English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 07 October 2016, 13:08   #1
attle
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.
attle is offline  
Old 07 October 2016, 20:05   #2
alkis
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;
alkis is offline  
Old 09 October 2016, 18:36   #3
attle
Registered User
 
Join Date: Aug 2012
Location: RAM:
Posts: 83
Happy

Thanks alkis!

That makes sense, since there was nothing associating the raster port and the bitmap.
attle is offline  
Old 06 February 2017, 22:07   #4
attle
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?
attle is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:48.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11334 seconds with 15 queries