07 October 2016, 13:08 | #1 |
Registered User
Join Date: Aug 2012
Location: RAM:
Posts: 83
|
C - minimal setup code for drawing graphics
http://pastebin.com/0tZPWPYX
Trying to get a nice baseline setup code for a game project, but something is wrong. A custom screen is set up, and I load a 32-col palette. Then I try to draw two lines. But I only get a grey screen with no lines? Maybe some of the screen/viewport/rasterport stuff is setup in the wrong order? I borrowed a lot of it from this projet-secret demo. Help is much appreciated. |
07 October 2016, 20:05 | #2 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
Just before InitRastPort put the following:
Code:
ras_info1.BitMap = &bit_map1; ras_info1.RxOffset = 0; ras_info1.RyOffset = 0; ras_info1.Next = NULL; |
09 October 2016, 18:36 | #3 |
Registered User
Join Date: Aug 2012
Location: RAM:
Posts: 83
|
Thanks alkis!
That makes sense, since there was nothing associating the raster port and the bitmap. |
06 February 2017, 22:07 | #4 |
Registered User
Join Date: Aug 2012
Location: RAM:
Posts: 83
|
I have discovered something annoying about this setup code. It needs Workbench to be running in order to work. If I run the executable from an ADF, the screen BitMap is not visible, only the AmigaDOS shell window behind.
If I put LoadWB first in Startup-Sequence it works. But I'd rather not. Is the code relying on a public WB screen being open? |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Minimal config for multiview | jotd | support.Apps | 17 | 14 March 2016 22:38 |
68000 minimal list of opcodes to know | kamelito | Coders. Asm / Hardware | 8 | 28 January 2014 21:43 |
A minimal request | jobro | Amiga scene | 3 | 29 December 2005 03:24 |
Plse help me setup the picasso graphics card | zardoz | New to Emulation or Amiga scene | 1 | 27 February 2004 18:15 |
just got a 1200 Tower Setup Needs Graphics Card ! Any Suggestions ? | xamigax | Retrogaming General Discussion | 10 | 02 April 2002 17:27 |
|
|