Page 1 of 1

I can't display my sprite

Posted: Thu Jan 09, 2020 8:57 pm
by New Nova
Hello there.
I'm kinda new in 3ds dev.
So here's the problem : I can't draw my sprite.
It compiles, no errors, no warnings, but the sprite doesn't show.
Where's my error ?
Thanks !

Re: I can't display my sprite

Posted: Fri Jan 10, 2020 12:36 am
by fincs

Code: Select all

C2D_SpriteFromSheet(&spr, sprsht, numImages);
This line is wrong. It is literally selecting the image at the position "numImages"; i.e. one after the last one (because image ids start at 0), which doesn't exist. I think you want it to be 0 instead of numImages.

Re: I can't display my sprite

Posted: Fri Jan 10, 2020 8:57 pm
by New Nova
Hello there.
I managed just after posting the question.
Don't reply now XD