gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Patater's Introduction to Nintendo DS Programming > Chapter 5 & 6 Issue

#171098 - Alriightyman - Sat Oct 31, 2009 8:46 pm

Hi, I am going through the manual and have come across a few problems. The first probelm is in chapter 5. After completing it, the game compiles, and viewing it in an emulator the planet doesn't show up.
I thought I'd just ignore it for now and moved on to chapter 6.

In chapter 6, I get 3 errors:
Code:
main.o: In function `initSprites(OAMTable*, SpriteInfo*)':
d:/devDSGames/Tutorial/source/main.cpp(182): undefined reference to `rotateSprite(SpriteRotation*, int)'
main.o: In function `main':
d:/devDSGames/Tutorial/source/main.cpp(323): undefined reference to `initOAM(OAMTable*)'
d:/devDSGames/Tutorial/source/main.cpp(341): undefined reference to `updateOAM(OAMTable*)'
collect2: ld returned 1 exit status
make[1]: *** [/d/devDSGames/Tutorial/Tutorial.elf] Error 1
make: *** [build] Error 2
Build log was saved at "file://d:\devDSGames\Tutorial\Debug\BuildLog.htm"
Tutorial - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

I have gone over the tutorial and even replaced all the code with the file that comes with the manual, but I still get these errors. If you want me to post the code I can.
Thanks.

#171099 - vuurrobin - Sun Nov 01, 2009 12:15 am

last time I checked, pataters tutorial didn't used the latest libnds API and created some functions on its own. I suggest that you look at the libnds API to see what you need to create yourself and what has been created for you.

for instance, libnds already has an oamInit and an oamUpdate function.

you should also look at the libnds examples that comes with devkitPro.
_________________
my blog:
http://vuurrobin.100webcustomers.com/

#171105 - Alriightyman - Sun Nov 01, 2009 2:11 am

Ok, I'll check that out. Thanks!