설명 없음

show_item.c 720B

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