|
@@ -0,0 +1,21 @@
|
|
1
|
+#include <pokeagb/pokeagb.h>
|
|
2
|
+
|
|
3
|
+const struct OamData item_oam = {.size = 2};
|
|
4
|
+
|
|
5
|
+void show_item_load_gfx(u16 item)
|
|
6
|
+{
|
|
7
|
+ struct SpriteTiles tiles = {.data = item_gfx_table[item].gfx, .size = 32*16, .tag = 0x1340};
|
|
8
|
+ struct SpritePalette pal = {.data = item_gfx_table[item].pal, .tag = 0x1340};
|
|
9
|
+ struct Template template = {
|
|
10
|
+ .tiles_tag = 0x1340,
|
|
11
|
+ .pal_tag = 0x1340,
|
|
12
|
+ .oam = &item_oam,
|
|
13
|
+ .animation = SPRITE_NO_ANIMATION,
|
|
14
|
+ .graphics = &tiles,
|
|
15
|
+ .rotscale = SPRITE_NO_ROTSCALE,
|
|
16
|
+ .callback = oac_nullsub
|
|
17
|
+ };
|
|
18
|
+ gpu_tile_obj_decompress_alloc_tag_and_upload(&tiles);
|
|
19
|
+ gpu_pal_obj_alloc_tag_and_apply(&pal);
|
|
20
|
+ template_instanciate_forward_search(&template, 100,100,0);
|
|
21
|
+}
|