mirror of
https://github.com/zeldaret/tmc
synced 2026-08-20 14:15:10 -04:00
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
extern u32 PlayerInRange(Entity*, u32, u32);
|
||||
|
||||
u32 sub_08021D00();
|
||||
u32 sub_08021D00(Entity*);
|
||||
void sub_08021D44(Entity* this, u32 direction);
|
||||
|
||||
extern void (*const gUnk_080CB590[])(Entity*);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "room.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_080A2CC0();
|
||||
extern void sub_080A2CC0(Entity*, void*, void*);
|
||||
|
||||
void BladeTrap(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
|
||||
+11
-11
@@ -136,19 +136,19 @@ void sub_0802A9A8(Entity* this) {
|
||||
sub_0802ACDC(this, 8);
|
||||
}
|
||||
} else {
|
||||
if (gRoomControls.unk2 != 0) {
|
||||
if (gRoomControls.reload_flags != 0) {
|
||||
return;
|
||||
}
|
||||
this->spriteSettings.draw = 1;
|
||||
this->field_0x82.HWORD = 1;
|
||||
if (this->field_0x80.HALF.LO) {
|
||||
this->x.HALF.HI = gRoomControls.roomScrollX - 0x10;
|
||||
this->x.HALF.HI = gRoomControls.scroll_x - 0x10;
|
||||
this->direction = 8;
|
||||
} else {
|
||||
this->x.HALF.HI = gRoomControls.roomScrollX + 0x100;
|
||||
this->x.HALF.HI = gRoomControls.scroll_x + 0x100;
|
||||
this->direction = 0x18;
|
||||
}
|
||||
this->y.HALF.HI = gRoomControls.roomScrollY + 0x40;
|
||||
this->y.HALF.HI = gRoomControls.scroll_y + 0x40;
|
||||
this->actionDelay = 0x80;
|
||||
sub_0802ADDC(this);
|
||||
}
|
||||
@@ -311,9 +311,9 @@ void sub_0802AC40(Entity* this) {
|
||||
void sub_0802ACDC(Entity* this, u32 param_2) {
|
||||
u32 x;
|
||||
if (this->field_0x80.HALF.LO) {
|
||||
x = sub_080045B4(this, gRoomControls.roomScrollX + 0x20, gRoomControls.roomScrollY + 0x60);
|
||||
x = sub_080045B4(this, gRoomControls.scroll_x + 0x20, gRoomControls.scroll_y + 0x60);
|
||||
} else {
|
||||
x = sub_080045B4(this, gRoomControls.roomScrollX + 0xd0, gRoomControls.roomScrollY + 0x60);
|
||||
x = sub_080045B4(this, gRoomControls.scroll_x + 0xd0, gRoomControls.scroll_y + 0x60);
|
||||
}
|
||||
sub_08004596(this, x);
|
||||
this->field_0xf = param_2;
|
||||
@@ -333,13 +333,13 @@ void sub_0802AD1C(Entity* this, u32 param_2) {
|
||||
|
||||
void sub_0802AD54(Entity* this) {
|
||||
if (this->field_0x82.HWORD != 0) {
|
||||
if (gRoomControls.unk2 != 0) {
|
||||
if (gRoomControls.reload_flags != 0) {
|
||||
this->spriteSettings.draw = 0;
|
||||
DeleteEntity(this);
|
||||
return;
|
||||
}
|
||||
if (gRoomControls.roomOriginY > this->y.HALF.HI ||
|
||||
(gRoomControls.roomOriginY + gRoomControls.height + 0x20) < this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y > this->y.HALF.HI ||
|
||||
(gRoomControls.origin_y + gRoomControls.height + 0x20) < this->y.HALF.HI) {
|
||||
this->spriteSettings.draw = 0;
|
||||
} else {
|
||||
this->spriteSettings.draw = 1;
|
||||
@@ -504,8 +504,8 @@ void sub_0802B048(Entity* this) {
|
||||
u32 action;
|
||||
|
||||
if (this->field_0x7a.HALF.HI) {
|
||||
if (gRoomControls.roomOriginY > this->y.HALF.HI ||
|
||||
(gRoomControls.roomOriginY + gRoomControls.height + 0x20) < this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y > this->y.HALF.HI ||
|
||||
(gRoomControls.origin_y + gRoomControls.height + 0x20) < this->y.HALF.HI) {
|
||||
COLLISION_OFF(this);
|
||||
} else {
|
||||
COLLISION_ON(this);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
#include "game.h"
|
||||
#include "item.h"
|
||||
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
extern bool32 sub_08056338(void);
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#include "common.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_080300AC(void) {
|
||||
MemClear(&gScreenTransition.armos_data, sizeof(gScreenTransition.armos_data));
|
||||
gScreenTransition.armos_data.field_0xae = 0xff;
|
||||
void ClearArmosData(void) {
|
||||
MemClear(&gRoomTransition.armos_data, sizeof(gRoomTransition.armos_data));
|
||||
gRoomTransition.armos_data.field_0xae = 0xff;
|
||||
}
|
||||
|
||||
void sub_080300C4(void) {
|
||||
if (gScreenTransition.armos_data.field_0xae == 0xff) {
|
||||
gScreenTransition.armos_data.field_0xac = 0;
|
||||
MemClear(&gScreenTransition.armos_data.data, sizeof(gScreenTransition.armos_data.data));
|
||||
if (gRoomTransition.armos_data.field_0xae == 0xff) {
|
||||
gRoomTransition.armos_data.field_0xac = 0;
|
||||
MemClear(&gRoomTransition.armos_data.data, sizeof(gRoomTransition.armos_data.data));
|
||||
}
|
||||
}
|
||||
|
||||
+17
-17
@@ -6,23 +6,23 @@ typedef struct {
|
||||
u8 field_0x1;
|
||||
} PACKED stuct_080CAB14;
|
||||
|
||||
void sub_08021218();
|
||||
void sub_08021588();
|
||||
void sub_080213D0();
|
||||
void sub_08021390();
|
||||
void sub_0802159C();
|
||||
void sub_0804AA1C();
|
||||
void sub_080213F0();
|
||||
u32 sub_080214FC();
|
||||
void sub_08021540();
|
||||
void sub_08021600();
|
||||
void sub_080213B0();
|
||||
u32 PlayerInRange();
|
||||
u32 sub_0802169C();
|
||||
void sub_0802124C();
|
||||
void sub_08021644();
|
||||
void sub_08021414();
|
||||
void sub_08021400();
|
||||
void sub_08021218(Entity*, u32, u32);
|
||||
void sub_08021588(Entity*);
|
||||
void sub_080213D0(Entity*, u32);
|
||||
void sub_08021390(Entity*);
|
||||
void sub_0802159C(Entity*);
|
||||
void sub_0804AA1C(Entity*);
|
||||
void sub_080213F0(Entity*);
|
||||
u32 sub_080214FC(Entity*);
|
||||
void sub_08021540(Entity*);
|
||||
void sub_08021600(Entity*);
|
||||
void sub_080213B0(Entity*);
|
||||
u32 PlayerInRange(Entity*, u32, u32);
|
||||
u32 sub_0802169C(Entity*, Entity*);
|
||||
void sub_0802124C(Entity*);
|
||||
void sub_08021644(Entity*);
|
||||
void sub_08021414(Entity*);
|
||||
void sub_08021400(Entity*);
|
||||
u32 sub_08021274(u32, u32);
|
||||
u32 sub_08021664(Entity*, Entity*);
|
||||
u32 sub_0804A044(Entity*, Entity*, u32);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "functions.h"
|
||||
|
||||
extern s16 sub_080001DA(u32, u32); // ?
|
||||
extern void sub_08049CF4();
|
||||
void sub_080221C0();
|
||||
extern void sub_08049CF4(Entity*);
|
||||
void sub_080221C0(Entity*);
|
||||
|
||||
typedef struct {
|
||||
s8 h;
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ void sub_0803EB34(Entity* this) {
|
||||
CreateDeathFx(this, 0xff, 0x57);
|
||||
}
|
||||
|
||||
void nullsub_21() {
|
||||
void nullsub_21(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0803EB44(Entity* this) {
|
||||
|
||||
@@ -61,7 +61,7 @@ void sub_0802C318(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;
|
||||
u32 tmp = gRoomControls.origin_y;
|
||||
if (&gPlayerEntity == NULL)
|
||||
return;
|
||||
if (tmp - gPlayerEntity.y.HALF.HI <= 0x38) {
|
||||
@@ -106,7 +106,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E
|
||||
}
|
||||
}
|
||||
|
||||
y = gRoomControls.roomOriginY + gRoomControls.height - this->y.HALF.HI;
|
||||
y = gRoomControls.origin_y + gRoomControls.height - this->y.HALF.HI;
|
||||
if (y >= 5) {
|
||||
sub_080AEFB4(this);
|
||||
} else {
|
||||
|
||||
+16
-15
@@ -2,21 +2,22 @@
|
||||
#include "enemy.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
// Gibudo
|
||||
void sub_08037794();
|
||||
void sub_08037B10();
|
||||
void sub_0803797C();
|
||||
void sub_080379BC();
|
||||
void sub_08037C0C();
|
||||
u32 sub_08037810();
|
||||
void sub_080377B0();
|
||||
u32 sub_080378B0();
|
||||
u32 sub_08037914();
|
||||
u32 sub_080379EC();
|
||||
void sub_08037A58();
|
||||
void sub_08037ACC();
|
||||
void sub_08037B48();
|
||||
void sub_08037A14();
|
||||
void sub_08037794(Entity*);
|
||||
void sub_08037B10(Entity*);
|
||||
void sub_0803797C(Entity*);
|
||||
void sub_080379BC(Entity*);
|
||||
void sub_08037C0C(Entity*, Entity*);
|
||||
u32 sub_08037810(Entity*);
|
||||
void sub_080377B0(Entity*);
|
||||
u32 sub_080378B0(Entity*);
|
||||
u32 sub_08037914(Entity*);
|
||||
u32 sub_080379EC(Entity*);
|
||||
void sub_08037A58(Entity*);
|
||||
void sub_08037ACC(Entity*);
|
||||
void sub_08037B48(Entity*);
|
||||
void sub_08037A14(Entity*);
|
||||
|
||||
extern void sub_0804A4E4(Entity*, Entity*);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
@@ -75,7 +76,7 @@ NONMATCH("asm/non_matching/gibdo/sub_080374A4.inc", void sub_080374A4(Entity* th
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void nullsub_162() {
|
||||
void nullsub_162(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08037558(Entity* this) {
|
||||
|
||||
+44
-44
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "enemy.h"
|
||||
#include "player.h"
|
||||
#include "fileScreen.h"
|
||||
#include "fileselect.h"
|
||||
#include "functions.h"
|
||||
|
||||
void (*const gUnk_080D1AFC[8])(Entity*);
|
||||
@@ -98,7 +98,7 @@ void GyorgMale(Entity* this) {
|
||||
this->animationState = -(this->field_0x78.HWORD >> 8);
|
||||
sub_08048004(this);
|
||||
this->field_0x7c.BYTES.byte1 = this->spriteSettings.draw;
|
||||
if (this->spriteSettings.draw == 1 && (this->y.HALF.HI - gRoomControls.roomScrollY + 0x30) > 0x100u) {
|
||||
if (this->spriteSettings.draw == 1 && (this->y.HALF.HI - gRoomControls.scroll_y + 0x30) > 0x100u) {
|
||||
this->spriteSettings.draw = 0;
|
||||
}
|
||||
this->cutsceneBeh.HWORD = gPlayerEntity.x.HALF.HI;
|
||||
@@ -162,7 +162,7 @@ void sub_08046930(Entity* this) {
|
||||
|
||||
void sub_0804696C(Entity* this) {
|
||||
sub_08047E48(this);
|
||||
if (gRoomControls.roomOriginY + 0x130 > this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x130 > this->y.HALF.HI) {
|
||||
this->subAction = 2;
|
||||
this->direction = 0x80;
|
||||
this->speed = 0x100;
|
||||
@@ -174,9 +174,9 @@ void sub_0804696C(Entity* this) {
|
||||
}
|
||||
if (this->actionDelay) {
|
||||
#ifdef EU
|
||||
if (gRoomControls.roomOriginY + 0x210 > this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x210 > this->y.HALF.HI) {
|
||||
#else
|
||||
if (gRoomControls.roomOriginY + 0x258 > this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x258 > this->y.HALF.HI) {
|
||||
#endif
|
||||
this->actionDelay = 0;
|
||||
SoundReq(SFX_APPARATE);
|
||||
@@ -186,7 +186,7 @@ void sub_0804696C(Entity* this) {
|
||||
|
||||
void sub_080469CC(Entity* this) {
|
||||
sub_08047E48(this);
|
||||
if (gRoomControls.roomOriginY + 0x210 < this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x210 < this->y.HALF.HI) {
|
||||
this->subAction = 3;
|
||||
this->direction = 0x90;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ void sub_080469CC(Entity* this) {
|
||||
|
||||
void sub_080469F4(Entity* this) {
|
||||
sub_08047E48(this);
|
||||
if (gRoomControls.roomOriginY + 0x290 < this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x290 < this->y.HALF.HI) {
|
||||
this->subAction = 4;
|
||||
this->spriteOrientation.flipY = 2;
|
||||
this->spriteRendering.b3 = 2;
|
||||
@@ -211,7 +211,7 @@ void sub_08046A30(Entity* this) {
|
||||
|
||||
void sub_08046A54(Entity* this) {
|
||||
sub_08047E48(this);
|
||||
if (gRoomControls.roomOriginX + 0x380 < this->x.HALF.HI) {
|
||||
if (gRoomControls.origin_x + 0x380 < this->x.HALF.HI) {
|
||||
this->subAction = 6;
|
||||
}
|
||||
}
|
||||
@@ -268,8 +268,8 @@ void sub_08046B8C(Entity* this) {
|
||||
if (sub_0806FCB8(this, this->field_0x80.HWORD, this->field_0x82.HWORD, 4)) {
|
||||
this->subAction = 3;
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x200;
|
||||
this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x210;
|
||||
this->field_0x80.HWORD = gRoomControls.origin_x + 0x200;
|
||||
this->field_0x82.HWORD = gRoomControls.origin_y + 0x210;
|
||||
sub_08047D88(this);
|
||||
} else {
|
||||
this->direction =
|
||||
@@ -331,8 +331,8 @@ void sub_08046D44(Entity* this) {
|
||||
this->subAction = 1;
|
||||
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;
|
||||
this->field_0x80.HWORD = tmp[0] + gRoomControls.origin_x;
|
||||
this->field_0x82.HWORD = tmp[1] + gRoomControls.origin_y;
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
sub_08047D88(this);
|
||||
}
|
||||
@@ -440,8 +440,8 @@ void sub_08046FE8(Entity* this) {
|
||||
this->subAction = 1;
|
||||
this->speed = 0x1c0;
|
||||
this->field_0x7c.HALF.HI = 0x1e;
|
||||
this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x290;
|
||||
this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x190;
|
||||
this->field_0x80.HWORD = gRoomControls.origin_x + 0x290;
|
||||
this->field_0x82.HWORD = gRoomControls.origin_y + 0x190;
|
||||
sub_08047D88(this);
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ void sub_0804717C(Entity* this) {
|
||||
this->speed += 8;
|
||||
}
|
||||
sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
if (gRoomControls.roomOriginX + 0x200 > this->x.HALF.HI) {
|
||||
if (gRoomControls.origin_x + 0x200 > this->x.HALF.HI) {
|
||||
this->subAction = 5;
|
||||
}
|
||||
}
|
||||
@@ -512,7 +512,7 @@ void sub_080471C8(Entity* this) {
|
||||
this->direction++;
|
||||
}
|
||||
sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
if (gRoomControls.roomOriginY + 0x190 <= this->y.HALF.HI)
|
||||
if (gRoomControls.origin_y + 0x190 <= this->y.HALF.HI)
|
||||
return;
|
||||
if (this->field_0x74.HWORD > 0x100) {
|
||||
if (Random() & 1) {
|
||||
@@ -552,7 +552,7 @@ void sub_080472BC(Entity* this) {
|
||||
this->speed += 8;
|
||||
}
|
||||
sub_08047DF0(this, ((0x100 - this->direction) & 0xFF) << 8);
|
||||
if (gRoomControls.roomOriginX + 0x2B0 >= this->x.HALF.HI)
|
||||
if (gRoomControls.origin_x + 0x2B0 >= this->x.HALF.HI)
|
||||
return;
|
||||
this->subAction = 9;
|
||||
this->field_0x76.HWORD = this->direction << 8;
|
||||
@@ -591,8 +591,8 @@ void sub_0804736C(Entity* this) {
|
||||
void sub_080473B8(Entity* this) {
|
||||
this->subAction = 1;
|
||||
this->speed = 0x120;
|
||||
this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x200;
|
||||
this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x1D0;
|
||||
this->field_0x80.HWORD = gRoomControls.origin_x + 0x200;
|
||||
this->field_0x82.HWORD = gRoomControls.origin_y + 0x1D0;
|
||||
sub_08047D88(this);
|
||||
}
|
||||
|
||||
@@ -645,9 +645,9 @@ void sub_08047484(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08047508(Entity* this) {
|
||||
if (gRoomControls.roomOriginX + 0x1A0 < this->x.HALF.HI) {
|
||||
if (gRoomControls.origin_x + 0x1A0 < this->x.HALF.HI) {
|
||||
if (this->direction == 0) {
|
||||
if (gRoomControls.roomOriginY + 0x208 >= this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x208 >= this->y.HALF.HI) {
|
||||
this->field_0x74.HWORD = -this->field_0x74.HWORD;
|
||||
this->field_0x76.HWORD += this->field_0x74.HWORD;
|
||||
this->direction = this->field_0x76.HWORD >> 8;
|
||||
@@ -673,7 +673,7 @@ void sub_08047508(Entity* this) {
|
||||
}
|
||||
}
|
||||
sub_08047E48(this);
|
||||
if (gRoomControls.roomOriginX + 0x280 < this->x.HALF.HI) {
|
||||
if (gRoomControls.origin_x + 0x280 < this->x.HALF.HI) {
|
||||
this->subAction = 4;
|
||||
this->speed = 0x200;
|
||||
this->animationState = this->direction;
|
||||
@@ -700,9 +700,9 @@ void sub_080475F4(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0804763C(Entity* this) {
|
||||
if (gRoomControls.roomOriginX + 0x1F0 > this->x.HALF.HI) {
|
||||
if (gRoomControls.origin_x + 0x1F0 > this->x.HALF.HI) {
|
||||
if (this->direction == 0) {
|
||||
if (gRoomControls.roomOriginY + 0x208 >= this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x208 >= this->y.HALF.HI) {
|
||||
this->field_0x74.HWORD = -this->field_0x74.HWORD;
|
||||
this->field_0x76.HWORD += this->field_0x74.HWORD;
|
||||
this->direction = this->field_0x76.HWORD >> 8;
|
||||
@@ -728,7 +728,7 @@ void sub_0804763C(Entity* this) {
|
||||
}
|
||||
}
|
||||
sub_08047E48(this);
|
||||
if (gRoomControls.roomOriginX + 0x180 > this->x.HALF.HI) {
|
||||
if (gRoomControls.origin_x + 0x180 > this->x.HALF.HI) {
|
||||
this->subAction = 6;
|
||||
this->speed = 0x200;
|
||||
this->animationState = this->direction;
|
||||
@@ -764,13 +764,13 @@ void sub_08047778(Entity* this) {
|
||||
void sub_08047798(Entity* this) {
|
||||
this->subAction = 1;
|
||||
this->speed = 0x80;
|
||||
if (this->x.HALF.HI - gRoomControls.roomOriginX < 0x1F8) {
|
||||
if (this->x.HALF.HI - gRoomControls.origin_x < 0x1F8) {
|
||||
this->field_0x80.HWORD = 0xa8;
|
||||
} else {
|
||||
this->field_0x80.HWORD = 0x348;
|
||||
}
|
||||
this->field_0x80.HWORD += gRoomControls.roomOriginX;
|
||||
this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x348;
|
||||
this->field_0x80.HWORD += gRoomControls.origin_x;
|
||||
this->field_0x82.HWORD = gRoomControls.origin_y + 0x348;
|
||||
sub_08047D88(this);
|
||||
}
|
||||
|
||||
@@ -790,7 +790,7 @@ void sub_080477F0(Entity* this) {
|
||||
this->direction = this->animationState;
|
||||
return;
|
||||
}
|
||||
if (!sub_0806FCB8(this, gRoomControls.roomOriginX + 0x200, gRoomControls.roomOriginY + 0x210, 0x100)) {
|
||||
if (!sub_0806FCB8(this, gRoomControls.origin_x + 0x200, gRoomControls.origin_y + 0x210, 0x100)) {
|
||||
this->spriteOrientation.flipY = 3;
|
||||
this->spriteRendering.b3 = 3;
|
||||
}
|
||||
@@ -800,7 +800,7 @@ void sub_080477F0(Entity* this) {
|
||||
this->field_0x74.HWORD = gUnk_080D1BF0[Random() & 1];
|
||||
if (((Entity*)this->myHeap)->prev->field_0x6c.HWORD & 1) {
|
||||
((Entity*)this->myHeap)->next->field_0x78.HALF.HI =
|
||||
gRoomControls.roomOriginX + 0x200 > this->x.HALF.HI ? 0x81 : 0x83;
|
||||
gRoomControls.origin_x + 0x200 > this->x.HALF.HI ? 0x81 : 0x83;
|
||||
} else {
|
||||
((Entity*)this->myHeap)->next->field_0x78.HALF.HI = 0x80;
|
||||
}
|
||||
@@ -861,25 +861,25 @@ void sub_08047978(Entity* this) {
|
||||
this->subAction = 4;
|
||||
if (this->type == 0) {
|
||||
if ((((Entity*)this->myHeap)->next->animationState >> 6) == 1) {
|
||||
this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x1C0;
|
||||
this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x250;
|
||||
this->field_0x80.HWORD = gRoomControls.origin_x + 0x1C0;
|
||||
this->field_0x82.HWORD = gRoomControls.origin_y + 0x250;
|
||||
} else {
|
||||
this->field_0x80.HWORD = gRoomControls.roomOriginX + 0x240;
|
||||
this->field_0x82.HWORD = gRoomControls.roomOriginY + 0x250;
|
||||
this->field_0x80.HWORD = gRoomControls.origin_x + 0x240;
|
||||
this->field_0x82.HWORD = gRoomControls.origin_y + 0x250;
|
||||
}
|
||||
} else {
|
||||
if (gRoomControls.roomOriginX + 0x200 < this->x.HALF.HI) {
|
||||
if (gRoomControls.origin_x + 0x200 < this->x.HALF.HI) {
|
||||
this->field_0x80.HWORD = 0x190;
|
||||
} else {
|
||||
this->field_0x80.HWORD = 0x270;
|
||||
}
|
||||
this->field_0x80.HWORD += gRoomControls.roomOriginX;
|
||||
if (gRoomControls.roomOriginY + 0x210 < this->y.HALF.HI) {
|
||||
this->field_0x80.HWORD += gRoomControls.origin_x;
|
||||
if (gRoomControls.origin_y + 0x210 < this->y.HALF.HI) {
|
||||
this->field_0x82.HWORD = 0x1A0;
|
||||
} else {
|
||||
this->field_0x82.HWORD = 0x280;
|
||||
}
|
||||
this->field_0x82.HWORD += gRoomControls.roomOriginY;
|
||||
this->field_0x82.HWORD += gRoomControls.origin_y;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -914,7 +914,7 @@ void sub_08047BA4(Entity* this) {
|
||||
this->subAction = 1;
|
||||
this->actionDelay = 0x78;
|
||||
this->field_0xf = 0;
|
||||
if (gRoomControls.roomOriginX + 0x200 < this->x.HALF.HI) {
|
||||
if (gRoomControls.origin_x + 0x200 < this->x.HALF.HI) {
|
||||
this->field_0x76.HWORD = 0x78;
|
||||
} else {
|
||||
this->field_0x76.HWORD = 0x88;
|
||||
@@ -946,7 +946,7 @@ void sub_08047BF0(Entity* this) {
|
||||
this->direction = this->field_0x76.HWORD;
|
||||
this->speed = 0x140;
|
||||
sub_08047E48(this);
|
||||
if (this->y.HALF.HI > gRoomControls.roomOriginY + 0x270) {
|
||||
if (this->y.HALF.HI > gRoomControls.origin_y + 0x270) {
|
||||
this->subAction = 2;
|
||||
this->field_0x7c.HALF.HI = 0xAA;
|
||||
SoundReq(SFX_12D);
|
||||
@@ -1117,8 +1117,8 @@ void sub_08048004(Entity* this) {
|
||||
if (this->field_0x7c.BYTES.byte0 & 1) {
|
||||
u32 b = this->spriteRendering.b3;
|
||||
if (b == 3) {
|
||||
s32 posX = ((gPlayerEntity.x.HALF.HI - gRoomControls.roomOriginX) >> 3);
|
||||
s32 posY = ((gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY) >> 3);
|
||||
s32 posX = ((gPlayerEntity.x.HALF.HI - gRoomControls.origin_x) >> 3);
|
||||
s32 posY = ((gPlayerEntity.y.HALF.HI - gRoomControls.origin_y) >> 3);
|
||||
u16* tmp = (u16*)&gUnk_02019EE0;
|
||||
if (tmp[(posY << 7) + posX]) {
|
||||
if (!(this->field_0x7c.BYTES.byte0 & 2)) {
|
||||
@@ -1169,6 +1169,6 @@ const u16 gUnk_080D1C60[8] = { 0x200, 0x150, 0x290, 0x210, 0x200, 0x2D0, 0x170,
|
||||
void sub_08048178(Entity* this, u32 unk1) {
|
||||
const u16* tmp =
|
||||
((((Entity*)this->myHeap)->next->animationState >> 6 & 1) ? gUnk_080D1C60 + unk1 : gUnk_080D1C50 + unk1);
|
||||
this->field_0x80.HWORD = *tmp + gRoomControls.roomOriginX;
|
||||
this->field_0x82.HWORD = *(tmp + 1) + gRoomControls.roomOriginY;
|
||||
this->field_0x80.HWORD = *tmp + gRoomControls.origin_x;
|
||||
this->field_0x82.HWORD = *(tmp + 1) + gRoomControls.origin_y;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "player.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
#include "enemy.h"
|
||||
|
||||
extern u32 GetNextFunction(Entity*);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "save.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
|
||||
extern bool32 ItemIsShield(u32);
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ void sub_0803A274(Entity* this) {
|
||||
this->spriteSettings.flipX = 1;
|
||||
PositionRelative(this->parent, this, -0x100000, 0x200000);
|
||||
}
|
||||
if (gScreenTransition.field_0x38 != 0) {
|
||||
if (gRoomTransition.field_0x38 != 0) {
|
||||
this->action = 3;
|
||||
COLLISION_ON(this);
|
||||
this->spriteSettings.draw = 1;
|
||||
@@ -1210,8 +1210,8 @@ void sub_0803B724(Entity* param_1) {
|
||||
pEVar1->type2 = 1;
|
||||
random_value = Random();
|
||||
temp = gUnk_080CFD1B[param_1->type];
|
||||
pEVar1->x.HALF.HI = (random_value & 0x70) + temp + gRoomControls.roomOriginX;
|
||||
pEVar1->y.HALF.HI = ((random_value >> 0x10) & 7) * 10 + 0x5c + gRoomControls.roomOriginY;
|
||||
pEVar1->x.HALF.HI = (random_value & 0x70) + temp + gRoomControls.origin_x;
|
||||
pEVar1->y.HALF.HI = ((random_value >> 0x10) & 7) * 10 + 0x5c + gRoomControls.origin_y;
|
||||
pEVar1->parent = param_1;
|
||||
ResolveCollisionLayer(pEVar1);
|
||||
param_1->field_0xf++;
|
||||
@@ -1282,7 +1282,7 @@ void sub_0803B8F8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0803B910(Entity* this) {
|
||||
if (gScreenTransition.field_0x38 != 0) {
|
||||
if (gRoomTransition.field_0x38 != 0) {
|
||||
this->action = 2;
|
||||
this->spriteSettings.draw = 1;
|
||||
*(u8*)&this->field_0x74 = 0;
|
||||
|
||||
+12
-12
@@ -119,7 +119,7 @@ void sub_08033F3C(Entity* this) {
|
||||
Entity* pEVar2;
|
||||
|
||||
if (gEntCount < 0x43) {
|
||||
if (gScreenTransition.field_0x38 != 0) {
|
||||
if (gRoomTransition.field_0x38 != 0) {
|
||||
sub_08034420(this);
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
} else {
|
||||
@@ -133,7 +133,7 @@ void sub_08033F3C(Entity* this) {
|
||||
pEVar1->parent = this;
|
||||
pEVar2 = CreateObject(OBJECT_7E, 0, 0);
|
||||
pEVar2->parent = this;
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
if (gRoomTransition.field_0x39 == 0) {
|
||||
this->action = 0xd;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = 0xfc;
|
||||
@@ -215,7 +215,7 @@ void sub_08033FFC(Entity* this) {
|
||||
break;
|
||||
default:
|
||||
if (((*(Entity**)&this->field_0x74)->flags & 0x80) != 0) {
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
gRoomControls.camera_target = &gPlayerEntity;
|
||||
sub_08034420(this);
|
||||
gPlayerState.controlMode = 1;
|
||||
ResetPlayerAnimationAndAction();
|
||||
@@ -227,8 +227,8 @@ void sub_08033FFC(Entity* this) {
|
||||
void sub_0803414C(Entity* this) {
|
||||
u32 x, y;
|
||||
|
||||
x = gRoomControls.roomOriginX + 0xb8;
|
||||
y = gRoomControls.roomOriginY + 0x48;
|
||||
x = gRoomControls.origin_x + 0xb8;
|
||||
y = gRoomControls.origin_y + 0x48;
|
||||
|
||||
if (this->x.HALF.HI - x + 1 < 3 && this->y.HALF.HI - y + 1 < 3) {
|
||||
if (sub_080349D8(this)) {
|
||||
@@ -377,10 +377,10 @@ void sub_0803442C(Entity* this, u32 unk) {
|
||||
|
||||
void sub_0803443C(Entity* this) {
|
||||
this->field_0x7c.BYTES.byte1 = 0;
|
||||
if (gScreenTransition.field_0x39 < 0x1f) {
|
||||
if (gRoomTransition.field_0x39 < 0x1f) {
|
||||
sub_080344BC(this);
|
||||
} else {
|
||||
if (gScreenTransition.field_0x39 < 0x3d) {
|
||||
if (gRoomTransition.field_0x39 < 0x3d) {
|
||||
sub_08034498(this);
|
||||
} else {
|
||||
sub_08034474(this);
|
||||
@@ -544,7 +544,7 @@ NONMATCH("asm/non_matching/mazaal/sub_0803473C.inc", void sub_0803473C(Entity* t
|
||||
}
|
||||
playerX = gPlayerEntity.x.HALF.HI + 0x60;
|
||||
}
|
||||
roomX = gRoomControls.roomOriginX;
|
||||
roomX = gRoomControls.origin_x;
|
||||
if (playerX - 4 > this->x.HALF.HI) {
|
||||
if (roomX + 0xe0 < this->x.HALF.HI) {
|
||||
return;
|
||||
@@ -567,7 +567,7 @@ END_NONMATCH
|
||||
NONMATCH("asm/non_matching/mazaal/sub_080347B4.inc", void sub_080347B4(Entity* this)) {
|
||||
u32 direction;
|
||||
u32 playerX = gPlayerEntity.x.HALF.HI;
|
||||
u32 roomX = gRoomControls.roomOriginX;
|
||||
u32 roomX = gRoomControls.origin_x;
|
||||
if (playerX - 4 > this->x.HALF.HI) {
|
||||
if (roomX + 0xe0 < this->x.HALF.HI) {
|
||||
return;
|
||||
@@ -810,9 +810,9 @@ void sub_08034BC8(Entity* this) {
|
||||
|
||||
void sub_08034C00(Entity* this) {
|
||||
if (((gPlayerState.flags & PL_MINISH) != 0) &&
|
||||
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.roomOriginX,
|
||||
this->y.HALF.HI - gRoomControls.roomOriginY + 0xd, 3, 3) != 0) {
|
||||
if (gScreenTransition.field_0x39 >= 0x3d) {
|
||||
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.origin_x, this->y.HALF.HI - gRoomControls.origin_y + 0xd, 3,
|
||||
3) != 0) {
|
||||
if (gRoomTransition.field_0x39 >= 0x3d) {
|
||||
DoExitTransition((ScreenTransitionData*)&gUnk_080CED88);
|
||||
} else {
|
||||
DoExitTransition((ScreenTransitionData*)&gUnk_080CED9C);
|
||||
|
||||
+16
-16
@@ -94,8 +94,8 @@ void sub_08034D4C(Entity* this) {
|
||||
if (--this->field_0x78.HWORD == 0) {
|
||||
if ((this->field_0xf < 8) && (entity = CreateEnemy(VAATI_PROJECTILE, 0), entity != (Entity*)0x0)) {
|
||||
entity->direction = (s32)Random() % 5 + 0xc;
|
||||
entity->x.HALF.HI = (gRoomControls.width / 2) + gRoomControls.roomOriginX;
|
||||
entity->y.HALF.HI = gRoomControls.roomOriginY + 8;
|
||||
entity->x.HALF.HI = (gRoomControls.width / 2) + gRoomControls.origin_x;
|
||||
entity->y.HALF.HI = gRoomControls.origin_y + 8;
|
||||
entity->collisionLayer = 3;
|
||||
entity->parent = this;
|
||||
UpdateSpriteForCollisionLayer(entity);
|
||||
@@ -108,7 +108,7 @@ void sub_08034D4C(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08034DC8(Entity* this) {
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
if (gRoomTransition.field_0x39 == 0) {
|
||||
CreateFx(this, FX_GIANT_EXPLOSION4, 0);
|
||||
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
@@ -136,7 +136,7 @@ void sub_08034E68(Entity* this) {
|
||||
this->spriteSettings.draw = 0;
|
||||
sub_08035120(this);
|
||||
}
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
if (gRoomTransition.field_0x39 == 0) {
|
||||
if (sub_08079F8C() != 0) {
|
||||
this->action = 3;
|
||||
scriptExecutionContext = StartCutscene(this, (u16*)script_MazaalMacroDefeated);
|
||||
@@ -167,8 +167,8 @@ void sub_08034EE4(Entity* this) {
|
||||
randomValue = Random();
|
||||
entity = CreateFx(this, gUnk_080CEEC8[randomValue & 3], 0);
|
||||
if (entity != NULL) {
|
||||
entity->x.HALF.HI = (((randomValue >> 2) & 0x77) << 1) + 1 + gRoomControls.roomScrollX;
|
||||
entity->y.HALF.HI = ((randomValue >> 9) & 0x7e) + 1 + gRoomControls.roomScrollY;
|
||||
entity->x.HALF.HI = (((randomValue >> 2) & 0x77) << 1) + 1 + gRoomControls.scroll_x;
|
||||
entity->y.HALF.HI = ((randomValue >> 9) & 0x7e) + 1 + gRoomControls.scroll_y;
|
||||
entity->collisionLayer = 2;
|
||||
UpdateSpriteForCollisionLayer(entity);
|
||||
}
|
||||
@@ -182,10 +182,10 @@ void sub_08034F58(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08034F70(Entity* this) {
|
||||
this->health = gScreenTransition.field_0x39;
|
||||
if (gScreenTransition.field_0x39 >= 0x3d) {
|
||||
this->health = gRoomTransition.field_0x39;
|
||||
if (gRoomTransition.field_0x39 >= 0x3d) {
|
||||
this->type2 = 0;
|
||||
} else if (gScreenTransition.field_0x39 >= 0x1f) {
|
||||
} else if (gRoomTransition.field_0x39 >= 0x1f) {
|
||||
this->type2 = 1;
|
||||
} else {
|
||||
this->type2 = 2;
|
||||
@@ -200,14 +200,14 @@ void sub_08034FA0(Entity* this) {
|
||||
switch (this->type2) {
|
||||
case 0:
|
||||
if (this->health < 0x3c) {
|
||||
gScreenTransition.field_0x39 = 0x3c;
|
||||
gRoomTransition.field_0x39 = 0x3c;
|
||||
sub_08035050(this);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this->health < 0x1e) {
|
||||
gScreenTransition.field_0x39 = 0x1e;
|
||||
gRoomTransition.field_0x39 = 0x1e;
|
||||
sub_08035050(this);
|
||||
return;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ void sub_08034FA0(Entity* this) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
gScreenTransition.field_0x39 = this->health;
|
||||
gRoomTransition.field_0x39 = this->health;
|
||||
}
|
||||
|
||||
void sub_08035050(Entity* this) {
|
||||
@@ -247,16 +247,16 @@ u32 sub_08035084(Entity* this) {
|
||||
}
|
||||
do {
|
||||
vulnPillar = (s32)Random() % 6;
|
||||
} while (vulnPillar == gScreenTransition.field_0x38 >> 4);
|
||||
gScreenTransition.field_0x38 = (gScreenTransition.field_0x38 & 0xf) | (vulnPillar << 4);
|
||||
} while (vulnPillar == gRoomTransition.field_0x38 >> 4);
|
||||
gRoomTransition.field_0x38 = (gRoomTransition.field_0x38 & 0xf) | (vulnPillar << 4);
|
||||
for (i = 0, coords = gUnk_080CEECC; i < 6; i++, coords += 2) {
|
||||
if (i == vulnPillar) {
|
||||
entity = this;
|
||||
} else {
|
||||
entity = CreateEnemy(MAZAAL_MACRO, 1);
|
||||
}
|
||||
entity->x.HALF.HI = gRoomControls.roomOriginX + *coords;
|
||||
entity->y.HALF.HI = gRoomControls.roomOriginY + *(coords + 1);
|
||||
entity->x.HALF.HI = gRoomControls.origin_x + *coords;
|
||||
entity->y.HALF.HI = gRoomControls.origin_y + *(coords + 1);
|
||||
entity->collisionLayer = 1;
|
||||
UpdateSpriteForCollisionLayer(entity);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
void sub_08045374(Entity*);
|
||||
|
||||
extern void sub_080452E4();
|
||||
extern void sub_080452E4(Entity*);
|
||||
extern void ReplaceMonitoredEntity(Entity*, Entity*);
|
||||
|
||||
extern void (*const gUnk_080D17C0[])(Entity*);
|
||||
|
||||
@@ -217,7 +217,7 @@ void sub_08023398(Entity* this) {
|
||||
this->field_0x7c.BYTES.byte0--;
|
||||
}
|
||||
|
||||
if ((gScreenTransition.frameCount & 7) == 0) {
|
||||
if ((gRoomTransition.frameCount & 7) == 0) {
|
||||
u32 uVar4;
|
||||
|
||||
sub_08004596(this, sub_08049F84(this, 1));
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@
|
||||
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
|
||||
void Octorok_Pause();
|
||||
bool32 Octorok_FacesPlayer();
|
||||
void Octorok_Turn();
|
||||
void Octorok_Pause(Entity*);
|
||||
bool32 Octorok_FacesPlayer(Entity*);
|
||||
void Octorok_Turn(Entity*);
|
||||
|
||||
extern void (*const gOctorok[6])(Entity*);
|
||||
extern void (*const gOctorokActions[4])(Entity*);
|
||||
|
||||
+24
-24
@@ -167,7 +167,7 @@ Hit SubActions
|
||||
void OctorokBoss_Hit(Entity* this) {
|
||||
if (GET_BOSS_PHASE(this) == 0) {
|
||||
if (this->subAction != 3) {
|
||||
gRoomControls.cameraTarget = GET_HELPER(this)->tailObjects[0];
|
||||
gRoomControls.camera_target = GET_HELPER(this)->tailObjects[0];
|
||||
GET_HELPER(this)->field_0x7 = 0x5a;
|
||||
sub_08078B48();
|
||||
}
|
||||
@@ -219,17 +219,17 @@ void OctorokBoss_Hit_SubAction1(Entity* this) {
|
||||
GET_HELPER(this)->tailObjects[0]->field_0x7c.BYTES.byte1--;
|
||||
}
|
||||
// Move to the center of the screen before freezing
|
||||
diffX = 0x108 + gRoomControls.roomOriginX - this->x.HALF.HI + 0x4;
|
||||
diffY = gRoomControls.roomOriginY - this->y.HALF.HI + 0x8c;
|
||||
diffX = 0x108 + gRoomControls.origin_x - this->x.HALF.HI + 0x4;
|
||||
diffY = gRoomControls.origin_y - this->y.HALF.HI + 0x8c;
|
||||
if (diffX > 8 || diffY > 8) {
|
||||
GET_HELPER(this)->field_0x2 = 1;
|
||||
#if defined(JP) || defined(DEMO_JP) || defined(EU)
|
||||
this->direction = ((s32)sub_080045DA((((gRoomControls.roomOriginX + 0x108) << 0x10) - this->x.WORD),
|
||||
(((gRoomControls.roomOriginY + 0x88) << 0x10) - this->y.WORD))) >>
|
||||
this->direction = ((s32)sub_080045DA((((gRoomControls.origin_x + 0x108) << 0x10) - this->x.WORD),
|
||||
(((gRoomControls.origin_y + 0x88) << 0x10) - this->y.WORD))) >>
|
||||
3;
|
||||
#else
|
||||
this->direction = ((s32)sub_080045DA(gRoomControls.roomOriginX + 0x108 - this->x.HALF.HI,
|
||||
gRoomControls.roomOriginY + 0x88 - this->y.HALF.HI)) >>
|
||||
this->direction = ((s32)sub_080045DA(gRoomControls.origin_x + 0x108 - this->x.HALF.HI,
|
||||
gRoomControls.origin_y + 0x88 - this->y.HALF.HI)) >>
|
||||
3;
|
||||
#endif
|
||||
this->speed = 0x100;
|
||||
@@ -253,7 +253,7 @@ void OctorokBoss_Hit_SubAction1(Entity* this) {
|
||||
Entity* tail = GET_HELPER(this)->tailObjects[i - 1];
|
||||
tail->spriteSettings.draw |= 1;
|
||||
}
|
||||
if ((gScreenTransition.frameCount & 2) != 0) {
|
||||
if ((gRoomTransition.frameCount & 2) != 0) {
|
||||
CreateObjectWithParent(this, OCTOROK_BOSS_OBJECT, 6, 0);
|
||||
}
|
||||
GET_TIMER(this)--;
|
||||
@@ -285,7 +285,7 @@ void OctorokBoss_Hit_SubAction2(Entity* this) {
|
||||
} else {
|
||||
this->subAction = 3;
|
||||
GET_TIMER(this) = 0x96;
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
gRoomControls.camera_target = &gPlayerEntity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ void OctorokBoss_Hit_SubAction4(Entity* this) {
|
||||
this->subAction = 5;
|
||||
object = CreateObjectWithParent(this, OCTOROK_BOSS_OBJECT, 9, 0);
|
||||
if (object != NULL) {
|
||||
gRoomControls.cameraTarget = object;
|
||||
gRoomControls.camera_target = object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ void OctorokBoss_Hit_SubAction6(Entity* this) {
|
||||
tmp = FixedDiv(tmp, 0x100);
|
||||
this->spriteOffsetY = -((tmp << 0x10) >> 8) >> 0x10;
|
||||
if (GET_TIMER(this) == 0) {
|
||||
if ((gScreenTransition.frameCount & 0xfU) == 0) {
|
||||
if ((gRoomTransition.frameCount & 0xfU) == 0) {
|
||||
// Explosion in the center
|
||||
CreateFx(this, FX_GIANT_EXPLOSION3, 0);
|
||||
// Explosion at the front right leg
|
||||
@@ -448,7 +448,7 @@ ASM_FUNC("asm/non_matching/octorokBoss/OctorokBoss_Init.inc", void OctorokBoss_I
|
||||
gPlayerEntity.spriteSettings.draw = 0;
|
||||
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
|
||||
gPlayerEntity.y.HALF.HI = this->y.HALF.HI - 0xa0;
|
||||
gRoomControls.cameraTarget = this;
|
||||
gRoomControls.camera_target = this;
|
||||
break;
|
||||
|
||||
case LEG_BR:
|
||||
@@ -533,7 +533,7 @@ void OctorokBoss_Intro_SubAction2(Entity* this) {
|
||||
this->subAction = 3;
|
||||
GET_TIMER(this) = 0x3c;
|
||||
gPlayerEntity.spriteSettings.draw |= 1;
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
gRoomControls.camera_target = &gPlayerEntity;
|
||||
gRoomControls.unk5 = 1;
|
||||
}
|
||||
}
|
||||
@@ -714,7 +714,7 @@ void OctorokBoss_Action1(Entity* this) {
|
||||
sub_08036F60(this);
|
||||
if (GET_HELPER(this)->fallingStonesTimer != 0) {
|
||||
GET_HELPER(this)->fallingStonesTimer--;
|
||||
if ((gScreenTransition.frameCount & 3) == 0) {
|
||||
if ((gRoomTransition.frameCount & 3) == 0) {
|
||||
// Falling stones
|
||||
CreateProjectileWithParent(this, OCTOROK_BOSS_PROJECTILE, 3);
|
||||
}
|
||||
@@ -892,7 +892,7 @@ void OctorokBoss_Action1_Attack_Type2_2(Entity* this) {
|
||||
}
|
||||
|
||||
void OctorokBoss_Action1_Attack_Type2_3(Entity* this) {
|
||||
if ((gScreenTransition.frameCount & 2) != 0) {
|
||||
if ((gRoomTransition.frameCount & 2) != 0) {
|
||||
GET_HELPER(this)->mouthObject->field_0x76.HWORD -= 8;
|
||||
} else {
|
||||
GET_HELPER(this)->mouthObject->field_0x76.HWORD += 8;
|
||||
@@ -938,8 +938,8 @@ void OctorokBoss_ExecuteAttackVacuum(Entity* this) {
|
||||
this->field_0x80.HALF.LO = 1;
|
||||
GET_TIMER(this) = 2;
|
||||
GET_HELPER(this)->targetAngle =
|
||||
sub_080045DA((gRoomControls.roomOriginX + 0x108) * 0x10000 - this->x.WORD,
|
||||
(gRoomControls.roomOriginY + 0x88) * 0x10000 - this->y.WORD);
|
||||
sub_080045DA((gRoomControls.origin_x + 0x108) * 0x10000 - this->x.WORD,
|
||||
(gRoomControls.origin_y + 0x88) * 0x10000 - this->y.WORD);
|
||||
GET_HELPER(this)->targetAngle = (u8) - (GET_HELPER(this)->targetAngle + 0x80);
|
||||
SoundReq(SFX_ED);
|
||||
}
|
||||
@@ -949,7 +949,7 @@ void OctorokBoss_ExecuteAttackVacuum(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((gScreenTransition.frameCount & 3) == 0) {
|
||||
if ((gRoomTransition.frameCount & 3) == 0) {
|
||||
CreateObjectWithParent(this, OCTOROK_BOSS_OBJECT, 2, 0);
|
||||
}
|
||||
} else {
|
||||
@@ -1012,8 +1012,8 @@ void OctorokBoss_ExecuteAttackSmoke(Entity* this) {
|
||||
} else {
|
||||
GET_TIMER(this)++;
|
||||
ChangeLightLevel(-1);
|
||||
if ((gScreenTransition.frameCount & 3) == 0) {
|
||||
if ((gScreenTransition.frameCount & 7) == 0) {
|
||||
if ((gRoomTransition.frameCount & 3) == 0) {
|
||||
if ((gRoomTransition.frameCount & 7) == 0) {
|
||||
SoundReq(SFX_124);
|
||||
}
|
||||
CreateObjectWithParent(this, OCTOROK_BOSS_OBJECT, 3, 0);
|
||||
@@ -1027,7 +1027,7 @@ void OctorokBoss_ExecuteAttackFreeze(Entity* this) {
|
||||
OctorokBoss_SetAttackTimer(this);
|
||||
} else {
|
||||
GET_TIMER(this)--;
|
||||
if ((gScreenTransition.frameCount & 3) == 0) {
|
||||
if ((gRoomTransition.frameCount & 3) == 0) {
|
||||
this->child = CreateProjectileWithParent(this, OCTOROK_BOSS_PROJECTILE, 2);
|
||||
if (this->child != NULL) {
|
||||
this->child->parent = this;
|
||||
@@ -1041,7 +1041,7 @@ void OctorokBoss_Burning(Entity* this) {
|
||||
OctorokBoss_Burning_SubActions[this->subAction](this);
|
||||
if (GET_HELPER(this)->fallingStonesTimer != 0) {
|
||||
GET_HELPER(this)->fallingStonesTimer--;
|
||||
if ((gScreenTransition.frameCount & 7) == 0) {
|
||||
if ((gRoomTransition.frameCount & 7) == 0) {
|
||||
// Falling stones
|
||||
CreateProjectileWithParent(this, OCTOROK_BOSS_PROJECTILE, 3);
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ void OctorokBoss_Burning_SubAction1(Entity* this) {
|
||||
if (GET_TIMER(this)-- == 0) {
|
||||
this->health = 0;
|
||||
}
|
||||
if ((gScreenTransition.frameCount & 0x1f) == 0) {
|
||||
if ((gRoomTransition.frameCount & 0x1f) == 0) {
|
||||
SoundReq(SFX_159);
|
||||
}
|
||||
}
|
||||
@@ -1410,7 +1410,7 @@ void sub_08036F60(Entity* this) {
|
||||
}
|
||||
|
||||
void OctorokBoss_StepSound(Entity* this, u32 frameMask) {
|
||||
if ((gScreenTransition.frameCount & frameMask) == 0) {
|
||||
if ((gRoomTransition.frameCount & frameMask) == 0) {
|
||||
if (IS_FROZEN(this) == FALSE) {
|
||||
SoundReq(SFX_163);
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -195,7 +195,7 @@ void Peahat_ChargeTarget(Entity* this) {
|
||||
if (this->actionDelay & 1)
|
||||
this->speed += 4;
|
||||
|
||||
if ((gScreenTransition.frameCount & 3) == 0)
|
||||
if ((gRoomTransition.frameCount & 3) == 0)
|
||||
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
|
||||
}
|
||||
sub_080AEFE0(this);
|
||||
|
||||
+2
-2
@@ -148,7 +148,7 @@ void sub_080240B8(Entity* this) {
|
||||
}
|
||||
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
if (CheckIsDungeon())
|
||||
if (AreaIsDungeon())
|
||||
this->spriteOrientation.flipY = 1;
|
||||
|
||||
this->field_0x80.HALF.HI = Random() & 0x40;
|
||||
@@ -534,7 +534,7 @@ void sub_08024940(Entity* this) {
|
||||
this->z.HALF.HI += 2;
|
||||
}
|
||||
|
||||
if (this->type2 != 0 || CheckIsDungeon()) {
|
||||
if (this->type2 != 0 || AreaIsDungeon()) {
|
||||
if (!sub_08049FA0(this)) {
|
||||
this->direction = sub_08049EE4(this);
|
||||
sub_080249F4(this);
|
||||
|
||||
+12
-12
@@ -386,8 +386,8 @@ void sub_080256B4(Entity* this) {
|
||||
|
||||
bool32 sub_0802571C(Entity* this) {
|
||||
RoomControls* ctrl = &gRoomControls;
|
||||
u16 xDiff = (this->x.HALF.HI - ctrl->roomOriginX + 8) & -0x10;
|
||||
u16 yDiff = (this->y.HALF.HI - ctrl->roomOriginY + 8) & -0x10;
|
||||
u16 xDiff = (this->x.HALF.HI - ctrl->origin_x + 8) & -0x10;
|
||||
u16 yDiff = (this->y.HALF.HI - ctrl->origin_y + 8) & -0x10;
|
||||
u16 unk = this->field_0x7a.HALF.LO;
|
||||
u16 i;
|
||||
|
||||
@@ -396,8 +396,8 @@ bool32 sub_0802571C(Entity* this) {
|
||||
u16 sVar4 = yDiff + gUnk_080CC020[unk + 1];
|
||||
|
||||
if (sub_080257EC(this, sVar3, sVar4)) {
|
||||
this->field_0x7c.HALF.LO = sVar3 + ctrl->roomOriginX;
|
||||
this->field_0x7c.HALF.HI = sVar4 + ctrl->roomOriginY;
|
||||
this->field_0x7c.HALF.LO = sVar3 + ctrl->origin_x;
|
||||
this->field_0x7c.HALF.HI = sVar4 + ctrl->origin_y;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -472,8 +472,8 @@ NONMATCH("asm/non_matching/puffstool/sub_0802594C.inc", bool32 sub_0802594C(Enti
|
||||
const s8* unk = gUnk_080CC090[param_2];
|
||||
u32 uVar1 = this->collisionLayer;
|
||||
RoomControls* ctrl = &gRoomControls;
|
||||
xDiff = (this->x.HALF.HI - ctrl->roomOriginX + 8) & -0x10;
|
||||
yDiff = (this->y.HALF.HI - ctrl->roomOriginY + 8) & -0x10;
|
||||
xDiff = (this->x.HALF.HI - ctrl->origin_x + 8) & -0x10;
|
||||
yDiff = (this->y.HALF.HI - ctrl->origin_y + 8) & -0x10;
|
||||
do {
|
||||
s16 iVar9 = xDiff + unk[0];
|
||||
s16 iVar11 = yDiff + unk[1];
|
||||
@@ -482,8 +482,8 @@ NONMATCH("asm/non_matching/puffstool/sub_0802594C.inc", bool32 sub_0802594C(Enti
|
||||
u8 bVar6 = sub_080002D4(iVar9 - 0x00, iVar11 - 0x10, uVar1);
|
||||
u8 bVar7 = sub_080002D4(iVar9 - 0x10, iVar11 - 0x10, uVar1);
|
||||
if ((bVar6 | bVar4 | bVar5 | bVar7) == 0) {
|
||||
this->field_0x7c.HALF.LO = ctrl->roomOriginX + iVar9;
|
||||
this->field_0x7c.HALF.HI = ctrl->roomOriginY + iVar11;
|
||||
this->field_0x7c.HALF.LO = ctrl->origin_x + iVar9;
|
||||
this->field_0x7c.HALF.HI = ctrl->origin_y + iVar11;
|
||||
return TRUE;
|
||||
}
|
||||
unk += 2;
|
||||
@@ -495,8 +495,8 @@ END_NONMATCH
|
||||
|
||||
void sub_08025A54(Entity* this) {
|
||||
u32 layer = this->collisionLayer;
|
||||
s16 x = this->x.HALF.HI - gRoomControls.roomOriginX;
|
||||
s16 y = this->y.HALF.HI - gRoomControls.roomOriginY;
|
||||
s16 x = this->x.HALF.HI - gRoomControls.origin_x;
|
||||
s16 y = this->y.HALF.HI - gRoomControls.origin_y;
|
||||
|
||||
const s8* offset = gUnk_080CC0A0;
|
||||
u32 i = 0;
|
||||
@@ -535,8 +535,8 @@ void sub_08025AE8(Entity* this) {
|
||||
void sub_08025B18(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
s32 x = this->x.HALF.HI - gRoomControls.roomOriginX;
|
||||
s32 y = this->y.HALF.HI - gRoomControls.roomOriginY;
|
||||
s32 x = this->x.HALF.HI - gRoomControls.origin_x;
|
||||
s32 y = this->y.HALF.HI - gRoomControls.origin_y;
|
||||
u32 layer = this->collisionLayer;
|
||||
|
||||
const s8* offset = gUnk_080CC0A8;
|
||||
|
||||
@@ -14,9 +14,9 @@ void sub_08020A7C(Entity*);
|
||||
bool32 Rollobite_TryToHoleUp(Entity*);
|
||||
bool32 Rollobite_IsRolledUp(Entity*);
|
||||
|
||||
extern void sub_080AE58C();
|
||||
extern void sub_080AE7E8();
|
||||
extern void sub_08078930();
|
||||
extern void sub_080AE58C(Entity*, u32, u32);
|
||||
extern void sub_080AE7E8(Entity*, u32, u32, u32);
|
||||
extern void sub_08078930(Entity*);
|
||||
|
||||
void Rollobite(Entity* this) {
|
||||
EnemyFunctionHandler(this, gRollobiteFunctions);
|
||||
|
||||
+3
-3
@@ -5,10 +5,10 @@ extern void (*const gRope[6])(Entity*);
|
||||
extern void (*const gUnk_080CE460[4])(Entity*);
|
||||
extern void (*const gUnk_080CE470[3])(Entity*);
|
||||
extern Entity* gUnk_020000B0;
|
||||
extern u32 sub_0804A044();
|
||||
extern u32 sub_0804A044(Entity*, Entity*, u32);
|
||||
|
||||
void sub_08031600();
|
||||
u32 sub_0803163C();
|
||||
void sub_08031600(Entity*);
|
||||
u32 sub_0803163C(Entity*);
|
||||
|
||||
void Rope(Entity* this) {
|
||||
EnemyFunctionHandler(this, gRope);
|
||||
|
||||
@@ -78,7 +78,7 @@ void sub_080293B4(Entity* this) {
|
||||
CreateDeathFx(this, 0xff, gUnk_080CCC34[this->cutsceneBeh.HALF.LO * 3 + this->type]);
|
||||
}
|
||||
|
||||
void nullsub_141() {
|
||||
void nullsub_141(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080293DC(Entity* this) {
|
||||
|
||||
+3
-3
@@ -37,7 +37,7 @@ void sub_08044F88(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_171() {
|
||||
void nullsub_171(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08044FC8(Entity* this) {
|
||||
@@ -127,10 +127,10 @@ void sub_08045178(Entity* this, Entity* child, int h, int v) {
|
||||
return;
|
||||
|
||||
x = child->x.HALF.HI + h;
|
||||
if (0 <= x && x < (gRoomControls.roomOriginX + gRoomControls.width))
|
||||
if (0 <= x && x < (gRoomControls.origin_x + gRoomControls.width))
|
||||
child->x.HALF.HI = x;
|
||||
|
||||
y = child->y.HALF.HI + v;
|
||||
if (0 <= y && y < (gRoomControls.roomOriginY + gRoomControls.height))
|
||||
if (0 <= y && y < (gRoomControls.origin_y + gRoomControls.height))
|
||||
child->y.HALF.HI = y;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ void sub_08031680(Entity* this) {
|
||||
gUnk_080CE548[this->action](this);
|
||||
}
|
||||
|
||||
void nullsub_152() {
|
||||
void nullsub_152(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0803169C(Entity* this) {
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
#include "enemy.h"
|
||||
#include "functions.h"
|
||||
|
||||
static void sub_0802F45C(Entity* this);
|
||||
|
||||
extern void (*const gUnk_080CDED0[])(Entity*);
|
||||
extern void (*const gUnk_080CDEE8[])(Entity*);
|
||||
|
||||
@@ -175,7 +177,7 @@ void sub_0802F3F4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0802F45C(Entity* this) {
|
||||
static void sub_0802F45C(Entity* this) {
|
||||
u32 temp;
|
||||
|
||||
if (sub_08049FA0(this) == 0) {
|
||||
|
||||
+45
-46
@@ -189,11 +189,11 @@ void sub_080425B4(Entity* this) {
|
||||
if (sub_080437DC(this)) {
|
||||
this->field_0x7c.BYTES.byte0 = 0;
|
||||
this->field_0x7c.BYTES.byte1 = 0;
|
||||
if ((gScreenTransition.field_0x38 & 1) != 0) {
|
||||
if (gScreenTransition.field_0x3c == this->type2) {
|
||||
if ((gRoomTransition.field_0x38 & 1) != 0) {
|
||||
if (gRoomTransition.field_0x3c == this->type2) {
|
||||
sub_08043EB8(this);
|
||||
sub_08043ABC(this);
|
||||
if ((gScreenTransition.field_0x39 >> (this->type2 + 2) & 1U) != 0) {
|
||||
if ((gRoomTransition.field_0x39 >> (this->type2 + 2) & 1U) != 0) {
|
||||
this->action = 7;
|
||||
this->subAction = 4;
|
||||
} else {
|
||||
@@ -207,7 +207,7 @@ void sub_080425B4(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
this->action = 1;
|
||||
this->subAction = gScreenTransition.field_0x38 & 1;
|
||||
this->subAction = gRoomTransition.field_0x38 & 1;
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk08 = gUnk_080D1280[this->type2];
|
||||
sub_08042654(this);
|
||||
}
|
||||
@@ -528,28 +528,27 @@ void sub_08042C34(Entity* this) {
|
||||
temp = &gUnk_080D12F8[random];
|
||||
x = gPlayerEntity.x.HALF.HI + *temp;
|
||||
y = gPlayerEntity.y.HALF.HI + *(temp + 1);
|
||||
if ((gRoomControls.roomOriginX + 0x20) > x) {
|
||||
x = gRoomControls.roomOriginX + 0x20;
|
||||
if ((gRoomControls.origin_x + 0x20) > x) {
|
||||
x = gRoomControls.origin_x + 0x20;
|
||||
}
|
||||
if (gRoomControls.roomOriginX + gRoomControls.width + -0x20 < x) {
|
||||
x = gRoomControls.roomOriginX + gRoomControls.width + -0x20;
|
||||
if (gRoomControls.origin_x + gRoomControls.width + -0x20 < x) {
|
||||
x = gRoomControls.origin_x + gRoomControls.width + -0x20;
|
||||
}
|
||||
if ((gRoomControls.roomOriginY + 0x20) > y) {
|
||||
y = gRoomControls.roomOriginY + 0x20;
|
||||
if ((gRoomControls.origin_y + 0x20) > y) {
|
||||
y = gRoomControls.origin_y + 0x20;
|
||||
}
|
||||
#if defined EU || defined JP || defined DEMO_JP
|
||||
if (gRoomControls.roomOriginY + gRoomControls.height + -0x20 < y) {
|
||||
y = gRoomControls.roomOriginY + gRoomControls.height + -0x20;
|
||||
if (gRoomControls.origin_y + gRoomControls.height + -0x20 < y) {
|
||||
y = gRoomControls.origin_y + gRoomControls.height + -0x20;
|
||||
}
|
||||
#else
|
||||
if (gRoomControls.roomOriginY + gRoomControls.height + -0x40 < y) {
|
||||
y = gRoomControls.roomOriginY + gRoomControls.height + -0x40;
|
||||
if (gRoomControls.origin_y + gRoomControls.height + -0x40 < y) {
|
||||
y = gRoomControls.origin_y + gRoomControls.height + -0x40;
|
||||
}
|
||||
#endif
|
||||
if (((u32)((x - gRoomControls.roomOriginX) - 0x90) < 0x41) &&
|
||||
((u32)((y - gRoomControls.roomOriginY) - 8) < 0x41)) {
|
||||
x = gRoomControls.roomOriginX + 0xb0;
|
||||
y = gRoomControls.roomOriginY + 0x40;
|
||||
if (((u32)((x - gRoomControls.origin_x) - 0x90) < 0x41) && ((u32)((y - gRoomControls.origin_y) - 8) < 0x41)) {
|
||||
x = gRoomControls.origin_x + 0xb0;
|
||||
y = gRoomControls.origin_y + 0x40;
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
|
||||
@@ -636,8 +635,8 @@ void sub_08042E30(Entity* this) {
|
||||
this->actionDelay = (Random() & 0x38) + 0x28;
|
||||
this->speed = 0x200;
|
||||
this->direction = pVVar9->unk00.HALF.HI >> 3;
|
||||
uVar6 = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, gRoomControls.roomOriginX + 0x110,
|
||||
gRoomControls.roomOriginY + 0x60);
|
||||
uVar6 = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, gRoomControls.origin_x + 0x110,
|
||||
gRoomControls.origin_y + 0x60);
|
||||
this->field_0x78.HALF.HI = (gUnk_080D1304[Random() & 7] + uVar6) & 0x1f;
|
||||
}
|
||||
pVVar9->unk00.HWORD += pVVar9->unk08;
|
||||
@@ -1079,15 +1078,15 @@ NONMATCH("asm/non_matching/vaati/sub_08043770.inc", void sub_08043770(Entity* th
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
entity = ((VaatiArm_HeapStruct*)this->myHeap)->parent;
|
||||
if ((gScreenTransition.field_0x39 & 0xc) == 0) {
|
||||
if ((gRoomTransition.field_0x39 & 0xc) == 0) {
|
||||
entity->subAction = 2;
|
||||
}
|
||||
if (this->type2 == 0) {
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->parent = NULL;
|
||||
gScreenTransition.field_0x39 &= 0xfe;
|
||||
gRoomTransition.field_0x39 &= 0xfe;
|
||||
} else {
|
||||
*(u32*)((VaatiArm_HeapStruct*)this->myHeap)->s1 = 0;
|
||||
gScreenTransition.field_0x39 &= 0xfd;
|
||||
gRoomTransition.field_0x39 &= 0xfd;
|
||||
}
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->myHeap = NULL;
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->health = 0;
|
||||
@@ -1291,7 +1290,7 @@ u32 sub_08043C98(Entity* this) {
|
||||
Entity* e2 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
|
||||
if ((e1->bitfield == 0x9d) || (e2->bitfield == 0x9d)) {
|
||||
sub_08043D08(this);
|
||||
gScreenTransition.field_0x38 |= 2;
|
||||
gRoomTransition.field_0x38 |= 2;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -1345,33 +1344,33 @@ void sub_08043DB0(Entity* this) {
|
||||
|
||||
if (((gPlayerState.flags & PL_MINISH) != 0)) {
|
||||
pEVar3 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
|
||||
if (CheckPlayerInRegion(pEVar3->x.HALF.HI - gRoomControls.roomOriginX,
|
||||
pEVar3->y.HALF.HI - gRoomControls.roomOriginY + 2, 3, 3)) {
|
||||
if (CheckPlayerInRegion(pEVar3->x.HALF.HI - gRoomControls.origin_x,
|
||||
pEVar3->y.HALF.HI - gRoomControls.origin_y + 2, 3, 3)) {
|
||||
DoExitTransition((ScreenTransitionData*)&gUnk_080D13EC);
|
||||
if ((gScreenTransition.field_0x39 & 3) != 3) {
|
||||
gScreenTransition.player_status.room_next = 1;
|
||||
if ((gRoomTransition.field_0x39 & 3) != 3) {
|
||||
gRoomTransition.player_status.room_next = 1;
|
||||
}
|
||||
cVar1 = this->field_0x7a.HWORD;
|
||||
gScreenTransition.field_0x3d = 0x1e - (cVar1 / 0x3c);
|
||||
gScreenTransition.field_0x3c = this->type2;
|
||||
gRoomTransition.field_0x3d = 0x1e - (cVar1 / 0x3c);
|
||||
gRoomTransition.field_0x3c = this->type2;
|
||||
pEVar2 = ((VaatiArm_HeapStruct*)this->myHeap)->parent;
|
||||
gScreenTransition.hurtType = pEVar2->x.HALF.HI;
|
||||
gScreenTransition.field_0x42 = pEVar2->y.HALF.HI;
|
||||
gRoomTransition.hurtType = pEVar2->x.HALF.HI;
|
||||
gRoomTransition.field_0x42 = pEVar2->y.HALF.HI;
|
||||
pEVar4 = ((VaatiArm_HeapStruct*)pEVar2->myHeap)->parent;
|
||||
if (pEVar4 != NULL) {
|
||||
gScreenTransition.field_0x44 = pEVar4->x.HALF.HI;
|
||||
gScreenTransition.field_0x46 = pEVar4->y.HALF.HI;
|
||||
gRoomTransition.field_0x44 = pEVar4->x.HALF.HI;
|
||||
gRoomTransition.field_0x46 = pEVar4->y.HALF.HI;
|
||||
} else {
|
||||
gScreenTransition.field_0x44 = gRoomControls.roomOriginX + 0x110;
|
||||
gScreenTransition.field_0x46 = gRoomControls.roomOriginY + 0x60;
|
||||
gRoomTransition.field_0x44 = gRoomControls.origin_x + 0x110;
|
||||
gRoomTransition.field_0x46 = gRoomControls.origin_y + 0x60;
|
||||
}
|
||||
pEVar4 = (Entity*)(*(int*)((VaatiArm_HeapStruct*)pEVar2->myHeap)->s1);
|
||||
if (pEVar4 != NULL) {
|
||||
gScreenTransition.field_0x48 = pEVar4->x.HALF.HI;
|
||||
gScreenTransition.field_0x4a = pEVar4->y.HALF.HI;
|
||||
gRoomTransition.field_0x48 = pEVar4->x.HALF.HI;
|
||||
gRoomTransition.field_0x4a = pEVar4->y.HALF.HI;
|
||||
} else {
|
||||
gScreenTransition.field_0x48 = gRoomControls.roomOriginX + 0x110;
|
||||
gScreenTransition.field_0x4a = gRoomControls.roomOriginY + 0x60;
|
||||
gRoomTransition.field_0x48 = gRoomControls.origin_x + 0x110;
|
||||
gRoomTransition.field_0x4a = gRoomControls.origin_y + 0x60;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1399,8 +1398,8 @@ void sub_08043EB8(Entity* this) {
|
||||
pEVar4->flags = pEVar4->flags | 0x80;
|
||||
pEVar4->spriteSettings.draw = 1;
|
||||
pEVar4->spritePriority.b0 = 4;
|
||||
pEVar4->x.HALF.HI = (this->type2 == 0) ? gScreenTransition.field_0x44 : gScreenTransition.field_0x48;
|
||||
pEVar4->y.HALF.HI = (this->type2 == 0) ? gScreenTransition.field_0x46 : gScreenTransition.field_0x4a;
|
||||
pEVar4->x.HALF.HI = (this->type2 == 0) ? gRoomTransition.field_0x44 : gRoomTransition.field_0x48;
|
||||
pEVar4->y.HALF.HI = (this->type2 == 0) ? gRoomTransition.field_0x46 : gRoomTransition.field_0x4a;
|
||||
pEVar4->z.HALF.HI = 0;
|
||||
pEVar4->field_0x3c = pEVar4->field_0x3c & 0xef;
|
||||
pEVar4->hitType = 0x3a;
|
||||
@@ -1442,8 +1441,8 @@ void sub_08044078(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
if (this->type != 3 ||
|
||||
!(((gScreenTransition.field_0x38 & 1) == 0 ||
|
||||
(((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->type2 != gScreenTransition.field_0x3c)))) {
|
||||
!(((gRoomTransition.field_0x38 & 1) == 0 ||
|
||||
(((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->type2 != gRoomTransition.field_0x3c)))) {
|
||||
InitializeAnimation(this, 0x12);
|
||||
} else {
|
||||
InitializeAnimation(this, 0x11);
|
||||
@@ -1455,8 +1454,8 @@ void sub_08044078(Entity* this) {
|
||||
void sub_080440CC(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
if ((gScreenTransition.field_0x38 & 1) != 0 &&
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->type2 == gScreenTransition.field_0x3c) {
|
||||
if ((gRoomTransition.field_0x38 & 1) != 0 &&
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->type2 == gRoomTransition.field_0x3c) {
|
||||
InitializeAnimation(this, 0x13);
|
||||
} else {
|
||||
InitializeAnimation(this, 0x11);
|
||||
|
||||
@@ -141,7 +141,7 @@ void sub_080447E0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
extern void sub_08044DEC();
|
||||
extern void sub_08044DEC(Entity*);
|
||||
|
||||
void sub_08044868(Entity* this) {
|
||||
Entity* vaati = this->parent;
|
||||
|
||||
@@ -58,12 +58,12 @@ void VaatiEyesMacroFunction0(Entity* this) {
|
||||
void VaatiEyesMacroFunction1(Entity* this) {
|
||||
if (this->type == 0) {
|
||||
if (this->health == 0) {
|
||||
gScreenTransition.field_0x39 &= ~(1 << (gScreenTransition.field_0x3c + 2));
|
||||
gRoomTransition.field_0x39 &= ~(1 << (gRoomTransition.field_0x3c + 2));
|
||||
}
|
||||
if (gRoomControls.roomID == 0) {
|
||||
gScreenTransition.field_0x3a = this->health;
|
||||
if (gRoomControls.room == 0) {
|
||||
gRoomTransition.field_0x3a = this->health;
|
||||
} else {
|
||||
gScreenTransition.field_0x3b = this->health;
|
||||
gRoomTransition.field_0x3b = this->health;
|
||||
}
|
||||
if (this->field_0x78.HALF.HI != this->health) {
|
||||
EnqueueSFX(SFX_17A);
|
||||
@@ -102,10 +102,10 @@ void VaatiEyesMacroFunction0Type0Action0(Entity* this) {
|
||||
enemy = CreateEnemy(VAATI_EYES_MACRO, 2);
|
||||
enemy->parent = this;
|
||||
this->action = 1;
|
||||
if (gRoomControls.roomID == 0) {
|
||||
this->field_0x78.HALF.HI = this->health = gScreenTransition.field_0x3a;
|
||||
if (gRoomControls.room == 0) {
|
||||
this->field_0x78.HALF.HI = this->health = gRoomTransition.field_0x3a;
|
||||
} else {
|
||||
this->field_0x78.HALF.HI = this->health = gScreenTransition.field_0x3b;
|
||||
this->field_0x78.HALF.HI = this->health = gRoomTransition.field_0x3b;
|
||||
}
|
||||
this->field_0x78.HALF.LO = Random();
|
||||
sub_0802EFB8(this);
|
||||
|
||||
@@ -192,7 +192,7 @@ void VaatiProjectileFunction0Action7(Entity* this) {
|
||||
sub_0803E444(this);
|
||||
LinearMoveUpdate(this);
|
||||
sub_0803E4D8(this);
|
||||
if ((gRoomControls.roomOriginY + gRoomControls.height + -0x10) <= this->y.HALF.HI) {
|
||||
if ((gRoomControls.origin_y + gRoomControls.height + -0x10) <= this->y.HALF.HI) {
|
||||
SetInitializationPriority();
|
||||
DoExitTransition((ScreenTransitionData*)&gUnk_0813AB94);
|
||||
}
|
||||
@@ -239,7 +239,7 @@ void sub_0803E480(Entity* this) {
|
||||
bool32 sub_0803E4A0(Entity* this) {
|
||||
#ifdef EU
|
||||
bool32 ret;
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
if (gRoomTransition.field_0x39 == 0) {
|
||||
return TRUE;
|
||||
} else {
|
||||
if (this->parent == NULL) {
|
||||
@@ -250,7 +250,7 @@ bool32 sub_0803E4A0(Entity* this) {
|
||||
return ret;
|
||||
#else
|
||||
bool32 ret;
|
||||
if (gScreenTransition.field_0x39 != 0) {
|
||||
if (gRoomTransition.field_0x39 != 0) {
|
||||
if (this->parent == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -245,8 +245,8 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
|
||||
tmp = this->field_0x80.HALF.HI;
|
||||
this->field_0x80.HALF.HI = tmp % 5;
|
||||
ptr = &gUnk_080D04AC[this->field_0x80.HALF.HI];
|
||||
this->x.HALF.HI = gRoomControls.roomOriginX + ptr->HALF.x + 0x10;
|
||||
this->y.HALF.HI = gRoomControls.roomOriginY + ptr->HALF.y + 0x10;
|
||||
this->x.HALF.HI = gRoomControls.origin_x + ptr->HALF.x + 0x10;
|
||||
this->y.HALF.HI = gRoomControls.origin_y + ptr->HALF.y + 0x10;
|
||||
}
|
||||
this->spriteSettings.draw = 1;
|
||||
this->actionDelay = 0x20;
|
||||
@@ -653,7 +653,7 @@ void VaatiRebornEnemyType1PreAction(Entity* this) {
|
||||
parent->direction = -1;
|
||||
this->actionDelay = 0;
|
||||
SoundReq(SONG_STOP_BGM);
|
||||
gArea.musicIndex = gArea.pMusicIndex;
|
||||
gArea.bgm = gArea.queued_bgm;
|
||||
return;
|
||||
}
|
||||
this->actionDelay = 1;
|
||||
@@ -879,15 +879,15 @@ u32 sub_0803E028(Entity* this) {
|
||||
if (this->field_0x76.HALF.HI != 1) {
|
||||
return ret;
|
||||
}
|
||||
tmp = gRoomControls.roomOriginX + 0x58;
|
||||
tmp = gRoomControls.origin_x + 0x58;
|
||||
if (tmp > gPlayerEntity.x.HALF.HI) {
|
||||
return ret;
|
||||
}
|
||||
tmp = gRoomControls.roomOriginY + 0x58;
|
||||
tmp = gRoomControls.origin_y + 0x58;
|
||||
if (tmp > gPlayerEntity.x.HALF.HI) {
|
||||
return ret;
|
||||
}
|
||||
tmp = gRoomControls.roomOriginY + 0xf8;
|
||||
tmp = gRoomControls.origin_y + 0xf8;
|
||||
if (tmp >= gPlayerEntity.x.HALF.HI) {
|
||||
this->field_0x80.HALF.HI += 5;
|
||||
ret = 1;
|
||||
|
||||
@@ -856,8 +856,8 @@ void sub_080406A0(Entity* this) {
|
||||
uVar5 = this->field_0x86.HALF.LO;
|
||||
{
|
||||
u32 tmp;
|
||||
uVar6 = gRoomControls.roomOriginX + gUnk_080D0B58[tmp = uVar5 * 2];
|
||||
uVar4 = gRoomControls.roomOriginY + gUnk_080D0B58[tmp + 1];
|
||||
uVar6 = gRoomControls.origin_x + gUnk_080D0B58[tmp = uVar5 * 2];
|
||||
uVar4 = gRoomControls.origin_y + gUnk_080D0B58[tmp + 1];
|
||||
}
|
||||
if (sub_0806FCB8(this, uVar6, uVar4, 0x1c)) {
|
||||
if (uVar5 != 0) {
|
||||
@@ -867,8 +867,8 @@ void sub_080406A0(Entity* this) {
|
||||
}
|
||||
{
|
||||
u32 tmp;
|
||||
uVar6 = gRoomControls.roomOriginX + gUnk_080D0B58[tmp = uVar5 * 2];
|
||||
uVar4 = gRoomControls.roomOriginY + gUnk_080D0B58[tmp + 1];
|
||||
uVar6 = gRoomControls.origin_x + gUnk_080D0B58[tmp = uVar5 * 2];
|
||||
uVar4 = gRoomControls.origin_y + gUnk_080D0B58[tmp + 1];
|
||||
}
|
||||
}
|
||||
uVar3 = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, uVar6, uVar4);
|
||||
@@ -891,8 +891,8 @@ void sub_08040770(Entity* this) {
|
||||
u32 tmp5, tmp6;
|
||||
{
|
||||
u32 index;
|
||||
tmp5 = gRoomControls.roomOriginX + gUnk_080D0B64[index = tmp2 * 2];
|
||||
tmp6 = gRoomControls.roomOriginY + gUnk_080D0B64[index + 1];
|
||||
tmp5 = gRoomControls.origin_x + gUnk_080D0B64[index = tmp2 * 2];
|
||||
tmp6 = gRoomControls.origin_y + gUnk_080D0B64[index + 1];
|
||||
}
|
||||
if (sub_0806FCB8(this, tmp5, tmp6, 0x1c)) {
|
||||
if (this->animationState != 2) {
|
||||
@@ -954,8 +954,8 @@ void sub_08040770(Entity* this) {
|
||||
}
|
||||
{
|
||||
u32 tmp3;
|
||||
tmp5 = gRoomControls.roomOriginX + gUnk_080D0B64[tmp3 = tmp2 * 2],
|
||||
tmp6 = gRoomControls.roomOriginY + gUnk_080D0B64[tmp3 + 1];
|
||||
tmp5 = gRoomControls.origin_x + gUnk_080D0B64[tmp3 = tmp2 * 2],
|
||||
tmp6 = gRoomControls.origin_y + gUnk_080D0B64[tmp3 + 1];
|
||||
}
|
||||
}
|
||||
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, tmp5, tmp6);
|
||||
|
||||
+22
-23
@@ -117,20 +117,20 @@ void VaatiWrathType0(Entity* this) {
|
||||
void VaatiWrathType0Action0(Entity* this) {
|
||||
u32 bVar1;
|
||||
|
||||
bVar1 = gScreenTransition.field_0x38 & 1;
|
||||
bVar1 = gRoomTransition.field_0x38 & 1;
|
||||
if (bVar1 != 0) {
|
||||
if (sub_08041FCC(this) == 0) {
|
||||
return;
|
||||
}
|
||||
if ((gScreenTransition.field_0x39 & 0xc) == 0) {
|
||||
if ((gRoomTransition.field_0x39 & 0xc) == 0) {
|
||||
this->action = 5;
|
||||
this->subAction = 1;
|
||||
} else {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x3c;
|
||||
}
|
||||
this->x.HALF.HI = gScreenTransition.hurtType;
|
||||
this->y.HALF.HI = gScreenTransition.field_0x42;
|
||||
this->x.HALF.HI = gRoomTransition.hurtType;
|
||||
this->y.HALF.HI = gRoomTransition.field_0x42;
|
||||
sub_08042004(this);
|
||||
} else {
|
||||
if (sub_08041ED4(this) == 0) {
|
||||
@@ -141,7 +141,7 @@ void VaatiWrathType0Action0(Entity* this) {
|
||||
this->actionDelay = 120;
|
||||
this->spritePriority.b1 = 0;
|
||||
this->z.HALF.HI = 0xffb0;
|
||||
gRoomControls.cameraTarget = this;
|
||||
gRoomControls.camera_target = this;
|
||||
sub_080809D4();
|
||||
}
|
||||
this->spriteSettings.draw = 1;
|
||||
@@ -209,8 +209,8 @@ void VaatiWrathType0Action1(Entity* this) {
|
||||
sub_08042004(this);
|
||||
this->subAction = 6;
|
||||
this->actionDelay = 0x1e;
|
||||
gScreenTransition.field_0x38 |= 1;
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
gRoomTransition.field_0x38 |= 1;
|
||||
gRoomControls.camera_target = &gPlayerEntity;
|
||||
gPlayerState.controlMode = 1;
|
||||
break;
|
||||
default:
|
||||
@@ -243,7 +243,7 @@ void VaatiWrathType0Action3(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
ProcessMovement(this);
|
||||
|
||||
roomY = gRoomControls.roomOriginY;
|
||||
roomY = gRoomControls.origin_y;
|
||||
bound = roomY + 0x90;
|
||||
thisY = this->y.HALF.HI;
|
||||
if ((bound < thisY)) {
|
||||
@@ -319,12 +319,12 @@ void VaatiWrathType0Action5(Entity* this) {
|
||||
} else {
|
||||
if (this->field_0x78.HALF.HI == 0) {
|
||||
if (this->subAction == 2) {
|
||||
if ((gScreenTransition.field_0x39 & 3) == 0) {
|
||||
if ((gRoomTransition.field_0x39 & 3) == 0) {
|
||||
object = CreateObject(OBJECT_B5, 0, 0);
|
||||
if (object != NULL) {
|
||||
object->parent = this;
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->object5b = object;
|
||||
gRoomControls.cameraTarget = object;
|
||||
gRoomControls.camera_target = object;
|
||||
this->action = 6;
|
||||
this->actionDelay = 0x1e;
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->type1->subAction = 1;
|
||||
@@ -374,9 +374,9 @@ void VaatiWrathType0Action7(Entity* this) {
|
||||
sub_08042214(this);
|
||||
sub_08042004(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (gRoomControls.roomOriginY + 0x48 != this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x48 != this->y.HALF.HI) {
|
||||
this->speed = 0x100;
|
||||
this->direction = ((gRoomControls.roomOriginY + 0x48) >= this->y.HALF.HI) ? 0x10 : 0;
|
||||
this->direction = ((gRoomControls.origin_y + 0x48) >= this->y.HALF.HI) ? 0x10 : 0;
|
||||
LinearMoveUpdate(this);
|
||||
} else {
|
||||
if (--this->actionDelay == 0) {
|
||||
@@ -389,8 +389,7 @@ void VaatiWrathType0Action8(Entity* this) {
|
||||
sub_08042004(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
LinearMoveUpdate(this);
|
||||
if (((gRoomControls.roomOriginX + 0x20) > this->x.HALF.HI) ||
|
||||
((gRoomControls.roomOriginX + 0x140) < this->x.HALF.HI)) {
|
||||
if (((gRoomControls.origin_x + 0x20) > this->x.HALF.HI) || ((gRoomControls.origin_x + 0x140) < this->x.HALF.HI)) {
|
||||
if (0x3f < this->speed) {
|
||||
this->direction ^= 0x10;
|
||||
}
|
||||
@@ -525,7 +524,7 @@ void VaatiWrathType0ActionC(Entity* this) {
|
||||
this->actionDelay--;
|
||||
} else {
|
||||
LinearMoveUpdate(this);
|
||||
if (gRoomControls.roomOriginY + 0x48 == this->y.HALF.HI) {
|
||||
if (gRoomControls.origin_y + 0x48 == this->y.HALF.HI) {
|
||||
this->subAction = 2;
|
||||
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type1, 0x11);
|
||||
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type2, 0x19);
|
||||
@@ -583,7 +582,7 @@ void sub_08041BE8(Entity* this) {
|
||||
DeleteEntity(entity);
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->object5b = NULL;
|
||||
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
gRoomControls.camera_target = &gPlayerEntity;
|
||||
#endif
|
||||
entity = ((VaatiWrathHeapStruct*)this->myHeap)->eyes[0];
|
||||
entity->myHeap = NULL;
|
||||
@@ -766,7 +765,7 @@ u32 sub_08041F74(Entity* this, u32 unk1) {
|
||||
}
|
||||
heap = ((VaatiWrathHeapStruct*)this->myHeap);
|
||||
arm = NULL;
|
||||
if ((gScreenTransition.field_0x39 >> unk1 & 1U) != 0) {
|
||||
if ((gRoomTransition.field_0x39 >> unk1 & 1U) != 0) {
|
||||
arm = CreateEnemy(VAATI_ARM, 0);
|
||||
arm->type2 = unk1;
|
||||
arm->parent = this;
|
||||
@@ -830,7 +829,7 @@ u32 sub_0804207C(Entity* this) {
|
||||
return sub_080045D4(arm->x.HALF.HI, arm->y.HALF.HI, x, y);
|
||||
} else {
|
||||
if (gPlayerEntity.y.HALF.HI < 0x40) {
|
||||
tmp = gRoomControls.roomOriginY + 0x18;
|
||||
tmp = gRoomControls.origin_y + 0x18;
|
||||
|
||||
} else {
|
||||
tmp = gPlayerEntity.y.HALF.HI - 0x28;
|
||||
@@ -885,7 +884,7 @@ void sub_080421AC(Entity* this) {
|
||||
this->field_0x7c.HALF_U.HI--;
|
||||
} else {
|
||||
if (this->field_0x78.HALF.HI == 0) {
|
||||
if (((Random() & 1) != 0) && ((gScreenTransition.field_0x39 & 0xc) != 0)) {
|
||||
if (((Random() & 1) != 0) && ((gRoomTransition.field_0x39 & 0xc) != 0)) {
|
||||
sub_08042264(this);
|
||||
this->field_0x78.HALF.HI = 1;
|
||||
return;
|
||||
@@ -991,9 +990,9 @@ void sub_0804235C(Entity* this) {
|
||||
#if defined USA || defined DEMO_USA || defined DEMO_JP
|
||||
void VaatiWrathType0PreAction(Entity* this) {
|
||||
int temp;
|
||||
if ((gScreenTransition.field_0x38 & 2) == 0) {
|
||||
if (gSave.unk48C[3] != 0) {
|
||||
gSave.unk48C[3]--;
|
||||
if ((gRoomTransition.field_0x38 & 2) == 0) {
|
||||
if (gSave.timers[3] != 0) {
|
||||
gSave.timers[3]--;
|
||||
} else {
|
||||
temp = gPlayerState.framestate_last;
|
||||
if (temp < 2) {
|
||||
@@ -1002,7 +1001,7 @@ void VaatiWrathType0PreAction(Entity* this) {
|
||||
if (gPlayerEntity.field_0x7a.HWORD == 0) {
|
||||
if ((gPlayerEntity.z.HALF.HI & 0x8000U) == 0 || (gPlayerState.field_0xa != 0)) {
|
||||
CreateEzloHint(0xb70, 0);
|
||||
gScreenTransition.field_0x38 |= 2;
|
||||
gRoomTransition.field_0x38 |= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ void VaatiWrathEye(Entity* this) {
|
||||
}
|
||||
|
||||
void VaatiWrathEyeAction0(Entity* this) {
|
||||
if ((gScreenTransition.field_0x38 & 1) != 0) {
|
||||
if ((gRoomTransition.field_0x38 & 1) != 0) {
|
||||
this->action = 2;
|
||||
InitializeAnimation(this, 1);
|
||||
} else {
|
||||
@@ -57,7 +57,7 @@ void VaatiWrathEyeAction1(Entity* this) {
|
||||
|
||||
void VaatiWrathEyeAction2(Entity* this) {
|
||||
sub_080485D8(this);
|
||||
if ((gScreenTransition.field_0x39 & 3) == 0) {
|
||||
if ((gRoomTransition.field_0x39 & 3) == 0) {
|
||||
this->action = 3;
|
||||
COLLISION_ON(this);
|
||||
this->speed = 0x80;
|
||||
|
||||
@@ -59,8 +59,8 @@ void sub_0802A2FC(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0802A334(Entity* this) {
|
||||
u32 x = (this->x.HALF.HI - gRoomControls.roomScrollX + gScreen.bg1.xOffset) >> 3;
|
||||
u32 y = (this->y.HALF.HI - gRoomControls.roomScrollY + gScreen.bg1.yOffset) >> 3;
|
||||
u32 x = (this->x.HALF.HI - gRoomControls.scroll_x + gScreen.bg1.xOffset) >> 3;
|
||||
u32 y = (this->y.HALF.HI - gRoomControls.scroll_y + gScreen.bg1.yOffset) >> 3;
|
||||
if (gBG3Buffer[(x & 0x1fU) + (y & 0x1fU) * 0x20 + 0x400]) {
|
||||
this->collisionLayer = 2;
|
||||
} else {
|
||||
@@ -70,8 +70,8 @@ void sub_0802A334(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0802A39C(Entity* this) {
|
||||
u32 x = (gPlayerEntity.x.HALF.HI - gRoomControls.roomScrollX + gScreen.bg1.xOffset) >> 3;
|
||||
u32 y = (gPlayerEntity.y.HALF.HI - gRoomControls.roomScrollY + gScreen.bg1.yOffset - 10) >> 3;
|
||||
u32 x = (gPlayerEntity.x.HALF.HI - gRoomControls.scroll_x + gScreen.bg1.xOffset) >> 3;
|
||||
u32 y = (gPlayerEntity.y.HALF.HI - gRoomControls.scroll_y + gScreen.bg1.yOffset - 10) >> 3;
|
||||
if (gBG3Buffer[(x & 0x1fU) + (y & 0x1fU) * 0x20 + 0x400]) {
|
||||
COLLISION_OFF(this);
|
||||
} else {
|
||||
|
||||
+3
-1
@@ -3,6 +3,8 @@
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
static void sub_08033744(Entity* this);
|
||||
|
||||
extern void (*const gUnk_080CEB74[])(Entity*);
|
||||
extern void (*const gUnk_080CEB8C[])(Entity*);
|
||||
extern void (*const gUnk_080CEB98[])(Entity*);
|
||||
@@ -120,7 +122,7 @@ void sub_080336DC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08033744(Entity* this) {
|
||||
static void sub_08033744(Entity* this) {
|
||||
u32 temp;
|
||||
u32 rand = (u32)Random() % 256;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user