Page 1 of 1

Issues with sprites...

Posted: Sat May 04, 2013 7:03 am
by POLYGAMe
I'm going through the tutorials and the sprites aren't displaying on screen properly... but the main problem I have is I don't understand what this is doing:

_spritedef mySprite;

And it gives me an undeclared error. Is there an h file I am neglecting to include or something? Or is this another case of the tutorials being outdated?

Also, is GenRes still the only way to load .bmp images into sprites in the latest version of SGDK?

Cheers :)

Posted: Sat May 04, 2013 7:14 am
by POLYGAMe
Got it working by using SpriteDef... instead of _spriteDef. That right? still not 100% sure what I'm doing and my sprites look odd... lol... will keep at it :P

This C stuff is harder than making games in Unity. LOL.

Posted: Sat May 04, 2013 11:00 am
by Stef
Ah yeah, renamed to SpriteDef sorry :p
Of course plain C is definitely "not easy", and having outdated tutorials does not help neither. When you meet an error in the tutorial, try to look in the .h file which should be related to what you want to do, vdp_spr in the current case for instance...

Posted: Sat May 04, 2013 12:15 pm
by POLYGAMe
Stef wrote:Ah yeah, renamed to SpriteDef sorry :p
Of course plain C is definitely "not easy", and having outdated tutorials does not help neither. When you meet an error in the tutorial, try to look in the .h file which should be related to what you want to do, vdp_spr in the current case for instance...
Got it sorta working... Just not showing up as it should from the data in the array. I think I'll try with bmp sprites anyway.

Re: Issues with sprites...

Posted: Wed Feb 13, 2019 11:20 pm
by danibus
Hi, I'm doing sprite tutorial, same error, but doesn't solve using Spritedef instead _spritedef.
Put #include "vdp_spr.h" also doesn't solve problem.

Code: Select all

main.c|53|error: unknown type name '_spritedef'|


Would you be so kind to help me?

Re: Issues with sprites...

Posted: Thu Feb 14, 2019 7:07 am
by Stef
Forget that old tutorial, just look into the 'sprite' sample in SGDK, it up to date and easier to deal with :)