mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-28 00:39:30 +00:00
Added missing dependicies
This commit is contained in:
parent
03baa21c10
commit
ebcd9f00ed
47 changed files with 18405 additions and 0 deletions
45
libs/sfillib/sample/source/main.c
Normal file
45
libs/sfillib/sample/source/main.c
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#include <3ds.h>
|
||||
#include <sf2d.h>
|
||||
#include <sfil.h>
|
||||
|
||||
#include "citra_jpeg.h"
|
||||
#include "3dbrew_png.h"
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
sf2d_init();
|
||||
sf2d_set_clear_color(RGBA8(0x40, 0x40, 0x40, 0xFF));
|
||||
|
||||
sf2d_texture *tex1 = sfil_load_JPEG_buffer(citra_jpeg, citra_jpeg_size, SF2D_PLACE_RAM);
|
||||
sf2d_texture *tex2 = sfil_load_PNG_buffer(_3dbrew_png, SF2D_PLACE_RAM);
|
||||
|
||||
while (aptMainLoop()) {
|
||||
|
||||
hidScanInput();
|
||||
|
||||
if (hidKeysHeld() & KEY_START) {
|
||||
break;
|
||||
}
|
||||
|
||||
sf2d_start_frame(GFX_TOP, GFX_LEFT);
|
||||
|
||||
sf2d_draw_texture(tex1, 400/2 - tex1->width/2, 240/2 - tex1->height/2);
|
||||
|
||||
sf2d_end_frame();
|
||||
|
||||
sf2d_start_frame(GFX_BOTTOM, GFX_LEFT);
|
||||
|
||||
sf2d_draw_texture(tex2, 320/2 - tex2->width/2, 240/2 - tex2->height/2);
|
||||
|
||||
sf2d_end_frame();
|
||||
|
||||
sf2d_swapbuffers();
|
||||
}
|
||||
|
||||
sf2d_free_texture(tex1);
|
||||
sf2d_free_texture(tex2);
|
||||
|
||||
sf2d_fini();
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue