From 4dd36687826dabdafa75f4dcf21d2548ed831f31 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Sun, 27 Aug 2023 22:35:25 -0400 Subject: [PATCH] Entity_Sub28 -> EntitySpriteInfo --- include/dungeon_entity.h | 2 +- include/sprite.h | 8 ++++---- src/code_806CD90.c | 4 ++-- src/sprite.c | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/dungeon_entity.h b/include/dungeon_entity.h index 7d9c9f448..b41211187 100644 --- a/include/dungeon_entity.h +++ b/include/dungeon_entity.h @@ -271,7 +271,7 @@ struct Entity // The global spawn index counter starts at 10. Each Pokémon that spawns increments the counter and // gets assigned the current counter value as its spawn index. /* 0x26 */ u16 spawnGenID; - /* 0x28*/ struct Entity_Sub28 sub28; + /* 0x28*/ struct EntitySpriteInfo spriteInfo; struct Dungeon_Sub17B44 *unk64; s16 unk68; u8 unk6A; diff --git a/include/sprite.h b/include/sprite.h index 4ade01359..d936a6633 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -30,7 +30,7 @@ struct unkStruct_20266B0 }; // size: ? 0x3C for now -struct Entity_Sub28 +struct EntitySpriteInfo { u16 unk0; // 0x2 and 0x6 seem to be related to the sprite animation, though not sure how they're related. @@ -90,9 +90,9 @@ void SetSavingIconCoords(struct Position *); void sub_8004E8C(struct unkStruct_2039DB0 *); void sub_8005180(void); void sub_8005304(void); -void sub_80053AC(struct Entity_Sub28 *, struct Dungeon_Sub17B44 *, u32, u32, u32, u32, bool8); -void sub_80053D0(struct Entity_Sub28 *, struct Dungeon_Sub17B44_Sub4 *, u32, u32, u32, u32, bool8); -void sub_800543C(struct Entity_Sub28 *, struct Dungeon_Sub17B44 *, u32, u32, u32, bool8); +void sub_80053AC(struct EntitySpriteInfo *, struct Dungeon_Sub17B44 *, u32, u32, u32, u32, bool8); +void sub_80053D0(struct EntitySpriteInfo *, struct Dungeon_Sub17B44_Sub4 *, u32, u32, u32, u32, bool8); +void sub_800543C(struct EntitySpriteInfo *, struct Dungeon_Sub17B44 *, u32, u32, u32, bool8); void sub_80054BC(struct axPokemon *); #endif // GUARD_SPRITE_H \ No newline at end of file diff --git a/src/code_806CD90.c b/src/code_806CD90.c index 1b8998fc1..9c5df0198 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -71,9 +71,9 @@ void sub_806CCB4(struct Entity *entity, u8 param_2) sVar1 = entity->unk68; if (info->waitingStatus != STATUS_DECOY && !flag) - sub_80053AC(&entity->sub28, entity->unk64, entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE); + sub_80053AC(&entity->spriteInfo, entity->unk64, entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE); else - sub_80053AC(&entity->sub28, sub_80687D0(MONSTER_DECOY), entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE); + sub_80053AC(&entity->spriteInfo, sub_80687D0(MONSTER_DECOY), entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE); entity->unk6E = 0; } diff --git a/src/sprite.c b/src/sprite.c index d95cd1090..186c4c382 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -20,7 +20,7 @@ extern struct unkStruct_20266B0 *gUnknown_203B074; extern void nullsub_3(s32, s32); void RegisterSpriteParts_80052BC(struct UnkSpriteMem *); -void sub_800545C(struct Entity_Sub28 *, struct Dungeon_Sub17B44_Sub4 *, u32, u32, u32, bool8); +void sub_800545C(struct EntitySpriteInfo *, struct Dungeon_Sub17B44_Sub4 *, u32, u32, u32, bool8); void InitSprites(void) { @@ -886,12 +886,12 @@ void sub_800533C(struct ax_pose **a0, struct UnkSpriteMem **a1, struct axdata1 * } } -void sub_80053AC(struct Entity_Sub28 *a0, struct Dungeon_Sub17B44 *a1, u32 a2, u32 a3, u32 a4, u32 spriteAnimIndex, bool8 a6) +void sub_80053AC(struct EntitySpriteInfo *a0, struct Dungeon_Sub17B44 *a1, u32 a2, u32 a3, u32 a4, u32 spriteAnimIndex, bool8 a6) { sub_80053D0(a0, a1->unk4, a2, a3, a4, spriteAnimIndex, a6); } -void sub_80053D0(struct Entity_Sub28 *a0, struct Dungeon_Sub17B44_Sub4 *a1, u32 a2, u32 direction, u32 a4, u32 spriteAnimIndex, bool8 a6) +void sub_80053D0(struct EntitySpriteInfo *a0, struct Dungeon_Sub17B44_Sub4 *a1, u32 a2, u32 direction, u32 a4, u32 spriteAnimIndex, bool8 a6) { a0->unk0 = 0x8000; if (a6) @@ -914,12 +914,12 @@ void sub_80053D0(struct Entity_Sub28 *a0, struct Dungeon_Sub17B44_Sub4 *a1, u32 a0->unk30 = a1->unk10; } -void sub_800543C(struct Entity_Sub28 *a0, struct Dungeon_Sub17B44 *a1, u32 a2, u32 a3, u32 spriteAnimIndex, bool8 a5) +void sub_800543C(struct EntitySpriteInfo *a0, struct Dungeon_Sub17B44 *a1, u32 a2, u32 a3, u32 spriteAnimIndex, bool8 a5) { sub_800545C(a0, a1->unk4, a2, a3, spriteAnimIndex, a5); } -void sub_800545C(struct Entity_Sub28 *a0, struct Dungeon_Sub17B44_Sub4 *a1, u32 a2, u32 a3, u32 spriteAnimIndex, bool8 a5) +void sub_800545C(struct EntitySpriteInfo *a0, struct Dungeon_Sub17B44_Sub4 *a1, u32 a2, u32 a3, u32 spriteAnimIndex, bool8 a5) { a0->unk0 = 0x8000; if (a5)