• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Graphics] [pokeemerald] How Do Subsprites Work?

I've been trying to use the subsprites in pokeemerald, located in src/data/object_events/object_event_subsprites.h to have an object event's sprite be half cut-off vertically, meaning the left half is visible while the right half is invisible. I see that a similar process is used in regards to entering long grass, though it's a horizonal cut-off, making the bottom half invisible while keeping the top half visible. I've tried creating a new subsprite, using a similar pattern as the subsprite that is applied when walking in long grass, but changing the SPRITE_SHAPE and SPRITE_SIZE to be vertically oriented and having .x change instead of .y:
Code:
static const struct Subsprite sOamTable_32x32_5[] = {
    {
        .x = -16,
        .y = -16,
        .shape = SPRITE_SHAPE(16x32),
        .size = SPRITE_SIZE(16x32),
        .tileOffset = 0,
        .priority = 2
    },
    {
        .x = 0,
        .y = -16,
        .shape = SPRITE_SHAPE(16x32),
        .size = SPRITE_SIZE(16x32),
        .tileOffset = 8,
        .priority = 3
    }
};
This does not produce any kind of desirable result, unless you're goal was to make a corrupted-looking sprite. If anyone can point me to a subsprite tutorial, or at least explain to me how to accomplish my goal, I would be greatly appreciative.
 
Back
Top