mirror of
https://github.com/zeldaret/tmc
synced 2026-06-03 18:36:43 -04:00
Gyorg: Rename heap struct
This commit is contained in:
+19
-19
@@ -33,6 +33,11 @@ extern u8 gUnk_080B3E80[];
|
||||
extern u8 gUnk_080B37A0[];
|
||||
extern u16 gMetatileTypesTop[];
|
||||
|
||||
extern const u8 gUnk_080D1A94[];
|
||||
extern const u8 gUnk_080D1AAC[];
|
||||
extern const u8 gUnk_080D1AC4[];
|
||||
extern const u8 gUnk_080D1ADC[];
|
||||
|
||||
void sub_0804614C(GyorgFemaleEntity*);
|
||||
void sub_0804625C(GyorgFemaleEntity*);
|
||||
void sub_0804632C(GyorgFemaleEntity*);
|
||||
@@ -55,10 +60,10 @@ void sub_0804614C(GyorgFemaleEntity* this) {
|
||||
tmp = CreateProjectile(0x22);
|
||||
tmp->type = 0;
|
||||
tmp->parent = super;
|
||||
((GyorgFemaleHeap*)super->myHeap)->unk_14 = (GenericEntity*)tmp;
|
||||
((GyorgHeap*)super->myHeap)->unk_14 = (GenericEntity*)tmp;
|
||||
tmp = CreateEnemy(GYORG_FEMALE_MOUTH, 0);
|
||||
tmp->parent = super;
|
||||
((GyorgFemaleHeap*)super->myHeap)->unk_10 = (GyorgFemaleMouthEntity*)tmp;
|
||||
((GyorgHeap*)super->myHeap)->unk_10 = (GyorgFemaleMouthEntity*)tmp;
|
||||
tmp = CreateEnemy(GYORG_FEMALE_EYE, 0);
|
||||
tmp->parent = super;
|
||||
tmp = CreateEnemy(GYORG_FEMALE_EYE, 1);
|
||||
@@ -107,7 +112,7 @@ void sub_0804625C(GyorgFemaleEntity* this) {
|
||||
}
|
||||
}
|
||||
sub_080465C8();
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 0x38) {
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x38) {
|
||||
super->action = 2;
|
||||
super->actionDelay = 0;
|
||||
this->unk_7a = 0;
|
||||
@@ -117,7 +122,7 @@ void sub_0804625C(GyorgFemaleEntity* this) {
|
||||
this->unk_80 = 0;
|
||||
return;
|
||||
}
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 0x40) {
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x40) {
|
||||
super->action = 3;
|
||||
this->unk_70 = 0x3c;
|
||||
super->actionDelay = 0;
|
||||
@@ -127,7 +132,7 @@ void sub_0804625C(GyorgFemaleEntity* this) {
|
||||
this->unk_80 = 0;
|
||||
return;
|
||||
}
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 0x100) {
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x100) {
|
||||
if (--this->unk_70 == 0) {
|
||||
this->unk_70 = 0x168;
|
||||
sub_08046634(this, 1);
|
||||
@@ -156,11 +161,11 @@ void sub_0804632C(GyorgFemaleEntity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 0x80 && --this->unk_70 == 0) {
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x80 && --this->unk_70 == 0) {
|
||||
this->unk_70 = 0x168;
|
||||
sub_08046634(this, 0);
|
||||
}
|
||||
if ((((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 0x38) == 0) {
|
||||
if ((((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x38) == 0) {
|
||||
super->action = 1;
|
||||
this->unk_70 = 0x3c;
|
||||
#ifndef EU
|
||||
@@ -205,7 +210,7 @@ void sub_080463E4(GyorgFemaleEntity* this) {
|
||||
this->unk_78 = 0;
|
||||
#endif
|
||||
this->unk_80 = 0;
|
||||
SoundReq(0x128);
|
||||
SoundReq(SFX_BOSS_DIE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,11 +222,6 @@ void sub_08046498(GyorgFemaleEntity* this) {
|
||||
}
|
||||
#endif
|
||||
|
||||
extern const u8 gUnk_080D1A94[];
|
||||
extern const u8 gUnk_080D1AAC[];
|
||||
extern const u8 gUnk_080D1AC4[];
|
||||
extern const u8 gUnk_080D1ADC[];
|
||||
|
||||
void sub_080464C0(GyorgFemaleEntity* this) {
|
||||
static const void* const gUnk_080D1A74[] = {
|
||||
gUnk_080D1A94,
|
||||
@@ -406,7 +406,7 @@ void sub_080466A8(GyorgFemaleEntity* this) {
|
||||
super->actionDelay = 0;
|
||||
this->unk_7d = 0;
|
||||
this->unk_78 = 0xFF;
|
||||
SoundReq(0x127);
|
||||
SoundReq(SFX_BOSS_HIT);
|
||||
if (super->health != 0) {
|
||||
sub_08080964(8, 0);
|
||||
if (++this->unk_82 <= 0xC) {
|
||||
@@ -431,16 +431,16 @@ void sub_080466A8(GyorgFemaleEntity* this) {
|
||||
this->unk_7d = 0;
|
||||
sub_080467DC(this);
|
||||
#ifndef EU
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->unk_3c != 0xFF) {
|
||||
if (((GyorgHeap*)super->myHeap)->unk_3c != 0xFF) {
|
||||
#endif
|
||||
tmp = &gPlayerEntity;
|
||||
tmp->knockbackDirection = ((GyorgFemaleHeap*)super->myHeap)->unk_3c;
|
||||
tmp->knockbackDirection = ((GyorgHeap*)super->myHeap)->unk_3c;
|
||||
tmp->iframes = 0xF4;
|
||||
tmp->knockbackDuration = 0xA;
|
||||
tmp = CreateFx(super, 0x2C, 0);
|
||||
if (tmp) {
|
||||
tmp->x.HALF.HI = ((GyorgFemaleHeap*)super->myHeap)->unk_38;
|
||||
tmp->y.HALF.HI = ((GyorgFemaleHeap*)super->myHeap)->unk_3a;
|
||||
tmp->x.HALF.HI = ((GyorgHeap*)super->myHeap)->unk_38;
|
||||
tmp->y.HALF.HI = ((GyorgHeap*)super->myHeap)->unk_3a;
|
||||
tmp->collisionLayer = 1;
|
||||
UpdateSpriteForCollisionLayer(tmp);
|
||||
}
|
||||
@@ -454,6 +454,6 @@ void sub_080466A8(GyorgFemaleEntity* this) {
|
||||
void sub_080467DC(GyorgFemaleEntity* this) {
|
||||
u32 i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
(*((GyorgFemaleHeap**)(&super->myHeap)))->unk_18[i] = 0;
|
||||
(*((GyorgHeap**)(&super->myHeap)))->unk_18[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,16 +77,14 @@ void sub_080489CC(GyorgFemaleEyeEntity* this) {
|
||||
case 16 ... 18:
|
||||
case 24 ... 26:
|
||||
#endif
|
||||
(*(((GyorgFemaleHeap**)&parent->base.myHeap)))->unk_18[super->type] = super->field_0x4c;
|
||||
(*(((GyorgFemaleHeap**)&parent->base.myHeap)))->unk_38 =
|
||||
(gPlayerEntity.x.HALF.HI + super->x.HALF.HI) / 2;
|
||||
(*(((GyorgFemaleHeap**)&parent->base.myHeap)))->unk_3a =
|
||||
(gPlayerEntity.y.HALF.HI + super->y.HALF.HI) / 2;
|
||||
(*(((GyorgFemaleHeap**)&parent->base.myHeap)))->unk_3c = (super->knockbackDirection ^= 0x10);
|
||||
(*(((GyorgHeap**)&parent->base.myHeap)))->unk_18[super->type] = super->field_0x4c;
|
||||
(*(((GyorgHeap**)&parent->base.myHeap)))->unk_38 = (gPlayerEntity.x.HALF.HI + super->x.HALF.HI) / 2;
|
||||
(*(((GyorgHeap**)&parent->base.myHeap)))->unk_3a = (gPlayerEntity.y.HALF.HI + super->y.HALF.HI) / 2;
|
||||
(*(((GyorgHeap**)&parent->base.myHeap)))->unk_3c = (super->knockbackDirection ^= 0x10);
|
||||
#ifndef EU
|
||||
break;
|
||||
default:
|
||||
((GyorgFemaleHeap*)parent->base.myHeap)->unk_3c = 0xFF;
|
||||
((GyorgHeap*)parent->base.myHeap)->unk_3c = 0xFF;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -199,9 +197,9 @@ u32 sub_08048D70(GyorgFemaleEntity* parent) {
|
||||
if (parent->base.health != 0) {
|
||||
return 1;
|
||||
}
|
||||
tmp = ((GyorgFemaleHeap*)parent->base.myHeap)->male1;
|
||||
tmp = ((GyorgHeap*)parent->base.myHeap)->male1;
|
||||
if (!tmp) {
|
||||
tmp = ((GyorgFemaleHeap*)parent->base.myHeap)->male2;
|
||||
tmp = ((GyorgHeap*)parent->base.myHeap)->male2;
|
||||
}
|
||||
if (tmp->base.health != 0) {
|
||||
return 0;
|
||||
|
||||
+13
-13
@@ -209,7 +209,7 @@ void sub_080469F4(GyorgMaleEntity* this) {
|
||||
|
||||
void sub_08046A30(GyorgMaleEntity* this) {
|
||||
sub_08047D88(this);
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 1) {
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 1) {
|
||||
super->action = 2;
|
||||
super->subAction = 0;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ void sub_08046A54(GyorgMaleEntity* this) {
|
||||
|
||||
void sub_08046A78(GyorgMaleEntity* this) {
|
||||
sub_08047D88(this);
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 0x10) {
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x10) {
|
||||
super->action = 3;
|
||||
super->subAction = 0;
|
||||
}
|
||||
@@ -250,7 +250,7 @@ void sub_08046A9C(GyorgMaleEntity* this) {
|
||||
void sub_08046AE8(GyorgMaleEntity* this) {
|
||||
super->subAction = 1;
|
||||
super->speed = 0x180;
|
||||
sub_08048178(this, ((GyorgFemaleHeap*)super->myHeap)->female->base.animationState >> 5);
|
||||
sub_08048178(this, ((GyorgHeap*)super->myHeap)->female->base.animationState >> 5);
|
||||
this->unk_76 = super->direction << 8;
|
||||
sub_08047D88(this);
|
||||
}
|
||||
@@ -323,7 +323,7 @@ void sub_08046CEC(GyorgMaleEntity* this) {
|
||||
}
|
||||
gUnk_080D1B4C[super->subAction](this);
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 2) {
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 2) {
|
||||
super->action = 2;
|
||||
super->subAction = 0;
|
||||
super->animationState = super->speed;
|
||||
@@ -373,7 +373,7 @@ void sub_08046E0C(GyorgMaleEntity* this) {
|
||||
const s16 gUnk_080D1B70[2] = { 0x40, -0x40 };
|
||||
|
||||
void sub_08046E68(GyorgMaleEntity* this) {
|
||||
u32 tmp = ((GyorgFemaleHeap*)super->myHeap)->female->base.animationState ^ 0x80;
|
||||
u32 tmp = ((GyorgHeap*)super->myHeap)->female->base.animationState ^ 0x80;
|
||||
if (tmp != super->direction) {
|
||||
if (((tmp - super->direction) & 0xFF) > 0x80) {
|
||||
this->unk_76 -= 0x100;
|
||||
@@ -436,7 +436,7 @@ void sub_08046F64(GyorgMaleEntity* this) {
|
||||
UpdateSpriteForCollisionLayer(tmp);
|
||||
}
|
||||
}
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 4) {
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 4) {
|
||||
super->action = 5;
|
||||
super->subAction = 0;
|
||||
}
|
||||
@@ -805,11 +805,11 @@ void sub_080477F0(GyorgMaleEntity* this) {
|
||||
super->subAction = 2;
|
||||
this->unk_76 = super->animationState << 8;
|
||||
this->unk_74 = gUnk_080D1BF0[Random() & 1];
|
||||
if (((GyorgFemaleHeap*)super->myHeap)->boss->unk_6c & 1) {
|
||||
((GyorgFemaleHeap*)super->myHeap)->female->unk_79 =
|
||||
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 1) {
|
||||
((GyorgHeap*)super->myHeap)->female->unk_79 =
|
||||
gRoomControls.roomOriginX + 0x200 > super->x.HALF.HI ? 0x81 : 0x83;
|
||||
} else {
|
||||
((GyorgFemaleHeap*)super->myHeap)->female->unk_79 = 0x80;
|
||||
((GyorgHeap*)super->myHeap)->female->unk_79 = 0x80;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -824,7 +824,7 @@ void sub_08047914(GyorgMaleEntity* this) {
|
||||
super->subAction = 3;
|
||||
this->unk_70 = 0x3C;
|
||||
this->unk_7e = ((super->type * 0xF) << 2) + 0x78;
|
||||
sub_080A1D70(&(((GyorgFemaleHeap*)super->myHeap)->boss->base), super->animationState);
|
||||
sub_080A1D70(&(((GyorgHeap*)super->myHeap)->boss->base), super->animationState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,7 +867,7 @@ void sub_08047978(GyorgMaleEntity* this) {
|
||||
return;
|
||||
super->subAction = 4;
|
||||
if (super->type == 0) {
|
||||
if ((((GyorgFemaleHeap*)super->myHeap)->female->base.animationState >> 6) == 1) {
|
||||
if ((((GyorgHeap*)super->myHeap)->female->base.animationState >> 6) == 1) {
|
||||
this->unk_80 = gRoomControls.roomOriginX + 0x1C0;
|
||||
this->unk_82 = gRoomControls.roomOriginY + 0x250;
|
||||
} else {
|
||||
@@ -1174,8 +1174,8 @@ const u16 gUnk_080D1C50[8] = { 0x200, 0x180, 0x2C0, 0x210, 0x200, 0x2A0, 0x140,
|
||||
const u16 gUnk_080D1C60[8] = { 0x200, 0x150, 0x290, 0x210, 0x200, 0x2D0, 0x170, 0x210 };
|
||||
|
||||
void sub_08048178(GyorgMaleEntity* this, u32 unk1) {
|
||||
const u16* tmp = ((((GyorgFemaleHeap*)super->myHeap)->female->base.animationState >> 6 & 1) ? gUnk_080D1C60 + unk1
|
||||
: gUnk_080D1C50 + unk1);
|
||||
const u16* tmp = ((((GyorgHeap*)super->myHeap)->female->base.animationState >> 6 & 1) ? gUnk_080D1C60 + unk1
|
||||
: gUnk_080D1C50 + unk1);
|
||||
this->unk_80 = *tmp + gRoomControls.roomOriginX;
|
||||
this->unk_82 = *(tmp + 1) + gRoomControls.roomOriginY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user