mirror of
https://github.com/zeldaret/tmc
synced 2026-08-21 14:37:54 -04:00
merge changes from master
This commit is contained in:
+49
-8
@@ -105,14 +105,19 @@ void sub_0802A924(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
this->field_0xf = 0;
|
||||
this->hitbox = (Hitbox*)&gUnk_080CD16C;
|
||||
#ifdef EU
|
||||
this->field_0x3c |= 0x10;
|
||||
#endif
|
||||
this->height.HALF.HI = -0x30;
|
||||
this->field_0x80.HALF.LO = Random() & 1;
|
||||
this->field_0x82.HWORD = 0;
|
||||
this->field_0x7a.HALF.HI = 0;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
this->field_0x7a.HALF.LO = 0;
|
||||
#ifndef EU
|
||||
this->field_0x78.HALF.LO = 0;
|
||||
this->field_0x78.HALF.HI = 0;
|
||||
#endif
|
||||
this->collisionLayer = 3;
|
||||
this->spriteOrientation.flipY = 1;
|
||||
this->spriteRendering.b3 = 1;
|
||||
@@ -183,6 +188,9 @@ void sub_0802AA40(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef EU
|
||||
ASM_FUNC("asm/non_matching/eu/sub_0802AAC0.inc", void sub_0802AAC0(Entity* this))
|
||||
#else
|
||||
void sub_0802AAC0(Entity* this) {
|
||||
sub_0802AC40(this);
|
||||
if (--this->field_0xf == 0) {
|
||||
@@ -210,7 +218,11 @@ void sub_0802AAC0(Entity* this) {
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef EU
|
||||
ASM_FUNC("asm/non_matching/eu/sub_0802AB40.inc", void sub_0802AB40(Entity* this));
|
||||
#else
|
||||
void sub_0802AB40(Entity* this) {
|
||||
sub_0802AC40(this);
|
||||
switch (this->field_0x78.HALF.LO) {
|
||||
@@ -249,6 +261,7 @@ void sub_0802AB40(Entity* this) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_0802AC08(Entity* this) {
|
||||
if (this->frames.all & 0x80) {
|
||||
@@ -262,6 +275,9 @@ void sub_0802AC08(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
#ifdef EU
|
||||
ASM_FUNC("asm/non_matching/eu/sub_0802AC40.inc", void sub_0802AC40(Entity* this))
|
||||
#else
|
||||
void sub_0802AC40(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
sub_0806F69C(this);
|
||||
@@ -291,6 +307,7 @@ void sub_0802AC40(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_0802ACDC(Entity* this, u32 param_2) {
|
||||
u32 x;
|
||||
@@ -339,6 +356,10 @@ void sub_0802AD54(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef EU
|
||||
// TODO regalloc in EU version
|
||||
ASM_FUNC("asm/non_matching/eu/sub_0802ADDC.inc", void sub_0802ADDC(Entity* this))
|
||||
#else
|
||||
void sub_0802ADDC(Entity* this) {
|
||||
Entity* ent = CreateEnemy(BOMB_PEAHAT, this->type + 2);
|
||||
if (ent != NULL) {
|
||||
@@ -346,12 +367,16 @@ void sub_0802ADDC(Entity* this) {
|
||||
ent->parent = this;
|
||||
this->attachedEntity = ent;
|
||||
CopyPosition(this, ent);
|
||||
/*#ifdef EU
|
||||
this->height.HALF.HI += 8;
|
||||
#endif*/
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
if (this->type == 0) {
|
||||
this->field_0x7a.HALF.LO++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_0802AE24(Entity* this) {
|
||||
this->action = 1;
|
||||
@@ -366,6 +391,9 @@ void sub_0802AE24(Entity* this) {
|
||||
InitializeAnimation(this, 3);
|
||||
}
|
||||
|
||||
#ifdef EU
|
||||
ASM_FUNC("asm/non_matching/eu/sub_0802AE68.inc", void sub_0802AE68(Entity* this))
|
||||
#else
|
||||
void sub_0802AE68(Entity* this) {
|
||||
Entity* ent = sub_0802B250(this);
|
||||
if (ent == 0) {
|
||||
@@ -383,6 +411,7 @@ void sub_0802AE68(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_0802AEBC(Entity* this) {
|
||||
gUnk_080CD158[this->subAction](this);
|
||||
@@ -444,8 +473,7 @@ void sub_0802AF9C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
#if NON_MATCHING
|
||||
void sub_0802AFC8(Entity* this) {
|
||||
NONMATCH("asm/non_matching/bombPeahat/sub_0802AFC8.inc", void sub_0802AFC8(Entity* this)) {
|
||||
u32 flag = 8;
|
||||
if (this->field_0xf < 0x29) {
|
||||
u32 tmp;
|
||||
@@ -470,12 +498,7 @@ void sub_0802AFC8(Entity* this) {
|
||||
this->palette.b.b0 = this->palette.b.b4;
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_0802AFC8(Entity* this) {
|
||||
asm(".include \"asm/non_matching/bombPeahat/sub_0802AFC8.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
void sub_0802B048(Entity* this) {
|
||||
Entity* ent;
|
||||
@@ -545,6 +568,9 @@ void sub_0802B1A0(Entity* this) {
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
|
||||
#ifdef EU
|
||||
ASM_FUNC("asm/non_matching/eu/sub_0802B1BC.inc", void sub_0802B1BC(Entity* this))
|
||||
#else
|
||||
void sub_0802B1BC(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
@@ -565,6 +591,7 @@ void sub_0802B1BC(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_0802B204(Entity* this) {
|
||||
if (sub_080044EC(this, 0x2800) == 1) {
|
||||
@@ -584,6 +611,7 @@ bool32 sub_0802B234(Entity* this) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef EU
|
||||
Entity* sub_0802B250(Entity* this) {
|
||||
Entity* parent = this->parent;
|
||||
if (parent && parent->next == NULL) {
|
||||
@@ -602,6 +630,7 @@ void sub_0802B264(Entity* this) {
|
||||
}
|
||||
GetNextFrame(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
void (*const gUnk_080CD0F0[])(Entity*) = {
|
||||
@@ -654,14 +683,26 @@ void (*const gUnk_080CD158[])(Entity*) = {
|
||||
};
|
||||
|
||||
const Hitbox gUnk_080CD16C = {
|
||||
#ifdef EU
|
||||
0x00, 0xFD, 0x05, 0x03, 0x03, 0x05, 0x06, 0x06,
|
||||
#else
|
||||
0x00, 0xFB, 0x05, 0x03, 0x03, 0x05, 0x06, 0x06,
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef EU
|
||||
const u8 unk_data[] = { // TODO
|
||||
0x0c, 0x0, 0x0, 0x0
|
||||
};
|
||||
#endif
|
||||
|
||||
const Hitbox gUnk_080CD174 = {
|
||||
0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x04, 0x04,
|
||||
};
|
||||
|
||||
|
||||
const Hitbox gUnk_080CD17C = {
|
||||
0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x16, 0x16,
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
@@ -138,7 +138,7 @@ void sub_08028A74(Entity* this) {
|
||||
unk = 1;
|
||||
sub_080290FC(this);
|
||||
if (this->frames.all & 1) {
|
||||
Entity* ent = sub_0804A98C(this, 4, 0);
|
||||
Entity* ent = CreateProjectileWithParent(this, 4, 0);
|
||||
if (ent != NULL) {
|
||||
ent->parent = this;
|
||||
ent->direction = this->direction;
|
||||
@@ -266,7 +266,9 @@ void sub_08028CE8(Entity* this) {
|
||||
this->actionDelay = 4;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
sub_080290E0(this, 3);
|
||||
#if defined(USA) || defined(DEMO)
|
||||
SetLocalFlag(0x87);
|
||||
#endif
|
||||
return;
|
||||
case 1:
|
||||
CreateItemEntity(offer->field_0x8, offer->field_0x9, 0);
|
||||
@@ -523,8 +525,7 @@ bool32 sub_080291DC(Entity* this) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#if NON_MATCHING
|
||||
void sub_0802922C(Entity* this) {
|
||||
NONMATCH("asm/non_matching/businessScrub/sub_0802925C.inc", void sub_0802922C(Entity* this)) {
|
||||
const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD;
|
||||
|
||||
this->action = 6;
|
||||
@@ -538,12 +539,7 @@ void sub_0802922C(Entity* this) {
|
||||
|
||||
sub_080290E0(this, 3);
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_0802922C(Entity* this) {
|
||||
asm(".include \"asm/non_matching/businessScrub/sub_0802925C.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
void sub_0802925C(Entity* this) {
|
||||
sub_08078784(this, sub_0801E99C(this));
|
||||
@@ -569,7 +565,11 @@ const struct SalesOffering gUnk_080CC954[] = {
|
||||
{0x04, 0x00, 0x0014, 0x2910, 0x2911, 0x1c, 0xff, 0xffff},
|
||||
{0x0c, 0x00, 0xffff, 0x2912, 0x2913, 0xff, 0xff, 0x0046},
|
||||
{0x04, 0x00, 0x0064, 0x2913, 0x2902, 0x5c, 0x75, 0xffff},
|
||||
#ifdef EU
|
||||
{0x00, 0x00, 0x0064, 0x290d, 0x2902, 0x5c, 0xff, 0xffff},
|
||||
#else
|
||||
{0x00, 0x00, 0x00C8, 0x290d, 0x2902, 0x5c, 0xff, 0xffff},
|
||||
#endif
|
||||
};
|
||||
|
||||
const u8 gUnk_080CC9C0[] = {
|
||||
|
||||
@@ -332,6 +332,9 @@ void sub_0801F3AC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef EU
|
||||
ASM_FUNC("asm/non_matching/eu/sub_0801F428.inc", void sub_0801F428(Entity* this))
|
||||
#else
|
||||
void sub_0801F428(Entity* this) {
|
||||
sub_0804A720(this);
|
||||
this->action = 1;
|
||||
@@ -348,6 +351,7 @@ void sub_0801F428(Entity* this) {
|
||||
this->spriteSettings.b.draw = 1;
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_0801F48C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
|
||||
+6
-9
@@ -224,7 +224,7 @@ void sub_08020F48(Entity* this) {
|
||||
|
||||
this->action = 14;
|
||||
sub_08021218(this, 13, uVar2 >> 3);
|
||||
pEVar3 = sub_0804A98C(this, 0, 1);
|
||||
pEVar3 = CreateProjectileWithParent(this, 0, 1);
|
||||
if (pEVar3) {
|
||||
pEVar3->parent = this;
|
||||
this->attachedEntity = pEVar3;
|
||||
@@ -270,7 +270,7 @@ void sub_08021010(Entity* this) {
|
||||
|
||||
void sub_08021038(Entity* this) {
|
||||
if (this->attachedEntity == NULL && this->frames.all) {
|
||||
Entity* pEVar2 = (Entity*)sub_0804A98C(this, 0, 0);
|
||||
Entity* pEVar2 = (Entity*)CreateProjectileWithParent(this, 0, 0);
|
||||
if (pEVar2) {
|
||||
pEVar2->parent = this;
|
||||
this->attachedEntity = pEVar2;
|
||||
@@ -309,7 +309,7 @@ void sub_080210E4(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
this->frames.all &= ~1;
|
||||
ent = sub_0804A98C(this, 0, 2);
|
||||
ent = CreateProjectileWithParent(this, 0, 2);
|
||||
if (ent) {
|
||||
ent->parent = this;
|
||||
this->attachedEntity = ent;
|
||||
@@ -391,10 +391,7 @@ void sub_0802124C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
NAKED
|
||||
u32 sub_08021274(u32 a, u32 b) {
|
||||
asm(".include \"asm/non_matching/darkNut/sub_08021274.inc\"");
|
||||
}
|
||||
ASM_FUNC("asm/non_matching/darkNut/sub_08021274.inc", u32 sub_08021274(u32 a, u32 b))
|
||||
|
||||
void sub_080212B0(Entity* this) {
|
||||
u8 tmp;
|
||||
@@ -572,7 +569,7 @@ void sub_0802159C(Entity* this) {
|
||||
|
||||
this->frames.all = 0;
|
||||
this->damageType = 0x51;
|
||||
ent = sub_0804A98C(this, 0, 3);
|
||||
ent = CreateProjectileWithParent(this, 0, 3);
|
||||
if (ent) {
|
||||
ent->parent = this;
|
||||
this->attachedEntity = ent;
|
||||
@@ -593,7 +590,7 @@ void sub_08021600(Entity* this) {
|
||||
|
||||
this->frames.all = 0;
|
||||
this->damageType = 0x51;
|
||||
ent = sub_0804A98C(this, 0, 4);
|
||||
ent = CreateProjectileWithParent(this, 0, 4);
|
||||
if (ent) {
|
||||
ent->parent = this;
|
||||
this->attachedEntity = ent;
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ void sub_0803EB44(Entity* this) {
|
||||
Entity* pEVar1;
|
||||
|
||||
sub_0804A720(this);
|
||||
pEVar1 = sub_0804A98C(this, 0x19, 0);
|
||||
pEVar1 = CreateProjectileWithParent(this, 0x19, 0);
|
||||
if (pEVar1 != NULL) {
|
||||
pEVar1->parent = this;
|
||||
this->attachedEntity = pEVar1;
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ void sub_08048478(Entity* this) {
|
||||
} else {
|
||||
if (this->frames.b.f0 != 0) {
|
||||
this->frames.all &= 0xfe;
|
||||
pEVar3 = sub_080A7EE0(0x24);
|
||||
pEVar3 = CreateProjectile(0x24);
|
||||
if (pEVar3 != NULL) {
|
||||
pEVar3->parent = this;
|
||||
this->attachedEntity = pEVar3;
|
||||
|
||||
@@ -11,6 +11,8 @@ extern const u16 gUnk_080CD568[];
|
||||
extern const u8 gUnk_080CD580[];
|
||||
extern const s16 gUnk_080CD58C[];
|
||||
|
||||
extern void sub_080AEFB4(Entity*);
|
||||
|
||||
void FallingBoulder(Entity* this) {
|
||||
EnemyFunctionHandler(this, gUnk_080CD540);
|
||||
}
|
||||
@@ -58,8 +60,7 @@ void sub_0802C318(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
#if NON_MATCHING
|
||||
void sub_0802C334(Entity* this) {
|
||||
NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(Entity* this)) {
|
||||
if ((u16)this->field_0x7c.HALF.LO == 0) {
|
||||
u32 tmp = gRoomControls.roomOriginY;
|
||||
if (&gPlayerEntity == NULL)
|
||||
@@ -99,7 +100,7 @@ void sub_0802C334(Entity* this) {
|
||||
diff += 0x18;
|
||||
}
|
||||
sub_0802C62C(this);
|
||||
this->field_0x7a.HWORD = Random() & 0xff | 0x100;
|
||||
this->field_0x7a.HWORD = (Random() & 0xff) | 0x100;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -124,12 +125,7 @@ void sub_0802C334(Entity* this) {
|
||||
this->spritePriority.b0 = 1;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_0802C334(Entity* this) {
|
||||
asm(".include \"asm/non_matching/fallingBoulder/sub_0802C334.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
void nullsub_148(Entity* this) {
|
||||
/* ... */
|
||||
|
||||
+6
-10
@@ -223,8 +223,8 @@ void sub_080377B0(Entity* this) {
|
||||
this->animationState = this->direction / 8;
|
||||
InitAnimationForceUpdate(this, this->animationState + 4);
|
||||
}
|
||||
// Nonmatching
|
||||
NONMATCH("asm/non_matching/gibdo/sub_08037810.inc", u32 sub_08037810(Entity* this)) {
|
||||
|
||||
u32 sub_08037810(Entity* this) {
|
||||
u32 x;
|
||||
u32 y;
|
||||
if (this->field_0x76.HALF.LO == 0) {
|
||||
@@ -236,9 +236,8 @@ NONMATCH("asm/non_matching/gibdo/sub_08037810.inc", u32 sub_08037810(Entity* thi
|
||||
this->actionDelay = 0x18;
|
||||
this->field_0xf = 0x8;
|
||||
this->speed = 0xc0;
|
||||
y = DirectionRoundUp(GetFacingDirection(this, gUnk_020000B0));
|
||||
this->direction = y;
|
||||
this->animationState = y / 8;
|
||||
this->direction = DirectionRoundUp(GetFacingDirection(this, gUnk_020000B0));
|
||||
this->animationState = this->direction >> 3;
|
||||
this->field_0x74.HWORD = 300;
|
||||
this->field_0x78.HWORD = gUnk_020000B0->x.HALF.HI;
|
||||
this->field_0x7a.HWORD = gUnk_020000B0->y.HALF.HI;
|
||||
@@ -252,7 +251,6 @@ NONMATCH("asm/non_matching/gibdo/sub_08037810.inc", u32 sub_08037810(Entity* thi
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
u32 sub_080378B0(Entity* this) {
|
||||
if (this->field_0x76.HALF.HI == 0) {
|
||||
@@ -333,12 +331,11 @@ void sub_08037A14(Entity* this) {
|
||||
CopyPosition(this, this->field_0x4c);
|
||||
InitAnimationForceUpdate(this, this->animationState + 0xc);
|
||||
}
|
||||
// Not match
|
||||
// Take Damage maybe?
|
||||
NONMATCH("asm/non_matching/gibdo/sub_08037A58.inc", void sub_08037A58(Entity* this)) {
|
||||
void sub_08037A58(Entity* this) {
|
||||
sub_08037ACC(this);
|
||||
this->action = 7;
|
||||
this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 4;
|
||||
this->spritePriority.b0 = 4;
|
||||
if (this->iframes == 0) {
|
||||
this->iframes = 0xec;
|
||||
}
|
||||
@@ -351,7 +348,6 @@ NONMATCH("asm/non_matching/gibdo/sub_08037A58.inc", void sub_08037A58(Entity* th
|
||||
this->field_0x76.HALF.LO = 0x3c;
|
||||
InitAnimationForceUpdate(this, this->animationState + 0x10);
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void sub_08037ACC(Entity* this) {
|
||||
gPlayerState.flags.all &= 0xFFFFFEFF;
|
||||
|
||||
+17
-3
@@ -109,7 +109,7 @@ void GyorgMale(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08046898(Entity* this) {
|
||||
Entity* tmp = sub_080A7EE0(0x22);
|
||||
Entity* tmp = CreateProjectile(0x22);
|
||||
u32 tmp2;
|
||||
if (!tmp)
|
||||
return;
|
||||
@@ -143,7 +143,11 @@ void sub_08046930(Entity* this) {
|
||||
if (this->type) {
|
||||
this->subAction = 5;
|
||||
this->direction = 0x20;
|
||||
#ifdef EU
|
||||
this->speed = 0x200;
|
||||
#else
|
||||
this->speed = 0x280;
|
||||
#endif
|
||||
}
|
||||
sub_08047D88(this);
|
||||
if (this->field_0x7c.BYTES.byte0 == 0)
|
||||
@@ -152,7 +156,11 @@ void sub_08046930(Entity* this) {
|
||||
this->actionDelay = 1;
|
||||
this->animationState = 0;
|
||||
this->direction = 0;
|
||||
#ifdef EU
|
||||
this->speed = 0x200;
|
||||
#else
|
||||
this->speed = 0x280;
|
||||
#endif
|
||||
}
|
||||
|
||||
void sub_0804696C(Entity* this) {
|
||||
@@ -163,10 +171,16 @@ void sub_0804696C(Entity* this) {
|
||||
this->speed = 0x100;
|
||||
this->spriteOrientation.flipY = 3;
|
||||
this->spriteRendering.b3 = 3;
|
||||
#ifndef EU
|
||||
SoundReq(BGM_BOSS_THEME);
|
||||
#endif
|
||||
}
|
||||
if (this->actionDelay) {
|
||||
#ifdef EU
|
||||
if (gRoomControls.roomOriginY + 0x210 > this->y.HALF.HI) {
|
||||
#else
|
||||
if (gRoomControls.roomOriginY + 0x258 > this->y.HALF.HI) {
|
||||
#endif
|
||||
this->actionDelay = 0;
|
||||
SoundReq(SFX_APPARATE);
|
||||
}
|
||||
@@ -388,7 +402,7 @@ void sub_08046EF4(Entity* this) {
|
||||
if ((--this->field_0xf & 0xFF) == 0) {
|
||||
Entity* tmp;
|
||||
this->field_0xf = (Random() & 0x38) + 0x78;
|
||||
tmp = sub_080A7EE0(0x23);
|
||||
tmp = CreateProjectile(0x23);
|
||||
if (tmp) {
|
||||
tmp->collisionLayer = 2;
|
||||
tmp->parent = this;
|
||||
@@ -412,7 +426,7 @@ void sub_08046F64(Entity* this) {
|
||||
if (--this->field_0x7c.HALF.HI == 0) {
|
||||
Entity* tmp;
|
||||
this->field_0x7c.HALF.HI = 0x78;
|
||||
tmp = sub_080A7EE0(0x23);
|
||||
tmp = CreateProjectile(0x23);
|
||||
if (tmp) {
|
||||
tmp->collisionLayer = 2;
|
||||
tmp->parent = this;
|
||||
|
||||
+1
-1
@@ -232,7 +232,7 @@ void sub_08032794(Entity* this) {
|
||||
void sub_080327C8(Entity* this) {
|
||||
Entity* child;
|
||||
|
||||
child = sub_0804A98C(this, 11, 0);
|
||||
child = CreateProjectileWithParent(this, 11, 0);
|
||||
if (child != NULL) {
|
||||
child->parent = this;
|
||||
this->attachedEntity = child;
|
||||
|
||||
+2
-2
@@ -117,7 +117,7 @@ void sub_0803C86C(Entity* this) {
|
||||
}
|
||||
|
||||
void Lakitu_Initialize(Entity* this) {
|
||||
Entity* cloud = sub_0804A98C(this, 17, 0);
|
||||
Entity* cloud = CreateProjectileWithParent(this, 17, 0);
|
||||
if (cloud == NULL) {
|
||||
return;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ void Lakitu_SpawnLightning(Entity* this) {
|
||||
Entity* lightning;
|
||||
const OffsetCoords* offset;
|
||||
|
||||
lightning = sub_0804A98C(this, 18, 0);
|
||||
lightning = CreateProjectileWithParent(this, 18, 0);
|
||||
|
||||
if (lightning == NULL) {
|
||||
return;
|
||||
|
||||
@@ -204,8 +204,7 @@ void sub_0802805C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
#if NON_MATCHING
|
||||
void sub_0802810C(Entity* this) {
|
||||
NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity* this)) {
|
||||
gPlayerState.jumpStatus = 0x41;
|
||||
gPlayerState.field_0xa = 0;
|
||||
gPlayerState.flags.all &= 0xffffffef;
|
||||
@@ -224,12 +223,7 @@ void sub_0802810C(Entity* this) {
|
||||
this->iframes = -18;
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_0802810C(Entity* this) {
|
||||
asm(".include \"asm/non_matching/likeLike/sub_0802810C.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
void sub_080281A0(Entity* this) {
|
||||
this->field_0xf = 0x19;
|
||||
@@ -263,7 +257,11 @@ bool32 sub_080281E0(u32 param_1) {
|
||||
}
|
||||
|
||||
void sub_08028224(u32 param_1) {
|
||||
#ifdef EU
|
||||
CreateItemEntity(param_1, 0, 1);
|
||||
#else
|
||||
sub_080A7C18(param_1, 0, 1);
|
||||
#endif
|
||||
TextboxNoOverlapFollow(0x579);
|
||||
}
|
||||
|
||||
|
||||
@@ -318,10 +318,7 @@ void sub_08029DE4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
NAKED
|
||||
void sub_08029E0C(Entity* this) {
|
||||
asm(".include \"asm/non_matching/madderpillar/sub_08029E0C.inc\"");
|
||||
}
|
||||
ASM_FUNC("asm/non_matching/madderpillar/sub_08029E0C.inc", void sub_08029E0C(Entity* this))
|
||||
|
||||
void sub_08029EEC(Entity* this) {
|
||||
u32 uVar1 = (this->direction >> 3) + this->field_0x74.HALF.HI;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "functions.h"
|
||||
|
||||
extern void UnloadOBJPalette(Entity*);
|
||||
extern void DoExitTransition(ScreenTransitionData*);
|
||||
|
||||
extern u8 gEntCount;
|
||||
|
||||
@@ -780,7 +779,7 @@ NONMATCH("asm/non_matching/mazaal/sub_08034B38.inc", void sub_08034B38(Entity* t
|
||||
this->action = 3;
|
||||
InitializeAnimation(this, this->type + 3);
|
||||
} else {
|
||||
target = sub_080A7EE0(0xe);
|
||||
target = CreateProjectile(0xe);
|
||||
if (target != NULL) {
|
||||
target->type -= 2;
|
||||
if (target->type == 0) {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void DoExitTransition(ScreenTransitionData*);
|
||||
extern void sub_0807B600(u32);
|
||||
|
||||
extern const u16 script_08012E20[];
|
||||
|
||||
+5
-8
@@ -141,15 +141,12 @@ void sub_08022DE8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
NAKED
|
||||
void sub_08022E40(Entity* this) {
|
||||
asm(".include \"asm/non_matching/moldorm/sub_08022E40.inc\"");
|
||||
}
|
||||
// this definition is only here, so clang-tidy does not mess gUnk_080CBBBC up.
|
||||
extern void sub_08022E40(Entity* this);
|
||||
|
||||
NAKED
|
||||
void sub_08022EAC(Entity* this) {
|
||||
asm(".include \"asm/non_matching/moldorm/sub_08022EAC.inc\"");
|
||||
}
|
||||
ASM_FUNC("asm/non_matching/moldorm/sub_08022E40.inc", void sub_08022E40(Entity* this))
|
||||
|
||||
ASM_FUNC("asm/non_matching/moldorm/sub_08022EAC.inc", void sub_08022EAC(Entity* this))
|
||||
|
||||
void sub_08022F14(Entity* this) {
|
||||
if (sub_08049FA0(this) == 0) {
|
||||
|
||||
+4
-16
@@ -27,8 +27,7 @@ extern void (*const gUnk_080CBC98[])(Entity*);
|
||||
extern void (*const gUnk_080CBCA8[])(Entity*);
|
||||
extern const s8 gUnk_080CBCB8[];
|
||||
|
||||
#if NON_MATCHING
|
||||
void Moldworm(Entity* this) {
|
||||
NONMATCH("asm/non_matching/moldworm/Moldworm.inc", void Moldworm(Entity* this)) {
|
||||
u16 prevX = this->x.HALF.HI;
|
||||
u16 prevY = this->y.HALF.HI;
|
||||
|
||||
@@ -56,12 +55,7 @@ void Moldworm(Entity* this) {
|
||||
(((this->x.HALF.HI - prevX + 8) & 0xf) << 4) | ((this->y.HALF.HI - prevY + 8U) & 0xf);
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void Moldworm(Entity* this) {
|
||||
asm(".include \"asm/non_matching/moldworm/moldworm.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
void sub_080230CC(Entity* this) {
|
||||
gUnk_080CBC50[this->action](this);
|
||||
@@ -472,10 +466,7 @@ void sub_08023990(Entity* this, u32 param_2, u32 param_3) {
|
||||
}
|
||||
|
||||
/* TODO: fix struct */
|
||||
NAKED
|
||||
void sub_080239F0(Entity* this) {
|
||||
asm(".include \"asm/non_matching/moldworm/sub_080239F0.inc\"");
|
||||
}
|
||||
ASM_FUNC("asm/non_matching/moldworm/sub_080239F0.inc", void sub_080239F0(Entity* this))
|
||||
|
||||
bool32 sub_08023A38(u32 unk) {
|
||||
if (unk == 0x1a || unk == 0x29) {
|
||||
@@ -522,10 +513,7 @@ void sub_08023AB0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
NAKED
|
||||
bool32 sub_08023B38(Entity* this) {
|
||||
asm(".include \"asm/non_matching/moldworm/sub_08023B38.inc\"");
|
||||
}
|
||||
ASM_FUNC("asm/non_matching/moldworm/sub_08023B38.inc", bool32 sub_08023B38(Entity* this))
|
||||
|
||||
// clang-format off
|
||||
void (*const gUnk_080CBC38[])(Entity*) = {
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ void Octorok_Move(Entity* this) {
|
||||
void Octorok_ShootNut(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 1) {
|
||||
Entity* ent = sub_0804A98C(this, 1, 0);
|
||||
Entity* ent = CreateProjectileWithParent(this, 1, 0);
|
||||
if (ent) {
|
||||
const s8* off;
|
||||
ent->direction = this->direction;
|
||||
|
||||
+10
-24
@@ -4,6 +4,7 @@
|
||||
#include "createObject.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
#include "save.h"
|
||||
|
||||
extern u32 sub_080002E0(u16, u32);
|
||||
extern void sub_0800449C(Entity*, u32);
|
||||
@@ -169,7 +170,7 @@ void sub_080240B8(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
this->field_0x82.HALF.HI = 0;
|
||||
ent = sub_0804A98C(this, 6, this->field_0x82.HALF.HI);
|
||||
ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI);
|
||||
if (ent) {
|
||||
this->attachedEntity = ent;
|
||||
ent->parent = this;
|
||||
@@ -412,7 +413,7 @@ void sub_080244E8(Entity* this) {
|
||||
this->height.HALF.HI -= 0xe;
|
||||
this->field_0x78.HWORD -= 0xe;
|
||||
|
||||
ent = sub_0804A98C(this, 6, this->field_0x82.HALF.HI);
|
||||
ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI);
|
||||
if (ent) {
|
||||
ent->parent = this;
|
||||
ent->height.HALF.HI += 0xe;
|
||||
@@ -435,7 +436,7 @@ void sub_080244E8(Entity* this) {
|
||||
this->height.HALF.HI -= 0xe;
|
||||
this->field_0x78.HWORD -= 0xe;
|
||||
|
||||
ent = sub_0804A98C(this, 6, this->field_0x82.HALF.HI);
|
||||
ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI);
|
||||
if (ent) {
|
||||
ent->parent = this;
|
||||
ent->height.HALF.HI += 0xe;
|
||||
@@ -559,20 +560,14 @@ void sub_080249DC(Entity* this) {
|
||||
InitializeAnimation(this, this->animationState);
|
||||
}
|
||||
|
||||
#if NON_MATCHING
|
||||
void sub_080249F4(Entity* this) {
|
||||
NONMATCH("asm/non_matching/pesto/sub_080249F4.inc", void sub_080249F4(Entity* this)) {
|
||||
u8 direction = ((this->direction + 2) & 0x1c) >> 2;
|
||||
if (direction != this->animationState) {
|
||||
this->animationState = direction;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_080249F4(Entity* this) {
|
||||
asm(".include \"asm/non_matching/pesto/sub_080249F4.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
void sub_08024A14(Entity* this, u32 param_2, u32 param_3) {
|
||||
u8 unk = FALSE;
|
||||
@@ -703,10 +698,7 @@ bool32 sub_08024B38(Entity* this) {
|
||||
return iVar4;
|
||||
}
|
||||
|
||||
NAKED
|
||||
bool32 sub_08024C48(Entity* this, bool32 unk) {
|
||||
asm(".include \"asm/non_matching/pesto/sub_08024C48.inc\"");
|
||||
}
|
||||
ASM_FUNC("asm/non_matching/pesto/sub_08024C48.inc", bool32 sub_08024C48(Entity* this, bool32 unk))
|
||||
|
||||
void sub_08024C7C(Entity* this) {
|
||||
this->action = 1;
|
||||
@@ -794,8 +786,7 @@ u32 sub_08024E34(void) {
|
||||
return gUnk_080CBF20[idx];
|
||||
}
|
||||
|
||||
#if NON_MATCHING
|
||||
void sub_08024E4C(Entity* this) {
|
||||
NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* this)) {
|
||||
if (this->field_0x82.HALF.HI == 3) {
|
||||
this->field_0xf++;
|
||||
this->field_0xf &= 0xff;
|
||||
@@ -829,7 +820,7 @@ void sub_08024E4C(Entity* this) {
|
||||
player->animationState = 4;
|
||||
player->spritePriority.b1 = 0;
|
||||
if (this->field_0xf == 0) {
|
||||
(this->field_0x86.HALF.HI++;
|
||||
this->field_0x86.HALF.HI++;
|
||||
player->iframes = 8;
|
||||
ModHealth(-2);
|
||||
sub_0800449C(player, 0x7a);
|
||||
@@ -837,12 +828,7 @@ void sub_08024E4C(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_08024E4C(Entity* this) {
|
||||
asm(".include \"asm/non_matching/pesto/sub_08024E4C.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
void sub_08024F50(Entity* this) {
|
||||
gPlayerState.field_0xa = 0;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
extern u32 sub_080002E0(u32, u32);
|
||||
extern u32 sub_080002C8(u16, u8);
|
||||
extern u16 sub_080002A8(u32, u32, u32);
|
||||
extern u16 sub_080002D4(u32, u32, u32);
|
||||
extern void sub_0804AA1C(Entity*);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
@@ -468,8 +467,7 @@ bool32 sub_080258C4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
#if NON_MATCHING
|
||||
bool32 sub_0802594C(Entity* this, u32 param_2) {
|
||||
NONMATCH("asm/non_matching/puffstool/sub_0802594C.inc", bool32 sub_0802594C(Entity* this, u32 param_2)) {
|
||||
const s8* unk = gUnk_080CC090[param_2];
|
||||
u32 uVar1 = this->collisionLayer;
|
||||
RoomControls* ctrl = &gRoomControls;
|
||||
@@ -492,12 +490,7 @@ bool32 sub_0802594C(Entity* this, u32 param_2) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
bool32 sub_0802594C(Entity* this, u32 param_2) {
|
||||
asm(".include \"asm/non_matching/puffstool/sub_0802594C.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
void sub_08025A54(Entity* this) {
|
||||
u32 layer = this->collisionLayer;
|
||||
|
||||
@@ -44,7 +44,9 @@ void sub_08022254(Entity* this) {
|
||||
ent = CreateEnemy(CHUCHU, 1);
|
||||
if (ent) {
|
||||
ent->type2 = 1;
|
||||
#ifndef EU
|
||||
ent->iframes = -8;
|
||||
#endif
|
||||
sub_0804A4E4(this, ent);
|
||||
this->action = 2;
|
||||
this->flags &= ~0x80;
|
||||
@@ -98,8 +100,10 @@ void sub_080223E4(Entity* this) {
|
||||
if (ent) {
|
||||
ent->bitfield = 0x94;
|
||||
ent->iframes = 0x10;
|
||||
#ifndef EU
|
||||
ent->field_0x42 = 0xc;
|
||||
ent->field_0x3e = this->direction;
|
||||
#endif
|
||||
}
|
||||
|
||||
DeleteEntity(this);
|
||||
|
||||
@@ -80,9 +80,7 @@ void sub_080382EC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/ropeGolden/sub_08038304.inc", void sub_08038304(Entity* this)) {
|
||||
}
|
||||
END_NONMATCH
|
||||
ASM_FUNC("asm/non_matching/ropeGolden/sub_08038304.inc", void sub_08038304(Entity* this))
|
||||
|
||||
void sub_080383AC(Entity* this) {
|
||||
u32 v;
|
||||
|
||||
@@ -274,7 +274,11 @@ void sub_080297F0(Entity* this) {
|
||||
this->spriteSettings.b.draw = TRUE;
|
||||
this->damageType = 0x8e;
|
||||
sub_080AE068(this);
|
||||
#ifdef EU
|
||||
this->spriteIndex = 0x142;
|
||||
#else
|
||||
this->spriteIndex = 0x143;
|
||||
#endif
|
||||
temp = gUnk_080CCC47[this->type];
|
||||
this->palette.b.b0 = temp;
|
||||
this->spriteVramOffset = 9;
|
||||
|
||||
+5
-11
@@ -94,7 +94,7 @@ void sub_08028314(Entity* this) {
|
||||
sub_08028604(this);
|
||||
}
|
||||
|
||||
pEVar2 = sub_080A7EE0(3);
|
||||
pEVar2 = CreateProjectile(3);
|
||||
if (pEVar2 != NULL) {
|
||||
pEVar2->parent = this;
|
||||
this->attachedEntity = pEVar2;
|
||||
@@ -240,14 +240,13 @@ void sub_08028528(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
#if NON_MATCHING
|
||||
void sub_08028604(Entity* this) {
|
||||
NONMATCH("asm/non_matching/spearMoblin/sub_08028604.inc", void sub_08028604(Entity* this)) {
|
||||
this->field_0xf = 0;
|
||||
if (this->field_0x82.HALF.LO == 1) {
|
||||
this->actionDelay = gUnk_080CC7BC[Random() & 3];
|
||||
this->speed = 0x80;
|
||||
if (sub_08049FA0(this) != 0) {
|
||||
this->direction = gUnk_080CC7D0[Random() & 7] + 0x18 + this->direction & 0x18;
|
||||
this->direction = gUnk_080CC7D0[Random() & 7] + 0x18 + (this->direction & 0x18);
|
||||
} else {
|
||||
u32 iVar3 = sub_08049EE4(this);
|
||||
u32 uVar1;
|
||||
@@ -258,7 +257,7 @@ void sub_08028604(Entity* this) {
|
||||
this->actionDelay = this->actionDelay + 0x10;
|
||||
this->field_0x82.HALF.HI--;
|
||||
}
|
||||
this->direction = iVar3 + uVar1 + 4U & 0x18;
|
||||
this->direction = iVar3 + uVar1 + (4U & 0x18);
|
||||
}
|
||||
} else {
|
||||
this->actionDelay = 0xc;
|
||||
@@ -270,12 +269,7 @@ void sub_08028604(Entity* this) {
|
||||
sub_080287E0(this);
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_08028604(Entity* this) {
|
||||
asm(".include \"asm/non_matching/spearMoblin/sub_08028604.inc\"");
|
||||
}
|
||||
#endif
|
||||
END_NONMATCH
|
||||
|
||||
bool32 sub_080286CC(Entity* this) {
|
||||
if (this->field_0x80.HALF.HI == 0) {
|
||||
|
||||
+17
-1
@@ -545,9 +545,15 @@ void sub_08042C34(Entity* this) {
|
||||
if ((gRoomControls.roomOriginY + 0x20) > y) {
|
||||
y = gRoomControls.roomOriginY + 0x20;
|
||||
}
|
||||
#if defined EU || defined JP
|
||||
if (gRoomControls.roomOriginY + gRoomControls.height + -0x20 < y) {
|
||||
y = gRoomControls.roomOriginY + gRoomControls.height + -0x20;
|
||||
}
|
||||
#else
|
||||
if (gRoomControls.roomOriginY + gRoomControls.height + -0x40 < y) {
|
||||
y = gRoomControls.roomOriginY + gRoomControls.height + -0x40;
|
||||
}
|
||||
#endif
|
||||
if (((u32)((x - gRoomControls.roomOriginX) - 0x90) < 0x41) &&
|
||||
((u32)((y - gRoomControls.roomOriginY) - 8) < 0x41)) {
|
||||
x = gRoomControls.roomOriginX + 0xb0;
|
||||
@@ -704,7 +710,7 @@ void sub_08042FD8(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (!sub_08043C98(this)) {
|
||||
if ((this->frames.all & 1) != 0) {
|
||||
entity = sub_080A7EE0(0x20);
|
||||
entity = CreateProjectile(0x20);
|
||||
if (entity != NULL) {
|
||||
CopyPosition(this, entity);
|
||||
entity->height.HALF.HI -= 0x18;
|
||||
@@ -1280,6 +1286,15 @@ void sub_08043C40(Entity* this, VaatiArm_HeapStruct1* heapStruct) {
|
||||
}
|
||||
|
||||
u32 sub_08043C98(Entity* this) {
|
||||
#if defined EU || defined JP
|
||||
Entity* e1 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
|
||||
if ((e1->bitfield == 0x9d)) {
|
||||
sub_08043D08(this);
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
Entity* e1 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[2];
|
||||
Entity* e2 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
|
||||
if ((e1->bitfield == 0x9d) || (e2->bitfield == 0x9d)) {
|
||||
@@ -1289,6 +1304,7 @@ u32 sub_08043C98(Entity* this) {
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void sub_08043CD4(Entity* this) {
|
||||
|
||||
@@ -34,7 +34,11 @@ void VaatiBall(Entity* this) {
|
||||
ModHealth(-2);
|
||||
}
|
||||
|
||||
#ifdef EU
|
||||
if (this->currentHealth < 0xfa) {
|
||||
#else
|
||||
if (this->currentHealth < 0xfd) {
|
||||
#endif
|
||||
this->spriteSettings.b.draw = 0;
|
||||
this->flags &= 0x7f;
|
||||
this->currentHealth = -1;
|
||||
@@ -181,7 +185,7 @@ void sub_08044868(Entity* this) {
|
||||
if (*(u8*)&vaati->field_0x86 > 1) {
|
||||
u8 draw = this->spriteSettings.b.draw;
|
||||
if (draw == 1 && this->cutsceneBeh.HALF.LO == 0) {
|
||||
vaati = sub_0804A98C(this, 0x18, 0);
|
||||
vaati = CreateProjectileWithParent(this, 0x18, 0);
|
||||
if (vaati) {
|
||||
vaati->type2 = 1;
|
||||
vaati->parent = this;
|
||||
@@ -271,7 +275,7 @@ void sub_080449F8(Entity* this) {
|
||||
this->field_0x74.HALF.LO++;
|
||||
draw = this->spriteSettings.b.draw;
|
||||
if (draw) {
|
||||
vaati = sub_0804A98C(this, 0x1c, 0);
|
||||
vaati = CreateProjectileWithParent(this, 0x1c, 0);
|
||||
if (vaati) {
|
||||
vaati->y.HALF.HI += 4;
|
||||
vaati->parent = this;
|
||||
|
||||
@@ -54,7 +54,9 @@ void sub_0803E0DC(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
if (this->bitfield == 0x80) {
|
||||
#ifndef EU
|
||||
if (this->currentHealth != 0) {
|
||||
#endif
|
||||
this->action = 5;
|
||||
this->flags = this->flags & 0x7f;
|
||||
this->spritePriority.b1 = 0;
|
||||
@@ -62,6 +64,7 @@ void sub_0803E0DC(Entity* this) {
|
||||
gPlayerEntity.spriteOrientation.flipY = this->spriteOrientation.flipY;
|
||||
gPlayerEntity.spriteRendering.b3 = this->spriteRendering.b3;
|
||||
sub_0803E444(this);
|
||||
#ifndef EU
|
||||
sub_08078A90(2);
|
||||
entity = this->parent;
|
||||
if (entity != NULL) {
|
||||
@@ -72,6 +75,7 @@ void sub_0803E0DC(Entity* this) {
|
||||
entity = &gPlayerEntity;
|
||||
entity->flags = gPlayerEntity.flags | 0x80;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
sub_0804AA30(this, gUnk_080D0648);
|
||||
}
|
||||
@@ -233,6 +237,18 @@ void sub_0803E480(Entity* this) {
|
||||
}
|
||||
|
||||
bool32 sub_0803E4A0(Entity* this) {
|
||||
#ifdef EU
|
||||
bool32 ret;
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
return TRUE;
|
||||
} else {
|
||||
if (this->parent == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
ret = this->parent->next == NULL;
|
||||
}
|
||||
return ret;
|
||||
#else
|
||||
bool32 ret;
|
||||
if (gScreenTransition.field_0x39 != 0) {
|
||||
if (this->parent == NULL) {
|
||||
@@ -247,6 +263,7 @@ bool32 sub_0803E4A0(Entity* this) {
|
||||
return TRUE;
|
||||
}
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
void sub_0803E4D8(Entity* this) {
|
||||
|
||||
@@ -60,7 +60,11 @@ const Coords gUnk_080D04AC[] = { { .HALF = { 0x58, 0x60 } },
|
||||
{ .HALF = { 0xd8, 0x90 } } };
|
||||
const u8 gUnk_080D04C0[] = { 2, 0, 0, 2, 2, 2, 4, 4 };
|
||||
const xy gUnk_080D04C8[] = { { 10, -29 }, { -10, -29 }, { 15, -21 }, { -15, -21 } };
|
||||
#ifdef EU
|
||||
const u8 gUnk_080D04D0[] = { -12, -20, -32 };
|
||||
#else
|
||||
const u8 gUnk_080D04D0[] = { -24, -40, -48 };
|
||||
#endif
|
||||
const u8 gUnk_080D04D3[] = { 0, 1, 0, -1 };
|
||||
|
||||
void VaatiRebornEnemy(Entity* this) {
|
||||
@@ -346,7 +350,7 @@ void sub_0803D658(Entity* this) {
|
||||
this->field_0xf = 0;
|
||||
}
|
||||
if ((this->field_0xf < 0x10) &&
|
||||
(entity = sub_0804A98C(this, 0x1a, this->cutsceneBeh.HALF.LO), entity != NULL)) {
|
||||
(entity = CreateProjectileWithParent(this, 0x1a, this->cutsceneBeh.HALF.LO), entity != NULL)) {
|
||||
entity->field_0xf = this->field_0xf;
|
||||
entity->parent = this;
|
||||
entity->height.HALF.HI = this->height.HALF.HI;
|
||||
@@ -433,7 +437,7 @@ void sub_0803D830(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->field_0x74.HALF.LO++;
|
||||
SoundReq(SFX_150);
|
||||
target = sub_0804A98C(this, 0x18, 0);
|
||||
target = CreateProjectileWithParent(this, 0x18, 0);
|
||||
if (target != NULL) {
|
||||
PositionRelative(this, target, 0, -0x100000);
|
||||
target->parent = this;
|
||||
@@ -476,7 +480,9 @@ void sub_0803D8FC(Entity* this) {
|
||||
tmp = Random() & 0x3f3f;
|
||||
fx->x.HALF.HI = ((tmp & 0xff) - 0x20) + fx->x.HALF.HI;
|
||||
fx->y.HALF.HI = ((tmp >> 8) & 0xff) - 0x20 + fx->y.HALF.HI;
|
||||
#ifndef EU
|
||||
fx->spritePriority.b0 = 2;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,11 @@ typedef struct {
|
||||
} PACKED xy;
|
||||
extern u8 gEntCount;
|
||||
|
||||
#ifdef EU
|
||||
const u8 gUnk_080D0ABC[] = { 0xf0, 0xd0, 0xb0 };
|
||||
#else
|
||||
const u8 gUnk_080D0ABC[] = { 0xf0, 0xd0, 0xc0 };
|
||||
#endif
|
||||
const u8 gUnk_080D0ABF[] = { 0x3c, 0x3c, 0x1e, 0x14, 0x14, 0x14, 0, 0, 0 };
|
||||
void (*const gUnk_080D0AC8[])(Entity*) = {
|
||||
sub_0803F818, sub_0803F914, sub_0803FAC8, sub_0803FAD0, sub_0803FD50, sub_0803FE90, sub_0803FF7C, sub_0804006C,
|
||||
@@ -405,7 +409,7 @@ void sub_0803FD50(Entity* this) {
|
||||
this->actionDelay = gUnk_080D0ABF[((u32)this->animationState << 1 | 1)];
|
||||
} else {
|
||||
if ((this->actionDelay & 7) == 0) {
|
||||
sub_0804A98C(this, 0x1f, this->field_0xf);
|
||||
CreateProjectileWithParent(this, 0x1f, this->field_0xf);
|
||||
}
|
||||
if (((this->field_0xf != 0) && (1 < this->animationState)) && (this->actionDelay < 6)) {
|
||||
this->actionDelay = 0x80;
|
||||
@@ -451,7 +455,7 @@ void sub_0803FE90(Entity* this) {
|
||||
} else {
|
||||
if (this->field_0xf) {
|
||||
if ((this->actionDelay & 7) == 0) {
|
||||
sub_0804A98C(this, 0x1f, this->field_0xf);
|
||||
CreateProjectileWithParent(this, 0x1f, this->field_0xf);
|
||||
}
|
||||
if (this->actionDelay < 6) {
|
||||
this->actionDelay = 0x40;
|
||||
@@ -459,7 +463,7 @@ void sub_0803FE90(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
if ((this->actionDelay & 0xf) == 0) {
|
||||
entity = sub_0804A98C(this, 0x1f, 2);
|
||||
entity = CreateProjectileWithParent(this, 0x1f, 2);
|
||||
if (entity != NULL) {
|
||||
entity->type2 = 0;
|
||||
if (this->field_0x80.HALF.HI != 0) {
|
||||
@@ -503,7 +507,7 @@ void sub_0803FF7C(Entity* this) {
|
||||
} else {
|
||||
if (this->field_0xf) {
|
||||
if ((this->actionDelay & 7) == 0) {
|
||||
sub_0804A98C(this, 0x1f, this->field_0xf);
|
||||
CreateProjectileWithParent(this, 0x1f, this->field_0xf);
|
||||
}
|
||||
if (this->actionDelay < 6) {
|
||||
this->actionDelay = 0x80;
|
||||
@@ -511,7 +515,7 @@ void sub_0803FF7C(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
if ((this->actionDelay & 0x1f) == 0) {
|
||||
pEVar2 = sub_0804A98C(this, 0x1f, 2);
|
||||
pEVar2 = CreateProjectileWithParent(this, 0x1f, 2);
|
||||
if (pEVar2 != NULL) {
|
||||
pEVar2->type2 = 1;
|
||||
pEVar2->y.HALF.HI += -0x20;
|
||||
|
||||
@@ -114,7 +114,9 @@ void VaatiWrath(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080413A0(Entity* this) {
|
||||
#if !(defined EU || defined JP)
|
||||
sub_080423A4(this);
|
||||
#endif
|
||||
gUnk_080D0E2C[this->action](this);
|
||||
}
|
||||
|
||||
@@ -581,14 +583,14 @@ void sub_08041BE8(Entity* this) {
|
||||
entity->myHeap = NULL;
|
||||
DeleteEntity(entity);
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->type3 = NULL;
|
||||
|
||||
#ifndef EU
|
||||
entity = ((VaatiWrathHeapStruct*)this->myHeap)->object5b;
|
||||
entity->myHeap = NULL;
|
||||
DeleteEntity(entity);
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->object5b = NULL;
|
||||
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
|
||||
#endif
|
||||
entity = ((VaatiWrathHeapStruct*)this->myHeap)->eyes[0];
|
||||
entity->myHeap = NULL;
|
||||
DeleteEntity(entity);
|
||||
@@ -951,7 +953,7 @@ u32 sub_080422C0(Entity* this, u32 unk1) {
|
||||
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
|
||||
GetNextFrame(type1);
|
||||
if (unk1 + 1 == (tmp = type1->frames.all)) {
|
||||
child = sub_080A7EE0(0x21);
|
||||
child = CreateProjectile(0x21);
|
||||
if (child != NULL) {
|
||||
child->type = unk1;
|
||||
child->parent = this;
|
||||
@@ -992,11 +994,12 @@ void sub_0804235C(Entity* this) {
|
||||
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type3, 0x1b);
|
||||
}
|
||||
|
||||
#if defined USA || defined DEMO
|
||||
void sub_080423A4(Entity* this) {
|
||||
int temp;
|
||||
if ((gScreenTransition.field_0x38 & 2) == 0) {
|
||||
if (gSave.filler498 != 0) {
|
||||
gSave.filler498--;
|
||||
if (gSave.unk498 != 0) {
|
||||
gSave.unk498--;
|
||||
} else {
|
||||
temp = gPlayerState.field_0xa9;
|
||||
if (temp < 2) {
|
||||
@@ -1014,6 +1017,7 @@ void sub_080423A4(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_08042428(Entity* this) {
|
||||
if (((VaatiWrathHeapStruct*)this->myHeap)->type0->next == NULL) {
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
|
||||
extern void sub_08001328(Entity*);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
extern void DoExitTransition(u32*);
|
||||
|
||||
extern u32* gUnk_0813AB1C[];
|
||||
extern ScreenTransitionData* gUnk_0813AB1C[];
|
||||
|
||||
void sub_0802A78C(Entity*);
|
||||
void sub_0802A7D0(Entity*);
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_08001328(Entity*);
|
||||
extern void DoExitTransition(u32*);
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
extern u32* gUnk_0813AB1C[];
|
||||
extern ScreenTransitionData* gUnk_0813AB1C[];
|
||||
|
||||
void sub_0802CF64(Entity*);
|
||||
void sub_0802CF8C(Entity*);
|
||||
@@ -160,10 +159,7 @@ void sub_0802CF64(Entity* this) {
|
||||
sub_0802CF8C(this);
|
||||
}
|
||||
|
||||
NAKED
|
||||
void sub_0802CF8C(Entity* this) {
|
||||
asm(".include \"asm/non_matching/wallMaster2/sub_0802CF8C.inc\"");
|
||||
}
|
||||
ASM_FUNC("asm/non_matching/wallMaster2/sub_0802CF8C.inc", void sub_0802CF8C(Entity* this))
|
||||
|
||||
void sub_0802CFD8(Entity* this) {
|
||||
u32 unk = gUnk_080CD740[(this->field_0x7a.HALF.LO++ >> 3) & 7];
|
||||
|
||||
Reference in New Issue
Block a user