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.
Code: Select all
C2D_SpriteFromSheet(&spr, sprsht, numImages);