- Joined
- Sep 19, 2024
- Messages
- 25
- Reaction score
- 14
- Trophies
- 0
- Age
- 21
- Location
- North Rhine Westphalia
- Website
- github.com
- XP
- 419
- Country

I want to render sprites in specific order so one sprite is layered above the other.
But for some reason it doesn't work like I thought.
First I tried just rendering the above sprite after the underlying sprite.
Then I tried messing with
but that had no effect either.
Any idea why that's the case?
Any help is appreciated
But for some reason it doesn't work like I thought.
First I tried just rendering the above sprite after the underlying sprite.
C:
C2D_TargetClear(topPtr, C2D_Color32(0, 0, 0, 255));
C2D_SceneBegin(topPtr);
renderSprite(&sun, frames); //Sun
renderSprite(&ground, frames);
renderSprite(&groundExt, frames);
for (size_t i = 0; i < MAX_CLOUDS; i++)
{
curCloudPtr = &clouds[i];
if (curCloudPtr->frames[curCloudPtr->curIndex].params.pos.x >= -curCloudPtr->hitbox.width
&& curCloudPtr->frames[curCloudPtr->curIndex].params.pos.x <= TOP_SCREEN_WIDTH)
{
renderSprite(curCloudPtr, frames); //This should be rendered above the sun that's rendered first
}
}
renderSprite(&player.sprites[player.state], frames);
C3D_FrameEnd(0);
Then I tried messing with
C:
C2D_SpriteSetDepth();
Any idea why that's the case?
Any help is appreciated






