diff --git a/include/entity.h b/include/entity.h index b79d1d5a..14b963f3 100644 --- a/include/entity.h +++ b/include/entity.h @@ -50,7 +50,7 @@ typedef struct Entity { /*0x10*/ u8 flags; /*0x11*/ u8 scriptedScene : 4; /* */ u8 scriptedScene2 : 4; - /*0x12*/ s16 spriteTileSize; + /*0x12*/ s16 spriteIndex; /*0x14*/ u8 animationState; /*0x15*/ u8 direction; /*0x16*/ u8 possibleBool; diff --git a/src/code_08077DF4.c b/src/code_08077DF4.c index 467cbe35..3897a273 100644 --- a/src/code_08077DF4.c +++ b/src/code_08077DF4.c @@ -18,7 +18,7 @@ void sub_08077DF4(Entity *ent, u32 arg1) if ((arg1 & 0xff) > 0xb8) { arg1 += (ent->entityType).form >> 1; } - gLinkEntity.spriteTileSize = (short)(arg1 >> 8); + gLinkEntity.spriteIndex = (short)(arg1 >> 8); InitAnimationForceUpdate(&gLinkEntity, (u8)arg1); sub_08077E54(ent); } @@ -38,7 +38,7 @@ void sub_08077E3C(Entity *ent) void sub_08077E54(Entity *ent) { ent->action = gLinkEntity.animIndex; - *(u8 *)&ent->spriteTileSize = gLinkEntity.frameIndex; + *(u8 *)&ent->spriteIndex = gLinkEntity.frameIndex; ent->previousActionFlag = gLinkEntity.frameDuration; ent->actionDelay = gLinkEntity.frames.all; } diff --git a/src/item11.c b/src/item11.c index 4f90bba6..b464bdd9 100644 --- a/src/item11.c +++ b/src/item11.c @@ -56,7 +56,7 @@ void sub_08018CBC(Entity *this) } this->action = 2; this->spriteSettings.b.draw = 1; - this->spriteTileSize = 0xa6; + this->spriteIndex = 0xa6; this->palette = 0x33; this->spriteVramOffset = 0; (this->entityType).form = gLinkState.field_0x1d[0] - 1; diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c index 7c4bf877..c99cce93 100644 --- a/src/npc/townsperson.c +++ b/src/npc/townsperson.c @@ -192,7 +192,7 @@ void sub_08061E90(Entity* this, Entity* arg1) { if (arg1->spriteSettings.raw == 0) { arg1->spriteSettings.raw++; - arg1->spriteTileSize = (Random() & 0x3f) + 0x20; + arg1->spriteIndex = (Random() & 0x3f) + 0x20; animIndex = Random() & 0x18; switch (this->direction) { case 0x0: @@ -227,23 +227,23 @@ void sub_08061E90(Entity* this, Entity* arg1) { iVar4 = this->x.HALF.HI - *(s16*)&this->field_0x6a.HWORD; if (0x10 < iVar4) { this->x.HALF.HI = this->field_0x6a.HWORD + 0x10; - arg1->spriteTileSize = 1; + arg1->spriteIndex = 1; } if (iVar4 < -0x10) { this->x.HALF.HI = *(s16*)&this->field_0x6a.HWORD - 0x10; - arg1->spriteTileSize = 1; + arg1->spriteIndex = 1; } iVar4 = this->y.HALF.HI - *(s16*)&this->field_0x6c; if (0x10 < iVar4) { this->y.HALF.HI = *(s16*)&this->field_0x6c + 0x10; - arg1->spriteTileSize = 1; + arg1->spriteIndex = 1; } if (iVar4 < -0x10) { this->y.HALF.HI = *(s16*)&this->field_0x6c - 0x10; - arg1->spriteTileSize = 1; + arg1->spriteIndex = 1; } - if (--arg1->spriteTileSize != 0) { + if (--arg1->spriteIndex != 0) { gUnk_02033280[6] = 0; } }