- 250
- Posts
- 7
- Years
- Seen Apr 23, 2025
I've been trying to add a simple overworld sprite into pokeemerald. I've added in all of the necessary data (as far as I can tell) into all of the proper files. I've added the indexed sprite png as well as it's proper palette. There are no errors or warnings when the ROM builds. I can even see the sprite when I place an object that uses the sprite into a map using PoryMap. However, when I actually play the game, the object is completely invisible, but still there, since the player avatar can't walk through it. If I have the object use a different sprite, it's visible. Based on some debugging, the issue seems to be related to the pic table of the sprite. When I changed only the pic table and kept everything else the same, the sprite appeared. Here is the pic table for the sprite that I've declared in src/data/object_events/object_event_pic_tables.h:
I've also attached the png file that holds the sprite pictures. I've tried deleting and rebuilding the sprite, reindexing, but none of it has worked. If anyone can explain why my sprite is invisible and how to make it visible, I would be greatly appreciative.
Code:
const struct SpriteFrameImage gObjectEventPicTable_Bulbasaur[] = {
overworld_frame(gObjectEventPic_Bulbasaur, 4, 4, 0),
overworld_frame(gObjectEventPic_Bulbasaur, 4, 4, 1),
overworld_frame(gObjectEventPic_Bulbasaur, 4, 4, 2),
overworld_frame(gObjectEventPic_Bulbasaur, 4, 4, 3),
overworld_frame(gObjectEventPic_Bulbasaur, 4, 4, 4),
overworld_frame(gObjectEventPic_Bulbasaur, 4, 4, 5),
};