Issues with sprites...

SGDK only sub forum

Moderator: Stef

Post Reply
POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Issues with sprites...

Post by POLYGAMe » Sat May 04, 2013 7:03 am

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 :)

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Post by POLYGAMe » Sat May 04, 2013 7:14 am

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.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sat May 04, 2013 11:00 am

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...

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Post by POLYGAMe » Sat May 04, 2013 12:15 pm

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.

danibus
Very interested
Posts: 135
Joined: Sat Feb 03, 2018 12:41 pm

Re: Issues with sprites...

Post by danibus » Wed Feb 13, 2019 11:20 pm

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?

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Issues with sprites...

Post by Stef » Thu Feb 14, 2019 7:07 am

Forget that old tutorial, just look into the 'sprite' sample in SGDK, it up to date and easier to deal with :)

Post Reply