I can't display my sprite

Post Reply
New Nova
Posts: 2
Joined: Thu Jan 09, 2020 8:54 pm

I can't display my sprite

Post by New Nova » Thu Jan 09, 2020 8:57 pm

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 !
Attachments
main.c
(1.61 KiB) Downloaded 127 times
sprite.png
(174 Bytes) Not downloaded yet

User avatar
fincs
( ͡° ͜ʖ ͡°)
Posts: 78
Joined: Mon Jul 12, 2010 9:45 pm
Location: Seville, Spain
Contact:

Re: I can't display my sprite

Post by fincs » Fri Jan 10, 2020 12:36 am

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.
Donate to devkitPro - help us stay alive!

New Nova
Posts: 2
Joined: Thu Jan 09, 2020 8:54 pm

Re: I can't display my sprite

Post by New Nova » Fri Jan 10, 2020 8:57 pm

Hello there.
I managed just after posting the question.
Don't reply now XD

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests