GP32 The right way


Cyclops

Active Member
Joined
May 26, 2003
Messages
950
After doing the tile example ( I can't rember where I got it), I had a go a the pong lesson1 it had bits of c++(comments more than anything) and is split into 4 files(balldata.c,paddledata.c,gpmain.c,pong.h), I joined the ogether not knowing how to link the together for the devkit. It works fine and I'm quite pleased with the result, although how should I have got it to use c++ and the split header files for devkitadv this is my current batch file.

Code:
make
b2fxe -t "Pong" -b "icon.bmp" -a "cyclops" -r "PD" hello.gxb pong.fxe
del *.gxb
del *.o
del *.elf
..\emu\geepee32

and my mkefile
Code:
# devkitadv base dir
export CCBASE=c:/devkitadv
# User options passed to the compiler
export CUSER=-DLITTLE_ENDIAN -DGP32 -W -Wall -ansi -pedantic
include $(CCBASE)/gp32.mk
#------------------------------

all: hello.fxe

gpmain.o: gpmain.c

hello.elf: gpmain.o
	$(LINK)

hello.fxe: hello.gxb


clean:
	del hello.gxb hello.fxe hello.elf gpmain.o
I don't think the clean works it just comes up with an error, and i cannot put b2fxe in there either

I'ma also using jedit to edit my text and its not shoddy, but anything better would be a treat.
 
I converted some bmp files with gp32converter, although the colours seen to be all blue, I'm using an 8 bit pallet(16 bit shows the screen smaller and twice),just wondering what I'm doing wrong do I need to use a certain pallet? I assume the answer is fairly straightforward.
 
I found this referance to pallets, but still, If I try to save it as 16bit it converts the files to a const short[] when I need need an unsigned char[] for GpBitBlt. I could use the same palette for the images but currently am not familier how to use it. This has been helpful (8-bit Palette tutorial)but need know more about using the images in code.

btw GpDevUtilV20_en.exe blahhh
 
Cyclops posted on May 27 2003 said:
Code:
clean:
	del hello.gxb hello.fxe hello.elf gpmain.o
I don't think the clean works it just comes up with an error, and i cannot put b2fxe in there either
Change "del" to "rm" which stands for ReMove.
 
Last edited by a moderator:
Back
Top