mirror of
https://github.com/zeldaret/tmc
synced 2026-07-27 06:45:35 -04:00
remove redundant unions
This commit is contained in:
+10
-10
@@ -17,10 +17,10 @@ void Manager1_Main(Entity* this) {
|
||||
u8* pbVar2;
|
||||
|
||||
gUnk_08107C5C[this->action](this);
|
||||
gUnk_08107C48[((u8*)&this->hVelocity)[1]](this);
|
||||
bVar1 = gUnk_08107C40[((u8*)&this->hVelocity)[1]];
|
||||
if ((bVar1 != 0) && (*(u8*)&this->hVelocity != bVar1)) {
|
||||
((u8*)&this->hVelocity)[0] = bVar1;
|
||||
gUnk_08107C48[((u8*)&this->zVelocity)[1]](this);
|
||||
bVar1 = gUnk_08107C40[((u8*)&this->zVelocity)[1]];
|
||||
if ((bVar1 != 0) && (*(u8*)&this->zVelocity != bVar1)) {
|
||||
((u8*)&this->zVelocity)[0] = bVar1;
|
||||
LoadGfxGroup(bVar1);
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,9 @@ void Manager1_Main(Entity* this) {
|
||||
void sub_080570B8(Entity* this) {
|
||||
u8* pbVar1;
|
||||
|
||||
LoadGfxGroup(((u8*)&this->hVelocity)[0]);
|
||||
this->height.WORD = 0;
|
||||
pbVar1 = ((u8*)&this->hVelocity + 1);
|
||||
LoadGfxGroup(((u8*)&this->zVelocity)[0]);
|
||||
this->z.WORD = 0;
|
||||
pbVar1 = ((u8*)&this->zVelocity + 1);
|
||||
if (*pbVar1 == 3) {
|
||||
gScreen.bg3.updated = 1;
|
||||
} else {
|
||||
@@ -46,9 +46,9 @@ void sub_080570F8(void) {
|
||||
|
||||
void sub_08057118(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
*(u8*)&this->hVelocity = 0;
|
||||
((u8*)&this->hVelocity)[1] = 0;
|
||||
((u8*)&this->hVelocity)[2] = 0;
|
||||
*(u8*)&this->zVelocity = 0;
|
||||
((u8*)&this->zVelocity)[1] = 0;
|
||||
((u8*)&this->zVelocity)[2] = 0;
|
||||
this->action = 1;
|
||||
gScreen.bg3.control = 0x1e04;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
|
||||
@@ -295,7 +295,7 @@ void sub_0805A758(Manager15* this) {
|
||||
}
|
||||
|
||||
void sub_0805A76C(Manager15* this) {
|
||||
if ((gPlayerEntity.currentHealth != 0) && (gPlayerEntity.height.HALF.HI == 0) && (!gPlayerState.field_0x2c)) {
|
||||
if ((gPlayerEntity.health != 0) && (gPlayerEntity.z.HALF.HI == 0) && (!gPlayerState.field_0x2c)) {
|
||||
switch (gPlayerState.field_0xa9) {
|
||||
case 1:
|
||||
case 0:
|
||||
|
||||
@@ -27,7 +27,7 @@ void sub_0805B55C(Manager* manager) {
|
||||
if (waterDrop != NULL) {
|
||||
waterDrop->x.HALF.HI = gRoomControls.roomScrollX + 0x78 + gUnk_08108C6C[Random() & 7];
|
||||
waterDrop->y.HALF.HI = gRoomControls.roomScrollY + 0x50 + gUnk_08108C7C[Random() & 3];
|
||||
waterDrop->height.HALF.HI = 0xff38;
|
||||
waterDrop->z.HALF.HI = 0xff38;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ void Manager2C_Main(Manager2C* manager) {
|
||||
manager->field_0x3a = 0;
|
||||
}
|
||||
if (((CheckPlayerInRegion(manager->field_0x38, manager->field_0x3a, 0x14, 0x40) != 0) &&
|
||||
(((gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY) + gPlayerEntity.height.HALF.HI) < 0)) &&
|
||||
(((gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY) + gPlayerEntity.z.HALF.HI) < 0)) &&
|
||||
(gRoomControls.roomScrollY == gRoomControls.roomOriginY)) {
|
||||
MemClear(&gScreenTransition.areaID, 0x20);
|
||||
gScreenTransition.transitioningOut = 1;
|
||||
|
||||
@@ -11,7 +11,7 @@ void Manager33_Main(Manager* this) {
|
||||
u32 b = roomControls->roomOriginY + 0x140;
|
||||
u32 y = (b - gPlayerEntity.y.HALF.HI) + 0x10;
|
||||
if (this->action == 0) {
|
||||
if (x < 0x20 && y < 0x20 && gPlayerEntity.height.HALF.HI < -0x18 && gPlayerState.field_0xa8 == 0x14) {
|
||||
if (x < 0x20 && y < 0x20 && gPlayerEntity.z.HALF.HI < -0x18 && gPlayerState.field_0xa8 == 0x14) {
|
||||
this->action += 1;
|
||||
this->unk_0e = 0x5a;
|
||||
SoundReq(SFX_10A);
|
||||
@@ -22,7 +22,7 @@ void Manager33_Main(Manager* this) {
|
||||
if (object != NULL) {
|
||||
object->x.HALF.HI = roomControls->roomOriginX + 0x1f8;
|
||||
object->y.HALF.HI = roomControls->roomOriginY + 0x140;
|
||||
object->height.HALF.HI = 0xffe8;
|
||||
object->z.HALF.HI = 0xffe8;
|
||||
}
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void sub_0805DEB8(Manager* this) {
|
||||
|
||||
void sub_0805DF4C(Manager* this) {
|
||||
gPlayerEntity.animationState = 0;
|
||||
if (gPlayerEntity.height.HALF.HI != 0) {
|
||||
if (gPlayerEntity.z.HALF.HI != 0) {
|
||||
if (gPlayerEntity.y.HALF.HI < (gRoomControls.roomOriginY + 0x48)) {
|
||||
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x48;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,7 @@ void Manager6_Main(Manager6* this) {
|
||||
tmp = (i->unk_07.all & 0x3);
|
||||
if (((tmp & (gPlayerEntity.collisionLayer)) != 0) &&
|
||||
(((gPlayerState.flags & 0x80) != 0) || ((i->unk_07.b.unk2) != 0)) &&
|
||||
(CheckPlayerInRegion(i->posX, i->posY, i->width, i->height) != 0) &&
|
||||
(gPlayerEntity.height.HALF.HI == 0)) {
|
||||
(CheckPlayerInRegion(i->posX, i->posY, i->width, i->height) != 0) && (gPlayerEntity.z.HALF.HI == 0)) {
|
||||
DoExitTransition(GetCurrentRoomProperty(i->unk_06));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ void sub_08058514(ManagerA* this) {
|
||||
case 1:
|
||||
if ((gPlayerState.flags & 0x1235) != 0)
|
||||
return;
|
||||
if (gPlayerEntity.height.HALF.HI != 0)
|
||||
if (gPlayerEntity.z.HALF.HI != 0)
|
||||
return;
|
||||
gPlayerState.jumpStatus = 0;
|
||||
sub_08078AA8(this->unk_36, this->unk_35);
|
||||
|
||||
@@ -155,7 +155,7 @@ void sub_08058A04(ManagerC* this) {
|
||||
s32 tmp = gPlayerEntity.x.HALF.HI - gRoomControls.roomOriginX;
|
||||
s32 tmp2 = gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY;
|
||||
if ((this->unk_20 - 0x118 < 0xDu) && CheckGlobalFlag(LV1TARU_OPEN) && (tmp - 0x6d < 0x17u) &&
|
||||
(tmp2 - 0x45 < 0x17u) && (gPlayerEntity.height.HALF.HI == 0)) {
|
||||
(tmp2 - 0x45 < 0x17u) && (gPlayerEntity.z.HALF.HI == 0)) {
|
||||
gPlayerState.playerAction = 3;
|
||||
gPlayerState.field_0x38 = 0;
|
||||
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x78;
|
||||
|
||||
Reference in New Issue
Block a user