Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: hayashi on September 05, 2009, 12:29:41 AM

Title: C with VBCC and NDK3.9
Post by: hayashi on September 05, 2009, 12:29:41 AM
Edit: Solved below problem, I needed more stack apparently. I'll keep posting in this topic when I need help though.

Hi,

I've set up VBCC and NDK3.9 on my Amiga, but trying to compile a program with includes to both exec/types.h and intuition/intuition.h causes four errors on line 34 of graphics/copper.h (incomplete type (WORD ) in struct, incomplete type () in struct, and two "declarator expected"). Setting it to C99 mode causes the WORD to become WORD aitPos (surely WORD VWaitPos?)

VBCC is currently looking for the system includes in NDK3.9/Includes/include_h.

Help?

Thanks, Matt
Title: Re: C with VBCC and NDK3.9
Post by: lsmart on September 05, 2009, 07:34:52 AM
exec/types.h has a lot of "#ifdef"s. For Example:
#ifdef OLD_TYPEDEFS

At least that´s what it´s like on 4.1.

I am working with gcc (on both 4.1 and 3.1 systems), so I don´t know what VBCCs best setup is, but maybe you have a look at types.h and define the variables in the environment according to your intuition. (I did´t mean Intuition(TM) ;-)   ) Maybe you should check what vbcc defines on its own first.

The C99 error seems completely weird. It just shouldn´t eat characters. Maybe it was caused by an incomplete build with the old setings was somehow mixed into the new build => make clean && make.
Title: Re: C with VBCC and NDK3.9
Post by: hayashi on September 05, 2009, 08:21:38 AM
@lsmart: The error was caused by not preceding the compiler with a stack-raising command, oddly enough. Thanks anyway!

NEW QUESTIONS!!

OK, I've progressed to the point where I can make a 320x256x256 menu-less Intuition screen that appears over the Workbench, and place a full-screen borderless window in it. From here, how might I...


Thanks, Matt
Title: Re: C with VBCC and NDK3.9
Post by: GMKai on September 05, 2009, 12:00:51 PM
may i point to
http://w3.norman-interactive.com/C-Kurs.html
even if it is in german...
Title: Re: C with VBCC and NDK3.9
Post by: xeron on September 05, 2009, 01:27:36 PM
The graphics library autodoc is your friend ;-)

Quote from: hayashi;522140
change the palette? (GetColorMap/something to do with viewports and SetRGB32/SetRGB32CM?

graphics.library/LoadRGB32()

Quote
change pen and write text on the screen?

graphics.library/SetDrMd()
graphics.library/SetAPen()
graphics.library/SetBPen()
graphics.library/Text()

Quote
fill areas on-screen?

graphics.library/RectFill()
graphics.library/AreaFill()


Quote
load ILBMs into memory and be able to blit them onto screen? (I see an ilbm.datatype and picture.datatype but not how to use them)

Have a look at the datatypes.library autodoc.
Title: Re: C with VBCC and NDK3.9
Post by: hayashi on September 05, 2009, 02:14:12 PM
The picture datatype documentation gives a load of methods to use with the datatype, but not their syntax or proper descriptions of what they do =/
Title: Re: C with VBCC and NDK3.9
Post by: hayashi on September 06, 2009, 01:17:28 AM
Another thing...

Text currently outputs in Topaz/8, which looks horrible in lowres. I tried to use DiskFont etc to load a different font, but this didn't work. Does anyone know how to use DiskFont properly? (I want to load a font called "Thin", size 8)
Title: Re: C with VBCC and NDK3.9
Post by: matthey on September 06, 2009, 02:19:27 PM
There should be source (example) for a datatype viewer in here...

http://www.aminet.net/pub/aminet/util/dtype/PNG_dt.lha

You can set a font when you open the screen with SA_Font. I think you would get better and faster help at http://utilitybase.com. It might help if you posted in a programming section too.