mirror of
https://github.com/zeldaret/tmc
synced 2026-07-11 15:28:41 -04:00
rename functions and clean some code
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
.syntax unified
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
movs r5, #0
|
||||
adds r0, #0x75
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #2
|
||||
beq _0803E046
|
||||
bl Random
|
||||
movs r1, #1
|
||||
ands r1, r0
|
||||
cmp r1, #0
|
||||
beq _0803E046
|
||||
movs r0, #0
|
||||
b _0803E082
|
||||
_0803E046:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x77
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #1
|
||||
bne _0803E080
|
||||
ldr r2, _0803E084 @ =gRoomControls
|
||||
ldrh r0, [r2, #6]
|
||||
adds r1, r0, #0
|
||||
adds r1, #0x58
|
||||
ldr r0, _0803E088 @ =gPlayerEntity
|
||||
movs r3, #0x2e
|
||||
ldrsh r0, [r0, r3]
|
||||
cmp r1, r0
|
||||
bgt _0803E080
|
||||
ldrh r2, [r2, #8]
|
||||
adds r1, r2, #0
|
||||
adds r1, #0x58
|
||||
cmp r1, r0
|
||||
bgt _0803E080
|
||||
adds r1, r2, #0
|
||||
adds r1, #0xf8
|
||||
cmp r1, r0
|
||||
blt _0803E080
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x81
|
||||
ldrb r0, [r1]
|
||||
adds r0, #5
|
||||
strb r0, [r1]
|
||||
movs r5, #1
|
||||
_0803E080:
|
||||
adds r0, r5, #0
|
||||
_0803E082:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_0803E084: .4byte gRoomControls
|
||||
_0803E088: .4byte gPlayerEntity
|
||||
.syntax divided
|
||||
@@ -1,86 +0,0 @@
|
||||
|
||||
.syntax unified
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r1, _08066B18 @ =sub_08066B74
|
||||
bl sub_0807DD94
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x69
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
beq _08066AF6
|
||||
ldr r0, _08066B1C @ =gScreenTransition
|
||||
ldr r0, [r0]
|
||||
movs r1, #3
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
bne _08066AF6
|
||||
adds r0, r4, #0
|
||||
bl sub_08095CB0
|
||||
_08066AF6:
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x5a
|
||||
ldrb r2, [r1]
|
||||
movs r0, #0x81
|
||||
rsbs r0, r0, #0
|
||||
ands r2, r0
|
||||
adds r5, r1, #0
|
||||
cmp r2, #0
|
||||
beq _08066B6E
|
||||
cmp r2, #2
|
||||
beq _08066B34
|
||||
cmp r2, #2
|
||||
bhi _08066B20
|
||||
cmp r2, #1
|
||||
beq _08066B2A
|
||||
b _08066B66
|
||||
.align 2, 0
|
||||
_08066B18: .4byte sub_08066B74
|
||||
_08066B1C: .4byte gScreenTransition
|
||||
_08066B20:
|
||||
cmp r2, #3
|
||||
beq _08066B40
|
||||
cmp r2, #4
|
||||
beq _08066B52
|
||||
b _08066B66
|
||||
_08066B2A:
|
||||
movs r0, #0x87
|
||||
lsls r0, r0, #2
|
||||
bl EnqueueSFX
|
||||
b _08066B66
|
||||
_08066B34:
|
||||
ldr r0, _08066B3C @ =0x0000021E
|
||||
bl EnqueueSFX
|
||||
b _08066B66
|
||||
.align 2, 0
|
||||
_08066B3C: .4byte 0x0000021E
|
||||
_08066B40:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x84
|
||||
ldr r1, [r0]
|
||||
movs r0, #4
|
||||
str r0, [r1, #4]
|
||||
adds r0, r4, #0
|
||||
bl CreateManager36
|
||||
b _08066B66
|
||||
_08066B52:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x84
|
||||
ldr r1, [r0]
|
||||
str r2, [r1, #4]
|
||||
adds r0, r4, #0
|
||||
bl DeleteManager36
|
||||
ldr r0, _08066B70 @ =0x0000021D
|
||||
bl EnqueueSFX
|
||||
_08066B66:
|
||||
ldrb r1, [r5]
|
||||
movs r0, #0x7f
|
||||
ands r0, r1
|
||||
strb r0, [r5]
|
||||
_08066B6E:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_08066B70: .4byte 0x0000021D
|
||||
.syntax divided
|
||||
+4
-4
@@ -95,12 +95,12 @@ typedef enum {
|
||||
/*0x57*/ MINI_SLIME,
|
||||
/*0x58*/ FIREBALL_GUY,
|
||||
/*0x59*/ MINI_FIREBALL_GUY,
|
||||
/*0x5a*/ ENEMY_5A,
|
||||
/*0x5a*/ VAATI_TRANSFIGURED_EYE,
|
||||
/*0x5b*/ BUSINESS_SCRUB_PROLOGUE,
|
||||
/*0x5c*/ GYORG_FEMALE,
|
||||
/*0x5d*/ GYORG_MALE,
|
||||
/*0x5e*/ CURTAIN,
|
||||
/*0x5f*/ ENEMY_5F,
|
||||
/*0x5f*/ VAATI_WRATH_EYE,
|
||||
/*0x60*/ GYORG_CHILD,
|
||||
/*0x61*/ GYORG_FEMALE_EYE,
|
||||
/*0x62*/ ENEMY_62,
|
||||
@@ -199,12 +199,12 @@ extern void Slime(Entity*);
|
||||
extern void MiniSlime(Entity*);
|
||||
extern void FireballGuy(Entity*);
|
||||
extern void MiniFireballGuy(Entity*);
|
||||
extern void Enemy5A(Entity*);
|
||||
extern void VaatiTransfiguredEye(Entity*);
|
||||
extern void BusinessScrubPrologue(Entity*);
|
||||
extern void GyorgFemale(Entity*);
|
||||
extern void GyorgMale(Entity*);
|
||||
extern void Curtain(Entity*);
|
||||
extern void Enemy5F(Entity*);
|
||||
extern void VaatiWrathEye(Entity*);
|
||||
extern void GyorgChild(Entity*);
|
||||
extern void GyorgFemaleEye(Entity*);
|
||||
extern void Enemy62(Entity*);
|
||||
|
||||
@@ -455,12 +455,12 @@ SECTIONS {
|
||||
src/enemy/miniSlime.o(.text);
|
||||
src/enemy/fireballGuy.o(.text);
|
||||
src/enemy/miniFireballGuy.o(.text);
|
||||
src/enemy/enemy5A.o(.text);
|
||||
src/enemy/vaatiTransfiguredEye.o(.text);
|
||||
asm/businessScrubPrologue.o(.text);
|
||||
asm/gyorgFemale.o(.text);
|
||||
src/enemy/gyorgMale.o(.text);
|
||||
asm/curtain.o(.text);
|
||||
src/enemy/enemy5F.o(.text);
|
||||
src/enemy/vaatiWrathEye.o(.text);
|
||||
asm/gyorgChild.o(.text);
|
||||
asm/gyorgFemaleEye.o(.text);
|
||||
asm/enemy62.o(.text);
|
||||
@@ -1156,16 +1156,16 @@ SECTIONS {
|
||||
data/const/enemy/fireballGuy.o(.rodata);
|
||||
data/animations/enemy/fireballGuy.o(.rodata);
|
||||
data/const/enemy/miniFireballGuy.o(.rodata);
|
||||
src/enemy/enemy5A.o(.rodata);
|
||||
data/animations/enemy/enemy5A.o(.rodata);
|
||||
src/enemy/vaatiTransfiguredEye.o(.rodata);
|
||||
data/animations/enemy/vaatiTransfiguredEye.o(.rodata);
|
||||
data/const/enemy/businessScrubPrologue.o(.rodata);
|
||||
data/const/enemy/gyorgFemale.o(.rodata);
|
||||
src/enemy/gyorgMale.o(.rodata);
|
||||
data/animations/enemy/gyorgMale.o(.rodata);
|
||||
data/const/enemy/curtain.o(.rodata);
|
||||
data/animations/enemy/curtain.o(.rodata);
|
||||
src/enemy/enemy5F.o(.rodata);
|
||||
data/animations/enemy/enemy5F.o(.rodata);
|
||||
src/enemy/vaatiWrathEye.o(.rodata);
|
||||
data/animations/enemy/vaatiWrathEye.o(.rodata);
|
||||
data/const/enemy/gyorgChild.o(.rodata);
|
||||
data/animations/enemy/gyorgChild.o(.rodata);
|
||||
data/const/enemy/gyorgFemaleEye.o(.rodata);
|
||||
|
||||
+2
-2
@@ -94,12 +94,12 @@ void (*const gEnemyFunctions[])(Entity* ent) = {
|
||||
[MINI_SLIME] = MiniSlime,
|
||||
[FIREBALL_GUY] = FireballGuy,
|
||||
[MINI_FIREBALL_GUY] = MiniFireballGuy,
|
||||
[ENEMY_5A] = Enemy5A,
|
||||
[VAATI_TRANSFIGURED_EYE] = VaatiTransfiguredEye,
|
||||
[BUSINESS_SCRUB_PROLOGUE] = BusinessScrubPrologue,
|
||||
[GYORG_FEMALE] = GyorgFemale,
|
||||
[GYORG_MALE] = GyorgMale,
|
||||
[CURTAIN] = Curtain,
|
||||
[ENEMY_5F] = Enemy5F,
|
||||
[VAATI_WRATH_EYE] = VaatiWrathEye,
|
||||
[GYORG_CHILD] = GyorgChild,
|
||||
[GYORG_FEMALE_EYE] = GyorgFemaleEye,
|
||||
[ENEMY_62] = Enemy62,
|
||||
|
||||
+38
-38
@@ -7,37 +7,37 @@
|
||||
extern u32 sub_080002E0(u32, u32);
|
||||
extern s16 gUnk_080B4488[];
|
||||
|
||||
void sub_0802EC98(Entity*);
|
||||
void sub_0802ECC0(Entity*);
|
||||
void sub_0802ED74(Entity*);
|
||||
void sub_0802EE20(Entity*);
|
||||
void sub_0802EEB8(Entity*);
|
||||
void sub_0802EF1C(Entity*);
|
||||
void sub_0802ED8C(Entity*);
|
||||
void sub_0802EE10(Entity*);
|
||||
void sub_0802EE38(Entity*);
|
||||
void sub_0802EE8C(Entity*);
|
||||
void VaatiEyesMacroFunction0(Entity*);
|
||||
void VaatiEyesMacroFunction1(Entity*);
|
||||
void VaatiEyesMacroFunction0Type0(Entity*);
|
||||
void VaatiEyesMacroFunction0Type1(Entity*);
|
||||
void VaatiEyesMacroFunction0Type2(Entity*);
|
||||
void VaatiEyesMacroFunction0Type3(Entity*);
|
||||
void VaatiEyesMacroFunction0Type0Action0(Entity*);
|
||||
void VaatiEyesMacroFunction0Type0Action1(Entity*);
|
||||
void VaatiEyesMacroFunction0Type1Action0(Entity*);
|
||||
void VaatiEyesMacroFunction0Type1Action1(Entity*);
|
||||
void sub_0802EF90(Entity*);
|
||||
void sub_0802EFB8(Entity*);
|
||||
void sub_0802EF58(Entity*);
|
||||
void sub_0802F04C(Entity*);
|
||||
|
||||
void (*const gUnk_080CDE34[])(Entity*) = {
|
||||
sub_0802EC98, sub_0802ECC0, sub_08001324, sub_0804A7D4, sub_08001242, sub_0802EC98,
|
||||
void (*const vaatiEyesMacroFunctions[])(Entity*) = {
|
||||
VaatiEyesMacroFunction0, VaatiEyesMacroFunction1, sub_08001324, sub_0804A7D4, sub_08001242, VaatiEyesMacroFunction0,
|
||||
};
|
||||
void (*const gUnk_080CDE4C[])(Entity*) = {
|
||||
sub_0802ED74,
|
||||
sub_0802EE20,
|
||||
sub_0802EEB8,
|
||||
sub_0802EF1C,
|
||||
void (*const vaatiEyesMacroFunction0Types[])(Entity*) = {
|
||||
VaatiEyesMacroFunction0Type0,
|
||||
VaatiEyesMacroFunction0Type1,
|
||||
VaatiEyesMacroFunction0Type2,
|
||||
VaatiEyesMacroFunction0Type3,
|
||||
};
|
||||
void (*const gUnk_080CDE5C[])(Entity*) = {
|
||||
sub_0802ED8C,
|
||||
sub_0802EE10,
|
||||
void (*const vaatiEyesMacroFunction0Type0Actions[])(Entity*) = {
|
||||
VaatiEyesMacroFunction0Type0Action0,
|
||||
VaatiEyesMacroFunction0Type0Action1,
|
||||
};
|
||||
void (*const gUnk_080CDE64[])(Entity*) = {
|
||||
sub_0802EE38,
|
||||
sub_0802EE8C,
|
||||
void (*const vaatiEyesMacroFunction0Type1Actions[])(Entity*) = {
|
||||
VaatiEyesMacroFunction0Type1Action0,
|
||||
VaatiEyesMacroFunction0Type1Action1,
|
||||
};
|
||||
const u8 gUnk_080CDE6C[] = { 0, 8, 0x18, 0 };
|
||||
const u8 gUnk_080CDE70[] = {
|
||||
@@ -49,18 +49,18 @@ const u16 gUnk_080CDE98[] = { 0xc0, 0x100, 0x140, 0x180 };
|
||||
extern u8 gEntCount;
|
||||
|
||||
void VaatiEyesMacro(Entity* this) {
|
||||
gUnk_080CDE34[GetNextFunction(this)](this);
|
||||
vaatiEyesMacroFunctions[GetNextFunction(this)](this);
|
||||
SetChildOffset(this, 0, 1, -0x10);
|
||||
}
|
||||
|
||||
void sub_0802EC98(Entity* this) {
|
||||
gUnk_080CDE4C[this->type](this);
|
||||
void VaatiEyesMacroFunction0(Entity* this) {
|
||||
vaatiEyesMacroFunction0Types[this->type](this);
|
||||
if (this->type < 2) {
|
||||
sub_0802EF90(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0802ECC0(Entity* this) {
|
||||
void VaatiEyesMacroFunction1(Entity* this) {
|
||||
if (this->type == 0) {
|
||||
if (this->currentHealth == 0) {
|
||||
gScreenTransition.field_0x39 &= ~(1 << (gScreenTransition.field_0x3c + 2));
|
||||
@@ -88,14 +88,14 @@ void sub_0802ECC0(Entity* this) {
|
||||
if (this->field_0x43 != 0) {
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
}
|
||||
sub_0804AA30(this, gUnk_080CDE34);
|
||||
sub_0804AA30(this, vaatiEyesMacroFunctions);
|
||||
}
|
||||
|
||||
void sub_0802ED74(Entity* this) {
|
||||
gUnk_080CDE5C[this->action](this);
|
||||
void VaatiEyesMacroFunction0Type0(Entity* this) {
|
||||
vaatiEyesMacroFunction0Type0Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0802ED8C(Entity* this) {
|
||||
void VaatiEyesMacroFunction0Type0Action0(Entity* this) {
|
||||
Manager* manager;
|
||||
Entity* enemy;
|
||||
|
||||
@@ -119,16 +119,16 @@ void sub_0802ED8C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0802EE10(Entity* this) {
|
||||
void VaatiEyesMacroFunction0Type0Action1(Entity* this) {
|
||||
sub_0802F04C(this);
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_0802EE20(Entity* this) {
|
||||
gUnk_080CDE64[this->action](this);
|
||||
void VaatiEyesMacroFunction0Type1(Entity* this) {
|
||||
vaatiEyesMacroFunction0Type1Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0802EE38(Entity* this) {
|
||||
void VaatiEyesMacroFunction0Type1Action0(Entity* this) {
|
||||
Entity* entity;
|
||||
u32 rand;
|
||||
|
||||
@@ -144,7 +144,7 @@ void sub_0802EE38(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0802EE8C(Entity* this) {
|
||||
void VaatiEyesMacroFunction0Type1Action1(Entity* this) {
|
||||
if (this->parent->next == NULL) {
|
||||
this->flags &= 0x7f;
|
||||
this->currentHealth = 0;
|
||||
@@ -159,7 +159,7 @@ typedef struct xy {
|
||||
u8 y;
|
||||
} xy;
|
||||
|
||||
void sub_0802EEB8(Entity* this) {
|
||||
void VaatiEyesMacroFunction0Type2(Entity* this) {
|
||||
u32 uVar2;
|
||||
xy* temp;
|
||||
|
||||
@@ -182,7 +182,7 @@ void sub_0802EEB8(Entity* this) {
|
||||
this->spriteOffsetY -= 1;
|
||||
}
|
||||
|
||||
void sub_0802EF1C(Entity* this) {
|
||||
void VaatiEyesMacroFunction0Type3(Entity* this) {
|
||||
if (this->parent->next == NULL) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
+40
-37
@@ -10,31 +10,34 @@ extern Entity* gUnk_020000B0;
|
||||
extern const ScreenTransitionData gUnk_0813AB94;
|
||||
|
||||
bool32 sub_0803E4A0(Entity*);
|
||||
void sub_0803E0C4(Entity*);
|
||||
void sub_0803E0DC(Entity*);
|
||||
void VaatiProjectileFunction0(Entity*);
|
||||
void VaatiProjectileFunction1(Entity*);
|
||||
void sub_08001328(Entity*);
|
||||
void sub_0803E188(Entity*);
|
||||
void nullsub_19(Entity*);
|
||||
void sub_0803E1A8(Entity*);
|
||||
void sub_0803E258(Entity*);
|
||||
void sub_0803E2A8(Entity*);
|
||||
void sub_0803E2D0(Entity*);
|
||||
void sub_0803E314(Entity*);
|
||||
void sub_0803E340(Entity*);
|
||||
void sub_0803E370(Entity*);
|
||||
void sub_0803E398(Entity*);
|
||||
void sub_0803E3D4(Entity*);
|
||||
void sub_0803E3FC(Entity*);
|
||||
void VaatiProjectileFunction3(Entity*);
|
||||
void VaatiProjectileNoop(Entity*);
|
||||
void VaatiProjectileFunction0Action0(Entity*);
|
||||
void VaatiProjectileFunction0Action1(Entity*);
|
||||
void VaatiProjectileFunction0Action2(Entity*);
|
||||
void VaatiProjectileFunction0Action3(Entity*);
|
||||
void VaatiProjectileFunction0Action4(Entity*);
|
||||
void VaatiProjectileFunction0Action5(Entity*);
|
||||
void VaatiProjectileFunction0Action6(Entity*);
|
||||
void VaatiProjectileFunction0Action7(Entity*);
|
||||
void VaatiProjectileFunction0Action8(Entity*);
|
||||
void VaatiProjectileFunction0Action9(Entity*);
|
||||
void sub_0803E444(Entity*);
|
||||
void sub_0803E480(Entity*);
|
||||
void sub_0803E4D8(Entity*);
|
||||
|
||||
void (*const gUnk_080D0648[])(Entity*) = {
|
||||
sub_0803E0C4, sub_0803E0DC, sub_08001328, sub_0803E188, sub_08001242, nullsub_19,
|
||||
void (*const vaatiProjectileFunctions[])(Entity*) = {
|
||||
VaatiProjectileFunction0, VaatiProjectileFunction1, sub_08001328, VaatiProjectileFunction3, sub_08001242,
|
||||
VaatiProjectileNoop,
|
||||
};
|
||||
void (*const gUnk_080D0660[])(Entity*) = {
|
||||
sub_0803E1A8, sub_0803E258, sub_0803E2A8, sub_0803E2D0, sub_0803E314,
|
||||
sub_0803E340, sub_0803E370, sub_0803E398, sub_0803E3D4, sub_0803E3FC,
|
||||
void (*const vaatiProjectileFunction0Actions[])(Entity*) = {
|
||||
VaatiProjectileFunction0Action0, VaatiProjectileFunction0Action1, VaatiProjectileFunction0Action2,
|
||||
VaatiProjectileFunction0Action3, VaatiProjectileFunction0Action4, VaatiProjectileFunction0Action5,
|
||||
VaatiProjectileFunction0Action6, VaatiProjectileFunction0Action7, VaatiProjectileFunction0Action8,
|
||||
VaatiProjectileFunction0Action9,
|
||||
};
|
||||
|
||||
void VaatiProjectile(Entity* this) {
|
||||
@@ -43,14 +46,14 @@ void VaatiProjectile(Entity* this) {
|
||||
this->currentHealth = 0;
|
||||
this->parent = NULL;
|
||||
}
|
||||
gUnk_080D0648[GetNextFunction(this)](this);
|
||||
vaatiProjectileFunctions[GetNextFunction(this)](this);
|
||||
}
|
||||
|
||||
void sub_0803E0C4(Entity* this) {
|
||||
gUnk_080D0660[this->action](this);
|
||||
void VaatiProjectileFunction0(Entity* this) {
|
||||
vaatiProjectileFunction0Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0803E0DC(Entity* this) {
|
||||
void VaatiProjectileFunction1(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
if (this->bitfield == 0x80) {
|
||||
@@ -77,10 +80,10 @@ void sub_0803E0DC(Entity* this) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
sub_0804AA30(this, gUnk_080D0648);
|
||||
sub_0804AA30(this, vaatiProjectileFunctions);
|
||||
}
|
||||
|
||||
void sub_0803E188(Entity* this) {
|
||||
void VaatiProjectileFunction3(Entity* this) {
|
||||
if (this->parent != NULL) {
|
||||
this->parent->field_0xf--;
|
||||
this->parent = NULL;
|
||||
@@ -88,10 +91,10 @@ void sub_0803E188(Entity* this) {
|
||||
sub_0804A7D4(this);
|
||||
}
|
||||
|
||||
void nullsub_19(Entity* this) {
|
||||
void VaatiProjectileNoop(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0803E1A8(Entity* this) {
|
||||
void VaatiProjectileFunction0Action0(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
if (this->type == 0) {
|
||||
@@ -121,7 +124,7 @@ void sub_0803E1A8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803E258(Entity* this) {
|
||||
void VaatiProjectileFunction0Action1(Entity* this) {
|
||||
sub_0803E480(this);
|
||||
if (PlayerInRange(this, 0, 8) != 0) {
|
||||
this->action = 2;
|
||||
@@ -136,7 +139,7 @@ void sub_0803E258(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803E2A8(Entity* this) {
|
||||
void VaatiProjectileFunction0Action2(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
} else {
|
||||
@@ -147,7 +150,7 @@ void sub_0803E2A8(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803E2D0(Entity* this) {
|
||||
void VaatiProjectileFunction0Action3(Entity* this) {
|
||||
if ((this->attachedEntity->frames.b.f3) != 0) {
|
||||
if (--this->height.HALF.HI <= -0x18) {
|
||||
this->action = 4;
|
||||
@@ -158,7 +161,7 @@ void sub_0803E2D0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803E314(Entity* this) {
|
||||
void VaatiProjectileFunction0Action4(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 1;
|
||||
this->direction = GetFacingDirection(this, &gPlayerEntity);
|
||||
@@ -166,7 +169,7 @@ void sub_0803E314(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803E340(Entity* this) {
|
||||
void VaatiProjectileFunction0Action5(Entity* this) {
|
||||
sub_0803E444(this);
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
@@ -179,7 +182,7 @@ void sub_0803E340(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803E370(Entity* this) {
|
||||
void VaatiProjectileFunction0Action6(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 7;
|
||||
this->direction = 0x10;
|
||||
@@ -188,7 +191,7 @@ void sub_0803E370(Entity* this) {
|
||||
sub_0803E444(this);
|
||||
}
|
||||
|
||||
void sub_0803E398(Entity* this) {
|
||||
void VaatiProjectileFunction0Action7(Entity* this) {
|
||||
sub_0803E444(this);
|
||||
sub_0806F69C(this);
|
||||
sub_0803E4D8(this);
|
||||
@@ -198,7 +201,7 @@ void sub_0803E398(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803E3D4(Entity* this) {
|
||||
void VaatiProjectileFunction0Action8(Entity* this) {
|
||||
if (this->parent->next == NULL) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -206,7 +209,7 @@ void sub_0803E3D4(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803E3FC(Entity* this) {
|
||||
void VaatiProjectileFunction0Action9(Entity* this) {
|
||||
this->x.HALF.HI = gPlayerEntity.x.HALF.HI;
|
||||
this->y.HALF.HI = gPlayerEntity.y.HALF.HI;
|
||||
if (this->height.HALF.HI < -8) {
|
||||
@@ -214,7 +217,7 @@ void sub_0803E3FC(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
InitializeAnimation(this->attachedEntity, 2);
|
||||
}
|
||||
sub_0803E2A8(this);
|
||||
VaatiProjectileFunction0Action2(this);
|
||||
} else {
|
||||
this->height.HALF.HI += 8;
|
||||
}
|
||||
|
||||
@@ -10,22 +10,22 @@
|
||||
extern void sub_080AEFB4(Entity*);
|
||||
extern u8 gEntCount;
|
||||
|
||||
void sub_0803DFBC(Entity*);
|
||||
void sub_0803DC58(Entity*);
|
||||
void sub_0803D134(Entity*);
|
||||
void sub_0803D264(Entity*);
|
||||
void sub_0803D408(Entity*);
|
||||
void sub_0803D560(Entity*);
|
||||
void sub_0803D658(Entity*);
|
||||
void sub_0803D700(Entity*);
|
||||
void sub_0803D830(Entity*);
|
||||
void sub_0803D8FC(Entity*);
|
||||
void sub_0803D974(Entity*);
|
||||
void sub_0803D9BC(Entity*);
|
||||
void sub_0803DAA8(Entity*);
|
||||
void sub_0803DAE4(Entity*);
|
||||
void sub_0803DB88(Entity*);
|
||||
void sub_0803DBB8(Entity*);
|
||||
void VaatiRebornEnemyType0PreAction(Entity*);
|
||||
void VaatiRebornEnemyType1PreAction(Entity*);
|
||||
void VaatiRebornEnemyType0Action0(Entity*);
|
||||
void VaatiRebornEnemyType0Action1(Entity*);
|
||||
void VaatiRebornEnemyType0Action2(Entity*);
|
||||
void VaatiRebornEnemyType0Action3(Entity*);
|
||||
void VaatiRebornEnemyType0Action4(Entity*);
|
||||
void VaatiRebornEnemyType0Action5(Entity*);
|
||||
void VaatiRebornEnemyType0Action6(Entity*);
|
||||
void VaatiRebornEnemyType0Action7(Entity*);
|
||||
void VaatiRebornEnemyType1Action0(Entity*);
|
||||
void VaatiRebornEnemyType1Action1(Entity*);
|
||||
void VaatiRebornEnemyType2Action0(Entity*);
|
||||
void VaatiRebornEnemyType2Action1(Entity*);
|
||||
void VaatiRebornEnemyType3Action0(Entity*);
|
||||
void VaatiRebornEnemyType3Action1(Entity*);
|
||||
void sub_0803DD78(Entity*);
|
||||
u32 sub_0803DEE0(Entity*);
|
||||
u32 sub_0803E028(Entity*);
|
||||
@@ -36,20 +36,22 @@ typedef struct xy {
|
||||
s8 y;
|
||||
} PACKED xy;
|
||||
|
||||
void (*const gUnk_080D0470[])(Entity*) = {
|
||||
sub_0803D134, sub_0803D264, sub_0803D408, sub_0803D560, sub_0803D658, sub_0803D700, sub_0803D830, sub_0803D8FC,
|
||||
void (*const vaatiRebornEnemyType0Actions[])(Entity*) = {
|
||||
VaatiRebornEnemyType0Action0, VaatiRebornEnemyType0Action1, VaatiRebornEnemyType0Action2,
|
||||
VaatiRebornEnemyType0Action3, VaatiRebornEnemyType0Action4, VaatiRebornEnemyType0Action5,
|
||||
VaatiRebornEnemyType0Action6, VaatiRebornEnemyType0Action7,
|
||||
};
|
||||
void (*const gUnk_080D0490[])(Entity*) = {
|
||||
sub_0803D974,
|
||||
sub_0803D9BC,
|
||||
void (*const vaatiRebornEnemyType1Actions[])(Entity*) = {
|
||||
VaatiRebornEnemyType1Action0,
|
||||
VaatiRebornEnemyType1Action1,
|
||||
};
|
||||
void (*const gUnk_080D0498[])(Entity*) = {
|
||||
sub_0803DAA8,
|
||||
sub_0803DAE4,
|
||||
void (*const vaatiRebornEnemyType2Actions[])(Entity*) = {
|
||||
VaatiRebornEnemyType2Action0,
|
||||
VaatiRebornEnemyType2Action1,
|
||||
};
|
||||
void (*const gUnk_080D04A0[])(Entity*) = {
|
||||
sub_0803DB88,
|
||||
sub_0803DBB8,
|
||||
void (*const vaatiRebornEnemyType3Actions[])(Entity*) = {
|
||||
VaatiRebornEnemyType3Action0,
|
||||
VaatiRebornEnemyType3Action1,
|
||||
};
|
||||
|
||||
const xy gUnk_080D04A8[] = { { 16, -43 }, { -16, -43 } };
|
||||
@@ -70,23 +72,23 @@ const u8 gUnk_080D04D3[] = { 0, 1, 0, -1 };
|
||||
void VaatiRebornEnemy(Entity* this) {
|
||||
switch (this->type) {
|
||||
case 0:
|
||||
sub_0803DFBC(this);
|
||||
gUnk_080D0470[this->action](this);
|
||||
VaatiRebornEnemyType0PreAction(this);
|
||||
vaatiRebornEnemyType0Actions[this->action](this);
|
||||
break;
|
||||
case 1:
|
||||
sub_0803DC58(this);
|
||||
gUnk_080D0490[this->action](this);
|
||||
VaatiRebornEnemyType1PreAction(this);
|
||||
vaatiRebornEnemyType1Actions[this->action](this);
|
||||
break;
|
||||
case 2:
|
||||
gUnk_080D0498[this->action](this);
|
||||
vaatiRebornEnemyType2Actions[this->action](this);
|
||||
break;
|
||||
case 3:
|
||||
gUnk_080D04A0[this->action](this);
|
||||
vaatiRebornEnemyType3Actions[this->action](this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803D134(Entity* this) {
|
||||
void VaatiRebornEnemyType0Action0(Entity* this) {
|
||||
s32 i;
|
||||
Entity* entity;
|
||||
const xy* ptr;
|
||||
@@ -138,7 +140,7 @@ void sub_0803D134(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803D264(Entity* this) {
|
||||
void VaatiRebornEnemyType0Action1(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if ((this->field_0x74.HALF.LO & 0x70) == 0) {
|
||||
@@ -221,7 +223,7 @@ void sub_0803D264(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803D408(Entity* this) {
|
||||
void VaatiRebornEnemyType0Action2(Entity* this) {
|
||||
const Coords* ptr;
|
||||
|
||||
switch (this->field_0x74.HALF.LO) {
|
||||
@@ -279,7 +281,7 @@ void sub_0803D408(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803D560(Entity* this) {
|
||||
void VaatiRebornEnemyType0Action3(Entity* this) {
|
||||
u8 temp;
|
||||
|
||||
switch (this->field_0x74.HALF.LO) {
|
||||
@@ -331,7 +333,7 @@ void sub_0803D560(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803D658(Entity* this) {
|
||||
void VaatiRebornEnemyType0Action4(Entity* this) {
|
||||
u32 index;
|
||||
Entity* entity;
|
||||
|
||||
@@ -361,7 +363,7 @@ void sub_0803D658(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803D700(Entity* this) {
|
||||
void VaatiRebornEnemyType0Action5(Entity* this) {
|
||||
u32 uVar3;
|
||||
|
||||
if (this->field_0x80.HALF.LO == 0) {
|
||||
@@ -417,7 +419,7 @@ void sub_0803D700(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803D830(Entity* this) {
|
||||
void VaatiRebornEnemyType0Action6(Entity* this) {
|
||||
Entity* target;
|
||||
|
||||
if (this->field_0x80.HALF.LO == 0) {
|
||||
@@ -466,7 +468,7 @@ void sub_0803D830(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803D8FC(Entity* this) {
|
||||
void VaatiRebornEnemyType0Action7(Entity* this) {
|
||||
Entity* fx;
|
||||
u32 tmp;
|
||||
|
||||
@@ -489,7 +491,7 @@ void sub_0803D8FC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803D974(Entity* this) {
|
||||
void VaatiRebornEnemyType1Action0(Entity* this) {
|
||||
Entity* enemy;
|
||||
|
||||
this->action = 1;
|
||||
@@ -504,7 +506,7 @@ void sub_0803D974(Entity* this) {
|
||||
InitAnimationForceUpdate(this, this->field_0x74.HALF.LO);
|
||||
}
|
||||
|
||||
void sub_0803D9BC(Entity* this) {
|
||||
void VaatiRebornEnemyType1Action1(Entity* this) {
|
||||
Entity* parent;
|
||||
|
||||
parent = this->parent;
|
||||
@@ -547,7 +549,7 @@ void sub_0803D9BC(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803DAA8(Entity* this) {
|
||||
void VaatiRebornEnemyType2Action0(Entity* this) {
|
||||
Entity* source;
|
||||
|
||||
source = this->parent->parent;
|
||||
@@ -560,8 +562,8 @@ void sub_0803DAA8(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 2);
|
||||
}
|
||||
|
||||
void sub_0803DAE4(Entity* this) {
|
||||
u8 bVar1;
|
||||
void VaatiRebornEnemyType2Action1(Entity* this) {
|
||||
u8 parentDirection;
|
||||
Entity* parent;
|
||||
|
||||
parent = this->parent;
|
||||
@@ -569,14 +571,14 @@ void sub_0803DAE4(Entity* this) {
|
||||
if (this->field_0x74.HALF.LO != 0) {
|
||||
this->field_0x74.HALF.LO = 0;
|
||||
}
|
||||
bVar1 = parent->parent->direction;
|
||||
if (bVar1 != 0xff) {
|
||||
parentDirection = parent->parent->direction;
|
||||
if (parentDirection != 0xff) {
|
||||
if (this->field_0x74.HALF.HI == 0) {
|
||||
this->field_0x74.HALF.HI = 1;
|
||||
}
|
||||
if (bVar1 != this->direction) {
|
||||
this->direction = bVar1;
|
||||
InitAnimationForceUpdate(this, bVar1 >> 3);
|
||||
if (parentDirection != this->direction) {
|
||||
this->direction = parentDirection;
|
||||
InitAnimationForceUpdate(this, parentDirection >> 3);
|
||||
}
|
||||
} else {
|
||||
if (this->field_0x74.HALF.HI != 0) {
|
||||
@@ -596,7 +598,7 @@ void sub_0803DAE4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803DB88(Entity* this) {
|
||||
void VaatiRebornEnemyType3Action0(Entity* this) {
|
||||
this->action = 1;
|
||||
this->field_0x74.HALF.LO = 0;
|
||||
this->direction = 0xff;
|
||||
@@ -605,7 +607,7 @@ void sub_0803DB88(Entity* this) {
|
||||
sub_0803DC0C(this);
|
||||
}
|
||||
|
||||
void sub_0803DBB8(Entity* this) {
|
||||
void VaatiRebornEnemyType3Action1(Entity* this) {
|
||||
Entity* parent = this->parent;
|
||||
|
||||
if (this->parent->direction != 0xff) {
|
||||
@@ -638,7 +640,7 @@ void sub_0803DC0C(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803DC58(Entity* this) {
|
||||
void VaatiRebornEnemyType1PreAction(Entity* this) {
|
||||
Entity* parent;
|
||||
|
||||
if (this->damageType != 0x30) {
|
||||
@@ -656,7 +658,7 @@ void sub_0803DC58(Entity* this) {
|
||||
parent->spriteOffsetX = 0;
|
||||
parent->direction = -1;
|
||||
this->actionDelay = 0;
|
||||
SoundReq(0x80100000);
|
||||
SoundReq(SONG_STOP_BGM);
|
||||
gArea.musicIndex = gArea.pMusicIndex;
|
||||
return;
|
||||
}
|
||||
@@ -845,9 +847,8 @@ u32 sub_0803DEE0(Entity* this) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
void sub_0803DFBC(Entity* this) {
|
||||
void VaatiRebornEnemyType0PreAction(Entity* this) {
|
||||
u32 bVar1;
|
||||
int iVar3;
|
||||
|
||||
if (this->action != 0) {
|
||||
*(u32*)&this->field_0x78 = this->x.WORD;
|
||||
@@ -873,24 +874,29 @@ void sub_0803DFBC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/vaati/sub_0803E028.inc", u32 sub_0803E028(Entity* this)) {
|
||||
u32 uVar4;
|
||||
u32 rx, ry, px;
|
||||
u32 sub_0803E028(Entity* this) {
|
||||
u32 ret;
|
||||
s32 tmp;
|
||||
|
||||
uVar4 = 0;
|
||||
ret = 0;
|
||||
if ((this->field_0x74.HALF.HI != 2) && ((Random() & 1) != 0)) {
|
||||
return 0;
|
||||
}
|
||||
if (this->field_0x76.HALF.HI == 1) {
|
||||
if (gRoomControls.roomOriginX + 0x58 <= gPlayerEntity.x.HALF.HI) {
|
||||
if (gRoomControls.roomOriginY + 0x58 <= gPlayerEntity.x.HALF.HI) {
|
||||
if (gRoomControls.roomOriginY + 0xf8 >= gPlayerEntity.x.HALF.HI) {
|
||||
this->field_0x80.HALF.HI += 5;
|
||||
uVar4 = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this->field_0x76.HALF.HI != 1) {
|
||||
return ret;
|
||||
}
|
||||
return uVar4;
|
||||
tmp = gRoomControls.roomOriginX + 0x58;
|
||||
if (tmp > gPlayerEntity.x.HALF.HI) {
|
||||
return ret;
|
||||
}
|
||||
tmp = gRoomControls.roomOriginY + 0x58;
|
||||
if (tmp > gPlayerEntity.x.HALF.HI) {
|
||||
return ret;
|
||||
}
|
||||
tmp = gRoomControls.roomOriginY + 0xf8;
|
||||
if (tmp >= gPlayerEntity.x.HALF.HI) {
|
||||
this->field_0x80.HALF.HI += 5;
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
@@ -16,26 +16,26 @@ void sub_080AF18C(Entity*);
|
||||
u32 sub_08040934(Entity*);
|
||||
void sub_08040648(Entity*, u32, u32);
|
||||
|
||||
void sub_0803F818(Entity*);
|
||||
void sub_0803F914(Entity*);
|
||||
void sub_0803FAC8(Entity*);
|
||||
void sub_0803FAD0(Entity*);
|
||||
void sub_0803FD50(Entity*);
|
||||
void sub_0803FE90(Entity*);
|
||||
void sub_0803FF7C(Entity*);
|
||||
void sub_0804006C(Entity*);
|
||||
void sub_08040130(Entity*);
|
||||
void sub_0804015C(Entity*);
|
||||
void sub_080401E0(Entity*);
|
||||
void sub_08040268(Entity*);
|
||||
void sub_0804038C(Entity*);
|
||||
void sub_080403CC(Entity*);
|
||||
void sub_080403EC(Entity*);
|
||||
void sub_0804041C(Entity*);
|
||||
void sub_0804044C(Entity*);
|
||||
void sub_080404D0(Entity*);
|
||||
void sub_0804051C(Entity*);
|
||||
void sub_080405D8(Entity*);
|
||||
void VaatiTransfiguredType0Action0(Entity*);
|
||||
void VaatiTransfiguredType0Action1(Entity*);
|
||||
void VaatiTransfiguredType0Action2(Entity*);
|
||||
void VaatiTransfiguredType0Action3(Entity*);
|
||||
void VaatiTransfiguredType0Action4(Entity*);
|
||||
void VaatiTransfiguredType0Action5(Entity*);
|
||||
void VaatiTransfiguredType0Action6(Entity*);
|
||||
void VaatiTransfiguredType0Action7(Entity*);
|
||||
void VaatiTransfiguredType1Action0(Entity*);
|
||||
void VaatiTransfiguredType1Action1(Entity*);
|
||||
void VaatiTransfiguredType2Action0(Entity*);
|
||||
void VaatiTransfiguredType2Action1(Entity*);
|
||||
void VaatiTransfiguredType2Action2(Entity*);
|
||||
void VaatiTransfiguredType3Action0(Entity*);
|
||||
void VaatiTransfiguredType3Action1(Entity*);
|
||||
void VaatiTransfiguredType4Action0(Entity*);
|
||||
void VaatiTransfiguredType4Action1(Entity*);
|
||||
void VaatiTransfiguredType5Action0(Entity*);
|
||||
void VaatiTransfiguredType5Action1(Entity*);
|
||||
void VaatiTransfiguredType5Action2(Entity*);
|
||||
|
||||
typedef struct {
|
||||
s8 x;
|
||||
@@ -49,30 +49,32 @@ const u8 gUnk_080D0ABC[] = { 0xf0, 0xd0, 0xb0 };
|
||||
const u8 gUnk_080D0ABC[] = { 0xf0, 0xd0, 0xc0 };
|
||||
#endif
|
||||
const u8 gUnk_080D0ABF[] = { 0x3c, 0x3c, 0x1e, 0x14, 0x14, 0x14, 0, 0, 0 };
|
||||
void (*const gUnk_080D0AC8[])(Entity*) = {
|
||||
sub_0803F818, sub_0803F914, sub_0803FAC8, sub_0803FAD0, sub_0803FD50, sub_0803FE90, sub_0803FF7C, sub_0804006C,
|
||||
void (*const vaatiTransfiguredType0Actions[])(Entity*) = {
|
||||
VaatiTransfiguredType0Action0, VaatiTransfiguredType0Action1, VaatiTransfiguredType0Action2,
|
||||
VaatiTransfiguredType0Action3, VaatiTransfiguredType0Action4, VaatiTransfiguredType0Action5,
|
||||
VaatiTransfiguredType0Action6, VaatiTransfiguredType0Action7,
|
||||
};
|
||||
void (*const gUnk_080D0AE8[])(Entity*) = {
|
||||
sub_08040130,
|
||||
sub_0804015C,
|
||||
void (*const vaatiTransfiguredType1Actions[])(Entity*) = {
|
||||
VaatiTransfiguredType1Action0,
|
||||
VaatiTransfiguredType1Action1,
|
||||
};
|
||||
void (*const gUnk_080D0AF0[])(Entity*) = {
|
||||
sub_080401E0,
|
||||
sub_08040268,
|
||||
sub_0804038C,
|
||||
void (*const vaatiTransfiguredType2Actions[])(Entity*) = {
|
||||
VaatiTransfiguredType2Action0,
|
||||
VaatiTransfiguredType2Action1,
|
||||
VaatiTransfiguredType2Action2,
|
||||
};
|
||||
void (*const gUnk_080D0AFC[])(Entity*) = {
|
||||
sub_080403CC,
|
||||
sub_080403EC,
|
||||
void (*const vaatiTransfiguredType3Actions[])(Entity*) = {
|
||||
VaatiTransfiguredType3Action0,
|
||||
VaatiTransfiguredType3Action1,
|
||||
};
|
||||
void (*const gUnk_080D0B04[])(Entity*) = {
|
||||
sub_0804041C,
|
||||
sub_0804044C,
|
||||
void (*const vaatiTransfiguredType4Actions[])(Entity*) = {
|
||||
VaatiTransfiguredType4Action0,
|
||||
VaatiTransfiguredType4Action1,
|
||||
};
|
||||
void (*const gUnk_080D0B0C[])(Entity*) = {
|
||||
sub_080404D0,
|
||||
sub_0804051C,
|
||||
sub_080405D8,
|
||||
void (*const vaatiTransfiguredType5Actions[])(Entity*) = {
|
||||
VaatiTransfiguredType5Action0,
|
||||
VaatiTransfiguredType5Action1,
|
||||
VaatiTransfiguredType5Action2,
|
||||
};
|
||||
|
||||
const xy gUnk_080D0B18[] = { { 0x00, 0xfe }, { 0x01, 0xfe }, { 0x01, 0xfe }, { 0x02, 0xfe }, { 0x02, 0xfe },
|
||||
@@ -104,29 +106,29 @@ void VaatiTransfigured(Entity* this) {
|
||||
this->field_0x7c.HALF.LO = this->y.HALF.HI;
|
||||
sub_080409B0(this);
|
||||
}
|
||||
gUnk_080D0AC8[this->action](this);
|
||||
vaatiTransfiguredType0Actions[this->action](this);
|
||||
break;
|
||||
case 1:
|
||||
gUnk_080D0AE8[this->action](this);
|
||||
vaatiTransfiguredType1Actions[this->action](this);
|
||||
break;
|
||||
case 2:
|
||||
gUnk_080D0AF0[this->action](this);
|
||||
vaatiTransfiguredType2Actions[this->action](this);
|
||||
break;
|
||||
case 3:
|
||||
gUnk_080D0AFC[this->action](this);
|
||||
vaatiTransfiguredType3Actions[this->action](this);
|
||||
break;
|
||||
case 4:
|
||||
gUnk_080D0B04[this->action](this);
|
||||
vaatiTransfiguredType4Actions[this->action](this);
|
||||
break;
|
||||
case 5:
|
||||
gUnk_080D0B0C[this->action](this);
|
||||
vaatiTransfiguredType5Actions[this->action](this);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803F818(Entity* this) {
|
||||
void VaatiTransfiguredType0Action0(Entity* this) {
|
||||
Entity* enemy;
|
||||
u32 i;
|
||||
|
||||
@@ -157,7 +159,7 @@ void sub_0803F818(Entity* this) {
|
||||
Random();
|
||||
sub_080408EC(this);
|
||||
for (i = 0; i < 8; ++i) {
|
||||
enemy = CreateEnemy(ENEMY_5A, 0);
|
||||
enemy = CreateEnemy(VAATI_TRANSFIGURED_EYE, 0);
|
||||
enemy->parent = this;
|
||||
enemy->type2 = i;
|
||||
if ((this->field_0x74.HALF.HI >> (i)&1) != 0) {
|
||||
@@ -170,7 +172,7 @@ void sub_0803F818(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803F914(Entity* this) {
|
||||
void VaatiTransfiguredType0Action1(Entity* this) {
|
||||
Entity* object;
|
||||
|
||||
switch (this->field_0x80.HALF.LO) {
|
||||
@@ -250,11 +252,11 @@ void sub_0803F914(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803FAC8(Entity* this) {
|
||||
void VaatiTransfiguredType0Action2(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803FAD0(Entity* this) {
|
||||
void VaatiTransfiguredType0Action3(Entity* this) {
|
||||
Entity* pEVar3;
|
||||
u32 uVar4;
|
||||
u32 tmp;
|
||||
@@ -368,7 +370,7 @@ void sub_0803FAD0(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803FD50(Entity* this) {
|
||||
void VaatiTransfiguredType0Action4(Entity* this) {
|
||||
switch (this->field_0x80.HALF.LO) {
|
||||
case 0:
|
||||
if (--this->actionDelay == 0) {
|
||||
@@ -434,7 +436,7 @@ void sub_0803FD50(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803FE90(Entity* this) {
|
||||
void VaatiTransfiguredType0Action5(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
switch (this->field_0x80.HALF.LO) {
|
||||
@@ -487,7 +489,7 @@ void sub_0803FE90(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0803FF7C(Entity* this) {
|
||||
void VaatiTransfiguredType0Action6(Entity* this) {
|
||||
Entity* pEVar2;
|
||||
|
||||
switch (this->field_0x80.HALF.LO) {
|
||||
@@ -539,7 +541,7 @@ void sub_0803FF7C(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0804006C(Entity* this) {
|
||||
void VaatiTransfiguredType0Action7(Entity* this) {
|
||||
Entity* pEVar3;
|
||||
u32 uVar4;
|
||||
|
||||
@@ -579,7 +581,7 @@ void sub_0804006C(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_08040130(Entity* this) {
|
||||
void VaatiTransfiguredType1Action0(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
@@ -587,7 +589,7 @@ void sub_08040130(Entity* this) {
|
||||
InitAnimationForceUpdate(this, (u32)this->actionDelay);
|
||||
}
|
||||
|
||||
void sub_0804015C(Entity* this) {
|
||||
void VaatiTransfiguredType1Action1(Entity* this) {
|
||||
Entity* parent;
|
||||
|
||||
parent = this->parent;
|
||||
@@ -618,7 +620,7 @@ void sub_0804015C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080401E0(Entity* this) {
|
||||
void VaatiTransfiguredType2Action0(Entity* this) {
|
||||
if (this->type2 != 0) {
|
||||
this->action = 1;
|
||||
this->spritePriority.b0 = this->type2 + 1;
|
||||
@@ -637,7 +639,7 @@ void sub_080401E0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08040268(Entity* this) {
|
||||
void VaatiTransfiguredType2Action1(Entity* this) {
|
||||
u32 uVar3;
|
||||
|
||||
const xy* t;
|
||||
@@ -694,7 +696,7 @@ void sub_08040268(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0804038C(Entity* this) {
|
||||
void VaatiTransfiguredType2Action2(Entity* this) {
|
||||
if (this->parent->currentHealth == 0) {
|
||||
this->field_0x6c.HALF.HI |= 2;
|
||||
DeleteThisEntity();
|
||||
@@ -706,13 +708,13 @@ void sub_0804038C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080403CC(Entity* this) {
|
||||
void VaatiTransfiguredType3Action0(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spritePriority.b0 = 4;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
|
||||
void sub_080403EC(Entity* this) {
|
||||
void VaatiTransfiguredType3Action1(Entity* this) {
|
||||
if (this->parent->currentHealth == 0) {
|
||||
this->field_0x6c.HALF.HI |= 2;
|
||||
DeleteThisEntity();
|
||||
@@ -721,7 +723,7 @@ void sub_080403EC(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_0804041C(Entity* this) {
|
||||
void VaatiTransfiguredType4Action0(Entity* this) {
|
||||
this->action = 1;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->actionDelay = 10;
|
||||
@@ -730,7 +732,7 @@ void sub_0804041C(Entity* this) {
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
|
||||
void sub_0804044C(Entity* this) {
|
||||
void VaatiTransfiguredType4Action1(Entity* this) {
|
||||
if (this->parent->currentHealth == 0) {
|
||||
this->field_0x6c.HALF.HI |= 2;
|
||||
DeleteThisEntity();
|
||||
@@ -754,7 +756,7 @@ void sub_0804044C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_080404D0(Entity* this) {
|
||||
void VaatiTransfiguredType5Action0(Entity* this) {
|
||||
if (this->type2 != 0) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 10;
|
||||
@@ -767,7 +769,7 @@ void sub_080404D0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0804051C(Entity* this) {
|
||||
void VaatiTransfiguredType5Action1(Entity* this) {
|
||||
if (this->parent->currentHealth == 0) {
|
||||
this->field_0x6c.HALF.HI |= 2;
|
||||
DeleteThisEntity();
|
||||
@@ -803,7 +805,7 @@ void sub_0804051C(Entity* this) {
|
||||
CopyPosition(this->parent, this);
|
||||
}
|
||||
|
||||
void sub_080405D8(Entity* this) {
|
||||
void VaatiTransfiguredType5Action2(Entity* this) {
|
||||
if (this->parent->currentHealth == 0) {
|
||||
this->field_0x6c.HALF.HI |= 2;
|
||||
DeleteThisEntity();
|
||||
|
||||
@@ -8,21 +8,27 @@
|
||||
void sub_08045A00(Entity*);
|
||||
void sub_08045A28(Entity*);
|
||||
|
||||
void sub_080456E8(Entity*);
|
||||
void sub_08045700(Entity*);
|
||||
void nullsub_173(Entity*);
|
||||
void sub_080457E4(Entity*);
|
||||
void sub_0804586C(Entity*);
|
||||
void sub_080458C4(Entity*);
|
||||
void sub_08045938(Entity*);
|
||||
void sub_08045984(Entity*);
|
||||
void VaatiTransfiguredEyeFunction0(Entity*);
|
||||
void VaatiTransfiguredEyeFunction1(Entity*);
|
||||
void VaatiTransfiguredEyeNoop(Entity*);
|
||||
void VaatiTransfiguredEyeFunction0Action0(Entity*);
|
||||
void VaatiTransfiguredEyeFunction0Action1(Entity*);
|
||||
void VaatiTransfiguredEyeFunction0Action2(Entity*);
|
||||
void VaatiTransfiguredEyeFunction0Action3(Entity*);
|
||||
void VaatiTransfiguredEyeFunction0Action4(Entity*);
|
||||
|
||||
void (*const gUnk_080D1888[])(Entity*) = {
|
||||
sub_080456E8, sub_08045700, sub_080456E8, sub_0804A7D4, sub_08001242, nullsub_173,
|
||||
void (*const vaatiTransfiguredEyeFunctions[])(Entity*) = {
|
||||
VaatiTransfiguredEyeFunction0,
|
||||
VaatiTransfiguredEyeFunction1,
|
||||
VaatiTransfiguredEyeFunction0,
|
||||
sub_0804A7D4,
|
||||
sub_08001242,
|
||||
VaatiTransfiguredEyeNoop,
|
||||
};
|
||||
|
||||
void (*const gUnk_080D18A0[])(Entity*) = {
|
||||
sub_080457E4, sub_0804586C, sub_080458C4, sub_08045938, sub_08045984,
|
||||
void (*const vaatiTransfiguredEyeFunction0Actions[])(Entity*) = {
|
||||
VaatiTransfiguredEyeFunction0Action0, VaatiTransfiguredEyeFunction0Action1, VaatiTransfiguredEyeFunction0Action2,
|
||||
VaatiTransfiguredEyeFunction0Action3, VaatiTransfiguredEyeFunction0Action4,
|
||||
};
|
||||
|
||||
struct xy {
|
||||
@@ -33,15 +39,15 @@ struct xy {
|
||||
const struct xy gUnk_080D18B4[] = { { 0xe8, 0xf6 }, { 0xf6, 0xe8 }, { 0x0a, 0xe8 }, { 0x18, 0xf6 },
|
||||
{ 0x18, 0x0a }, { 0x0a, 0x18 }, { 0xf6, 0x18 }, { 0xe8, 0x0a } };
|
||||
|
||||
void Enemy5A(Entity* this) {
|
||||
EnemyFunctionHandler(this, gUnk_080D1888);
|
||||
void VaatiTransfiguredEye(Entity* this) {
|
||||
EnemyFunctionHandler(this, vaatiTransfiguredEyeFunctions);
|
||||
}
|
||||
|
||||
void sub_080456E8(Entity* this) {
|
||||
gUnk_080D18A0[this->action](this);
|
||||
void VaatiTransfiguredEyeFunction0(Entity* this) {
|
||||
vaatiTransfiguredEyeFunction0Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08045700(Entity* this) {
|
||||
void VaatiTransfiguredEyeFunction1(Entity* this) {
|
||||
u8 bVar1;
|
||||
Entity* pEVar4;
|
||||
|
||||
@@ -77,13 +83,13 @@ void sub_08045700(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
sub_0804AA30(this, gUnk_080D1888);
|
||||
sub_0804AA30(this, vaatiTransfiguredEyeFunctions);
|
||||
}
|
||||
|
||||
void nullsub_173(Entity* this) {
|
||||
void VaatiTransfiguredEyeNoop(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080457E4(Entity* this) {
|
||||
void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
|
||||
Entity* child;
|
||||
u8 bVar2;
|
||||
|
||||
@@ -99,7 +105,7 @@ void sub_080457E4(Entity* this) {
|
||||
this->field_0x82.HALF.HI = bVar2;
|
||||
if (this->type == 0) {
|
||||
sub_08045A00(this);
|
||||
child = CreateEnemy(ENEMY_5A, 1);
|
||||
child = CreateEnemy(VAATI_TRANSFIGURED_EYE, 1);
|
||||
if (child != NULL) {
|
||||
child->parent = this;
|
||||
this->attachedEntity = child;
|
||||
@@ -114,7 +120,7 @@ void sub_080457E4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0804586C(Entity* this) {
|
||||
void VaatiTransfiguredEyeFunction0Action1(Entity* this) {
|
||||
sub_08045A28(this);
|
||||
if (this->field_0x82.HALF.LO == 0) {
|
||||
if ((this->frames.all & 0x80) != 0) {
|
||||
@@ -122,7 +128,7 @@ void sub_0804586C(Entity* this) {
|
||||
this->flags |= 0x80;
|
||||
}
|
||||
this->action = 2;
|
||||
InitializeAnimation(this, (u32)this->type << 3);
|
||||
InitializeAnimation(this, this->type << 3);
|
||||
}
|
||||
} else {
|
||||
if (--this->field_0x82.HALF.LO == 0) {
|
||||
@@ -131,7 +137,7 @@ void sub_0804586C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080458C4(Entity* this) {
|
||||
void VaatiTransfiguredEyeFunction0Action2(Entity* this) {
|
||||
Entity* parent;
|
||||
|
||||
sub_08045A28(this);
|
||||
@@ -155,7 +161,7 @@ void sub_080458C4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08045938(Entity* this) {
|
||||
void VaatiTransfiguredEyeFunction0Action3(Entity* this) {
|
||||
sub_08045A28(this);
|
||||
if ((this->frames.all & 0x80) != 0) {
|
||||
this->action = 2;
|
||||
@@ -170,7 +176,7 @@ void sub_08045938(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08045984(Entity* this) {
|
||||
void VaatiTransfiguredEyeFunction0Action4(Entity* this) {
|
||||
Entity* parent;
|
||||
|
||||
sub_08045A28(this);
|
||||
+55
-53
@@ -13,7 +13,7 @@
|
||||
|
||||
extern u8 gEntCount;
|
||||
|
||||
void sub_080423A4(Entity*);
|
||||
void VaatiWrathType0PreAction(Entity*);
|
||||
u32 sub_08041FCC(Entity*);
|
||||
void sub_08042004(Entity*);
|
||||
u32 sub_08041ED4(Entity*);
|
||||
@@ -32,24 +32,24 @@ void sub_08042264(Entity*);
|
||||
u32 sub_080422C0(Entity*, u32);
|
||||
void sub_0804228C(Entity*);
|
||||
|
||||
void sub_080413A0(Entity*);
|
||||
void sub_08042428(Entity*);
|
||||
void sub_080424A0(Entity*);
|
||||
void sub_0804250C(Entity*);
|
||||
void sub_080413C0(Entity*);
|
||||
void sub_08041490(Entity*);
|
||||
void sub_080415E8(Entity*);
|
||||
void sub_08041618(Entity*);
|
||||
void sub_080416A4(Entity*);
|
||||
void sub_080416DC(Entity*);
|
||||
void sub_080417AC(Entity*);
|
||||
void sub_08041828(Entity*);
|
||||
void sub_08041880(Entity*);
|
||||
void sub_08041904(Entity*);
|
||||
void sub_0804197C(Entity*);
|
||||
void sub_08041A00(Entity*);
|
||||
void sub_08041AF4(Entity*);
|
||||
void sub_08041BD0(Entity*);
|
||||
void VaatiWrathType0(Entity*);
|
||||
void VaatiWrathType1(Entity*);
|
||||
void VaatiWrathType2(Entity*);
|
||||
void VaatiWrathType3(Entity*);
|
||||
void VaatiWrathType0Action0(Entity*);
|
||||
void VaatiWrathType0Action1(Entity*);
|
||||
void VaatiWrathType0Action2(Entity*);
|
||||
void VaatiWrathType0Action3(Entity*);
|
||||
void VaatiWrathType0Action4(Entity*);
|
||||
void VaatiWrathType0Action5(Entity*);
|
||||
void VaatiWrathType0Action6(Entity*);
|
||||
void VaatiWrathType0Action7(Entity*);
|
||||
void VaatiWrathType0Action8(Entity*);
|
||||
void VaatiWrathType0Action9(Entity*);
|
||||
void VaatiWrathType0ActionA(Entity*);
|
||||
void VaatiWrathType0ActionB(Entity*);
|
||||
void VaatiWrathType0ActionC(Entity*);
|
||||
void VaatiWrathType0ActionD(Entity*);
|
||||
void sub_08041BE8(Entity*);
|
||||
void sub_08041CD0(Entity*);
|
||||
void sub_08041D14(Entity*);
|
||||
@@ -67,15 +67,17 @@ typedef struct {
|
||||
Entity* eyes[4];
|
||||
} VaatiWrathHeapStruct;
|
||||
|
||||
void (*const gUnk_080D0E1C[])(Entity*) = {
|
||||
sub_080413A0,
|
||||
sub_08042428,
|
||||
sub_080424A0,
|
||||
sub_0804250C,
|
||||
void (*const vaatiWrathTypes[])(Entity*) = {
|
||||
VaatiWrathType0,
|
||||
VaatiWrathType1,
|
||||
VaatiWrathType2,
|
||||
VaatiWrathType3,
|
||||
};
|
||||
void (*const gUnk_080D0E2C[])(Entity*) = {
|
||||
sub_080413C0, sub_08041490, sub_080415E8, sub_08041618, sub_080416A4, sub_080416DC, sub_080417AC,
|
||||
sub_08041828, sub_08041880, sub_08041904, sub_0804197C, sub_08041A00, sub_08041AF4, sub_08041BD0,
|
||||
void (*const vaatiWrathType0Actions[])(Entity*) = {
|
||||
VaatiWrathType0Action0, VaatiWrathType0Action1, VaatiWrathType0Action2, VaatiWrathType0Action3,
|
||||
VaatiWrathType0Action4, VaatiWrathType0Action5, VaatiWrathType0Action6, VaatiWrathType0Action7,
|
||||
VaatiWrathType0Action8, VaatiWrathType0Action9, VaatiWrathType0ActionA, VaatiWrathType0ActionB,
|
||||
VaatiWrathType0ActionC, VaatiWrathType0ActionD,
|
||||
};
|
||||
|
||||
const u8 gUnk_080D0E64[] = { 0, -1, 0, 1 };
|
||||
@@ -110,17 +112,17 @@ void VaatiWrath(Entity* this) {
|
||||
SoundReq(SFX_BOSS_DIE);
|
||||
}
|
||||
}
|
||||
gUnk_080D0E1C[this->type](this);
|
||||
vaatiWrathTypes[this->type](this);
|
||||
}
|
||||
|
||||
void sub_080413A0(Entity* this) {
|
||||
void VaatiWrathType0(Entity* this) {
|
||||
#if !(defined EU || defined JP)
|
||||
sub_080423A4(this);
|
||||
VaatiWrathType0PreAction(this);
|
||||
#endif
|
||||
gUnk_080D0E2C[this->action](this);
|
||||
vaatiWrathType0Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_080413C0(Entity* this) {
|
||||
void VaatiWrathType0Action0(Entity* this) {
|
||||
u32 bVar1;
|
||||
|
||||
bVar1 = gScreenTransition.field_0x38 & 1;
|
||||
@@ -159,7 +161,7 @@ void sub_080413C0(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
|
||||
void sub_08041490(Entity* this) {
|
||||
void VaatiWrathType0Action1(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
@@ -230,7 +232,7 @@ void sub_08041490(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080415E8(Entity* this) {
|
||||
void VaatiWrathType0Action2(Entity* this) {
|
||||
sub_08042004(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (--this->actionDelay == 0) {
|
||||
@@ -239,7 +241,7 @@ void sub_080415E8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08041618(Entity* this) {
|
||||
void VaatiWrathType0Action3(Entity* this) {
|
||||
s32 bound;
|
||||
s32 thisY;
|
||||
|
||||
@@ -280,7 +282,7 @@ void sub_08041618(Entity* this) {
|
||||
sub_080421AC(this);
|
||||
}
|
||||
|
||||
void sub_080416A4(Entity* this) {
|
||||
void VaatiWrathType0Action4(Entity* this) {
|
||||
sub_08042004(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (--this->actionDelay == 0) {
|
||||
@@ -292,7 +294,7 @@ void sub_080416A4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080416DC(Entity* this) {
|
||||
void VaatiWrathType0Action5(Entity* this) {
|
||||
Entity* object;
|
||||
u32 subAction;
|
||||
Entity* arm;
|
||||
@@ -345,7 +347,7 @@ void sub_080416DC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080417AC(Entity* this) {
|
||||
void VaatiWrathType0Action6(Entity* this) {
|
||||
Entity* type1;
|
||||
|
||||
if (this->actionDelay == 0) {
|
||||
@@ -376,7 +378,7 @@ void sub_080417AC(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_08041828(Entity* this) {
|
||||
void VaatiWrathType0Action7(Entity* this) {
|
||||
sub_08042214(this);
|
||||
sub_08042004(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
@@ -391,7 +393,7 @@ void sub_08041828(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08041880(Entity* this) {
|
||||
void VaatiWrathType0Action8(Entity* this) {
|
||||
sub_08042004(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
sub_0806F69C(this);
|
||||
@@ -415,7 +417,7 @@ void sub_08041880(Entity* this) {
|
||||
sub_08042214(this);
|
||||
}
|
||||
|
||||
void sub_08041904(Entity* this) {
|
||||
void VaatiWrathType0Action9(Entity* this) {
|
||||
sub_08042004(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->field_0x78.HALF.HI != 0) {
|
||||
@@ -438,7 +440,7 @@ void sub_08041904(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0804197C(Entity* this) {
|
||||
void VaatiWrathType0ActionA(Entity* this) {
|
||||
Entity* type1;
|
||||
|
||||
sub_08042004(this);
|
||||
@@ -466,7 +468,7 @@ void sub_0804197C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08041A00(Entity* this) {
|
||||
void VaatiWrathType0ActionB(Entity* this) {
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
sub_0806F69C(this);
|
||||
@@ -507,7 +509,7 @@ void sub_08041A00(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08041AF4(Entity* this) {
|
||||
void VaatiWrathType0ActionC(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
UpdateAnimationSingleFrame(this);
|
||||
@@ -554,7 +556,7 @@ void sub_08041AF4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08041BD0(Entity* this) {
|
||||
void VaatiWrathType0ActionD(Entity* this) {
|
||||
gUnk_080D0E68[this->subAction](this);
|
||||
}
|
||||
|
||||
@@ -748,16 +750,16 @@ u32 sub_08041F1C(Entity* this) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
eye = CreateEnemy(ENEMY_5F, 0);
|
||||
eye = CreateEnemy(VAATI_WRATH_EYE, 0);
|
||||
eye->parent = this;
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->eyes[0] = eye;
|
||||
eye = CreateEnemy(ENEMY_5F, 1);
|
||||
eye = CreateEnemy(VAATI_WRATH_EYE, 1);
|
||||
eye->parent = this;
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->eyes[1] = eye;
|
||||
eye = CreateEnemy(ENEMY_5F, 2);
|
||||
eye = CreateEnemy(VAATI_WRATH_EYE, 2);
|
||||
eye->parent = this;
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->eyes[2] = eye;
|
||||
eye = CreateEnemy(ENEMY_5F, 3);
|
||||
eye = CreateEnemy(VAATI_WRATH_EYE, 3);
|
||||
eye->parent = this;
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->eyes[3] = eye;
|
||||
return 1;
|
||||
@@ -995,7 +997,7 @@ void sub_0804235C(Entity* this) {
|
||||
}
|
||||
|
||||
#if defined USA || defined DEMO
|
||||
void sub_080423A4(Entity* this) {
|
||||
void VaatiWrathType0PreAction(Entity* this) {
|
||||
int temp;
|
||||
if ((gScreenTransition.field_0x38 & 2) == 0) {
|
||||
if (gSave.unk498 != 0) {
|
||||
@@ -1019,7 +1021,7 @@ void sub_080423A4(Entity* this) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_08042428(Entity* this) {
|
||||
void VaatiWrathType1(Entity* this) {
|
||||
if (((VaatiWrathHeapStruct*)this->myHeap)->type0->next == NULL) {
|
||||
this->myHeap = NULL;
|
||||
DeleteThisEntity();
|
||||
@@ -1040,7 +1042,7 @@ void sub_08042428(Entity* this) {
|
||||
this->spriteOffsetY--;
|
||||
}
|
||||
|
||||
void sub_080424A0(Entity* this) {
|
||||
void VaatiWrathType2(Entity* this) {
|
||||
u32 uVar1;
|
||||
|
||||
if (((VaatiWrathHeapStruct*)this->myHeap)->type0->next == NULL) {
|
||||
@@ -1059,7 +1061,7 @@ void sub_080424A0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0804250C(Entity* this) {
|
||||
void VaatiWrathType3(Entity* this) {
|
||||
if (((VaatiWrathHeapStruct*)this->myHeap)->type0->next == NULL) {
|
||||
this->myHeap = NULL;
|
||||
DeleteThisEntity();
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
|
||||
void sub_080485D8(Entity*);
|
||||
void sub_080485FC(Entity*);
|
||||
void sub_080482EC(Entity*);
|
||||
void sub_08048330(Entity*);
|
||||
void sub_0804835C(Entity*);
|
||||
void sub_08048388(Entity*);
|
||||
void sub_080483F8(Entity*);
|
||||
void sub_08048438(Entity*);
|
||||
void sub_08048478(Entity*);
|
||||
void sub_080484E8(Entity*);
|
||||
void sub_08048550(Entity*);
|
||||
void sub_080485A0(Entity*);
|
||||
void VaatiWrathEyeAction0(Entity*);
|
||||
void VaatiWrathEyeAction1(Entity*);
|
||||
void VaatiWrathEyeAction2(Entity*);
|
||||
void VaatiWrathEyeAction3(Entity*);
|
||||
void VaatiWrathEyeAction4(Entity*);
|
||||
void VaatiWrathEyeAction5(Entity*);
|
||||
void VaatiWrathEyeAction6(Entity*);
|
||||
void VaatiWrathEyeAction7(Entity*);
|
||||
void VaatiWrathEyeAction8(Entity*);
|
||||
void VaatiWrathEyeAction9(Entity*);
|
||||
|
||||
void (*const gUnk_080D1D48[])(Entity*) = {
|
||||
sub_080482EC, sub_08048330, sub_0804835C, sub_08048388, sub_080483F8,
|
||||
sub_08048438, sub_08048478, sub_080484E8, sub_08048550, sub_080485A0,
|
||||
void (*const vaatiWrathEyeActions[])(Entity*) = {
|
||||
VaatiWrathEyeAction0, VaatiWrathEyeAction1, VaatiWrathEyeAction2, VaatiWrathEyeAction3, VaatiWrathEyeAction4,
|
||||
VaatiWrathEyeAction5, VaatiWrathEyeAction6, VaatiWrathEyeAction7, VaatiWrathEyeAction8, VaatiWrathEyeAction9,
|
||||
};
|
||||
|
||||
const s8 gUnk_080D1D70[] = { 0xee, 0x01, 0xfa, 0x04, 0x06, 0x04, 0x13, 0x01 };
|
||||
@@ -29,14 +29,14 @@ const s8 gUnk_080D1D78[] = { 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xfa, 0xfb, 0xfc, 0xf
|
||||
|
||||
const s8 gUnk_080D1D98[] = { 0xe8, 0x04, 0xf8, 0x08, 0x08, 0x08, 0x18, 0x04 };
|
||||
|
||||
void Enemy5F(Entity* this) {
|
||||
void VaatiWrathEye(Entity* this) {
|
||||
if (this->parent->next == NULL) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
gUnk_080D1D48[this->action](this);
|
||||
vaatiWrathEyeActions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_080482EC(Entity* this) {
|
||||
void VaatiWrathEyeAction0(Entity* this) {
|
||||
if ((gScreenTransition.field_0x38 & 1) != 0) {
|
||||
this->action = 2;
|
||||
InitializeAnimation(this, 1);
|
||||
@@ -48,7 +48,7 @@ void sub_080482EC(Entity* this) {
|
||||
sub_080485D8(this);
|
||||
}
|
||||
|
||||
void sub_08048330(Entity* this) {
|
||||
void VaatiWrathEyeAction1(Entity* this) {
|
||||
sub_080485D8(this);
|
||||
GetNextFrame(this);
|
||||
if ((this->frames.all & 0x80) != 0) {
|
||||
@@ -57,7 +57,7 @@ void sub_08048330(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0804835C(Entity* this) {
|
||||
void VaatiWrathEyeAction2(Entity* this) {
|
||||
sub_080485D8(this);
|
||||
if ((gScreenTransition.field_0x39 & 3) == 0) {
|
||||
this->action = 3;
|
||||
@@ -66,7 +66,7 @@ void sub_0804835C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08048388(Entity* this) {
|
||||
void VaatiWrathEyeAction3(Entity* this) {
|
||||
u32 direction;
|
||||
Entity* parent;
|
||||
u32 x;
|
||||
@@ -92,7 +92,7 @@ void sub_08048388(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080483F8(Entity* this) {
|
||||
void VaatiWrathEyeAction4(Entity* this) {
|
||||
sub_080485FC(this);
|
||||
if (this->actionDelay != 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
@@ -107,7 +107,7 @@ void sub_080483F8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08048438(Entity* this) {
|
||||
void VaatiWrathEyeAction5(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->action = 6;
|
||||
if (this->parent->currentHealth >= 0x15) {
|
||||
@@ -122,7 +122,7 @@ void sub_08048438(Entity* this) {
|
||||
sub_080485FC(this);
|
||||
}
|
||||
|
||||
void sub_08048478(Entity* this) {
|
||||
void VaatiWrathEyeAction6(Entity* this) {
|
||||
Entity* pEVar3;
|
||||
|
||||
sub_080485FC(this);
|
||||
@@ -150,7 +150,7 @@ void sub_08048478(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080484E8(Entity* this) {
|
||||
void VaatiWrathEyeAction7(Entity* this) {
|
||||
sub_080485FC(this);
|
||||
GetNextFrame(this);
|
||||
if (this->field_0xf != 0) {
|
||||
@@ -170,7 +170,7 @@ void sub_080484E8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08048550(Entity* this) {
|
||||
void VaatiWrathEyeAction8(Entity* this) {
|
||||
if (this->parent->action == 0xb) {
|
||||
this->actionDelay = 0x3c;
|
||||
} else {
|
||||
@@ -185,7 +185,7 @@ void sub_08048550(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080485A0(Entity* this) {
|
||||
void VaatiWrathEyeAction9(Entity* this) {
|
||||
sub_080485FC(this);
|
||||
GetNextFrame(this);
|
||||
if ((this->frames.all & 0x80) != 0) {
|
||||
+15
-15
@@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "enemy.h"
|
||||
#include "entity.h"
|
||||
#include "script.h"
|
||||
#include "audio.h"
|
||||
@@ -11,18 +10,18 @@ extern void CreateManager36(Entity*);
|
||||
extern void DeleteManager36(Entity*);
|
||||
extern void sub_0805DA90(Entity*, u32);
|
||||
|
||||
void sub_08066A94(Entity*);
|
||||
void sub_08066ACC(Entity*);
|
||||
void VaatiAction0(Entity*);
|
||||
void VaatiAction1(Entity*);
|
||||
void sub_08066B74(Entity*, ScriptExecutionContext*);
|
||||
|
||||
void (*const gUnk_08110734[])(Entity*) = { sub_08066A94, sub_08066ACC };
|
||||
void (*const vaatiActions[])(Entity*) = { VaatiAction0, VaatiAction1 };
|
||||
|
||||
void Vaati(Entity* this) {
|
||||
gUnk_08110734[this->action](this);
|
||||
vaatiActions[this->action](this);
|
||||
this->palette.b.b0 = this->palette.b.b4 + (this->frameSpriteSettings & 1);
|
||||
}
|
||||
|
||||
void sub_08066A94(Entity* this) {
|
||||
void VaatiAction0(Entity* this) {
|
||||
this->action = 1;
|
||||
this->subAction = 0;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
@@ -30,10 +29,11 @@ void sub_08066A94(Entity* this) {
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
sub_0805E3A0(this, 2);
|
||||
sub_0807DD64(this);
|
||||
sub_08066ACC(this);
|
||||
VaatiAction1(this);
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/vaati/sub_08066ACC.inc", void sub_08066ACC(Entity* this)) {
|
||||
void VaatiAction1(Entity* this){
|
||||
ScriptExecutionContext* tmp;
|
||||
sub_0807DD94(this, sub_08066B74);
|
||||
if ((*(s8*)&this->field_0x68.HALF.HI != 0) && ((gScreenTransition.frameCount & 3) == 0)) {
|
||||
sub_08095CB0(this);
|
||||
@@ -42,30 +42,30 @@ NONMATCH("asm/non_matching/vaati/sub_08066ACC.inc", void sub_08066ACC(Entity* th
|
||||
if ((this->frames.all & ~0x80) != 0) {
|
||||
switch (this->frames.all & ~0x80u) {
|
||||
case 1:
|
||||
EnqueueSFX(0x21c);
|
||||
EnqueueSFX(SFX_21C);
|
||||
break;
|
||||
case 2:
|
||||
EnqueueSFX(0x21e);
|
||||
EnqueueSFX(SFX_21E);
|
||||
break;
|
||||
case 3:
|
||||
(*(ScriptExecutionContext**)&this->cutsceneBeh)->intVariable = 4;
|
||||
tmp = (*(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
tmp->intVariable = 4;
|
||||
CreateManager36(this);
|
||||
break;
|
||||
case 4:
|
||||
(*(ScriptExecutionContext**)&this->cutsceneBeh)->intVariable = 4;
|
||||
tmp = (*(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
tmp->intVariable = 4;
|
||||
DeleteManager36(this);
|
||||
EnqueueSFX(0x21d);
|
||||
EnqueueSFX(SFX_21D);
|
||||
break;
|
||||
}
|
||||
this->frames.b.f3 = 0;
|
||||
}
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void sub_08066B74(Entity* this, ScriptExecutionContext* context) {
|
||||
u8 animationState;
|
||||
u32 currentAction;
|
||||
short* psVar4;
|
||||
u32 actions;
|
||||
|
||||
actions = context->postScriptActions & 0xfff00000;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include "textbox.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_0806B67C(Entity*);
|
||||
void sub_0806B7BC(Entity*);
|
||||
void VaatiRebornAction0(Entity* this);
|
||||
void VaatiRebornAction1(Entity* this);
|
||||
void sub_0806B96C(Entity*);
|
||||
Entity* sub_0806B9BC(Entity*);
|
||||
|
||||
@@ -16,17 +16,17 @@ typedef struct xy {
|
||||
s8 y;
|
||||
} PACKED xy;
|
||||
|
||||
void (*const gUnk_08112F78[])(Entity*) = {
|
||||
sub_0806B67C,
|
||||
sub_0806B7BC,
|
||||
void (*const vaatiRebornActions[])(Entity*) = {
|
||||
VaatiRebornAction0,
|
||||
VaatiRebornAction1,
|
||||
};
|
||||
const xy gUnk_08112F80[] = { { 10, -29 }, { -10, -29 }, { 15, -21 }, { -15, -21 } };
|
||||
|
||||
void VaatiReborn(Entity* this) {
|
||||
gUnk_08112F78[this->action](this);
|
||||
vaatiRebornActions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0806B67C(Entity* this) {
|
||||
void VaatiRebornAction0(Entity* this) {
|
||||
Entity* entity;
|
||||
u32 i;
|
||||
|
||||
@@ -88,7 +88,7 @@ void sub_0806B67C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806B7BC(Entity* this) {
|
||||
void VaatiRebornAction1(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
if (CheckRoomFlag(3) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user