mirror of
https://github.com/zeldaret/tmc
synced 2026-06-03 18:36:43 -04:00
Merge branch 'master' into cleanup_declarations
This commit is contained in:
+1
-1
@@ -255,7 +255,7 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
|
||||
arg0->attachedEntity = itemEntity;
|
||||
} else if (arg0->id == 0x1e) {
|
||||
itemEntity->direction = arg0->animationState << 3 | 0x80;
|
||||
itemEntity->nonPlanarMovement = 0xc0;
|
||||
itemEntity->speed = 0xc0;
|
||||
itemEntity->field_0x20 = 0x18000;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -104,4 +104,4 @@ void sub_0805ED14(u32 param_1) {
|
||||
gPlayerState.field_0x9c = param_1;
|
||||
gPlayerState.field_0x98 = 0;
|
||||
gPlayerState.field_0x9a = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
|
||||
void sub_080A29BC(Entity* parent) {
|
||||
void sub_080A29BC(Entity* parent) { // TODO this is CreateDust, why is it here again? Fogot to delete file?
|
||||
CreateFx(parent, 2, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -449,7 +449,7 @@ void sub_08032160(Entity* this) {
|
||||
} else {
|
||||
this->spriteSettings.b.flipX = 0;
|
||||
}
|
||||
this->nonPlanarMovement = 0xf0;
|
||||
this->speed = 0xf0;
|
||||
this->field_0x20 = 0x12000;
|
||||
this->spritePriority.b1 = 1;
|
||||
InitializeAnimation(this, 12);
|
||||
|
||||
+5
-5
@@ -104,7 +104,7 @@ void sub_080218CC(Entity* this) {
|
||||
this->previousActionFlag = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->direction = ((sub_08049F84(this, 1) ^ 0x10) + gUnk_080CB5DC[Random() & 7]) & 0x1f;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
this->field_0x20 = 0x12000;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ void sub_080218CC(Entity* this) {
|
||||
this->actionDelay = (Random() & 0x38) + 8;
|
||||
this->field_0xf = 1;
|
||||
this->flags |= 0x80;
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
}
|
||||
@@ -141,7 +141,7 @@ void sub_08021984(Entity* this) {
|
||||
this->actionDelay = 16;
|
||||
this->field_0xf = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
((u8*)&this->field_0x86)[0] = 60;
|
||||
InitializeAnimation(this, 0);
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
@@ -311,9 +311,9 @@ void sub_08021D44(Entity* this, u32 direction) {
|
||||
direction = DirectionRoundUp(direction);
|
||||
this->direction = direction;
|
||||
if (DirectionIsHorizontal(direction)) {
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
} else {
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -54,7 +54,7 @@ void sub_0802C688(Entity* this) {
|
||||
this->damageType = 0x6e;
|
||||
this->field_0xf = 1;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
InitializeAnimation(this, this->direction >> 4 | 6);
|
||||
break;
|
||||
@@ -69,7 +69,7 @@ void sub_0802C7AC(Entity* this) {
|
||||
this->field_0xf = 1;
|
||||
this->height.HALF.HI = 0;
|
||||
if (this->field_0x82.HALF.LO != 2) {
|
||||
this->nonPlanarMovement = this->field_0x82.HALF.LO ? 0x200 : 0x80;
|
||||
this->speed = this->field_0x82.HALF.LO ? 0x200 : 0x80;
|
||||
}
|
||||
this->field_0x20 = 0x18000;
|
||||
this->field_0x82.HALF.HI = 0;
|
||||
@@ -225,7 +225,7 @@ void sub_0802CA94(Entity* this) {
|
||||
this->field_0xf = 1;
|
||||
this->spritePriority.b1 = 1;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->field_0x82.HALF.HI = 0;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
this->direction = ((gPlayerEntity.animationState << 2) | 4) & 0x1c;
|
||||
@@ -262,11 +262,11 @@ void sub_0802CB68(Entity* this) {
|
||||
this->flags |= 0x80;
|
||||
if (this->field_0x82.HALF.LO) {
|
||||
this->actionDelay = 200;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
InitializeAnimation(this, (this->direction >> 4) | 2);
|
||||
} else {
|
||||
this->actionDelay = 0x3c;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
InitializeAnimation(this, this->direction >> 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ void sub_0802AA40(Entity* this) {
|
||||
}
|
||||
if (this->direction == direction) {
|
||||
this->action = 3;
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
this->field_0x7a.HALF.HI = 0;
|
||||
ent->field_0x80.HALF.LO = 1;
|
||||
ent->actionDelay = 0x96;
|
||||
@@ -242,7 +242,7 @@ void sub_0802AB40(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
this->action = 5;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
InitializeAnimation(this, this->type + 1);
|
||||
}
|
||||
break;
|
||||
@@ -254,7 +254,7 @@ void sub_0802AC08(Entity* this) {
|
||||
this->action = 2;
|
||||
this->previousActionFlag = 0;
|
||||
this->actionDelay = 0x40;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
sub_0802ACDC(this, 8);
|
||||
sub_0802ADDC(this);
|
||||
}
|
||||
|
||||
+4
-4
@@ -36,7 +36,7 @@ void sub_0802B540(Entity* this) {
|
||||
u32 direction = sub_0804A024(this, 1, 0xc);
|
||||
if (direction != 0xff) {
|
||||
this->action = 2;
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
this->direction = direction;
|
||||
}
|
||||
}
|
||||
@@ -45,15 +45,15 @@ void sub_0802B540(Entity* this) {
|
||||
void sub_0802B56C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->bitfield & 0x80) {
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
}
|
||||
|
||||
if (sub_080AF038(this)) {
|
||||
if (this->animIndex != 1) {
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
if (this->nonPlanarMovement < 0x220) {
|
||||
this->nonPlanarMovement += 4;
|
||||
if (this->speed < 0x220) {
|
||||
this->speed += 4;
|
||||
}
|
||||
} else {
|
||||
this->action = 3;
|
||||
|
||||
+7
-7
@@ -55,7 +55,7 @@ void Chuchu(Entity* this) {
|
||||
if (this->flags & 0x80) {
|
||||
this->action = 6;
|
||||
this->flags &= ~0x80;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
this->damageType = 0x5c;
|
||||
InitializeAnimation(this, 5);
|
||||
}
|
||||
@@ -294,7 +294,7 @@ void sub_0801F328(Entity* this) {
|
||||
void sub_0801F340(Entity* this) {
|
||||
this->action = 5;
|
||||
this->actionDelay = 60;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
this->damageType = 92;
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
@@ -418,7 +418,7 @@ void sub_0801F584(Entity* this) {
|
||||
} else {
|
||||
this->action = 6;
|
||||
this->field_0xf = 60;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
this->damageType = 92;
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
@@ -470,7 +470,7 @@ void sub_0801F6F8(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 0x80) {
|
||||
this->action = 4;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
sub_0804AA1C(this);
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
@@ -593,7 +593,7 @@ void sub_0801F940(Entity* this) {
|
||||
} else {
|
||||
this->action = 6;
|
||||
this->field_0xf = 60;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
}
|
||||
@@ -645,7 +645,7 @@ void sub_0801FAAC(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 0x80) {
|
||||
sub_0801FB14(this);
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
sub_0804AA1C(this);
|
||||
}
|
||||
}
|
||||
@@ -706,7 +706,7 @@ u32 sub_0801FBD0(Entity* this) {
|
||||
}
|
||||
|
||||
void Chuchu_JumpAtPlayer(Entity* this) {
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
InitializeAnimation(this, 3);
|
||||
|
||||
@@ -72,7 +72,7 @@ void sub_080229F8(Entity* this) {
|
||||
this->actionDelay = 6;
|
||||
this->field_0xf = 8;
|
||||
this->frameIndex = 0;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
sub_08022B44(this);
|
||||
} else {
|
||||
this->field_0x20 = 0x10000;
|
||||
@@ -111,7 +111,7 @@ void sub_08022AA4(Entity* this) {
|
||||
this->action = 2;
|
||||
this->actionDelay = (rand & 3) + 1;
|
||||
this->field_0xf = 1;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
|
||||
if (!sub_08049FA0(this) && (rand >> 8) & 3) {
|
||||
this->direction = sub_08049EE4(this);
|
||||
|
||||
+4
-4
@@ -430,7 +430,7 @@ void sub_08021328(Entity* this) {
|
||||
void sub_0802134C(Entity* this) {
|
||||
this->action = 15;
|
||||
this->direction = DirectionFromAnimationState(this->animationState);
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->field_0x76.HWORD = 0x78;
|
||||
sub_08021218(this, 0xe, this->animationState);
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void sub_08021380(Entity* this) {
|
||||
|
||||
void sub_08021390(Entity* this) {
|
||||
this->action = 7;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->damageType = 0x56;
|
||||
sub_08021218(this, 6, this->animationState);
|
||||
}
|
||||
@@ -455,7 +455,7 @@ void sub_08021390(Entity* this) {
|
||||
void sub_080213B0(Entity* this) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 1;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
this->field_0x76.HWORD = 0xf0;
|
||||
sub_08021218(this, 3, this->animationState);
|
||||
}
|
||||
@@ -474,7 +474,7 @@ void sub_080213F0(Entity* this) {
|
||||
|
||||
void sub_08021400(Entity* this) {
|
||||
this->action = 9;
|
||||
this->nonPlanarMovement = 0x60;
|
||||
this->speed = 0x60;
|
||||
sub_08021218(this, 10, this->animationState);
|
||||
}
|
||||
|
||||
|
||||
@@ -157,15 +157,15 @@ void sub_0802C4B0(Entity* this) {
|
||||
rand = Random() & 7;
|
||||
if (rand & 4) {
|
||||
if (rand & 3) {
|
||||
this->nonPlanarMovement = gUnk_080CD568[offset | 2];
|
||||
this->speed = gUnk_080CD568[offset | 2];
|
||||
} else {
|
||||
this->nonPlanarMovement = gUnk_080CD568[offset | 0];
|
||||
this->speed = gUnk_080CD568[offset | 0];
|
||||
}
|
||||
} else {
|
||||
if (rand & 3) {
|
||||
this->nonPlanarMovement = gUnk_080CD568[offset | 1];
|
||||
this->speed = gUnk_080CD568[offset | 1];
|
||||
} else {
|
||||
this->nonPlanarMovement = gUnk_080CD568[offset | 3];
|
||||
this->speed = gUnk_080CD568[offset | 3];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ void sub_080453E8(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->cutsceneBeh.HALF.LO = this->currentHealth;
|
||||
this->field_0x3c |= 0x10;
|
||||
sub_0804A720(this);
|
||||
|
||||
+3
-3
@@ -212,7 +212,7 @@ void sub_080377B0(Entity* this) {
|
||||
this->field_0xf = 8;
|
||||
r1 = Random();
|
||||
this->field_0x74.HWORD = (r1 & 0x38) + 0x78;
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
r2 = Random();
|
||||
if (!sub_08049FA0(this) && (r2 & 3)) {
|
||||
this->direction = DirectionRoundUp(sub_08049EE4(this));
|
||||
@@ -234,7 +234,7 @@ NONMATCH("asm/non_matching/gibdo/sub_08037810.inc", u32 sub_08037810(Entity* thi
|
||||
this->action = 3;
|
||||
this->actionDelay = 0x18;
|
||||
this->field_0xf = 0x8;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
y = DirectionRoundUp(GetFacingDirection(this, gUnk_020000B0));
|
||||
this->direction = y;
|
||||
this->animationState = y / 8;
|
||||
@@ -259,7 +259,7 @@ u32 sub_080378B0(Entity* this) {
|
||||
if (sub_0804A044(this, gUnk_020000B0, 0xa) == this->direction)
|
||||
if (sub_0806FCB8(this, gUnk_020000B0->x.HALF.HI, gUnk_020000B0->y.HALF.HI, 0x18) != 0) {
|
||||
this->action = 5;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
InitAnimationForceUpdate(this, this->animationState + 8);
|
||||
return 1;
|
||||
}
|
||||
|
||||
+35
-35
@@ -144,7 +144,7 @@ void sub_08046930(Entity* this) {
|
||||
if (this->type) {
|
||||
this->previousActionFlag = 5;
|
||||
this->direction = 0x20;
|
||||
this->nonPlanarMovement = 0x280;
|
||||
this->speed = 0x280;
|
||||
}
|
||||
sub_08047D88(this);
|
||||
if (this->field_0x7c.BYTES.byte0 == 0)
|
||||
@@ -153,7 +153,7 @@ void sub_08046930(Entity* this) {
|
||||
this->actionDelay = 1;
|
||||
this->animationState = 0;
|
||||
this->direction = 0;
|
||||
this->nonPlanarMovement = 0x280;
|
||||
this->speed = 0x280;
|
||||
}
|
||||
|
||||
void sub_0804696C(Entity* this) {
|
||||
@@ -161,7 +161,7 @@ void sub_0804696C(Entity* this) {
|
||||
if (gRoomControls.roomOriginY + 0x130 > this->y.HALF.HI) {
|
||||
this->previousActionFlag = 2;
|
||||
this->direction = 0x80;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
this->spriteOrientation.flipY = 3;
|
||||
this->spriteRendering.b3 = 3;
|
||||
SoundReq(0x2e);
|
||||
@@ -232,7 +232,7 @@ void sub_08046A9C(Entity* this) {
|
||||
|
||||
void sub_08046AE8(Entity* this) {
|
||||
this->previousActionFlag = 1;
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
sub_08048178(this, ((Entity*)this->myHeap)->next->animationState >> 5);
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
sub_08047D88(this);
|
||||
@@ -310,7 +310,7 @@ void sub_08046CEC(Entity* this) {
|
||||
if (((Entity*)this->myHeap)->prev->field_0x6c.HWORD & 2) {
|
||||
this->action = 2;
|
||||
this->previousActionFlag = 0;
|
||||
this->animationState = this->nonPlanarMovement;
|
||||
this->animationState = this->speed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ const u16 gUnk_080D1B60[8] = { 0x200, 0x184, 0x28C, 0x210, 0x200, 0x29C, 0x174,
|
||||
void sub_08046D44(Entity* this) {
|
||||
const u16* tmp;
|
||||
this->previousActionFlag = 1;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
tmp = gUnk_080D1B60 + (((Entity*)this->myHeap)->next->animationState >> 5);
|
||||
this->field_0x80.HWORD = tmp[0] + gRoomControls.roomOriginX;
|
||||
this->field_0x82.HWORD = tmp[1] + gRoomControls.roomOriginY;
|
||||
@@ -385,7 +385,7 @@ void sub_08046EF4(Entity* this) {
|
||||
this->actionDelay = 0x7F;
|
||||
this->direction ^= 0x80;
|
||||
}
|
||||
this->nonPlanarMovement = gUnk_080D1B74[(this->actionDelay >> 3) & 0xF];
|
||||
this->speed = gUnk_080D1B74[(this->actionDelay >> 3) & 0xF];
|
||||
if ((--this->field_0xf & 0xFF) == 0) {
|
||||
Entity* tmp;
|
||||
this->field_0xf = (Random() & 0x38) + 0x78;
|
||||
@@ -428,7 +428,7 @@ void sub_08046F64(Entity* this) {
|
||||
|
||||
void sub_08046FE8(Entity* this) {
|
||||
this->previousActionFlag = 1;
|
||||
this->nonPlanarMovement = 0x1c0;
|
||||
this->speed = 0x1c0;
|
||||
this->field_0x7c.HALF.HI = 0x1e;
|
||||
this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x290;
|
||||
this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x190;
|
||||
@@ -445,10 +445,10 @@ void sub_0804702C(Entity* this) {
|
||||
}
|
||||
}
|
||||
sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
if (sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, (this->nonPlanarMovement >> 0x10) + 0x10)) {
|
||||
if (sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, (this->speed >> 0x10) + 0x10)) {
|
||||
this->previousActionFlag = 2;
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
this->nonPlanarMovement = 0x280;
|
||||
this->speed = 0x280;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ void sub_080470B4(Entity* this) {
|
||||
sub_08047EA4(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
} else {
|
||||
this->previousActionFlag = 3;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
this->field_0x74.HWORD = gUnk_080D1BBC[Random() & 1];
|
||||
sub_08047D88(this);
|
||||
@@ -485,8 +485,8 @@ void sub_08047140(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0804717C(Entity* this) {
|
||||
if (this->nonPlanarMovement < 0x280) {
|
||||
this->nonPlanarMovement += 8;
|
||||
if (this->speed < 0x280) {
|
||||
this->speed += 8;
|
||||
}
|
||||
sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
if (gRoomControls.roomOriginX + 0x200 > this->x.HALF.HI) {
|
||||
@@ -495,8 +495,8 @@ void sub_0804717C(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080471C8(Entity* this) {
|
||||
if (this->nonPlanarMovement > 0x180) {
|
||||
this->nonPlanarMovement -= 0x10;
|
||||
if (this->speed > 0x180) {
|
||||
this->speed -= 0x10;
|
||||
}
|
||||
if (this->direction < 0xe0) {
|
||||
this->direction++;
|
||||
@@ -519,7 +519,7 @@ void sub_0804723C(Entity* this) {
|
||||
this->direction -= 2;
|
||||
if (this->direction < 0xc0) {
|
||||
this->previousActionFlag = 7;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->direction = 0xc0;
|
||||
this->field_0x76.HWORD = 0xc000;
|
||||
}
|
||||
@@ -538,8 +538,8 @@ void sub_08047284(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080472BC(Entity* this) {
|
||||
if (this->nonPlanarMovement < 0x300) {
|
||||
this->nonPlanarMovement += 8;
|
||||
if (this->speed < 0x300) {
|
||||
this->speed += 8;
|
||||
}
|
||||
sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
if (gRoomControls.roomOriginX + 0x2B0 >= this->x.HALF.HI)
|
||||
@@ -549,8 +549,8 @@ void sub_080472BC(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08047310(Entity* this) {
|
||||
if (this->nonPlanarMovement < 0x180) {
|
||||
this->nonPlanarMovement -= 0x10;
|
||||
if (this->speed < 0x180) {
|
||||
this->speed -= 0x10;
|
||||
}
|
||||
this->field_0x76.HWORD -= 0x1D0;
|
||||
this->direction = this->field_0x76.HWORD >> 8;
|
||||
@@ -580,7 +580,7 @@ void sub_0804736C(Entity* this) {
|
||||
|
||||
void sub_080473B8(Entity* this) {
|
||||
this->previousActionFlag = 1;
|
||||
this->nonPlanarMovement = 0x120;
|
||||
this->speed = 0x120;
|
||||
this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x200;
|
||||
this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x1D0;
|
||||
sub_08047D88(this);
|
||||
@@ -608,7 +608,7 @@ void sub_080473F0(Entity* this) {
|
||||
if (sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, 8)) {
|
||||
this->previousActionFlag = 2;
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,7 +625,7 @@ void sub_08047484(Entity* this) {
|
||||
sub_08047EA4(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
} else {
|
||||
this->previousActionFlag = 3;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->direction = 0x40;
|
||||
this->field_0x76.HWORD = 0x4000;
|
||||
this->field_0x74.HWORD = 0x180;
|
||||
@@ -665,7 +665,7 @@ void sub_08047508(Entity* this) {
|
||||
sub_08047E48(this);
|
||||
if (gRoomControls.roomOriginX + 0x280 < this->x.HALF.HI) {
|
||||
this->previousActionFlag = 4;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->animationState = this->direction;
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
}
|
||||
@@ -683,7 +683,7 @@ void sub_080475F4(Entity* this) {
|
||||
if (this->direction >= 0xc0) {
|
||||
this->direction = 0xc0;
|
||||
this->previousActionFlag = 5;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->field_0x7c.HALF.HI = 0x3c;
|
||||
}
|
||||
sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
@@ -720,7 +720,7 @@ void sub_0804763C(Entity* this) {
|
||||
sub_08047E48(this);
|
||||
if (gRoomControls.roomOriginX + 0x180 > this->x.HALF.HI) {
|
||||
this->previousActionFlag = 6;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->animationState = this->direction;
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
}
|
||||
@@ -738,7 +738,7 @@ void sub_0804772C(Entity* this) {
|
||||
if (this->direction <= 0x40) {
|
||||
this->direction = 0x40;
|
||||
this->previousActionFlag = 3;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
this->field_0x7c.HALF.HI = 0x1e;
|
||||
}
|
||||
sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
@@ -753,7 +753,7 @@ void sub_08047778(Entity* this) {
|
||||
|
||||
void sub_08047798(Entity* this) {
|
||||
this->previousActionFlag = 1;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
if (this->x.HALF.HI - gRoomControls.roomOriginX < 0x1F8) {
|
||||
this->field_0x80.HWORD = 0xa8;
|
||||
} else {
|
||||
@@ -767,8 +767,8 @@ void sub_08047798(Entity* this) {
|
||||
const s16 gUnk_080D1BF0[2] = { 0x80, -0x80 };
|
||||
|
||||
void sub_080477F0(Entity* this) {
|
||||
if (this->nonPlanarMovement < 0x300) {
|
||||
this->nonPlanarMovement += 8;
|
||||
if (this->speed < 0x300) {
|
||||
this->speed += 8;
|
||||
}
|
||||
this->direction = sub_080045DA(this->field_0x80.HWORD - this->x.HALF.HI, this->field_0x82.HWORD - this->y.HALF.HI);
|
||||
sub_08047E48(this);
|
||||
@@ -876,7 +876,7 @@ void sub_08047978(Entity* this) {
|
||||
void sub_08047B08(Entity* this) {
|
||||
sub_08047D88(this);
|
||||
this->direction = sub_080045DA(this->field_0x80.HWORD - this->x.HALF.HI, this->field_0x82.HWORD - this->y.HALF.HI);
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->speed = 0x200;
|
||||
sub_08047E58(this);
|
||||
if (!sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, 4))
|
||||
return;
|
||||
@@ -918,7 +918,7 @@ const s8 gUnk_080D1C00[4] = { 0x40, -0x40, -0x40, 0x40 };
|
||||
void sub_08047BF0(Entity* this) {
|
||||
Entity* tmp;
|
||||
this->direction = gUnk_080D1C00[this->actionDelay & 3];
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
sub_08047E48(this);
|
||||
if (this->actionDelay == 0) {
|
||||
if ((this->field_0xf++ & 0xF) == 0) {
|
||||
@@ -934,7 +934,7 @@ void sub_08047BF0(Entity* this) {
|
||||
}
|
||||
}
|
||||
this->direction = this->field_0x76.HWORD;
|
||||
this->nonPlanarMovement = 0x140;
|
||||
this->speed = 0x140;
|
||||
sub_08047E48(this);
|
||||
if (this->y.HALF.HI > gRoomControls.roomOriginY + 0x270) {
|
||||
this->previousActionFlag = 2;
|
||||
@@ -1009,7 +1009,7 @@ void sub_08047DF0(Entity* this, u32 unk1) {
|
||||
sub_08047EA4(this, unk1);
|
||||
oldX = this->x.HALF.HI;
|
||||
oldY = this->y.HALF.HI;
|
||||
sub_0806F62C(this, this->nonPlanarMovement, this->direction);
|
||||
sub_0806F62C(this, this->speed, this->direction);
|
||||
if (this->field_0x7c.BYTES.byte0 & 1) {
|
||||
if (sub_08079F8C()) {
|
||||
gPlayerEntity.x.HALF.HI += this->x.HALF.HI - oldX;
|
||||
@@ -1027,7 +1027,7 @@ void sub_08047E58(Entity* this) {
|
||||
u32 oldX, oldY;
|
||||
oldX = this->x.HALF.HI;
|
||||
oldY = this->y.HALF.HI;
|
||||
sub_0806F62C(this, this->nonPlanarMovement, this->direction);
|
||||
sub_0806F62C(this, this->speed, this->direction);
|
||||
if (this->field_0x7c.BYTES.byte0 & 1) {
|
||||
if (sub_08079F8C()) {
|
||||
gPlayerEntity.x.HALF.HI += this->x.HALF.HI - oldX;
|
||||
|
||||
@@ -177,7 +177,7 @@ void sub_0802BE18(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 0x1e;
|
||||
this->nonPlanarMovement = 0x300;
|
||||
this->speed = 0x300;
|
||||
} else {
|
||||
sub_0802C18C(this);
|
||||
}
|
||||
@@ -197,12 +197,12 @@ void sub_0802BE48(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0802BE80(Entity* this) {
|
||||
this->nonPlanarMovement -= 0x20;
|
||||
if (0xff < this->nonPlanarMovement) {
|
||||
this->speed -= 0x20;
|
||||
if (0xff < this->speed) {
|
||||
sub_0802C1CC(this);
|
||||
}
|
||||
|
||||
if (this->nonPlanarMovement > 0) {
|
||||
if (this->speed > 0) {
|
||||
sub_080AEFE0(this);
|
||||
sub_0802C18C(this);
|
||||
} else {
|
||||
@@ -230,7 +230,7 @@ void sub_0802BEEC(Entity* this) {
|
||||
} else if (!sub_08003FC4(this, 0x1c00)) {
|
||||
this->action = 8;
|
||||
this->actionDelay = 30;
|
||||
this->nonPlanarMovement = 0x120;
|
||||
this->speed = 0x120;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ void sub_0802C1CC(Entity* this) {
|
||||
|
||||
void sub_0802C218(Entity* this) {
|
||||
this->action = 6;
|
||||
this->nonPlanarMovement = 0xe0;
|
||||
this->speed = 0xe0;
|
||||
this->field_0x20 = 0x18000;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -104,7 +104,7 @@ void sub_080324FC(Entity* this) {
|
||||
this->field_0xf--;
|
||||
if (this->field_0xf == 0) {
|
||||
this->action = 4;
|
||||
this->nonPlanarMovement = 0x1E0;
|
||||
this->speed = 0x1E0;
|
||||
this->field_0x76.HWORD = 0x46;
|
||||
this->field_0x78.HWORD = 0;
|
||||
*(((u8*)&this->field_0x7a) + 1) = 0;
|
||||
@@ -199,7 +199,7 @@ u32 sub_0803271C(Entity* this) {
|
||||
|
||||
void sub_08032740(Entity* this) {
|
||||
this->action = 1;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
sub_08032650(this);
|
||||
}
|
||||
@@ -207,7 +207,7 @@ void sub_08032740(Entity* this) {
|
||||
void sub_0803275C(Entity* this) {
|
||||
this->action = 5;
|
||||
this->actionDelay = 0x2D;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
InitAnimationForceUpdate(this, this->animationState);
|
||||
sub_0803269C(this, this->direction);
|
||||
sub_080327E0(this);
|
||||
|
||||
+2
-2
@@ -167,13 +167,13 @@ void Leever_Move(Entity* this) {
|
||||
this->field_0x74.HWORD = 1;
|
||||
}
|
||||
|
||||
this->nonPlanarMovement = (this->frames.all & 0xf) * 0x20;
|
||||
this->speed = (this->frames.all & 0xf) * 0x20;
|
||||
if (this->type == LeeverForm_Red) {
|
||||
if ((this->field_0xf++ & 0xf) == 0) {
|
||||
sub_08004596(this, sub_0800132C(this, gUnk_020000B0));
|
||||
}
|
||||
} else {
|
||||
this->nonPlanarMovement += 0x40;
|
||||
this->speed += 0x40;
|
||||
if ((this->field_0xf++ & 0x7) == 0) {
|
||||
sub_08004596(this, sub_0800132C(this, gUnk_020000B0));
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ void sub_0802999C(Entity* this) {
|
||||
this->action = 1;
|
||||
this->flags |= 0x80;
|
||||
this->direction = DirectionRound(Random());
|
||||
this->nonPlanarMovement = 0xa0;
|
||||
this->speed = 0xa0;
|
||||
this->animationState = 0xff;
|
||||
this->y.WORD += 6;
|
||||
this->parent = this;
|
||||
@@ -136,7 +136,7 @@ void sub_08029A94(Entity* this) {
|
||||
void sub_08029AA4(Entity* this) {
|
||||
if (this->field_0x76.HALF.HI != 0) {
|
||||
this->action = 3;
|
||||
this->nonPlanarMovement = 0x108;
|
||||
this->speed = 0x108;
|
||||
this->damageType = 0x6a;
|
||||
this->field_0x7a.HWORD = 0x168;
|
||||
this->field_0x74.HALF.HI = 4;
|
||||
@@ -151,7 +151,7 @@ void sub_08029AE0(Entity* this) {
|
||||
sub_0802A098(this);
|
||||
if (--this->field_0x7a.HWORD == 0) {
|
||||
this->action = 1;
|
||||
this->nonPlanarMovement = 0xa0;
|
||||
this->speed = 0xa0;
|
||||
this->field_0x74.HALF.HI = 0;
|
||||
sub_08029EEC(this);
|
||||
sub_0801D2B4(this, 0x77);
|
||||
|
||||
@@ -36,7 +36,7 @@ void nullsub_23(Entity* this) {
|
||||
void sub_08045618(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->field_0x3c = this->field_0x3c | 0x10;
|
||||
sub_0804A720(this);
|
||||
InitializeAnimation(this, 1);
|
||||
|
||||
@@ -48,7 +48,7 @@ void nullsub_22(void) {
|
||||
void sub_080452A4(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
sub_0804A720(this);
|
||||
InitializeAnimation(this, 6);
|
||||
if (this->type2) {
|
||||
@@ -70,8 +70,8 @@ void sub_080452FC(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 1;
|
||||
if (0 < this->nonPlanarMovement)
|
||||
this->actionDelay = sub_0806FA04(0x1000, this->nonPlanarMovement) >> 0x8;
|
||||
if (0 < this->speed)
|
||||
this->actionDelay = sub_0806FA04(0x1000, this->speed) >> 0x8;
|
||||
|
||||
if (sub_08049FA0(this) == 0 && (Random() & 3)) {
|
||||
cVar2 = sub_08049EE4(this);
|
||||
|
||||
+9
-9
@@ -59,14 +59,14 @@ void sub_0801FFDC(Entity* this) {
|
||||
this->field_0x82.HALF.LO = 0;
|
||||
this->animationState = PeahatAnimation_SlicedPropeller;
|
||||
this->action = 5;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->hurtBlinkTime = -30;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
} else if (this->bitfield == 0x9b) {
|
||||
this->animationState = PeahatAnimation_BrokenPropeller;
|
||||
this->action = 5;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->hurtBlinkTime = -30;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
@@ -74,7 +74,7 @@ void sub_0801FFDC(Entity* this) {
|
||||
if (this->animationState == PeahatAnimation_Flying) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 30;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->direction = -1;
|
||||
this->field_0x82.HALF.HI = 0x78;
|
||||
GetNextFrame(this);
|
||||
@@ -154,7 +154,7 @@ void Peahat_Fly(Entity* this) {
|
||||
this->action = 2;
|
||||
this->previousActionFlag = Random() & 3;
|
||||
this->actionDelay = 60;
|
||||
this->nonPlanarMovement = 160;
|
||||
this->speed = 160;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ void Peahat_ChargeStart(Entity* this) {
|
||||
} else {
|
||||
this->action = 3;
|
||||
this->actionDelay = 120;
|
||||
this->nonPlanarMovement = 192;
|
||||
this->speed = 192;
|
||||
this->direction = (GetFacingDirection(this, gUnk_020000B0) + gUnk_080CA5D4[Random() & 1]) & 0x1f;
|
||||
}
|
||||
} else {
|
||||
@@ -195,7 +195,7 @@ void Peahat_ChargeTarget(Entity* this) {
|
||||
}
|
||||
if (60 < this->actionDelay) {
|
||||
if (this->actionDelay & 1)
|
||||
this->nonPlanarMovement += 4;
|
||||
this->speed += 4;
|
||||
|
||||
if ((gScreenTransition.frameCount & 3) == 0)
|
||||
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
|
||||
@@ -211,12 +211,12 @@ void Peahat_ChargeEnd(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 1;
|
||||
this->nonPlanarMovement = 128;
|
||||
this->speed = 128;
|
||||
this->field_0x82.HALF.HI = 120;
|
||||
GetNextFrame(this);
|
||||
} else {
|
||||
if (this->actionDelay & 1)
|
||||
this->nonPlanarMovement -= 8;
|
||||
this->speed -= 8;
|
||||
|
||||
sub_080AEFE0(this);
|
||||
UpdateAnimationVariableFrames(this, 4);
|
||||
@@ -331,7 +331,7 @@ void PeahatPropeller_Initialize(Entity* this) {
|
||||
this->spriteRendering.b3 = 1;
|
||||
this->spriteOrientation.flipY = 1;
|
||||
this->spriteSettings.b.shadow = 0;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
this->direction = (Random() & 0x10) + 8;
|
||||
InitializeAnimation(this, PeahatAnimation_Propeller);
|
||||
}
|
||||
|
||||
+25
-25
@@ -83,7 +83,7 @@ void sub_08023FF0(Entity* this) {
|
||||
this->flags |= 0x80;
|
||||
this->damageType = 0x77;
|
||||
this->actionDelay = 1;
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
} else {
|
||||
gUnk_080CBEF8[this->previousActionFlag](this);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ void sub_080241C0(Entity* this) {
|
||||
if (PlayerInRange(this, 3, (gPlayerState.hurtBlinkSpeed != 0) ? 0xa0 : 0x40) && sub_08049FDC(this, 3) &&
|
||||
gPlayerEntity.action != 0x1e) {
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
sub_08024A14(this, 3, 10);
|
||||
} else if (--this->field_0xf == 0) {
|
||||
sub_08024A14(this, 0, 0x20);
|
||||
@@ -222,8 +222,8 @@ void sub_080242A0(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->direction = GetFacingDirection(this, gUnk_020000B0);
|
||||
sub_08024E00(this, 1);
|
||||
if (this->nonPlanarMovement != 0) {
|
||||
this->nonPlanarMovement = 0;
|
||||
if (this->speed != 0) {
|
||||
this->speed = 0;
|
||||
} else {
|
||||
sub_08024E1C(this);
|
||||
}
|
||||
@@ -235,7 +235,7 @@ void sub_080242A0(Entity* this) {
|
||||
this->action = 4;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->actionDelay = 0x10;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,7 +246,7 @@ void sub_0802433C(Entity* this) {
|
||||
case 0:
|
||||
if (--this->actionDelay == 0) {
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
this->field_0xf = 8;
|
||||
sub_08024E00(this, 1);
|
||||
}
|
||||
@@ -255,7 +255,7 @@ void sub_0802433C(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 5;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->nonPlanarMovement = 0x140;
|
||||
this->speed = 0x140;
|
||||
this->actionDelay = 0xc0;
|
||||
this->field_0xf = 8;
|
||||
} else {
|
||||
@@ -274,12 +274,12 @@ void sub_080243B8(Entity* this) {
|
||||
if (this->attachedEntity == NULL || this->attachedEntity->next == NULL) {
|
||||
this->field_0x80.HALF.LO = 2;
|
||||
this->actionDelay = 0x20;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->field_0x82.HALF.HI = 0x80;
|
||||
} else if (sub_08049F1C(this, gUnk_020000B0, 0xe)) {
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->actionDelay = 0x1e;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
this->field_0x82.HALF.HI = 0x80;
|
||||
this->attachedEntity->action = 2;
|
||||
} else if (--this->actionDelay) {
|
||||
@@ -297,14 +297,14 @@ void sub_080243B8(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->actionDelay = 0x20;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 6;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
sub_08024B38(this);
|
||||
|
||||
if ((this->field_0x82.HALF.HI & 0x40) == 0) {
|
||||
@@ -338,7 +338,7 @@ void sub_080244E8(Entity* this) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x82.HALF.LO += 1;
|
||||
this->field_0xf = 0;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
} else {
|
||||
this->actionDelay = 0x30;
|
||||
this->field_0xf = 4;
|
||||
@@ -367,8 +367,8 @@ void sub_080244E8(Entity* this) {
|
||||
u32 tmp;
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
if (this->nonPlanarMovement) {
|
||||
this->nonPlanarMovement = 0;
|
||||
if (this->speed) {
|
||||
this->speed = 0;
|
||||
} else {
|
||||
sub_08024E1C(this);
|
||||
}
|
||||
@@ -386,7 +386,7 @@ void sub_080244E8(Entity* this) {
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->actionDelay = 0xc;
|
||||
this->direction = 0x10;
|
||||
this->nonPlanarMovement = tmp;
|
||||
this->speed = tmp;
|
||||
this->cutsceneBeh.HALF.LO = 0;
|
||||
this->flags2 &= 0xfc;
|
||||
sub_080249DC(this);
|
||||
@@ -452,7 +452,7 @@ void sub_080244E8(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->field_0xf = 0;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->field_0x82.HALF.LO++;
|
||||
}
|
||||
break;
|
||||
@@ -481,7 +481,7 @@ void sub_080244E8(Entity* this) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->actionDelay = 0xc0;
|
||||
this->field_0xf = 8;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
sub_080249DC(this);
|
||||
break;
|
||||
default:
|
||||
@@ -495,7 +495,7 @@ void sub_080244E8(Entity* this) {
|
||||
if (this->field_0x82.HALF.HI & 0x80) {
|
||||
this->field_0x82.HALF.HI = 0xc0;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
this->actionDelay = 0x40;
|
||||
this->field_0xf = 8;
|
||||
sub_08024A14(this, 0, 8);
|
||||
@@ -510,7 +510,7 @@ void sub_080244E8(Entity* this) {
|
||||
case 7:
|
||||
if (gPlayerEntity.height.HALF.HI == 0) {
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
sub_08024B38(this);
|
||||
}
|
||||
}
|
||||
@@ -708,7 +708,7 @@ bool32 sub_08024C48(Entity* this, bool32 unk) {
|
||||
|
||||
void sub_08024C7C(Entity* this) {
|
||||
this->action = 1;
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
this->actionDelay = 0;
|
||||
sub_08024A14(this, 0, 0x20);
|
||||
}
|
||||
@@ -718,7 +718,7 @@ void sub_08024C94(Entity* this) {
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->actionDelay = 0x40;
|
||||
this->field_0xf = 0;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
this->field_0x82.HALF.HI = 0x80;
|
||||
sub_08024A14(this, 3, this->field_0xf);
|
||||
}
|
||||
@@ -784,7 +784,7 @@ void sub_08024E00(Entity* this, u32 unk) {
|
||||
}
|
||||
|
||||
void sub_08024E1C(Entity* this) {
|
||||
this->nonPlanarMovement = gUnk_080CBF18[sub_08024E34()];
|
||||
this->speed = gUnk_080CBF18[sub_08024E34()];
|
||||
}
|
||||
|
||||
u32 sub_08024E34(void) {
|
||||
@@ -808,7 +808,7 @@ void sub_08024E4C(Entity* this) {
|
||||
this->field_0x86.HALF.HI = 0;
|
||||
sub_08024F50(this);
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
this->actionDelay = 0x40;
|
||||
this->field_0xf = 8;
|
||||
sub_08024A14(this, 0, 8);
|
||||
@@ -850,7 +850,7 @@ void sub_08024F50(Entity* this) {
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
gPlayerEntity.hurtBlinkTime = -0x3c;
|
||||
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
|
||||
gPlayerEntity.nonPlanarMovement = 0;
|
||||
gPlayerEntity.speed = 0;
|
||||
gPlayerEntity.spritePriority.b1 = this->cutsceneBeh.HALF.HI;
|
||||
gPlayerEntity.height.HALF.HI = gPlayerEntity.spriteOffsetY;
|
||||
gPlayerEntity.spriteOffsetY = 0;
|
||||
@@ -858,7 +858,7 @@ void sub_08024F50(Entity* this) {
|
||||
this->field_0x82.HALF.HI = 0xc0;
|
||||
this->field_0x80.HALF.LO += 2;
|
||||
this->cutsceneBeh.HALF.LO = 0;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
@@ -103,7 +103,7 @@ void sub_080207A8(Entity* this) {
|
||||
this->field_0x3a &= 0xfb;
|
||||
this->direction ^= 0x10;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
InitializeAnimation(this, this->animationState + 0x10);
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ void Rollobite_Unroll(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 0x80) {
|
||||
this->flags |= 0x80;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
this->damageType = 34;
|
||||
sub_08020A30(this);
|
||||
this->direction = DirectionFromAnimationState(this->animationState);
|
||||
|
||||
+4
-4
@@ -61,7 +61,7 @@ void sub_08031434(Entity* this) {
|
||||
sub_0804A720(this);
|
||||
this->animationState = 0xff;
|
||||
this->field_0x1c = 1;
|
||||
this->field_0x7a.HWORD = this->nonPlanarMovement;
|
||||
this->field_0x7a.HWORD = this->speed;
|
||||
if (!(this->type)) {
|
||||
sub_08031600(this);
|
||||
} else {
|
||||
@@ -113,7 +113,7 @@ void sub_080314FC(Entity* this) {
|
||||
if (u != 0xff) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 0x1e;
|
||||
this->field_0x7a.HWORD = this->nonPlanarMovement = 0x1a0;
|
||||
this->field_0x7a.HWORD = this->speed = 0x1a0;
|
||||
this->direction = u;
|
||||
this->animationState = this->direction >> 3;
|
||||
InitializeAnimation(this, this->animationState + 4);
|
||||
@@ -158,7 +158,7 @@ void sub_08031600(Entity* this) {
|
||||
u32 r;
|
||||
this->action = 2;
|
||||
this->actionDelay = (Random() & 0x30) + 0x3c;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->field_0x7a.HWORD = 0x80;
|
||||
r = Random() & 0x18;
|
||||
this->direction = r;
|
||||
@@ -176,6 +176,6 @@ u32 sub_0803163C(Entity* this) {
|
||||
} else {
|
||||
h = this->field_0x7a.HWORD;
|
||||
}
|
||||
this->nonPlanarMovement = h;
|
||||
this->speed = h;
|
||||
return ProcessMovement(this);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ void sub_080383AC(Entity* this) {
|
||||
u32 v;
|
||||
this->action = 1;
|
||||
this->actionDelay = 0x8;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
this->direction = DirectionRoundUp(GetFacingDirection(this, &gPlayerEntity));
|
||||
v = this->direction >> 3;
|
||||
if (v != this->animationState) {
|
||||
@@ -101,7 +101,7 @@ void sub_080383E4(Entity* this) {
|
||||
u32 v;
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x8;
|
||||
this->nonPlanarMovement = 0x280;
|
||||
this->speed = 0x280;
|
||||
v = DirectionRoundUp(GetFacingDirection(this, &gPlayerEntity));
|
||||
this->direction = v;
|
||||
this->field_0x78.HALF.LO = v;
|
||||
|
||||
@@ -239,7 +239,7 @@ void sub_080296D8(Entity* this) {
|
||||
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
|
||||
gPlayerEntity.spritePriority.b1 = this->field_0x80.HALF.LO;
|
||||
gPlayerEntity.spriteOffsetY = 0;
|
||||
gPlayerEntity.nonPlanarMovement = 0x140;
|
||||
gPlayerEntity.speed = 0x140;
|
||||
this->action = 5;
|
||||
this->field_0xf = 0x3c;
|
||||
this->flags2 |= 3;
|
||||
|
||||
@@ -35,7 +35,7 @@ void sub_0802BA18(Entity* this) {
|
||||
return;
|
||||
|
||||
this->action = 2;
|
||||
this->nonPlanarMovement = this->field_0x78.HWORD;
|
||||
this->speed = this->field_0x78.HWORD;
|
||||
this->direction = direction;
|
||||
|
||||
switch (direction >> 3) {
|
||||
@@ -87,7 +87,7 @@ void sub_0802BAFC(Entity* this) {
|
||||
|
||||
void sub_0802BB10(Entity* this) {
|
||||
this->action = 3;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
this->direction = this->direction ^ 0x10;
|
||||
EnqueueSFX(0x74);
|
||||
}
|
||||
|
||||
+3
-3
@@ -57,7 +57,7 @@ void nullsub_171() {
|
||||
void sub_08044FC8(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->nonPlanarMovement = 128;
|
||||
this->speed = 128;
|
||||
sub_0804A720(this);
|
||||
InitializeAnimation(this, 0);
|
||||
sub_08044FF8(this);
|
||||
@@ -74,8 +74,8 @@ void sub_08045018(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 1;
|
||||
if (0 < this->nonPlanarMovement) {
|
||||
this->actionDelay = sub_0806FA04(4096, this->nonPlanarMovement) >> 8;
|
||||
if (0 < this->speed) {
|
||||
this->actionDelay = sub_0806FA04(4096, this->speed) >> 8;
|
||||
}
|
||||
if (sub_08049FA0(this) == 0 && (Random() & 3)) {
|
||||
this->direction = (sub_08049EE4(this) + 0xfc + (Random() & 8)) & 24;
|
||||
|
||||
@@ -37,7 +37,7 @@ void sub_0803169C(Entity* this) {
|
||||
this->action = 1;
|
||||
this->previousActionFlag = 0;
|
||||
this->flags = this->flags | 0x80;
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
this->field_0xf = 1;
|
||||
} else {
|
||||
gUnk_080CE554[this->previousActionFlag](this);
|
||||
|
||||
@@ -58,7 +58,7 @@ void sub_08028284(Entity* this) {
|
||||
|
||||
this->attachedEntity->hurtBlinkTime = this->hurtBlinkTime;
|
||||
if (this->currentHealth == 0) {
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->field_0x82.HALF.LO = 0;
|
||||
sub_080287E0(this);
|
||||
DeleteEntity(this->attachedEntity);
|
||||
@@ -86,7 +86,7 @@ void sub_08028314(Entity* this) {
|
||||
if (this->actionDelay) {
|
||||
this->animationState = this->type2 << 1;
|
||||
this->actionDelay = 0x1e;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->direction = this->animationState << 2;
|
||||
sub_080287E0(this);
|
||||
} else {
|
||||
@@ -164,13 +164,13 @@ void sub_08028488(Entity* this) {
|
||||
switch (this->field_0x82.HALF.LO) {
|
||||
case 3:
|
||||
this->action = 4;
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
EnqueueSFX(0x11e);
|
||||
break;
|
||||
case 2:
|
||||
this->action = 2;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->actionDelay = (Random() & 7) * 3 + 0x40;
|
||||
break;
|
||||
case 4:
|
||||
@@ -180,7 +180,7 @@ void sub_08028488(Entity* this) {
|
||||
default:
|
||||
this->action = 1;
|
||||
this->field_0x82.HALF.LO = 1;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->actionDelay = (Random() & 7) * 3 + 0x22;
|
||||
break;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ void sub_08028604(Entity* this) {
|
||||
this->field_0xf = 0;
|
||||
if (this->field_0x82.HALF.LO == 1) {
|
||||
this->actionDelay = gUnk_080CC7BC[Random() & 3];
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
if (sub_08049FA0(this) != 0) {
|
||||
this->direction = gUnk_080CC7D0[Random() & 7] + 0x18 + this->direction & 0x18;
|
||||
} else {
|
||||
@@ -262,7 +262,7 @@ void sub_08028604(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
this->actionDelay = 0xc;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
}
|
||||
|
||||
if (this->direction >> 2 != this->animationState) {
|
||||
@@ -324,7 +324,7 @@ void sub_080287B4(Entity* this) {
|
||||
this->field_0xf = 0;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->field_0x7a.HALF.HI = 0;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->field_0x82.HALF.LO = 0;
|
||||
sub_080287E0(this);
|
||||
}
|
||||
@@ -371,7 +371,7 @@ void sub_08028858(Entity* this) {
|
||||
this->hitbox->height = box->height;
|
||||
|
||||
if (this->field_0x82.HALF.LO == 0) {
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
}
|
||||
|
||||
ProcessMovement(this);
|
||||
|
||||
@@ -50,7 +50,7 @@ void sub_0802B628(Entity* this) {
|
||||
if (this->action < 6) {
|
||||
this->action = 6;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
this->direction = this->field_0x3e;
|
||||
this->field_0x42 = 0;
|
||||
this->hurtBlinkTime = -8;
|
||||
@@ -100,7 +100,7 @@ void sub_0802B7A4(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 1;
|
||||
this->actionDelay = gUnk_080CD314[Random() & 3];
|
||||
this->nonPlanarMovement = 0x60;
|
||||
this->speed = 0x60;
|
||||
sub_0802B960(this);
|
||||
if (this->direction != 0xff) {
|
||||
u32 animation = this->direction >> 3;
|
||||
@@ -117,7 +117,7 @@ void sub_0802B7FC(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 0x78;
|
||||
this->nonPlanarMovement = 0x1c0;
|
||||
this->speed = 0x1c0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ void sub_0802B8E0(Entity* this) {
|
||||
} else {
|
||||
this->action = 8;
|
||||
this->field_0x20 = 0x10000;
|
||||
this->nonPlanarMovement = 0x60;
|
||||
this->speed = 0x60;
|
||||
this->damageType = 99;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
EnqueueSFX(299);
|
||||
|
||||
@@ -159,7 +159,7 @@ void sub_080226EC(Entity* this) {
|
||||
if (sub_080228F0(this)) {
|
||||
this->action = 6;
|
||||
this->field_0x20 = 0x12000;
|
||||
this->nonPlanarMovement = 0x140;
|
||||
this->speed = 0x140;
|
||||
this->direction = GetFacingDirection(this, gUnk_020000B0);
|
||||
this->damageType = 0x5a;
|
||||
InitializeAnimation(this, 4);
|
||||
@@ -210,7 +210,7 @@ void sub_0802281C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 0x80) {
|
||||
this->action = 2;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
InitializeAnimation(this, 0);
|
||||
sub_0804AA1C(this);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ void sub_0802289C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 0x80) {
|
||||
this->action = 2;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->speed = 0x20;
|
||||
this->field_0x80.HALF.HI = 0x78;
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
|
||||
+14
-14
@@ -153,7 +153,7 @@ void sub_08044868(Entity* this) {
|
||||
if (this->frames.all & 0x80) {
|
||||
this->field_0x74.HALF.LO = 1;
|
||||
this->direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10);
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@@ -228,7 +228,7 @@ void sub_080449F8(Entity* this) {
|
||||
|
||||
if (this->field_0x78.HALF.LO == 0) {
|
||||
this->field_0x78.HALF.LO++;
|
||||
this->nonPlanarMovement = 640;
|
||||
this->speed = 640;
|
||||
}
|
||||
|
||||
this->actionDelay = 4;
|
||||
@@ -319,7 +319,7 @@ void sub_08044B04(Entity* this) {
|
||||
this->field_0xf = 32;
|
||||
}
|
||||
|
||||
this->nonPlanarMovement = this->field_0x78.HALF.LO ? 640 : 1280;
|
||||
this->speed = this->field_0x78.HALF.LO ? 640 : 1280;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -329,7 +329,7 @@ void sub_08044B04(Entity* this) {
|
||||
this->direction = (this->direction + 1) & 0x1f;
|
||||
if (++this->field_0xf == 0x30) {
|
||||
u32 direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10);
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->direction = (direction + 16) & 0x1f;
|
||||
this->actionDelay = 16;
|
||||
this->field_0xf = 16;
|
||||
@@ -341,32 +341,32 @@ void sub_08044B04(Entity* this) {
|
||||
if (this->field_0xf == 0) {
|
||||
switch (--this->actionDelay) {
|
||||
case 12:
|
||||
this->nonPlanarMovement = 1280;
|
||||
this->speed = 1280;
|
||||
break;
|
||||
case 0:
|
||||
this->field_0x74.HALF.LO++;
|
||||
this->direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10);
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->actionDelay = 4;
|
||||
this->field_0xf = 16;
|
||||
break;
|
||||
case 4:
|
||||
this->nonPlanarMovement = 640;
|
||||
this->speed = 640;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (--this->field_0xf == 0)
|
||||
this->nonPlanarMovement = 640;
|
||||
this->speed = 640;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (this->field_0xf) {
|
||||
if (--this->field_0xf == 0)
|
||||
this->nonPlanarMovement = 640;
|
||||
this->speed = 640;
|
||||
} else {
|
||||
if (this->actionDelay) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->nonPlanarMovement = 1280;
|
||||
this->speed = 1280;
|
||||
SoundReq(0x14f);
|
||||
}
|
||||
}
|
||||
@@ -448,7 +448,7 @@ void sub_08044DEC(Entity* this) {
|
||||
}
|
||||
this->flags &= 0x7f;
|
||||
this->field_0x78.HALF.LO = 0;
|
||||
this->nonPlanarMovement = 0x300;
|
||||
this->speed = 0x300;
|
||||
off = this->parent->field_0x80.HALF.LO - 1;
|
||||
this->direction = gUnk_080D1628[off][this->field_0x78.HALF.HI];
|
||||
PositionRelative(this->parent, this, 0, -0x100000);
|
||||
@@ -464,11 +464,11 @@ void sub_08044E74(Entity* this, u32 state) {
|
||||
this->direction += 0x18;
|
||||
this->direction &= 0x1f;
|
||||
PositionRelative(this->parent, this, 0, -0x100000);
|
||||
this->nonPlanarMovement = 12288;
|
||||
this->speed = 12288;
|
||||
sub_0806F69C(this);
|
||||
this->direction += 0x8;
|
||||
this->direction &= 0x1f;
|
||||
this->nonPlanarMovement = 1280;
|
||||
this->speed = 1280;
|
||||
sub_0806F69C(this);
|
||||
break;
|
||||
case 1:
|
||||
@@ -497,5 +497,5 @@ void sub_08044E74(Entity* this, u32 state) {
|
||||
}
|
||||
this->actionDelay = 1;
|
||||
this->field_0x78.HALF.LO = 0;
|
||||
this->nonPlanarMovement = 1280;
|
||||
this->speed = 1280;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ void sub_0802CD54(Entity* this) {
|
||||
this->action = 2;
|
||||
tmp = Random() >> 0x10;
|
||||
this->actionDelay = tmp;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->speed = 0xc0;
|
||||
this->field_0x78.HWORD = gUnk_080CD728[Random() & 3];
|
||||
this->field_0x7a.HALF.HI = (tmp >> 8) & 0x60;
|
||||
return;
|
||||
@@ -107,7 +107,7 @@ void sub_0802CDE8(Entity* this) {
|
||||
} else {
|
||||
this->action = 1;
|
||||
this->actionDelay = 60;
|
||||
this->nonPlanarMovement = 0x60;
|
||||
this->speed = 0x60;
|
||||
this->field_0x7c.HALF.LO = (Random() & 0x38) + 0x96;
|
||||
}
|
||||
GetNextFrame(this);
|
||||
|
||||
@@ -23,7 +23,7 @@ void sub_0802A250(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0;
|
||||
this->field_0x20 = -0x30000;
|
||||
this->nonPlanarMovement = gUnk_080CD03C[Random() & 3];
|
||||
this->speed = gUnk_080CD03C[Random() & 3];
|
||||
this->direction = gUnk_080CD040[Random() & 3] + 0x18;
|
||||
this->collisionLayer = 2;
|
||||
InitializeAnimation(this, 0);
|
||||
|
||||
+1
-1
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "dma.h"
|
||||
#include "script.h"
|
||||
|
||||
typedef struct OtherEntity {
|
||||
struct OtherEntity* prev;
|
||||
@@ -76,7 +77,6 @@ extern void sub_08078954();
|
||||
extern void sub_0805EC60();
|
||||
extern void sub_08017744();
|
||||
extern void sub_0805E92C();
|
||||
extern void UnloadCutsceneData();
|
||||
extern void UnloadHitbox();
|
||||
extern void sub_0801DA0C();
|
||||
extern void sub_0804AA1C();
|
||||
|
||||
+1
-1
@@ -259,7 +259,7 @@ void InitializePlayer(void) {
|
||||
gPlayerState.field_0x34[4] = 0x10;
|
||||
pl->direction = gScreenTransition.playerState << 2;
|
||||
case 0x3:
|
||||
pl->nonPlanarMovement = 0xe0;
|
||||
pl->speed = 0xe0;
|
||||
break;
|
||||
case 0x7:
|
||||
case 0x8:
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ void sub_08018CBC(Entity* this) {
|
||||
*(u32*)&this->field_0x80 = this->y.WORD = gPlayerEntity.y.WORD;
|
||||
uVar2 = this->animationState = gPlayerEntity.animationState & 0xe;
|
||||
this->direction = (u8)(uVar2 << 2);
|
||||
this->nonPlanarMovement = 0x400;
|
||||
this->speed = 0x400;
|
||||
this->damageType = 0x96;
|
||||
this->field_0x3c = (gPlayerEntity.field_0x3c + 1) | 0x80;
|
||||
this->flags2 = gPlayerEntity.flags2;
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ void sub_0805FBE8(Entity* this) {
|
||||
this->spriteSettings.b.draw = TRUE;
|
||||
this->field_0x3c = gPlayerEntity.field_0x3c + 1;
|
||||
this->hitbox = &gUnk_08109AD0;
|
||||
this->nonPlanarMovement = 0x380;
|
||||
this->speed = 0x380;
|
||||
this->animationState = this->animationState & 0x7f;
|
||||
if (this->collisionLayer == 2) {
|
||||
this->type2 = 1;
|
||||
|
||||
@@ -32,7 +32,6 @@ void Anju(Entity* this) {
|
||||
if (UpdateFuseInteraction(this)) {
|
||||
this->action = 1;
|
||||
}
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -109,8 +109,8 @@ void sub_08063410(Entity* this) {
|
||||
if (this->type != 0) {
|
||||
sub_0806346C(this);
|
||||
}
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
@@ -148,17 +148,17 @@ void sub_0806346C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080634E4(Entity* this, u32* param_1) {
|
||||
param_1[1] = this->type2;
|
||||
void sub_080634E4(Entity* this, ScriptExecutionContext* context) {
|
||||
context->intVariable = this->type2;
|
||||
}
|
||||
|
||||
void sub_080634EC(Entity* this) {
|
||||
gRoomVars.itemForSaleIndex = gUnk_0810C88C[this->type2];
|
||||
}
|
||||
|
||||
void sub_08063504(Entity* this, u32* param_2) {
|
||||
void sub_08063504(Entity* this, ScriptExecutionContext* context) {
|
||||
u32 uVar1;
|
||||
|
||||
uVar1 = sub_080544DC(gUnk_0810C88C[this->type2]);
|
||||
param_2[5] = BOOLCAST(uVar1);
|
||||
context->condition = BOOLCAST(uVar1);
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ void sub_0806CF30(Entity* this) {
|
||||
sub_0806D0B0(this);
|
||||
sub_0807DD64(this);
|
||||
} else {
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
}
|
||||
|
||||
switch (this->previousActionFlag) {
|
||||
|
||||
+19
-23
@@ -196,53 +196,50 @@ void sub_08068C6C(Entity* this) {
|
||||
sub_080A7C18(gUnk_0811162B[this->actionDelay] & 0xffffff7f, 0, 0);
|
||||
}
|
||||
|
||||
void sub_08068C8C(Entity* param_1, Entity* param_2) {
|
||||
void sub_08068C8C(Entity* this, ScriptExecutionContext* context) {
|
||||
u8* arr = gUnk_0811162B + 0xd;
|
||||
|
||||
*(u32*)¶m_2->animationState = *(u32*)(arr + param_1->actionDelay * 4);
|
||||
context->condition = *(u32*)(arr + this->actionDelay * 4);
|
||||
}
|
||||
|
||||
void sub_08068CA0(Entity* param_1, Entity* param_2) {
|
||||
void sub_08068CA0(Entity* this, ScriptExecutionContext* context) {
|
||||
u8 bVar1;
|
||||
u32 uVar2;
|
||||
|
||||
bVar1 = param_1->type;
|
||||
bVar1 = this->type;
|
||||
if (bVar1 == 1) {
|
||||
*(u32*)¶m_2->animationState = bVar1;
|
||||
context->condition = bVar1;
|
||||
uVar2 = GetInventoryValue(0x48); // spin attack
|
||||
if (uVar2 == 0) {
|
||||
*(u32*)¶m_2->animationState = 0;
|
||||
context->condition = 0;
|
||||
}
|
||||
uVar2 = GetInventoryValue(0x4b); // rock breaker
|
||||
if (uVar2 == 0) {
|
||||
*(u32*)¶m_2->animationState = 0;
|
||||
context->condition = 0;
|
||||
}
|
||||
uVar2 = GetInventoryValue(0x4a); // dash attack
|
||||
if (uVar2 == 0) {
|
||||
*(u32*)¶m_2->animationState = 0;
|
||||
context->condition = 0;
|
||||
}
|
||||
uVar2 = GetInventoryValue(0x4e); // down thrust
|
||||
if (uVar2 != 0) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
uVar2 = GetInventoryValue(gUnk_0811162B[param_1->actionDelay] & -0x81);
|
||||
uVar2 = GetInventoryValue(gUnk_0811162B[this->actionDelay] & -0x81);
|
||||
if (uVar2 != 0) {
|
||||
uVar2 = 1;
|
||||
}
|
||||
}
|
||||
*(u32*)¶m_2->animationState = uVar2;
|
||||
context->condition = uVar2;
|
||||
}
|
||||
|
||||
void sub_08068CFC(Entity* param_1, Entity* param_2, u32 param_3, u32 param_4)
|
||||
|
||||
{
|
||||
void sub_08068CFC(Entity* this, ScriptExecutionContext* context) {
|
||||
u8 bVar1;
|
||||
u8 itemID;
|
||||
u32 uVar2;
|
||||
|
||||
*(u32*)¶m_2->animationState = 0;
|
||||
bVar1 = param_1->actionDelay;
|
||||
context->condition = 0;
|
||||
bVar1 = this->actionDelay;
|
||||
if (bVar1 > 10)
|
||||
return;
|
||||
|
||||
@@ -303,7 +300,7 @@ LABEL1:
|
||||
return;
|
||||
}
|
||||
switchD_08068d12_caseD_0:
|
||||
*(u32*)¶m_2->animationState = 1;
|
||||
context->condition = 1;
|
||||
}
|
||||
|
||||
// Introduction dialoague
|
||||
@@ -355,12 +352,12 @@ void sub_08068EB4(void) {
|
||||
gPlayerState.field_0xab = 0;
|
||||
}
|
||||
|
||||
void sub_08068EC4(Entity* param_1, Entity* param_2) {
|
||||
if (gUnk_08111740[param_1->actionDelay] == gPlayerState.field_0xab) {
|
||||
*(u16*)¶m_2->flags = gUnk_0811172A[param_1->actionDelay];
|
||||
*(u32*)¶m_2->animationState = 1;
|
||||
void sub_08068EC4(Entity* this, ScriptExecutionContext* context) {
|
||||
if (gUnk_08111740[this->actionDelay] == gPlayerState.field_0xab) {
|
||||
context->wait = gUnk_0811172A[this->actionDelay];
|
||||
context->condition = 1;
|
||||
} else {
|
||||
*(u32*)¶m_2->animationState = 0;
|
||||
context->condition = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,7 +384,6 @@ void sub_08068F3C(Entity* this) {
|
||||
}
|
||||
|
||||
void BladeBrothers_Fusion(Entity* this) {
|
||||
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
|
||||
+1
-1
@@ -8,8 +8,8 @@
|
||||
#include "npc.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "script.h"
|
||||
|
||||
extern void sub_0807DD94(Entity*, u32);
|
||||
|
||||
void Carlov(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
|
||||
+5
-5
@@ -4,9 +4,9 @@
|
||||
#include "player.h"
|
||||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
#include "script.h"
|
||||
|
||||
extern SpriteLoadData gUnk_08110CA8[];
|
||||
extern void sub_0807DDAC(Entity*, u32);
|
||||
|
||||
void Carpenter(Entity* this) {
|
||||
if (*(u32*)&this->cutsceneBeh == 0) {
|
||||
@@ -30,8 +30,8 @@ void Carpenter(Entity* this) {
|
||||
sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)) + 4 + (this->type * 8));
|
||||
sub_0806F118(this);
|
||||
} else {
|
||||
sub_0807DDAC(this, 0);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, 0);
|
||||
HandleEntity0x82Actions(this);
|
||||
GetNextFrame(this);
|
||||
}
|
||||
break;
|
||||
@@ -60,6 +60,6 @@ void Carpenter_Head(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080672b0(Entity* this, u32 param_2) {
|
||||
InitializeAnimation(this, *(u32*)(param_2 + 4) + (this->animationState >> 1) + this->type * 8);
|
||||
void sub_080672B0(Entity* this, ScriptExecutionContext* context) {
|
||||
InitializeAnimation(this, context->intVariable + (this->animationState >> 1) + this->type * 8);
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ void sub_08068FC0(Entity* ent) {
|
||||
|
||||
ent->action = 1;
|
||||
ent->animationState = ent->type2;
|
||||
ent->nonPlanarMovement = 0x40;
|
||||
ent->speed = 0x40;
|
||||
|
||||
ent->field_0x6c.HALF.HI = 0xFF;
|
||||
|
||||
|
||||
+10
-17
@@ -7,19 +7,13 @@
|
||||
#include "textbox.h"
|
||||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
#include "script.h"
|
||||
|
||||
extern void sub_0807DD94(Entity*, u32);
|
||||
|
||||
extern u16 gUnk_08113344[];
|
||||
extern u16 gUnk_0811334A[];
|
||||
|
||||
typedef struct {
|
||||
u8 filler[18];
|
||||
u32 unk;
|
||||
} struct_0806BE84;
|
||||
|
||||
void Dampe(Entity* this) {
|
||||
|
||||
switch (this->action) {
|
||||
case 0:
|
||||
this->action = 1;
|
||||
@@ -42,7 +36,6 @@ void Dampe(Entity* this) {
|
||||
if (UpdateFuseInteraction(this)) {
|
||||
this->action = 1;
|
||||
}
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,15 +54,15 @@ void Dampe_Fusion(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806BE84(Entity* this, struct_0806BE84* r1) {
|
||||
void sub_0806BE84(Entity* this, ScriptExecutionContext* context) {
|
||||
u32 msgIndex;
|
||||
|
||||
r1->unk = 0;
|
||||
context->condition = 0;
|
||||
msgIndex = 1;
|
||||
if (!CheckLocalFlag(0x69)) {
|
||||
msgIndex = 0;
|
||||
SetLocalFlag(0x69);
|
||||
r1->unk = 1;
|
||||
context->condition = 1;
|
||||
}
|
||||
// Graveyard key
|
||||
if (GetInventoryValue(0x3C) >= 2) {
|
||||
@@ -78,16 +71,16 @@ void sub_0806BE84(Entity* this, struct_0806BE84* r1) {
|
||||
TextboxNoOverlap(gUnk_08113344[msgIndex], this);
|
||||
}
|
||||
|
||||
void sub_0806BEC8(Entity* this, struct_0806BE84* r1) {
|
||||
void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) {
|
||||
u32 hasGraveyardKey;
|
||||
u32 msgIndex;
|
||||
|
||||
msgIndex = 0;
|
||||
r1->unk = 0;
|
||||
context->condition = 0;
|
||||
hasGraveyardKey = GetInventoryValue(0x3C);
|
||||
if (hasGraveyardKey == 1) {
|
||||
msgIndex = 1;
|
||||
r1->unk = 1;
|
||||
context->condition = 1;
|
||||
} else if (hasGraveyardKey >= 2) {
|
||||
msgIndex = 2;
|
||||
}
|
||||
@@ -102,10 +95,10 @@ void sub_0806BEFC() {
|
||||
SetTileType(0x181, 0x5CF, 1);
|
||||
}
|
||||
|
||||
void sub_0806BF44(Entity* this, struct_0806BE84* r1) {
|
||||
r1->unk = 0;
|
||||
void sub_0806BF44(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = 0;
|
||||
if (((this->x.HALF.HI - gRoomControls.roomScrollX) + 0x10U < 0x110) &&
|
||||
((this->y.HALF.HI - gRoomControls.roomScrollY) + 0x18U < 0xD0)) {
|
||||
r1->unk = 1;
|
||||
context->condition = 1;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -1,21 +1,21 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "script.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern u32 gUnk_0813AD10;
|
||||
extern u32 gUnk_0813AD24;
|
||||
extern u32 gUnk_0813AD38;
|
||||
|
||||
extern void sub_0807DD94(Entity*, u32);
|
||||
extern void DoExitTransition(u32*);
|
||||
|
||||
void Emma(Entity* param_1) {
|
||||
if (param_1->action == 0) {
|
||||
param_1->action += 1;
|
||||
sub_0805E3A0(param_1, 2);
|
||||
sub_0807DD50(param_1);
|
||||
void Emma(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
sub_0805E3A0(this, 2);
|
||||
sub_0807DD50(this);
|
||||
} else {
|
||||
sub_0807DD94(param_1, 0);
|
||||
sub_0807DD94(this, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,6 @@ void sub_0806C588(void) {
|
||||
DoExitTransition(&gUnk_0813AD24);
|
||||
}
|
||||
|
||||
void FUN_0806c598(void) {
|
||||
void sub_0806C598(void) {
|
||||
DoExitTransition(&gUnk_0813AD38);
|
||||
}
|
||||
|
||||
+24
-41
@@ -6,8 +6,8 @@
|
||||
#include "script.h"
|
||||
|
||||
extern Hitbox gUnk_080FD170;
|
||||
extern void gUnk_08016030; // Cutscene data type?
|
||||
extern void gUnk_0801606C; // Cutscene data type?
|
||||
extern void script_08016030; // Cutscene data type?
|
||||
extern void script_0801606C; // Cutscene data type?
|
||||
|
||||
extern void sub_0809623C(Entity*);
|
||||
extern void sub_08096260(Entity*);
|
||||
@@ -34,40 +34,26 @@ void EzloCap(Entity* this) {
|
||||
sub_0805E3A0(this, 2);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
u8 unk_00[4];
|
||||
u32 field_04;
|
||||
u32 field_08;
|
||||
u8 unk_0c[8];
|
||||
u32 field_14;
|
||||
u8 unk_18;
|
||||
u8 field_19;
|
||||
u8 unk_1a[3];
|
||||
u16 field_1e;
|
||||
u8 unk_20[2];
|
||||
u16 field_22;
|
||||
} paramStruct;
|
||||
|
||||
void sub_0806D8A0(Entity* this, paramStruct* param_2) {
|
||||
void sub_0806D8A0(Entity* this, ScriptExecutionContext* context) {
|
||||
s32 xOffset;
|
||||
s32 yOffset;
|
||||
|
||||
param_2->field_19 = 8;
|
||||
param_2->field_08 |= 2;
|
||||
param_2->field_14 = 0;
|
||||
context->unk_19 = 8;
|
||||
context->postScriptActions |= 2;
|
||||
context->condition = 0;
|
||||
xOffset = 16;
|
||||
if (this->spriteSettings.b.flipX) {
|
||||
xOffset = -xOffset;
|
||||
}
|
||||
xOffset += gPlayerEntity.x.HALF.HI;
|
||||
yOffset = gPlayerEntity.y.HALF.HI + 2;
|
||||
param_2->field_1e = xOffset;
|
||||
param_2->field_22 = yOffset;
|
||||
context->x.HALF.HI = xOffset;
|
||||
context->y.HALF.HI = yOffset;
|
||||
|
||||
xOffset -= this->x.HALF.HI;
|
||||
this->direction = sub_080045DA(xOffset, yOffset - this->y.HALF.HI);
|
||||
@@ -119,15 +105,16 @@ void NPC4E(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806DA04(Entity* this, u32* param_2) {
|
||||
void sub_0806DA04(Entity* this, ScriptExecutionContext* context) {
|
||||
// TODO gUnk_0811415C should be a gUnk_0810C89C_struct[], but then a lot of bytes everywhere are wrong?
|
||||
gUnk_0810C89C_struct* a = (gUnk_0810C89C_struct*)&(
|
||||
(gUnk_0810C89C_struct*)gUnk_0811415C)[param_2[1]]; // cast necessary to no longer make it a const* ?
|
||||
(gUnk_0810C89C_struct*)gUnk_0811415C)[context->intVariable]; // cast necessary to no longer make it a const* ?
|
||||
sub_08078850(this, 1, a->unk_04, a);
|
||||
}
|
||||
|
||||
void sub_0806DA1C(Entity* this, u32* param_2) {
|
||||
sub_0808091C((ScreenTransitionData*)(gUnk_081141A4)[param_2[1]], (u32)(gUnk_081141E4[param_2[1]]));
|
||||
void sub_0806DA1C(Entity* this, ScriptExecutionContext* context) {
|
||||
sub_0808091C((ScreenTransitionData*)(gUnk_081141A4)[context->intVariable],
|
||||
(u32)(gUnk_081141E4[context->intVariable]));
|
||||
}
|
||||
|
||||
// Returns the kinstone id?
|
||||
@@ -168,11 +155,9 @@ u8 sub_0806DA3C(Entity* this) {
|
||||
}
|
||||
|
||||
// Check whether a kinstone fusion is possible and store the result somewhere in param_2?
|
||||
void sub_0806DAAC(Entity* this, u32* param_2) {
|
||||
u32 uVar1;
|
||||
uVar1 = CheckKinstoneFused(sub_0806DA3C(this));
|
||||
param_2[5] = uVar1;
|
||||
gUnk_02033280.unk_07 |= 1;
|
||||
void sub_0806DAAC(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = CheckKinstoneFused(sub_0806DA3C(this));
|
||||
gActiveScriptInfo.flags |= 1;
|
||||
}
|
||||
|
||||
// maybe actually execute the kinstone fusion?
|
||||
@@ -202,29 +187,27 @@ void sub_0806DAE8(Entity* this) {
|
||||
SoundReq(0xcd);
|
||||
}
|
||||
|
||||
// Unknown param_2 struct
|
||||
void sub_0806DB44(Entity* this, u32* param_2) {
|
||||
param_2[5] = 0;
|
||||
void sub_0806DB44(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = 0;
|
||||
|
||||
if (CheckLocalFlag(0xee) != 0 && CheckLocalFlag(0xef) != 0 && CheckLocalFlag(0xf0) != 0 &&
|
||||
CheckLocalFlag(0xf1) != 0 && CheckLocalFlag(0xf2) != 0) {
|
||||
param_2[5] = 1;
|
||||
context->condition = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// The unused param just had to be added, so that a mov r1, #0 in NPC4E_Fusion is matching correctly
|
||||
void sub_0806DB84(Entity* this, u8 unused) {
|
||||
void sub_0806DB84(Entity* this, ScriptExecutionContext* context) {
|
||||
Entity* ent;
|
||||
this->hitbox = (Hitbox*)&gUnk_08114154;
|
||||
ent = CreateObject(0x3e, 4, 0);
|
||||
if (ent != NULL) {
|
||||
PositionRelative(this, ent, -0x80000, 0);
|
||||
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &gUnk_08016030);
|
||||
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_08016030);
|
||||
}
|
||||
ent = CreateObject(0x3e, 5, 0);
|
||||
if (ent != NULL) {
|
||||
PositionRelative(this, ent, 0x80000, 0);
|
||||
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &gUnk_0801606C);
|
||||
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_0801606C);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ void sub_0805FE48(Entity* this) {
|
||||
InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)));
|
||||
sub_0806F118(this);
|
||||
} else {
|
||||
ExecuteScriptCommandSet(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
ExecuteScript(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
sub_0805FF2C(this, *(void**)&this->cutsceneBeh);
|
||||
uVar4 = this->field_0x80.HWORD;
|
||||
if (uVar4 < 8) {
|
||||
|
||||
@@ -42,8 +42,8 @@ void ForestMinish(Entity* this) {
|
||||
this->interactType = 0;
|
||||
sub_0806F118(this);
|
||||
} else {
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
if (this->frameDuration != 0xf0) {
|
||||
sub_080600F0(this);
|
||||
}
|
||||
@@ -215,8 +215,8 @@ void sub_080602BC(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_0810A362[index], this);
|
||||
}
|
||||
|
||||
void sub_0806030C(Entity* this, u32* arg1) {
|
||||
ModBombs(*(arg1 + 1));
|
||||
void sub_0806030C(Entity* this, ScriptExecutionContext* context) {
|
||||
ModBombs(context->intVariable);
|
||||
}
|
||||
|
||||
void sub_08060318(void) {
|
||||
|
||||
+3
-3
@@ -97,9 +97,9 @@ u32 sub_08069480(Entity* this) {
|
||||
return (sub_0801E99C(this) << 24) >> 24;
|
||||
}
|
||||
|
||||
void sub_0806948C(Entity* this, u32* param_1) {
|
||||
param_1[5] = CheckKinstoneFused((sub_08069480(this) << 24) >> 24);
|
||||
gUnk_02033280.unk_07 |= 1;
|
||||
void sub_0806948C(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = CheckKinstoneFused((sub_08069480(this) << 24) >> 24);
|
||||
gActiveScriptInfo.flags |= 1;
|
||||
}
|
||||
|
||||
void sub_080694B0(Entity* this) {
|
||||
|
||||
+9
-11
@@ -4,6 +4,7 @@
|
||||
#include "flags.h"
|
||||
#include "textbox.h"
|
||||
#include "room.h"
|
||||
#include "script.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
@@ -20,7 +21,6 @@ typedef struct {
|
||||
extern void sub_08063D24(Entity*);
|
||||
extern void sub_0806EE20(Entity*);
|
||||
extern void sub_08064428(Entity*);
|
||||
extern void sub_0807DDAC(Entity*, u32);
|
||||
extern void sub_0806EE04(Entity*, void*, u32);
|
||||
void sub_08063DC8(Entity*);
|
||||
void sub_08063F20(Entity*);
|
||||
@@ -148,8 +148,8 @@ void sub_08063E90(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08063F20(Entity* this) {
|
||||
sub_0807DDAC(this, 0);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, 0);
|
||||
HandleEntity0x82Actions(this);
|
||||
GetNextFrame(this);
|
||||
if (this->interactType != 0) {
|
||||
this->action++;
|
||||
@@ -211,18 +211,16 @@ void sub_08064044(void) {
|
||||
gScreenTransition.transitioningOut = 1;
|
||||
}
|
||||
|
||||
void sub_08064050(Entity* arg0, struct_08064050* arg1) {
|
||||
u32 unk;
|
||||
|
||||
arg1->unk2 = 0;
|
||||
switch (arg0->type2) {
|
||||
void sub_08064050(Entity* this, ScriptExecutionContext* context) {
|
||||
context->intVariable = 0;
|
||||
switch (this->type2) {
|
||||
case 0x11:
|
||||
arg1->unk2 = 1;
|
||||
context->intVariable = 1;
|
||||
break;
|
||||
case 0x12:
|
||||
arg1->unk2 = 2;
|
||||
context->intVariable = 2;
|
||||
break;
|
||||
case 0x13:
|
||||
arg1->unk2 = 3;
|
||||
context->intVariable = 3;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -25,8 +25,8 @@ void Librari(Entity* this) {
|
||||
this->interactType = 0;
|
||||
sub_0806F118(this);
|
||||
} else {
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
break;
|
||||
@@ -37,15 +37,15 @@ void Librari(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806B260(Entity* this, u32 arg1) {
|
||||
void sub_0806B260(Entity* this, ScriptExecutionContext* context) {
|
||||
u32 index;
|
||||
|
||||
*(u32*)(arg1 + 0x14) = 0;
|
||||
context->condition = 0;
|
||||
// flippers
|
||||
if (!GetInventoryValue(0x46)) {
|
||||
if (CheckGlobalFlag(0x29)) {
|
||||
index = 2;
|
||||
*(u32*)(arg1 + 0x14) = 1;
|
||||
context->condition = 1;
|
||||
} else if (!CheckLocalFlag(0x7a)) {
|
||||
index = 0;
|
||||
SetLocalFlag(0x7a);
|
||||
@@ -60,7 +60,7 @@ void sub_0806B260(Entity* this, u32 arg1) {
|
||||
|
||||
extern u16 gUnk_08112D50[];
|
||||
|
||||
void sub_0806b2b4(Entity* this) {
|
||||
void sub_0806B2B4(Entity* this) {
|
||||
u32 index;
|
||||
|
||||
if (CheckLocalFlag(0xb3)) {
|
||||
|
||||
@@ -35,8 +35,8 @@ void MayorHagen(Entity* this) {
|
||||
sub_0806F118(this);
|
||||
break;
|
||||
}
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
break;
|
||||
case 2:
|
||||
|
||||
+2
-2
@@ -72,8 +72,8 @@ void sub_08068780(Entity* this) {
|
||||
this->interactType = 0;
|
||||
sub_0806F118(this);
|
||||
} else {
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
GetNextFrame(this);
|
||||
}
|
||||
break;
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ void sub_08060428(Entity* this) {
|
||||
void* data;
|
||||
|
||||
this->actionDelay = 0x5a;
|
||||
this->nonPlanarMovement = 0x180;
|
||||
this->speed = 0x180;
|
||||
if (this->type2 != 0) {
|
||||
data = GetCurrentRoomProperty(this->type2);
|
||||
} else {
|
||||
@@ -195,7 +195,7 @@ void sub_08060700(Entity* entity, ScriptExecutionContext* context) {
|
||||
u32 x = coords->x + gRoomControls.roomOriginX;
|
||||
u32 y = coords->y + gRoomControls.roomOriginY;
|
||||
sub_0807DEDC(entity, context, x, y);
|
||||
gUnk_02033280.unk_07 |= 1;
|
||||
gActiveScriptInfo.flags |= 1;
|
||||
}
|
||||
|
||||
void sub_0806075C(Entity* this) {
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@ extern void sub_0806A8C8(Entity*);
|
||||
extern void (*gUnk_08112260[])(Entity*);
|
||||
extern void (*gUnk_08112278[])(Entity*);
|
||||
|
||||
extern void gUnk_08012F0C;
|
||||
extern void script_08012F0C;
|
||||
|
||||
void Rem(Entity* this) {
|
||||
gUnk_08112260[this->type](this);
|
||||
@@ -18,8 +18,8 @@ void sub_0806a370(Entity* this) {
|
||||
u8* pbVar1;
|
||||
|
||||
gUnk_08112278[this->action](this);
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
sub_0806ED78(this);
|
||||
if (this->animIndex == 0xf) {
|
||||
@@ -42,7 +42,7 @@ void sub_0806A3D8(Entity* this) {
|
||||
this->actionDelay = 0xb4;
|
||||
sub_0805E3A0(this, 2);
|
||||
sub_0806A8C8(this);
|
||||
uVar1 = StartCutscene(this, &gUnk_08012F0C);
|
||||
uVar1 = StartCutscene(this, &script_08012F0C);
|
||||
*(ScriptExecutionContext**)&this->cutsceneBeh = uVar1;
|
||||
sub_0807DD94(this, NULL);
|
||||
}
|
||||
|
||||
+2
-2
@@ -41,8 +41,8 @@ void sub_0806C280(void) {
|
||||
gScreenTransition.transitionType = 6;
|
||||
}
|
||||
|
||||
void sub_0806C2A0(u32* param_1, struct_0806C2A0* param_2) {
|
||||
switch (param_2->unk) {
|
||||
void sub_0806C2A0(Entity* this, ScriptExecutionContext* context) {
|
||||
switch (context->intVariable) {
|
||||
case 0:
|
||||
DoFade(0xd, 4);
|
||||
break;
|
||||
|
||||
+6
-6
@@ -125,8 +125,8 @@ void sub_080661BC(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08066200(Entity* this) {
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
@@ -154,12 +154,12 @@ void sub_08066258(void) {
|
||||
SoundReq(gUnk_081103D0[Random() & 7]);
|
||||
}
|
||||
|
||||
void sub_08066274(u32 arg0) {
|
||||
sub_08078850(arg0, 1, 0, &gUnk_081103E0);
|
||||
void sub_08066274(Entity* this) {
|
||||
sub_08078850(this, 1, 0, &gUnk_081103E0);
|
||||
}
|
||||
|
||||
void sub_08066288(Entity* arg0) {
|
||||
sub_08078784(arg0, arg0->field_0x68.HALF.LO);
|
||||
void sub_08066288(Entity* this) {
|
||||
sub_08078784(this, this->field_0x68.HALF.LO);
|
||||
}
|
||||
|
||||
void Smith_Fusion(Entity* this) {
|
||||
|
||||
+3
-5
@@ -62,15 +62,13 @@ void sub_08062C7C(Entity* ent) {
|
||||
}
|
||||
|
||||
void sub_08062CA4(Entity* ent) {
|
||||
sub_0807DDAC(ent, NULL);
|
||||
sub_0807DDE4(ent);
|
||||
ExecuteScriptForEntity(ent, NULL);
|
||||
HandleEntity0x82Actions(ent);
|
||||
GetNextFrame(ent);
|
||||
}
|
||||
|
||||
void sub_08062CBC(Entity* ent) {
|
||||
u32 uVar1;
|
||||
|
||||
uVar1 = CheckKinstoneFused(44);
|
||||
u32 uVar1 = CheckKinstoneFused(44);
|
||||
ShowNPCDialogue(ent, &gUnk_0810C2E4[(-uVar1 | uVar1) >> 31]);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -52,8 +52,8 @@ void sub_0806A26C(Entity* this) {
|
||||
if (uVar2 = Random(), uVar2) {
|
||||
unk = -unk; // wtf?!
|
||||
}
|
||||
pEVar1->spriteOffsetX = gUnk_081121DC[uVar2 & 7];
|
||||
pEVar1->spriteOffsetY = gUnk_081121DC[(uVar2 / 256) & 7] - 8;
|
||||
pEVar1->spriteOffsetX = gUnk_081121D4[uVar2 & 7];
|
||||
pEVar1->spriteOffsetY = gUnk_081121D4[(uVar2 / 256) & 7] - 8;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
extern void (*gUnk_0810FEC4[])(Entity* this);
|
||||
extern void (*gUnk_0810FEBC[])(Entity* this);
|
||||
extern SpriteLoadData gUnk_0810FEB0;
|
||||
extern u8 gUnk_0800B41C;
|
||||
extern u8 script_0800B41C;
|
||||
extern u8 gUnk_0810FED8[];
|
||||
|
||||
void sub_0806574C(Entity* this);
|
||||
@@ -109,7 +109,7 @@ void sub_080656D4(Entity* this) {
|
||||
} else {
|
||||
if (this->interactType != 0) {
|
||||
if (GetInventoryValue(0x37) != 0) { // keyLonLon
|
||||
StartCutscene(this, (u16*)&gUnk_0800B41C);
|
||||
StartCutscene(this, (u16*)&script_0800B41C);
|
||||
goto label2;
|
||||
} else {
|
||||
this->field_0x68.HALF.HI = this->action;
|
||||
@@ -136,12 +136,12 @@ void sub_0806574C(Entity* this) {
|
||||
this->field_0x6a.HALF.LO = this->animIndex;
|
||||
}
|
||||
|
||||
void sub_08065780(Entity* this, u16* param_2) {
|
||||
void sub_08065780(Entity* this, ScriptExecutionContext* context) {
|
||||
u32 rand;
|
||||
|
||||
rand = Random();
|
||||
this->animationState = rand & 6;
|
||||
param_2[8] = gUnk_0810FED8[rand >> 8 & 7];
|
||||
context->wait = gUnk_0810FED8[rand >> 8 & 7];
|
||||
}
|
||||
|
||||
void Talon_Head(Entity* this) {
|
||||
|
||||
+16
-16
@@ -11,7 +11,7 @@ extern u32 sub_080002C0();
|
||||
extern void sub_0806ACC4(Entity*);
|
||||
extern void sub_0806AEA8();
|
||||
extern void sub_0806AEE4(Entity*);
|
||||
extern void sub_0806AFE8(Entity*, s32*);
|
||||
extern void sub_0806AFE8(Entity*, ScriptExecutionContext*);
|
||||
extern s32 sub_0806EDD8(Entity*, u32, u32);
|
||||
extern void sub_08078850(Entity*, u32, u32, u32*);
|
||||
|
||||
@@ -21,7 +21,7 @@ extern u32 gUnk_081126D4[4];
|
||||
extern u8 gUnk_081126E4[4];
|
||||
extern void (*gUnk_081126E8[])();
|
||||
extern Dialog gUnk_081126F0[0x10];
|
||||
extern void (*gUnk_08112BF0[])(Entity*, s32*);
|
||||
extern void (*gUnk_08112BF0[])(Entity*, ScriptExecutionContext*);
|
||||
extern u16 gUnk_08112C40[5];
|
||||
extern u16 gUnk_08112C4A[3];
|
||||
extern u16 gUnk_08112C50[6];
|
||||
@@ -107,13 +107,13 @@ void sub_0806ACC4(Entity* this) {
|
||||
this->interactType = 0;
|
||||
sub_0806F118(this);
|
||||
} else {
|
||||
sub_0807DDAC(this, NULL);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
sub_0806AEA8(this);
|
||||
if (this->type2 == 10 && this->interactType) {
|
||||
this->action = 2;
|
||||
this->interactType = 0;
|
||||
InitializeAnimation(this, sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)) + 8);
|
||||
sub_0806AFE8(this, *(s32**)&this->cutsceneBeh);
|
||||
sub_0806AFE8(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
}
|
||||
if (this->type == 1) {
|
||||
u8 idx = gPlayerEntity.animationState >> 1;
|
||||
@@ -177,7 +177,7 @@ void sub_0806AEA8(Entity* this) {
|
||||
if (old & 0x20) {
|
||||
sub_08003FC4(this, 0x4000);
|
||||
}
|
||||
sub_0807DDE4(this);
|
||||
HandleEntity0x82Actions(this);
|
||||
this->field_0x82.HWORD = old;
|
||||
}
|
||||
|
||||
@@ -218,25 +218,25 @@ void sub_0806AEE4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806AF60(Entity* this, int* idx) {
|
||||
InitializeAnimation(this, idx[1] + (this->animationState / 2));
|
||||
void sub_0806AF60(Entity* this, ScriptExecutionContext* context) {
|
||||
InitializeAnimation(this, context->intVariable + (this->animationState / 2));
|
||||
}
|
||||
|
||||
void sub_0806AF70(Entity* this, u32 arg1) {
|
||||
void sub_0806AF70(Entity* this, ScriptExecutionContext* context) {
|
||||
this->field_0x20 = 0x24000;
|
||||
}
|
||||
|
||||
void sub_0806AF78(Entity* this, u32 arg1) {
|
||||
void sub_0806AF78(Entity* this, ScriptExecutionContext* context) {
|
||||
sub_08003FC4(this, 0x1800);
|
||||
if (0 <= this->height.WORD && this->field_0x20 < 1) {
|
||||
this->height.WORD = 0;
|
||||
sub_0806AF70(this, arg1);
|
||||
sub_0806AF70(this, context);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806AFA0(Entity* this) {
|
||||
if (sub_0806ED78(this)) {
|
||||
sub_0806F62C(this, -this->nonPlanarMovement, this->direction);
|
||||
sub_0806F62C(this, -this->speed, this->direction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,12 +248,12 @@ void sub_0806AFBC(Entity* this) {
|
||||
ShowNPCDialogue(this, gUnk_081126F0 + this->type2 * 8 + idx);
|
||||
}
|
||||
|
||||
void sub_0806AFE8(Entity* this, s32* unk) {
|
||||
unk[5] = 0;
|
||||
gUnk_08112BF0[this->type2](this, unk);
|
||||
void sub_0806AFE8(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = 0;
|
||||
gUnk_08112BF0[this->type2](this, context);
|
||||
}
|
||||
|
||||
void sub_0806B004(Entity* this, int* unk) {
|
||||
void sub_0806B004(Entity* this, ScriptExecutionContext* context) {
|
||||
int idx = 0;
|
||||
|
||||
if (CheckGlobalFlag(0x29)) {
|
||||
@@ -262,7 +262,7 @@ void sub_0806B004(Entity* this, int* unk) {
|
||||
idx = 3;
|
||||
if (CheckLocalFlag(0x78) == 0) {
|
||||
idx = 2;
|
||||
unk[5] = 1;
|
||||
context->condition = 1;
|
||||
SetLocalFlag(0x78);
|
||||
}
|
||||
} else {
|
||||
|
||||
+7
-11
@@ -17,11 +17,6 @@ typedef struct {
|
||||
u8 unk3;
|
||||
} struct_0810B680;
|
||||
|
||||
typedef struct {
|
||||
u32 unk;
|
||||
u32 unk2;
|
||||
} struct_08061FB8;
|
||||
|
||||
extern void (*const gUnk_0810B774[])(Entity*);
|
||||
extern void (*const gUnk_0810B77C[])(Entity*);
|
||||
extern void sub_08061CB4(Entity*, u32);
|
||||
@@ -133,8 +128,8 @@ void sub_08061D64(Entity* this) {
|
||||
this->field_0x68.HALF.HI = this->animIndex;
|
||||
InitializeAnimation(this, (this->animIndex & -4) + sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)));
|
||||
} else {
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
if (this->frameDuration == 0xff) {
|
||||
this->frameDuration = gUnk_0810B680[this->type].unk2;
|
||||
}
|
||||
@@ -173,6 +168,7 @@ void sub_08061E70(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME this is actually (Entity* this, ScriptExecutionContext* context)
|
||||
void sub_08061E90(Entity* this, Entity* arg1) {
|
||||
u32 animIndex;
|
||||
s32 iVar4;
|
||||
@@ -204,7 +200,7 @@ void sub_08061E90(Entity* this, Entity* arg1) {
|
||||
}
|
||||
this->direction = (u8)animIndex;
|
||||
this->animationState = sub_0806F5B0(animIndex);
|
||||
this->nonPlanarMovement = gUnk_0810B74A[this->type];
|
||||
this->speed = gUnk_0810B74A[this->type];
|
||||
}
|
||||
animIndex = (this->animationState >> 1) + 4;
|
||||
if (animIndex != this->animIndex) {
|
||||
@@ -231,7 +227,7 @@ void sub_08061E90(Entity* this, Entity* arg1) {
|
||||
arg1->spriteIndex = 1;
|
||||
}
|
||||
if (--arg1->spriteIndex != 0) {
|
||||
gUnk_02033280.unk_06 = 0;
|
||||
gActiveScriptInfo.commandSize = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,10 +244,10 @@ void sub_08061FB0(Entity* this) {
|
||||
this->hitbox = NULL;
|
||||
}
|
||||
|
||||
void sub_08061FB8(Entity* this, struct_08061FB8* arg1) {
|
||||
void sub_08061FB8(Entity* this, ScriptExecutionContext* context) {
|
||||
u8* temp = gUnk_0810B748;
|
||||
|
||||
sub_08078850(this, 1, temp[arg1->unk2], &gUnk_0810B740[arg1->unk2]);
|
||||
sub_08078850(this, 1, temp[context->intVariable], &gUnk_0810B740[context->intVariable]);
|
||||
}
|
||||
|
||||
void sub_08061FD8(Entity* this) {
|
||||
|
||||
@@ -9,13 +9,12 @@
|
||||
#include "script.h"
|
||||
|
||||
extern void sub_0806C7D4(Entity*);
|
||||
extern void sub_0807DD80(Entity*, u32*);
|
||||
|
||||
extern void (*const gUnk_08113A7C[])(Entity*);
|
||||
extern void (*const gUnk_08113A8C[])(Entity*, Entity*);
|
||||
extern void (*const gUnk_08113A8C[])(Entity*, ScriptExecutionContext*);
|
||||
|
||||
extern SpriteLoadData gUnk_08113A1C[];
|
||||
extern u32 gUnk_08014A80;
|
||||
extern u16 script_08014A80;
|
||||
extern Dialog gUnk_08113ABC[];
|
||||
extern u16 gUnk_08113B0C[];
|
||||
|
||||
@@ -48,7 +47,7 @@ void sub_0806C7D4(Entity* this) {
|
||||
sub_0807DD94(this, NULL);
|
||||
if ((this->type2 == 3) && (!CheckGlobalFlag(WARP_EVENT_END)) && (CheckLocalFlag(0x63)) && (CheckRoomFlag(0))) {
|
||||
this->type2 = 7;
|
||||
sub_0807DD80(this, &gUnk_08014A80);
|
||||
sub_0807DD80(this, &script_08014A80);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,10 +101,9 @@ void WindTribespeople_Head(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
// body and head entities?
|
||||
void sub_0806C90C(Entity* param_1, Entity* param_2) {
|
||||
*(u32*)¶m_2->animationState = 0;
|
||||
gUnk_08113A8C[param_1->type2](param_1, param_2);
|
||||
void sub_0806C90C(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = 0;
|
||||
gUnk_08113A8C[this->type2](this, context);
|
||||
}
|
||||
|
||||
void sub_0806C928(Entity* this) {
|
||||
|
||||
+77
-77
@@ -14,59 +14,59 @@ extern void sub_080686C4(Entity*, Entity*);
|
||||
extern void (*gUnk_08110BD8[])(Entity* ent);
|
||||
extern u16 gUnk_08110BE0[];
|
||||
|
||||
void Zelda(Entity* ent) {
|
||||
gUnk_08110BD8[ent->action](ent);
|
||||
void Zelda(Entity* this) {
|
||||
gUnk_08110BD8[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08066CCC(Entity* ent) {
|
||||
ent->action = 1;
|
||||
ent->spriteSettings.b.draw = 1;
|
||||
PrependEntityToList(ent, 7);
|
||||
sub_0805E3A0(ent, 2);
|
||||
sub_0807DD50(ent);
|
||||
void sub_08066CCC(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
PrependEntityToList(this, 7);
|
||||
sub_0805E3A0(this, 2);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
|
||||
void sub_08066CF8(Entity* ent) {
|
||||
sub_0807DD94(ent, NULL);
|
||||
void sub_08066CF8(Entity* this) {
|
||||
sub_0807DD94(this, NULL);
|
||||
}
|
||||
|
||||
void sub_08066D04(Entity* ent) {
|
||||
ent->parent = FindEntityBySubtype(7, 0x2E);
|
||||
void sub_08066D04(Entity* this) {
|
||||
this->parent = FindEntityBySubtype(7, 0x2E);
|
||||
}
|
||||
|
||||
void sub_08066D14(Entity* ent, u32* param_2) {
|
||||
void sub_08066D14(Entity* this, ScriptExecutionContext* context) {
|
||||
Entity* parent;
|
||||
|
||||
parent = ent->parent;
|
||||
parent = this->parent;
|
||||
if (parent != NULL) {
|
||||
ent->animationState = parent->animationState;
|
||||
ent->spriteSettings.b.draw = 1;
|
||||
CopyPosition(parent, ent);
|
||||
sub_08068680(ent, ent->parent);
|
||||
param_2[5] = 1;
|
||||
this->animationState = parent->animationState;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
CopyPosition(parent, this);
|
||||
sub_08068680(this, this->parent);
|
||||
context->condition = 1;
|
||||
} else {
|
||||
param_2[5] = 0;
|
||||
context->condition = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08066D4C(Entity* ent, u32* param_2) {
|
||||
void sub_08066D4C(Entity* this, ScriptExecutionContext* context) {
|
||||
Entity* parent;
|
||||
|
||||
parent = ent->parent;
|
||||
if (ent->parent != NULL) {
|
||||
CopyPosition(ent, parent);
|
||||
ent->parent->spriteSettings.b.draw = 1;
|
||||
ent->parent->animationState = ent->animationState;
|
||||
ent->spriteSettings.b.draw = 0;
|
||||
ent->field_0x17 &= 0xFE;
|
||||
sub_08068694(ent, ent->parent);
|
||||
param_2[5] = 1;
|
||||
parent = this->parent;
|
||||
if (this->parent != NULL) {
|
||||
CopyPosition(this, parent);
|
||||
this->parent->spriteSettings.b.draw = 1;
|
||||
this->parent->animationState = this->animationState;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
this->field_0x17 &= 0xFE;
|
||||
sub_08068694(this, this->parent);
|
||||
context->condition = 1;
|
||||
} else {
|
||||
param_2[5] = 0;
|
||||
context->condition = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08066D94(Entity* ent) {
|
||||
void sub_08066D94(Entity* this) {
|
||||
u32 roomID;
|
||||
Entity* npc;
|
||||
|
||||
@@ -75,91 +75,91 @@ void sub_08066D94(Entity* ent) {
|
||||
if (npc != NULL) {
|
||||
npc->animationState = gPlayerEntity.animationState;
|
||||
npc->flags |= 0x20;
|
||||
npc->animationState = GetAnimationState(ent);
|
||||
npc->animationState = GetAnimationState(this);
|
||||
roomID = gRoomControls.roomID;
|
||||
npc->field_0x74.HWORD = roomID;
|
||||
CopyPosition(ent, npc);
|
||||
CopyPosition(this, npc);
|
||||
}
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void sub_08066DE4(Entity* ent) {
|
||||
void sub_08066DE4(Entity* this) {
|
||||
Entity* pEVar1;
|
||||
|
||||
pEVar1 = FindEntityBySubtype(7, 0x2E);
|
||||
if (pEVar1 != NULL) {
|
||||
CopyPosition(ent, pEVar1);
|
||||
sub_080686C4(ent, pEVar1);
|
||||
CopyPosition(this, pEVar1);
|
||||
sub_080686C4(this, pEVar1);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08066E08(Entity* ent) {
|
||||
InitAnimationForceUpdate(ent, 0x50);
|
||||
ent->field_0x80.HWORD = ent->animIndex;
|
||||
void sub_08066E08(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 0x50);
|
||||
this->field_0x80.HWORD = this->animIndex;
|
||||
}
|
||||
|
||||
void sub_08066E20(Entity* ent) {
|
||||
InitAnimationForceUpdate(ent, 0x44);
|
||||
ent->field_0x80.HWORD = ent->animIndex;
|
||||
void sub_08066E20(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 0x44);
|
||||
this->field_0x80.HWORD = this->animIndex;
|
||||
}
|
||||
|
||||
void sub_08066E38(Entity* ent) {
|
||||
InitAnimationForceUpdate(ent, 0x48);
|
||||
ent->field_0x80.HWORD = ent->animIndex;
|
||||
void sub_08066E38(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 0x48);
|
||||
this->field_0x80.HWORD = this->animIndex;
|
||||
}
|
||||
|
||||
void sub_08066E50(Entity* ent) {
|
||||
InitAnimationForceUpdate(ent, 0x4C);
|
||||
ent->field_0x80.HWORD = ent->animIndex;
|
||||
void sub_08066E50(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 0x4C);
|
||||
this->field_0x80.HWORD = this->animIndex;
|
||||
}
|
||||
|
||||
void sub_08066E68(Entity* ent) {
|
||||
InitAnimationForceUpdate(ent, 0x54);
|
||||
ent->field_0x80.HWORD = ent->animIndex;
|
||||
void sub_08066E68(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 0x54);
|
||||
this->field_0x80.HWORD = this->animIndex;
|
||||
}
|
||||
|
||||
void sub_08066E80(Entity* ent, u8* param_2) {
|
||||
switch (param_2[0x18]) {
|
||||
void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
|
||||
switch (context->unk_18) {
|
||||
case 0:
|
||||
param_2[0x18]++;
|
||||
InitAnimationForceUpdate(ent, 0x16);
|
||||
context->unk_18++;
|
||||
InitAnimationForceUpdate(this, 0x16);
|
||||
break;
|
||||
case 1:
|
||||
UpdateAnimationSingleFrame(ent);
|
||||
if (ent->frames.all & 1) {
|
||||
param_2[0x18]++;
|
||||
ent->field_0x20 = 0x20000;
|
||||
ent->frames.all &= 0xFE;
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 1) {
|
||||
context->unk_18++;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->frames.all &= 0xFE;
|
||||
SoundReq(0x7C);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
sub_0806F62C(ent, 0x100, 0x80);
|
||||
sub_08003FC4(ent, 0x2000);
|
||||
if (!(ent->frames.all & 1)) {
|
||||
UpdateAnimationSingleFrame(ent);
|
||||
sub_0806F62C(this, 0x100, 0x80);
|
||||
sub_08003FC4(this, 0x2000);
|
||||
if (!(this->frames.all & 1)) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
if (ent->field_0x20 < 0) {
|
||||
param_2[0x18]++;
|
||||
if (this->field_0x20 < 0) {
|
||||
context->unk_18++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
sub_0806F62C(ent, 0x100, 0x80);
|
||||
UpdateAnimationSingleFrame(ent);
|
||||
if (sub_08003FC4(ent, 0x2000) == 0) {
|
||||
param_2[0x18]++;
|
||||
InitAnimationForceUpdate(ent, 0x1E);
|
||||
sub_0806F62C(this, 0x100, 0x80);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (sub_08003FC4(this, 0x2000) == 0) {
|
||||
context->unk_18++;
|
||||
InitAnimationForceUpdate(this, 0x1E);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
UpdateAnimationSingleFrame(ent);
|
||||
if (ent->frames.b.f3) {
|
||||
gUnk_02033280.unk_07 |= 1;
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.b.f3) {
|
||||
gActiveScriptInfo.flags |= 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
ent->field_0x80.HWORD = ent->animIndex;
|
||||
gUnk_02033280.unk_06 = 0;
|
||||
this->field_0x80.HWORD = this->animIndex;
|
||||
gActiveScriptInfo.commandSize = 0;
|
||||
}
|
||||
|
||||
void sub_08066F94(void) {
|
||||
|
||||
@@ -19,7 +19,7 @@ void sub_0808F658(Entity* this) {
|
||||
this->spritePriority.b0 = this->type;
|
||||
this->frameIndex = this->type;
|
||||
this->direction = 8;
|
||||
this->nonPlanarMovement = gUnk_08121EB0[this->type];
|
||||
this->speed = gUnk_08121EB0[this->type];
|
||||
this->field_0x78.HWORD = gRoomControls.roomOriginX - 0x60;
|
||||
this->field_0x7a.HWORD = gRoomControls.roomOriginX + gRoomControls.width + 0x60;
|
||||
this->animationState = 0;
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ void sub_0809CF54(Entity* this) {
|
||||
this->field_0x20 = -0x18000;
|
||||
this->height.WORD = -0x38C000;
|
||||
this->field_0x68.HWORD = -0x800;
|
||||
this->nonPlanarMovement = 0x280;
|
||||
this->speed = 0x280;
|
||||
this->direction = 8;
|
||||
this->collisionLayer = 2;
|
||||
this->x.HALF.HI = gRoomControls.roomScrollX;
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ void sub_0809F7BC(Entity* this) {
|
||||
cloud = sub_0809F770(this);
|
||||
if (cloud != NULL) {
|
||||
uVar1 = Random();
|
||||
cloud->nonPlanarMovement = gUnk_081247C8[uVar1 & 3];
|
||||
cloud->speed = gUnk_081247C8[uVar1 & 3];
|
||||
cloud->direction = (u8)(uVar1 >> 8) & 31;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ static u32 sub_0808EF6C(Entity* this) {
|
||||
if (this->field_0x6c.HWORD < var7) {
|
||||
var7 = this->field_0x6c.HWORD;
|
||||
}
|
||||
this->nonPlanarMovement = var7;
|
||||
this->speed = var7;
|
||||
this->direction = sub_080045DA(var0, var2) >> 3;
|
||||
sub_0806F69C(this);
|
||||
return 1;
|
||||
@@ -515,7 +515,7 @@ static void sub_0808EFF0(Entity* this) {
|
||||
u8 var1;
|
||||
|
||||
this->spriteSettings.b.draw = 2;
|
||||
this->nonPlanarMovement = 0x400;
|
||||
this->speed = 0x400;
|
||||
this->currentHealth = 1;
|
||||
this->frameIndex = 0xFF;
|
||||
this->animIndex = 0xFF;
|
||||
|
||||
+15
-14
@@ -6,6 +6,7 @@
|
||||
#include "flags.h"
|
||||
#include "save.h"
|
||||
#include "random.h"
|
||||
#include "script.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
@@ -160,21 +161,21 @@ void GreatFairy_WingsInit(Entity* this) {
|
||||
this->spriteRendering.alphaBlend = 1;
|
||||
gScreen.controls.layerFXControl = 0xF40;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 8);
|
||||
this->nonPlanarMovement = 1024;
|
||||
this->speed = 1024;
|
||||
sub_0805EC9C(this, 1024, 256, 0);
|
||||
}
|
||||
|
||||
void GreatFairy_WingsUpdate(Entity* this) {
|
||||
s32 iVar1;
|
||||
|
||||
iVar1 = this->nonPlanarMovement -= 32;
|
||||
iVar1 = this->speed -= 32;
|
||||
if (iVar1 * 65536 >> 16 == 256) {
|
||||
this->action = 2;
|
||||
sub_0805EC60(this);
|
||||
gRoomVars.greatFairyState |= 32;
|
||||
gUnk_02033280.unk_00 |= 4;
|
||||
gActiveScriptInfo.unk_00 |= 4;
|
||||
} else {
|
||||
sub_0805EC9C(this, this->nonPlanarMovement, 256, 0);
|
||||
sub_0805EC9C(this, this->speed, 256, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +262,7 @@ void GreatFairy_MiniAffineInit2(Entity* this) {
|
||||
if (this->height.HALF.HI == -20) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 90;
|
||||
this->nonPlanarMovement = 4096;
|
||||
this->speed = 4096;
|
||||
this->spriteRendering.b0 = 3;
|
||||
sub_0805EC9C(this, 256, 256, 0);
|
||||
}
|
||||
@@ -276,7 +277,7 @@ void GreatFairy_MiniAffineUpdate(Entity* this) {
|
||||
this->action = 3;
|
||||
sub_0805EC60(this);
|
||||
} else {
|
||||
iVar2 = this->nonPlanarMovement -= 24;
|
||||
iVar2 = this->speed -= 24;
|
||||
sub_0805EC9C(this, 256, iVar2 * 0x10000 >> 20, 0);
|
||||
}
|
||||
}
|
||||
@@ -387,7 +388,7 @@ void sub_08087150(Entity* this) {
|
||||
this->spriteOrientation.flipY = 0;
|
||||
this->spriteRendering.b0 = 0;
|
||||
this->spritePriority.b0 = 3;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->direction = 0x10;
|
||||
temp = gUnk_0812079C;
|
||||
this->palette.raw = ((temp & 0xf) << 4) | 0xf;
|
||||
@@ -464,7 +465,7 @@ void sub_080872AC(Entity* this) {
|
||||
this->field_0x68.HWORD = this->x.HALF.HI;
|
||||
this->field_0x6a.HWORD = this->y.HALF.HI;
|
||||
this->direction = (u8)Random() & 0x1F;
|
||||
this->nonPlanarMovement = 32;
|
||||
this->speed = 32;
|
||||
GreatFairy_InitializeAnimation(this);
|
||||
}
|
||||
|
||||
@@ -530,7 +531,7 @@ void sub_080873FC(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08087424(Entity* arg0, struct_08087424* arg1) {
|
||||
void sub_08087424(Entity* this, ScriptExecutionContext* context) {
|
||||
Entity* ent;
|
||||
|
||||
sub_080791D0();
|
||||
@@ -541,9 +542,9 @@ void sub_08087424(Entity* arg0, struct_08087424* arg1) {
|
||||
sub_0805E3A0(ent, 2);
|
||||
}
|
||||
|
||||
switch (arg1->unk4) {
|
||||
switch (context->intVariable) {
|
||||
case 0:
|
||||
gSave.stats.arrowCount = arg1->unk4;
|
||||
gSave.stats.arrowCount = 0;
|
||||
break;
|
||||
case 1:
|
||||
gSave.stats.bombCount = 0;
|
||||
@@ -551,14 +552,14 @@ void sub_08087424(Entity* arg0, struct_08087424* arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808747C(u32 arg0, u32 arg1) {
|
||||
u32 iVar1;
|
||||
void sub_0808747C(Entity* this, ScriptExecutionContext* context) {
|
||||
u32 iVar1 = 0;
|
||||
|
||||
iVar1 = (u32)FindEntityInListByForm(0x6, 0xf, 0x6, 0xb, 0x0);
|
||||
if (iVar1 != 0) {
|
||||
iVar1 = 1;
|
||||
}
|
||||
*(u32*)(arg1 + 0x14) = iVar1;
|
||||
context->condition = iVar1;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
@@ -117,7 +117,7 @@ static void sub_0808681C(Entity* this) {
|
||||
}
|
||||
|
||||
if (this->flags & 0x2) {
|
||||
ExecuteScriptCommandSet(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
ExecuteScript(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
sub_080868EC(this, *(void**)&this->cutsceneBeh);
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ void sub_080868B0(Entity* this) {
|
||||
this->hitbox = &gUnk_081206AC;
|
||||
this->actionDelay = 8;
|
||||
}
|
||||
ExecuteScriptCommandSet(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
ExecuteScript(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
|
||||
sub_080868EC(this, *(void**)&this->cutsceneBeh);
|
||||
}
|
||||
|
||||
@@ -174,11 +174,10 @@ static u8 sub_08086954(Entity* this) {
|
||||
return this->actionDelay;
|
||||
}
|
||||
|
||||
// TODO: Second arg is some unknown struct.
|
||||
void sub_080869A4(Entity* entityA, u32* entityB) {
|
||||
entityB[5] = 0;
|
||||
if (!sub_08086954(entityA)) {
|
||||
entityA->actionDelay = 8;
|
||||
entityB[5] = 1;
|
||||
void sub_080869A4(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = 0;
|
||||
if (!sub_08086954(this)) {
|
||||
this->actionDelay = 8;
|
||||
context->condition = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,8 +141,8 @@ static void sub_080810A8(Entity* this) {
|
||||
sub_080814A4(this);
|
||||
if (this->direction & 0x80) {
|
||||
this->direction &= 0x1F;
|
||||
if (this->nonPlanarMovement == 0) {
|
||||
this->nonPlanarMovement = 0x100;
|
||||
if (this->speed == 0) {
|
||||
this->speed = 0x100;
|
||||
}
|
||||
} else {
|
||||
this->direction |= 0xFF;
|
||||
@@ -259,7 +259,7 @@ void sub_080812A0(Entity* this) {
|
||||
void sub_080812A8(Entity* this) {
|
||||
if (sub_080002D0(this) != 0xF && this->field_0x6e.HWORD != GetTileTypeByEntity(this)) {
|
||||
this->direction = 0;
|
||||
this->nonPlanarMovement = 0;
|
||||
this->speed = 0;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
sub_080810A8(this);
|
||||
|
||||
@@ -22,7 +22,7 @@ void sub_080A0684(Entity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
this->action = 1;
|
||||
this->nonPlanarMovement = 0x300;
|
||||
this->speed = 0x300;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
this->frameIndex = 0;
|
||||
this->spriteSettings.b.flipY = 1;
|
||||
|
||||
@@ -50,7 +50,7 @@ void sub_080916EC(Entity* this) {
|
||||
this->field_0x40 = 0x44;
|
||||
this->flags2 = 0x80;
|
||||
this->direction = DirectionFromAnimationState(this->animationState);
|
||||
this->nonPlanarMovement = 0x700;
|
||||
this->speed = 0x700;
|
||||
this->spritePriority.b1 = 3;
|
||||
InitAnimationForceUpdate(this, this->type2 + 4 + this->animationState);
|
||||
SetTile(0x4022, COORD_TO_TILE(this), this->collisionLayer);
|
||||
@@ -80,7 +80,7 @@ void sub_080917DC(Entity* this) {
|
||||
gPlayerState.jumpStatus = 0x81;
|
||||
gPlayerState.flags.all |= 0x4000000;
|
||||
gPlayerEntity.field_0x20 = 0x20000;
|
||||
gPlayerEntity.nonPlanarMovement = 0x100;
|
||||
gPlayerEntity.speed = 0x100;
|
||||
gPlayerEntity.flags &= 0x7f;
|
||||
ResetPlayer();
|
||||
sub_0807A108();
|
||||
@@ -142,7 +142,7 @@ void sub_080919AC(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
this->flags = this->flags | 0x80;
|
||||
gPlayerEntity.nonPlanarMovement = 0;
|
||||
gPlayerEntity.speed = 0;
|
||||
sub_0806F69C(this);
|
||||
CopyPosition(this, &gPlayerEntity);
|
||||
gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
|
||||
@@ -175,7 +175,7 @@ void sub_080919AC(Entity* this) {
|
||||
gPlayerState.jumpStatus = 0x41;
|
||||
gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x1000) | 0x4000000;
|
||||
gPlayerEntity.field_0x20 = 0x20000;
|
||||
gPlayerEntity.nonPlanarMovement = 0x200;
|
||||
gPlayerEntity.speed = 0x200;
|
||||
gPlayerEntity.animationState = this->animationState << 1;
|
||||
gPlayerEntity.direction = this->direction;
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
|
||||
@@ -55,5 +55,5 @@ void sub_08086A6C(Entity* ent) {
|
||||
uVar1 = Random();
|
||||
ent->field_0x20 = 163840;
|
||||
ent->direction = (uVar1 >> 16) & 31;
|
||||
ent->nonPlanarMovement = uVar1 & 480;
|
||||
ent->speed = uVar1 & 480;
|
||||
}
|
||||
|
||||
@@ -106,6 +106,6 @@ void sub_0809F448(Entity* this) {
|
||||
tmp += -0x80000 + (rand & 0xFFFFF);
|
||||
break;
|
||||
}
|
||||
this->nonPlanarMovement = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8);
|
||||
this->speed = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8);
|
||||
this->direction = sub_080045DA(tmp, 0) >> 3;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@ void ObjectB2(Entity* this) {
|
||||
this->attachedEntity = pEVar3;
|
||||
InitializeAnimation(this, this->type);
|
||||
}
|
||||
this->nonPlanarMovement = this->parent->nonPlanarMovement;
|
||||
this->speed = this->parent->speed;
|
||||
sub_0806F69C(this);
|
||||
if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (this->nonPlanarMovement < 0x41) {
|
||||
if (this->speed < 0x41) {
|
||||
this->spriteSettings.b.draw ^= 1;
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
|
||||
+3
-3
@@ -32,7 +32,7 @@ void sub_0808222C(Entity* this) {
|
||||
|
||||
this->action = 1;
|
||||
this->hitbox = &gUnk_080FD338;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->y.HALF.HI += 3;
|
||||
this->field_0x16 = 0;
|
||||
this->flags |= 0x80;
|
||||
@@ -84,7 +84,7 @@ void sub_08082310(Entity* this) {
|
||||
this->actionDelay = 32;
|
||||
this->action = 4;
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
this->nonPlanarMovement >>= 1;
|
||||
this->speed >>= 1;
|
||||
this->actionDelay = 64;
|
||||
}
|
||||
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
|
||||
@@ -183,7 +183,7 @@ void sub_08082614(Entity* this) {
|
||||
|
||||
this->action = 1;
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
this->nonPlanarMovement <<= 1;
|
||||
this->speed <<= 1;
|
||||
}
|
||||
|
||||
this->field_0x70.HALF.LO = sub_080001DA(COORD_TO_TILE(this), this->collisionLayer);
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ void sub_0808A46C(Entity* this) {
|
||||
void sub_0808A484(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = TRUE;
|
||||
this->nonPlanarMovement = 0x40;
|
||||
this->speed = 0x40;
|
||||
this->direction = 6;
|
||||
this->spriteRendering.b3 = 1;
|
||||
this->spritePriority.b0 = 0;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
|
||||
@@ -14,8 +13,8 @@ void Windcrest(Entity* this) {
|
||||
this->frameIndex = 0;
|
||||
sub_0807DD64(this);
|
||||
}
|
||||
sub_0807DDAC(this, NULL);
|
||||
sub_0807DDE4(this);
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
}
|
||||
|
||||
void sub_080A2124(Entity* this) {
|
||||
|
||||
+3
-3
@@ -143,7 +143,7 @@ void sub_08070D20(Entity* this) {
|
||||
void sub_08070D38(Entity* this) {
|
||||
this->flags &= ~0x80;
|
||||
this->direction = ((this->animationState & 0xe) << 2) ^ 0x10;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
this->field_0x42 = 0;
|
||||
this->previousActionFlag++;
|
||||
this->actionDelay = gPlayerState.field_0x38;
|
||||
@@ -353,7 +353,7 @@ void sub_080710A8(Entity* this) {
|
||||
asm("lsl r0, r0, #0x4");
|
||||
this->field_0x20 = (temp - 4) * 64 * 64;
|
||||
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
sub_0807A108();
|
||||
SoundReq(0x7c);
|
||||
SoundReq(0x78);
|
||||
@@ -522,7 +522,7 @@ void sub_08071400(Entity* this) {
|
||||
|
||||
if ((this->x.HALF.HI != x) || (this->y.HALF.HI != y)) {
|
||||
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, gArea.field_0x12, gArea.field_0x14);
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->speed = 0x100;
|
||||
sub_08079E08();
|
||||
}
|
||||
|
||||
|
||||
+36
-35
@@ -9,6 +9,7 @@
|
||||
#include "main.h"
|
||||
#include "structures.h"
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
|
||||
@@ -387,7 +388,7 @@ u32 sub_0804B7A8(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern void* gUnk_08010A5C[];
|
||||
extern void* script_08010A5C[];
|
||||
|
||||
void sub_0804B7E8(void) {
|
||||
if (CheckLocalFlag(0x91)) {
|
||||
@@ -395,7 +396,7 @@ void sub_0804B7E8(void) {
|
||||
DoFade(5, 0x100);
|
||||
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x50;
|
||||
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
|
||||
sub_080751E8(1, 2, &gUnk_08010A5C);
|
||||
sub_080751E8(1, 2, &script_08010A5C);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,7 +422,7 @@ void sub_0804B86C(void) {
|
||||
DoFade(5, 0x100);
|
||||
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x50;
|
||||
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
|
||||
sub_080751E8(1, 2, &gUnk_08010A5C);
|
||||
sub_080751E8(1, 2, &script_08010A5C);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,7 +448,7 @@ void sub_0804B8F0(void) {
|
||||
DoFade(5, 0x100);
|
||||
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x60;
|
||||
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
|
||||
sub_080751E8(1, 2, &gUnk_08010A5C);
|
||||
sub_080751E8(1, 2, &script_08010A5C);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -647,14 +648,14 @@ u32 sub_0804BC50(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern u32 gUnk_08009E88;
|
||||
extern u32 script_08009E88;
|
||||
|
||||
void sub_0804BC70(void) {
|
||||
if (!CheckLocalFlag(0x9f)) {
|
||||
DoFade(5, 0x100);
|
||||
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0xb0;
|
||||
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x40;
|
||||
sub_080751E8(0, 6, &gUnk_08009E88);
|
||||
sub_080751E8(0, 6, &script_08009E88);
|
||||
}
|
||||
if (!CheckGlobalFlag(TABIDACHI)) {
|
||||
sub_08052878();
|
||||
@@ -970,7 +971,7 @@ void sub_0804BF38(u32 arg0, struct_0804BF38* arg1)
|
||||
fx->x.HALF.HI = gUnk_080D8E50[iVar3].x + gRoomControls.roomOriginX + xOff;
|
||||
fx->y.HALF.HI = gUnk_080D8E50[iVar3].y + gRoomControls.roomOriginY + -0xc + (entCnt & 1) * 8;
|
||||
fx->direction = 0;
|
||||
fx->nonPlanarMovement = 0x100;
|
||||
fx->speed = 0x100;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -980,7 +981,7 @@ void sub_0804BF38(u32 arg0, struct_0804BF38* arg1)
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_0804BF38(u32 arg0, void* arg1) {
|
||||
void sub_0804BF38(Entity* this, ScriptExecutionContext* context) {
|
||||
asm(".include \"asm/non_matching/sub_0804BF38.inc\"");
|
||||
}
|
||||
#endif
|
||||
@@ -4770,7 +4771,7 @@ u32 sub_0804E7D8() {
|
||||
}
|
||||
|
||||
extern EntityData gUnk_080F31D8;
|
||||
extern u32 gUnk_08009B30;
|
||||
extern u32 script_08009B30;
|
||||
|
||||
void sub_0804E7DC(void) {
|
||||
|
||||
@@ -4778,7 +4779,7 @@ void sub_0804E7DC(void) {
|
||||
sub_080A71C4(5, 1, 4, 4);
|
||||
gUnk_02000070 = 0;
|
||||
DoFade(5, 0x100);
|
||||
sub_080751E8(0, 6, &gUnk_08009B30);
|
||||
sub_080751E8(0, 6, &script_08009B30);
|
||||
}
|
||||
if (!CheckGlobalFlag(OUTDOOR)) {
|
||||
gArea.musicIndex = gArea.pMusicIndex;
|
||||
@@ -4789,12 +4790,12 @@ void sub_0804E7DC(void) {
|
||||
}
|
||||
}
|
||||
|
||||
extern u32 gUnk_08009E58;
|
||||
extern u32 script_08009E58;
|
||||
|
||||
void sub_0804E864(void) {
|
||||
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x90;
|
||||
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
|
||||
sub_080751E8(1, 6, &gUnk_08009E58);
|
||||
sub_080751E8(1, 6, &script_08009E58);
|
||||
ModHealth(0xa0);
|
||||
}
|
||||
|
||||
@@ -5266,14 +5267,14 @@ u32 sub_0804EFDC(void) {
|
||||
}
|
||||
|
||||
extern EntityData gUnk_080F5DD0;
|
||||
extern u32 gUnk_08011C50;
|
||||
extern u32 script_08011C50;
|
||||
|
||||
void sub_0804EFF8(void) {
|
||||
if (gSave.unk8 > 7) {
|
||||
LoadRoomEntityList(&gUnk_080F5DD0);
|
||||
}
|
||||
if (CheckGlobalFlag(MAROYA_WAKEUP)) {
|
||||
sub_080751E8(1, 2, &gUnk_08011C50);
|
||||
sub_080751E8(1, 2, &script_08011C50);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5670,35 +5671,35 @@ void sub_0804F680(Entity* parent, s32 x, s32 y) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0804F6A8(Entity* arg0) {
|
||||
sub_0804F680(arg0, 0x1d8, 0x108);
|
||||
sub_0804F680(arg0, 0x218, 0x188);
|
||||
void sub_0804F6A8(Entity* this) {
|
||||
sub_0804F680(this, 0x1d8, 0x108);
|
||||
sub_0804F680(this, 0x218, 0x188);
|
||||
}
|
||||
|
||||
void sub_0804F6C8(Entity* arg0) {
|
||||
sub_0804F680(arg0, 0x1e8, 0x108);
|
||||
sub_0804F680(arg0, 0x208, 0x188);
|
||||
void sub_0804F6C8(Entity* this) {
|
||||
sub_0804F680(this, 0x1e8, 0x108);
|
||||
sub_0804F680(this, 0x208, 0x188);
|
||||
}
|
||||
|
||||
void sub_0804F6E8(Entity* arg0) {
|
||||
sub_0804F680(arg0, 0x1f8, 0x108);
|
||||
sub_0804F680(arg0, 0x258, 0x138);
|
||||
sub_0804F680(arg0, 0x1f8, 0x188);
|
||||
sub_0804F680(arg0, 0x198, 0x158);
|
||||
void sub_0804F6E8(Entity* this) {
|
||||
sub_0804F680(this, 0x1f8, 0x108);
|
||||
sub_0804F680(this, 0x258, 0x138);
|
||||
sub_0804F680(this, 0x1f8, 0x188);
|
||||
sub_0804F680(this, 0x198, 0x158);
|
||||
}
|
||||
|
||||
void sub_0804F724(Entity* arg0) {
|
||||
sub_0804F680(arg0, 0x208, 0x108);
|
||||
sub_0804F680(arg0, 0x258, 0x148);
|
||||
sub_0804F680(arg0, 0x1e8, 0x188);
|
||||
sub_0804F680(arg0, 0x198, 0x148);
|
||||
void sub_0804F724(Entity* this) {
|
||||
sub_0804F680(this, 0x208, 0x108);
|
||||
sub_0804F680(this, 0x258, 0x148);
|
||||
sub_0804F680(this, 0x1e8, 0x188);
|
||||
sub_0804F680(this, 0x198, 0x148);
|
||||
}
|
||||
|
||||
void sub_0804F760(Entity* arg0) {
|
||||
sub_0804F680(arg0, 0x218, 0x108);
|
||||
sub_0804F680(arg0, 0x258, 0x158);
|
||||
sub_0804F680(arg0, 0x1d8, 0x188);
|
||||
sub_0804F680(arg0, 0x198, 0x138);
|
||||
void sub_0804F760(Entity* this) {
|
||||
sub_0804F680(this, 0x218, 0x108);
|
||||
sub_0804F680(this, 0x258, 0x158);
|
||||
sub_0804F680(this, 0x1d8, 0x188);
|
||||
sub_0804F680(this, 0x198, 0x138);
|
||||
}
|
||||
|
||||
void sub_0804F79C(Entity* parent) {
|
||||
|
||||
+843
-716
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user