- Joined
- May 29, 2016
- Messages
- 1,511
- Trophies
- 0
- Age
- 28
- Location
- Madrid
- Website
- manuelrodriguezmatesanz.com
- XP
- 2,769
- Country
Hi there, can someone explain me how to use pictures with Citro2D (Citro3D?), as I don't understand the devkitpro's "gpusprites" example (they use a lot of sprites here, and from what I have understood, it all goes into 1 big t3x spritesheet ?)
Thanks to anyone who can point me the way to use pictures with Citro !
I recommend you to use PP2D. It is a modification of Citro2D so noob friendly. You can see my template here . You just need to create the texture with
Code:
pp2d_load_texture_png(TEXTURE_SPRITESHEET_ID,spritesheet);
and draw it with something like:
Code:
//Top screen
pp2d_begin_draw(GFX_TOP, GFX_LEFT);
pp2d_draw_texture_part(TEXTURE_SPRITESHEET_ID, xPosition, yPosition, xOffset, yOffset, SpriteWidth, SpriteHeight);
// Bottom screen
pp2d_draw_on(GFX_BOTTOM, GFX_LEFT);
pp2d_draw_texture_part(TEXTURE_SPRITESHEET_ID, xPosition, yPosition, xOffset, yOffset, SpriteWidth, SpriteHeight);
pp2d_end_draw();
For text:
Code:
pp2d_draw_text(xPosition, yPosition, sizeX, sizeY, rgbColor, "HELLO WORLD!!");