Welcome, Guest. Please login or register.

Author Topic: C with VBCC and NDK3.9  (Read 2717 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline hayashiTopic starter

  • Jr. Member
  • **
  • Join Date: Jan 2009
  • Posts: 82
    • Show only replies by hayashi
    • http://www.d-linc.co.uk
C with VBCC and NDK3.9
« 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
« Last Edit: September 05, 2009, 12:56:26 AM by hayashi »
[UK] A1200 with 2GB hard drive and Apollo 1240 040/33MHz/16MB FastRAM | A500+ with trapdoor memory upgrade and A520 modulator and no battery or power supply

Floppy Drive Grim Reaper and DPaint lover
 

Offline lsmart

  • Sr. Member
  • ****
  • Join Date: Jun 2009
  • Posts: 433
    • Show only replies by lsmart
Re: C with VBCC and NDK3.9
« Reply #1 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.
 

Offline hayashiTopic starter

  • Jr. Member
  • **
  • Join Date: Jan 2009
  • Posts: 82
    • Show only replies by hayashi
    • http://www.d-linc.co.uk
Re: C with VBCC and NDK3.9
« Reply #2 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...


  • change the palette? (GetColorMap/something to do with viewports and SetRGB32/SetRGB32CM?
  • change pen and write text on the screen?
  • fill areas on-screen?
  • 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)
Thanks, Matt
[UK] A1200 with 2GB hard drive and Apollo 1240 040/33MHz/16MB FastRAM | A500+ with trapdoor memory upgrade and A520 modulator and no battery or power supply

Floppy Drive Grim Reaper and DPaint lover
 

Offline GMKai

  • Newbie
  • *
  • Join Date: Mar 2002
  • Posts: 5
    • Show only replies by GMKai
Re: C with VBCC and NDK3.9
« Reply #3 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...
Horsepower and Computing?
---------Pegasos---------
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: C with VBCC and NDK3.9
« Reply #4 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.
Playstation Network ID: xeron6
 

Offline hayashiTopic starter

  • Jr. Member
  • **
  • Join Date: Jan 2009
  • Posts: 82
    • Show only replies by hayashi
    • http://www.d-linc.co.uk
Re: C with VBCC and NDK3.9
« Reply #5 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 =/
[UK] A1200 with 2GB hard drive and Apollo 1240 040/33MHz/16MB FastRAM | A500+ with trapdoor memory upgrade and A520 modulator and no battery or power supply

Floppy Drive Grim Reaper and DPaint lover
 

Offline hayashiTopic starter

  • Jr. Member
  • **
  • Join Date: Jan 2009
  • Posts: 82
    • Show only replies by hayashi
    • http://www.d-linc.co.uk
Re: C with VBCC and NDK3.9
« Reply #6 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)
[UK] A1200 with 2GB hard drive and Apollo 1240 040/33MHz/16MB FastRAM | A500+ with trapdoor memory upgrade and A520 modulator and no battery or power supply

Floppy Drive Grim Reaper and DPaint lover
 

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show only replies by matthey
Re: C with VBCC and NDK3.9
« Reply #7 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.