Create new entity structs for Objects

This commit is contained in:
octorock
2023-07-31 21:31:30 +02:00
parent eb233b05cd
commit 4d67e6fe1f
178 changed files with 3741 additions and 3500 deletions
+206 -193
View File
@@ -4,6 +4,7 @@
*
* @brief File Screen Objects object
*/
#define NENT_DEPRECATED
#include "fileselect.h"
#include "functions.h"
#include "main.h"
@@ -11,30 +12,39 @@
#include "object.h"
#include "player.h"
extern u32 sub_080041EC(int, int);
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u16 unk_68;
/*0x6a*/ u16 unk_6a;
/*0x6c*/ u16 unk_6c;
/*0x6e*/ u8 unused1[2];
/*0x70*/ u8 unk_70;
} FileScreenObjectsEntity;
extern u32 sub_080041EC(s32, s32);
static bool32 sub_0808E950(void);
static void sub_0808EABC(Entity*);
static Entity* sub_0808EC80(int);
static u32 sub_0808EF6C(Entity*);
static void sub_0808EFF0(Entity*);
static void sub_0808EA28(Entity*);
static void sub_0808E7D8(Entity*);
static void sub_0808E988(Entity*);
static void sub_0808E9F4(Entity*);
static void sub_0808EBB8(Entity*);
static void sub_0808ECBC(Entity*);
static void sub_0808ED64(Entity*);
static void sub_0808E9F4(Entity*);
static void sub_0808ED98(Entity*);
static void sub_0808EE00(Entity*);
static void nullsub_522(Entity*);
static void sub_0808EB74(Entity*);
static void sub_0808EE98(Entity*);
static void sub_0808EED8(Entity*);
static void sub_0808EF24(Entity*);
static void sub_0808E818(Entity*);
static void sub_0808E7F0(Entity*);
static void sub_0808EABC(FileScreenObjectsEntity*);
static Entity* sub_0808EC80(s32);
static u32 sub_0808EF6C(FileScreenObjectsEntity*);
static void sub_0808EFF0(FileScreenObjectsEntity*);
static void FileScreenObjects_Type0(FileScreenObjectsEntity*);
static void FileScreenObjects_Type23(FileScreenObjectsEntity*);
static void FileScreenObjects_Type24(FileScreenObjectsEntity*);
static void FileScreenObjects_Type25(FileScreenObjectsEntity*);
static void FileScreenObjects_Type16(FileScreenObjectsEntity*);
static void FileScreenObjects_Type4(FileScreenObjectsEntity*);
static void FileScreenObjects_Type8(FileScreenObjectsEntity*);
static void FileScreenObjects_Type25(FileScreenObjectsEntity*);
static void FileScreenObjects_Type9(FileScreenObjectsEntity*);
static void FileScreenObjects_Type10(FileScreenObjectsEntity*);
static void FileScreenObjects_Type17(FileScreenObjectsEntity*);
static void FileScreenObjects_Type15(FileScreenObjectsEntity*);
static void FileScreenObjects_Type18(FileScreenObjectsEntity*);
static void FileScreenObjects_Type19(FileScreenObjectsEntity*);
static void FileScreenObjects_Type21(FileScreenObjectsEntity*);
static void FileScreenObjects_Type23_Action1(FileScreenObjectsEntity*);
static void FileScreenObjects_Type23_Init(FileScreenObjectsEntity*);
typedef struct {
u8 unk0;
@@ -52,58 +62,61 @@ typedef struct {
u8 unk7;
} struct_08121D54;
extern const int gUnk_08133368[];
extern const s32 gUnk_08133368[];
void FileScreenObjects(Entity* this) {
static void (*const gUnk_08121C64[])(Entity*) = {
sub_0808EA28, sub_0808EA28, sub_0808EA28, sub_0808EA28, sub_0808ECBC, sub_0808ECBC, sub_0808ECBC,
sub_0808ECBC, sub_0808ED64, sub_0808ED98, sub_0808EE00, sub_0808EE00, sub_0808EE00, sub_0808EE00,
sub_0808EE00, sub_0808EB74, sub_0808EBB8, nullsub_522, sub_0808EE98, sub_0808EED8, sub_0808EED8,
sub_0808EF24, sub_0808EF24, sub_0808E7D8, sub_0808E988, sub_0808E9F4,
void FileScreenObjects(FileScreenObjectsEntity* this) {
static void (*const FileScreenObjects_Types[])(FileScreenObjectsEntity*) = {
FileScreenObjects_Type0, FileScreenObjects_Type0, FileScreenObjects_Type0, FileScreenObjects_Type0,
FileScreenObjects_Type4, FileScreenObjects_Type4, FileScreenObjects_Type4, FileScreenObjects_Type4,
FileScreenObjects_Type8, FileScreenObjects_Type9, FileScreenObjects_Type10, FileScreenObjects_Type10,
FileScreenObjects_Type10, FileScreenObjects_Type10, FileScreenObjects_Type10, FileScreenObjects_Type15,
FileScreenObjects_Type16, FileScreenObjects_Type17, FileScreenObjects_Type18, FileScreenObjects_Type19,
FileScreenObjects_Type19, FileScreenObjects_Type21, FileScreenObjects_Type21, FileScreenObjects_Type23,
FileScreenObjects_Type24, FileScreenObjects_Type25,
};
if (this->health == 0) {
if (super->health == 0) {
sub_0808EFF0(this);
}
gUnk_08121C64[this->type](this);
if (this->animIndex < 64) {
UpdateAnimationSingleFrame(this);
FileScreenObjects_Types[super->type](this);
if (super->animIndex < 64) {
UpdateAnimationSingleFrame(super);
}
}
void sub_0808E7D8(Entity* this) {
static void (*const gUnk_08121CCC[])(Entity*) = {
sub_0808E7F0,
sub_0808E818,
void FileScreenObjects_Type23(FileScreenObjectsEntity* this) {
static void (*const FileScreenObjects_Type23_Actions[])(FileScreenObjectsEntity*) = {
FileScreenObjects_Type23_Init,
FileScreenObjects_Type23_Action1,
};
gUnk_08121CCC[this->action](this);
FileScreenObjects_Type23_Actions[super->action](this);
}
void sub_0808E7F0(Entity* this) {
LoadSwapGFX(this, 1, 2);
this->palette.b.b0 = 0xF;
this->spriteSettings.draw = 0;
this->type2 = 0xFF;
this->action = 1;
void FileScreenObjects_Type23_Init(FileScreenObjectsEntity* this) {
LoadSwapGFX(super, 1, 2);
super->palette.b.b0 = 0xF;
super->spriteSettings.draw = 0;
super->type2 = 0xFF;
super->action = 1;
}
void sub_0808E818(Entity* this) {
void FileScreenObjects_Type23_Action1(FileScreenObjectsEntity* this) {
u32 var0;
u32 offset;
if (!sub_0808E950()) {
int var2 = -1;
this->type2 = var2;
this->field_0x68.HWORD = var2;
this->field_0x6a.HWORD = var2;
this->spriteSettings.draw = 0;
s32 var2 = -1;
super->type2 = var2;
this->unk_68 = var2;
this->unk_6a = var2;
super->spriteSettings.draw = 0;
return;
}
if (this->type2 != gMapDataBottomSpecial.unk6) {
this->type2 = gMapDataBottomSpecial.unk6;
this->field_0x68.HWORD = CheckGlobalFlag(EZERO_1ST) == 0 ? 0x400 : 0x100;
this->field_0x70.BYTES.byte0 = 4;
this->animationState = 2;
if (super->type2 != gMapDataBottomSpecial.unk6) {
super->type2 = gMapDataBottomSpecial.unk6;
this->unk_68 = CheckGlobalFlag(EZERO_1ST) == 0 ? 0x400 : 0x100;
this->unk_70 = 4;
super->animationState = 2;
offset = gUnk_08133368[GetPlayerPalette(TRUE) - 22] & 0xFFFFFF;
LoadPalettes(&gGlobalGfxAndPalettes[offset], 31, 1);
}
@@ -112,33 +125,33 @@ void sub_0808E818(Entity* this) {
if (gInput.heldKeys & L_BUTTON) {
switch (gInput.newKeys) {
case DPAD_UP:
this->animationState = 0;
super->animationState = 0;
break;
case DPAD_RIGHT:
this->animationState = 1;
super->animationState = 1;
break;
case DPAD_DOWN:
this->animationState = 2;
super->animationState = 2;
break;
case DPAD_LEFT:
this->animationState = 3;
super->animationState = 3;
break;
case B_BUTTON:
this->field_0x70.BYTES.byte0 = this->field_0x70.BYTES.byte0 ? 0 : 4;
this->unk_70 = this->unk_70 ? 0 : 4;
break;
}
}
}
this->spriteSettings.flipX = this->animationState == 3;
var0 = this->field_0x68.HWORD + this->field_0x70.BYTES.byte0 + this->animationState;
if (this->field_0x6a.HWORD != var0) {
this->field_0x6a.HWORD = var0;
this->spriteIndex = var0 >> 8;
InitAnimationForceUpdate(this, (u8)var0);
super->spriteSettings.flipX = super->animationState == 3;
var0 = this->unk_68 + this->unk_70 + super->animationState;
if (this->unk_6a != var0) {
this->unk_6a = var0;
super->spriteIndex = var0 >> 8;
InitAnimationForceUpdate(super, (u8)var0);
}
this->spriteSettings.draw = 2;
super->spriteSettings.draw = 2;
}
static bool32 sub_0808E950(void) {
@@ -155,20 +168,20 @@ static bool32 sub_0808E950(void) {
return result;
}
void sub_0808E988(Entity* this) {
if (this->action == 0) {
this->action = 1;
void FileScreenObjects_Type24(FileScreenObjectsEntity* this) {
if (super->action == 0) {
super->action = 1;
#ifdef EU
this->spriteIndex = 0x141;
super->spriteIndex = 0x141;
#else
this->spriteIndex = 0x142;
super->spriteIndex = 0x142;
#endif
this->type2 = 0xFF;
LoadSwapGFX(this, 1, 3);
super->type2 = 0xFF;
LoadSwapGFX(super, 1, 3);
}
if (sub_0808E950()) {
int i;
s32 i;
for (i = 6; i != 0; i--) {
if (GetInventoryValue(i)) {
break;
@@ -176,42 +189,42 @@ void sub_0808E988(Entity* this) {
}
if (i != 0) {
if (this->type2 != i) {
InitAnimationForceUpdate(this, i);
if (super->type2 != i) {
InitAnimationForceUpdate(super, i);
}
this->spriteSettings.draw = 2;
super->spriteSettings.draw = 2;
return;
}
}
this->spriteSettings.draw = 0;
super->spriteSettings.draw = 0;
}
void sub_0808E9F4(Entity* this) {
void FileScreenObjects_Type25(FileScreenObjectsEntity* this) {
if (sub_0808E950() && gSave.saw_staffroll) {
this->spriteSettings.draw = 2;
super->spriteSettings.draw = 2;
} else {
this->spriteSettings.draw = 0;
super->spriteSettings.draw = 0;
}
}
void sub_0808EA28(Entity* this) {
void FileScreenObjects_Type0(FileScreenObjectsEntity* this) {
u32 var0;
u32 var1;
if (this->type == 3) {
if (super->type == 3) {
if (gSaveHeader->language > LANGUAGE_EN) {
this->spriteSettings.draw = 2;
super->spriteSettings.draw = 2;
} else {
this->spriteSettings.draw = 0;
super->spriteSettings.draw = 0;
}
}
if (this->type == gMapDataBottomSpecial.unk6) {
if (super->type == gMapDataBottomSpecial.unk6) {
var0 = 12;
var1 = 1;
} else {
if (gUI.lastState == 5 && this->type == gMapDataBottomSpecial.unk7) {
if (gUI.lastState == 5 && super->type == gMapDataBottomSpecial.unk7) {
var0 = 13;
var1 = 2;
} else {
@@ -220,16 +233,16 @@ void sub_0808EA28(Entity* this) {
}
}
this->palette.b.b0 = var0;
this->spriteRendering.b3 = var1;
super->palette.b.b0 = var0;
super->spriteRendering.b3 = var1;
sub_0808EABC(this);
gMapDataBottomSpecial.isTransitioning |= sub_0808EF6C(this);
}
void sub_0808EABC(Entity* this) {
int var0 = -72;
int var1 = this->type * 32 + 40;
int var2 = gMapDataBottomSpecial.unk6 == this->type;
void sub_0808EABC(FileScreenObjectsEntity* this) {
s32 var0 = -72;
s32 var1 = super->type * 32 + 40;
s32 var2 = gMapDataBottomSpecial.unk6 == super->type;
switch (gUI.lastState) {
case 0:
var0 = 24;
@@ -244,7 +257,7 @@ void sub_0808EABC(Entity* this) {
}
break;
case 5:
switch (gGenericMenu.unk10.a[this->type]) {
switch (gGenericMenu.unk10.a[super->type]) {
case 0:
var0 = 42;
var1 = 40;
@@ -253,7 +266,7 @@ void sub_0808EABC(Entity* this) {
case 2:
var0 = 20;
var1 = 144;
var1 -= (gGenericMenu.unk16 - gGenericMenu.unk10.a[this->type]) * 32;
var1 -= (gGenericMenu.unk16 - gGenericMenu.unk10.a[super->type]) * 32;
break;
}
break;
@@ -271,24 +284,24 @@ void sub_0808EABC(Entity* this) {
break;
}
this->field_0x68.HWORD = var0;
this->field_0x6a.HWORD = var1;
this->unk_68 = var0;
this->unk_6a = var1;
}
void sub_0808EB74(Entity* this) {
void FileScreenObjects_Type15(FileScreenObjectsEntity* this) {
Entity* entity = sub_0808EC80(gMapDataBottomSpecial.unk6);
if (entity != NULL) {
this->x.WORD = entity->x.WORD;
this->y.WORD = entity->y.WORD;
this->spriteRendering.b3 = entity->spriteRendering.b3;
SortEntityBelow(entity, this);
super->x.WORD = entity->x.WORD;
super->y.WORD = entity->y.WORD;
super->spriteRendering.b3 = entity->spriteRendering.b3;
SortEntityBelow(entity, super);
} else {
this->x.HALF.HI = 0xF000;
this->y.HALF.HI = 0xF000;
super->x.HALF.HI = 0xF000;
super->y.HALF.HI = 0xF000;
}
}
void sub_0808EBB8(Entity* this) {
void FileScreenObjects_Type16(FileScreenObjectsEntity* this) {
u32 var0;
u32 x, y;
Entity* entity;
@@ -331,19 +344,19 @@ void sub_0808EBB8(Entity* this) {
default:
entity = sub_0808EC80(var0);
if (entity != NULL) {
SortEntityBelow(entity, this);
this->spriteRendering.b3 = entity->spriteRendering.b3;
SortEntityBelow(entity, super);
super->spriteRendering.b3 = entity->spriteRendering.b3;
x = entity->x.HALF.HI;
y = entity->y.HALF.HI;
}
break;
}
this->x.HALF.HI = x;
this->y.HALF.HI = y;
super->x.HALF.HI = x;
super->y.HALF.HI = y;
}
static Entity* sub_0808EC80(int form) {
static Entity* sub_0808EC80(s32 form) {
Entity* entityA = (Entity*)&gEntityLists[6];
Entity* entityB = entityA->next;
while (entityB != entityA) {
@@ -355,7 +368,7 @@ static Entity* sub_0808EC80(int form) {
return NULL;
}
void sub_0808ECBC(Entity* this) {
void FileScreenObjects_Type4(FileScreenObjectsEntity* this) {
static const struct_08121CD4 gUnk_08121CD4[][4] = {
{ { 0x9, 0x18, 0xb0 }, { 0x9, 0x60, 0xb0 }, { 0x9, 0xa8, 0xb0 }, { 0x9, 0x40, 0xb0 } },
{ { 0x0, 0x18, 0x90 }, { 0x1, 0x60, 0x90 }, { 0x2, 0xa8, 0x90 }, { 0x9, 0x40, 0xb0 } },
@@ -363,9 +376,9 @@ void sub_0808ECBC(Entity* this) {
{ { 0x9, 0x18, 0xb0 }, { 0x9, 0x60, 0xb0 }, { 0x1, 0x88, 0x90 }, { 0x0, 0x40, 0x90 } },
{ { 0x0, 0x18, 0x90 }, { 0x9, 0x60, 0xb0 }, { 0x9, 0xa8, 0xb0 }, { 0x9, 0x40, 0xb0 } }
};
int var0;
int var1;
int var2;
s32 var0;
s32 var1;
s32 var2;
const struct_08121CD4* var3;
var0 = gMenu.column_idx;
@@ -388,66 +401,66 @@ void sub_0808ECBC(Entity* this) {
break;
}
var2 = this->type - 4;
var2 = super->type - 4;
var3 = &gUnk_08121CD4[var1][var2];
this->field_0x68.HWORD = var3->unk1;
this->field_0x6a.HWORD = var3->unk2;
this->unk_68 = var3->unk1;
this->unk_6a = var3->unk2;
if (var3->unk0 == var0) {
this->palette.b.b0 = 13;
super->palette.b.b0 = 13;
} else {
this->palette.b.b0 = 14;
super->palette.b.b0 = 14;
}
gMapDataBottomSpecial.isTransitioning |= sub_0808EF6C(this);
}
void sub_0808ED64(Entity* this) {
int y = 255;
void FileScreenObjects_Type8(FileScreenObjectsEntity* this) {
s32 y = 255;
if (gUI.lastState == 1 && gGenericMenu.unk10.a[1] != 5) {
this->x.HALF.HI = gGenericMenu.unk10.a[0] * 16 + 28;
super->x.HALF.HI = gGenericMenu.unk10.a[0] * 16 + 28;
y = gGenericMenu.unk10.a[1] * 16 + 58;
}
this->y.HALF.HI = y;
super->y.HALF.HI = y;
}
void sub_0808ED98(Entity* this) {
void FileScreenObjects_Type9(FileScreenObjectsEntity* this) {
static const s8 gUnk_08121D10[] = {
0, -1, -3, -2, -2, -1, 0, 0,
};
int y;
s32 y;
if (gUI.lastState != 1) {
this->field_0x68.HWORD = 27;
this->unk_68 = 27;
y = -10;
} else {
u32 var0 = gGenericMenu.unk10.a[3];
if (var0 > 5) {
var0 = 5;
}
this->field_0x68.HWORD = var0 * 8 + 27;
this->unk_68 = var0 * 8 + 27;
y = 24;
}
this->y.HALF.HI = y;
this->field_0x6a.HWORD = y;
this->subtimer++;
this->spriteOffsetY = gUnk_08121D10[(this->subtimer / 4) & 0x7];
super->y.HALF.HI = y;
this->unk_6a = y;
super->subtimer++;
super->spriteOffsetY = gUnk_08121D10[(super->subtimer / 4) & 0x7];
sub_0808EF6C(this);
}
void sub_0808EE00(Entity* this) {
void FileScreenObjects_Type10(FileScreenObjectsEntity* this) {
static const u16 gUnk_08121D18[][8] = { { 0x2c, 0x54, 0x7c, 0xa4, 0xcc, 0x0, 0x0, 0x0 },
{ 0xfff, 0x2e, 0x62, 0x96, 0xca, 0x0, 0x0, 0x0 } };
static const u8 gUnk_08121D38[][8] = {
{ 12, 13, 14, 16, 17, 0, 0, 0 },
{ -1, 14, 15, 16, 17, 0, 0, 0 },
};
int var0, var1, var2;
s32 var0, var1, var2;
var0 = ((SaveHeader*)0x2000000)->language != 0;
var1 = this->type - 10;
this->frameIndex = gUnk_08121D38[var0][var1];
this->x.HALF.HI = gUnk_08121D18[var0][var1];
this->field_0x68.HWORD = gUnk_08121D18[var0][var1];
var1 = super->type - 10;
super->frameIndex = gUnk_08121D38[var0][var1];
super->x.HALF.HI = gUnk_08121D18[var0][var1];
this->unk_68 = gUnk_08121D18[var0][var1];
var1 -= var0;
if (gUI.lastState != 1) {
var1 = 128;
@@ -456,81 +469,81 @@ void sub_0808EE00(Entity* this) {
var2 = 140;
}
this->field_0x6a.HWORD = var2;
this->palette.b.b0 = gGenericMenu.unk10.a[1] == 5 && var1 == gGenericMenu.unk10.a[2] ? 11 : 9;
this->unk_6a = var2;
super->palette.b.b0 = gGenericMenu.unk10.a[1] == 5 && var1 == gGenericMenu.unk10.a[2] ? 11 : 9;
gMapDataBottomSpecial.isTransitioning |= sub_0808EF6C(this);
}
void nullsub_522(Entity* this) {
void FileScreenObjects_Type17(FileScreenObjectsEntity* this) {
}
void sub_0808EE98(Entity* this) {
void FileScreenObjects_Type18(FileScreenObjectsEntity* this) {
static const u8 gUnk_08121D48[] = { 0x28, 0x27, 0x28, 0x28, 0x28, 0x2a, 0x29, 0x28, 0xff, 0x0, 0x0, 0x0 };
this->timer = gUI.lastState;
this->frameIndex = gUnk_08121D48[this->timer];
if (this->timer != 2) {
this->field_0x68.HWORD = 96;
super->timer = gUI.lastState;
super->frameIndex = gUnk_08121D48[super->timer];
if (super->timer != 2) {
this->unk_68 = 96;
} else {
this->field_0x68.HWORD = -96;
this->unk_68 = -96;
}
sub_0808EF6C(this);
}
void sub_0808EED8(Entity* this) {
int var0;
void FileScreenObjects_Type19(FileScreenObjectsEntity* this) {
s32 var0;
if (gUI.lastState != 3) {
this->spriteSettings.draw = 0;
super->spriteSettings.draw = 0;
} else {
this->spriteSettings.draw = 2;
var0 = this->type - 19;
this->palette.b.b0 = gMenu.column_idx == var0 ? 4 : 3;
super->spriteSettings.draw = 2;
var0 = super->type - 19;
super->palette.b.b0 = gMenu.column_idx == var0 ? 4 : 3;
}
}
void sub_0808EF24(Entity* this) {
int var0;
void FileScreenObjects_Type21(FileScreenObjectsEntity* this) {
s32 var0;
if (gUI.lastState != 3) {
this->spriteSettings.draw = 0;
super->spriteSettings.draw = 0;
} else {
this->spriteSettings.draw = 2;
if (this->type == 21) {
super->spriteSettings.draw = 2;
if (super->type == 21) {
var0 = ((SaveHeader*)0x2000000)->msg_speed;
} else {
var0 = ((SaveHeader*)0x2000000)->brightness;
}
this->frameIndex = this->lastFrameIndex + var0;
super->frameIndex = super->lastFrameIndex + var0;
}
}
static u32 sub_0808EF6C(Entity* this) {
int var0;
static u32 sub_0808EF6C(FileScreenObjectsEntity* this) {
s32 var0;
u32 var1;
int var2;
s32 var2;
u32 var3;
int var4;
s32 var4;
s16 var5;
s16 var6;
int var7;
s32 var7;
var6 = this->field_0x68.HWORD;
var0 = var6 - this->x.HALF.HI;
var6 = this->unk_68;
var0 = var6 - super->x.HALF.HI;
var1 = var0;
if (var0 < 0) {
var1 = -var0;
}
if (var1 < 2) {
this->x.WORD = var6 << 16;
super->x.WORD = var6 << 16;
var0 = 0;
}
var5 = this->field_0x6a.HWORD;
var2 = var5 - this->y.HALF.HI;
var5 = this->unk_6a;
var2 = var5 - super->y.HALF.HI;
var3 = var2;
if (var2 < 0) {
var3 = -var2;
}
if (var3 < 2) {
this->y.WORD = var5 << 16;
super->y.WORD = var5 << 16;
var2 = 0;
}
@@ -541,16 +554,16 @@ static u32 sub_0808EF6C(Entity* this) {
var4 = var7 = sub_080041EC(var0, var2);
var4 += 128;
var7 = var4 + var7 * 16;
if (this->field_0x6c.HWORD < var7) {
var7 = this->field_0x6c.HWORD;
if (this->unk_6c < var7) {
var7 = this->unk_6c;
}
this->speed = var7;
this->direction = sub_080045DA(var0, var2) >> 3;
LinearMoveUpdate(this);
super->speed = var7;
super->direction = sub_080045DA(var0, var2) >> 3;
LinearMoveUpdate(super);
return 1;
}
static void sub_0808EFF0(Entity* this) {
static void sub_0808EFF0(FileScreenObjectsEntity* this) {
static const struct_08121D54 gUnk_08121D54[] = {
{ 0x800, -0x40, 0x28, 2, 4, 1, 0x80 }, { 0x800, -0x40, 0x48, 2, 4, 1, 0x81 },
{ 0x800, -0x40, 0x68, 2, 4, 1, 0x82 }, { 0x800, -0x40, 0x88, 2, 4, 1, 0x83 },
@@ -569,26 +582,26 @@ static void sub_0808EFF0(Entity* this) {
const struct_08121D54* var0;
u8 var1;
this->spriteSettings.draw = 2;
this->speed = 0x400;
this->health = 1;
this->frameIndex = 0xFF;
this->animIndex = 0xFF;
var0 = &gUnk_08121D54[this->type];
this->x.HALF.HI = var0->unk2;
this->field_0x68.HWORD = var0->unk2;
this->y.HALF.HI = var0->unk4;
this->field_0x6a.HWORD = var0->unk4;
this->spriteRendering.b3 = var0->unk6_0;
this->spritePriority.b0 = var0->unk6_3;
this->spriteOrientation.flipY = var0->unk6_6;
this->field_0x6c.HWORD = var0->unk0;
super->spriteSettings.draw = 2;
super->speed = 0x400;
super->health = 1;
super->frameIndex = 0xFF;
super->animIndex = 0xFF;
var0 = &gUnk_08121D54[super->type];
super->x.HALF.HI = var0->unk2;
this->unk_68 = var0->unk2;
super->y.HALF.HI = var0->unk4;
this->unk_6a = var0->unk4;
super->spriteRendering.b3 = var0->unk6_0;
super->spritePriority.b0 = var0->unk6_3;
super->spriteOrientation.flipY = var0->unk6_6;
this->unk_6c = var0->unk0;
var1 = var0->unk7;
if (var1 & 0x80) {
var1 &= ~(0x80);
this->frameIndex = var1;
this->lastFrameIndex = var1;
super->frameIndex = var1;
super->lastFrameIndex = var1;
} else {
InitAnimationForceUpdate(this, var1);
InitAnimationForceUpdate(super, var1);
}
}