mirror of
https://github.com/zeldaret/tmc
synced 2026-08-02 00:24:31 -04:00
Merge branch 'master' into asset-extraction
This commit is contained in:
@@ -17,10 +17,10 @@ void Manager1_Main(Entity* this) {
|
||||
u8* pbVar2;
|
||||
|
||||
gUnk_08107C5C[this->action](this);
|
||||
gUnk_08107C48[((u8*)&this->field_0x20)[1]](this);
|
||||
bVar1 = gUnk_08107C40[((u8*)&this->field_0x20)[1]];
|
||||
if ((bVar1 != 0) && (*(u8*)&this->field_0x20 != bVar1)) {
|
||||
((u8*)&this->field_0x20)[0] = bVar1;
|
||||
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;
|
||||
LoadGfxGroup(bVar1);
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,9 @@ void Manager1_Main(Entity* this) {
|
||||
void sub_080570B8(Entity* this) {
|
||||
u8* pbVar1;
|
||||
|
||||
LoadGfxGroup(((u8*)&this->field_0x20)[0]);
|
||||
LoadGfxGroup(((u8*)&this->hVelocity)[0]);
|
||||
this->height.WORD = 0;
|
||||
pbVar1 = ((u8*)&this->field_0x20 + 1);
|
||||
pbVar1 = ((u8*)&this->hVelocity + 1);
|
||||
if (*pbVar1 == 3) {
|
||||
gScreen.affine.bg3Updated = 1;
|
||||
} else {
|
||||
@@ -46,9 +46,9 @@ void sub_080570F8(void) {
|
||||
|
||||
void sub_08057118(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
*(u8*)&this->field_0x20 = 0;
|
||||
((u8*)&this->field_0x20)[1] = 0;
|
||||
((u8*)&this->field_0x20)[2] = 0;
|
||||
*(u8*)&this->hVelocity = 0;
|
||||
((u8*)&this->hVelocity)[1] = 0;
|
||||
((u8*)&this->hVelocity)[2] = 0;
|
||||
this->action = 1;
|
||||
gScreen.affine.bg3Control = 0x1e04;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
|
||||
@@ -253,8 +253,6 @@ void sub_0805A664(Manager15* this) {
|
||||
sub_0805A68C(this);
|
||||
}
|
||||
|
||||
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
|
||||
void sub_0805A68C(Manager15* this) {
|
||||
if (CheckPlayerProximity(this->unk_38 - 0x18, this->unk_3a - 0x18, 0x30, 0x30)) {
|
||||
if (this->unk_2c <= 0x1007) {
|
||||
|
||||
@@ -32,7 +32,6 @@ void Manager1A_Main(Manager1A* this) {
|
||||
}
|
||||
|
||||
extern void sub_08052D74(void*, void*, void*);
|
||||
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
|
||||
typedef struct struct_08108764 {
|
||||
u8 unk_00;
|
||||
@@ -140,9 +139,9 @@ void sub_0805B168(Manager1A* this) {
|
||||
u32 sub_0805B1CC(Manager1A* this) {
|
||||
u32 re = 0;
|
||||
if (CheckPlayerProximity(this->unk_20, this->unk_22, this->unk_24, this->unk_26)) {
|
||||
if ((gPlayerState.flags.all & 0x4) && (gPlayerState.flags.all & 0x1)) {
|
||||
gPlayerState.flags.all |= 0x8000;
|
||||
} else if (gPlayerState.flags.all & 0x8000) {
|
||||
if ((gPlayerState.flags & 0x4) && (gPlayerState.flags & 0x1)) {
|
||||
gPlayerState.flags |= 0x8000;
|
||||
} else if (gPlayerState.flags & 0x8000) {
|
||||
re = 1;
|
||||
}
|
||||
}
|
||||
@@ -158,7 +157,7 @@ void sub_0805B210(Manager1A* this) {
|
||||
gScreenTransition.areaID = tmp->unk_01;
|
||||
gScreenTransition.roomID = tmp->unk_02;
|
||||
gScreenTransition.playerLayer = tmp->unk_03;
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
if (gPlayerState.flags & 0x80) {
|
||||
gScreenTransition.field_0xf = 6;
|
||||
} else {
|
||||
gScreenTransition.field_0xf = 2;
|
||||
|
||||
@@ -76,7 +76,7 @@ void sub_0805C7C4(Manager26* this) {
|
||||
}
|
||||
|
||||
void sub_0805C7CC(Manager26* this) {
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
if (gPlayerState.flags & 0x80) {
|
||||
if (gPlayerEntity.y.HALF.HI < this->unk_2a + 0x10) {
|
||||
this->manager.unk_0d = 1;
|
||||
} else {
|
||||
|
||||
+10
-10
@@ -7,6 +7,7 @@
|
||||
#include "random.h"
|
||||
#include "audio.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
// Facilitates the usage of minish portals.
|
||||
|
||||
@@ -25,10 +26,9 @@ typedef struct {
|
||||
} Manager3;
|
||||
|
||||
extern s8 gUnk_08107C6C[];
|
||||
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
extern u32 sub_08057810(void);
|
||||
extern u32 sub_080002C0(u16, u16, u8);
|
||||
extern void sub_080577AC(u32, u32, u32);
|
||||
extern void CreateMagicSparkles(u32, u32, u32);
|
||||
|
||||
void Manager3_Main(Manager3* this) {
|
||||
s8 tmp;
|
||||
@@ -47,7 +47,7 @@ void Manager3_Main(Manager3* this) {
|
||||
gArea.field_0x18 = 1;
|
||||
gArea.curPortalType = 5;
|
||||
} else {
|
||||
if ((gPlayerState.flags.all & 0x20) && gPlayerState.jumpStatus == 0) {
|
||||
if ((gPlayerState.flags & 0x20) && gPlayerState.jumpStatus == 0) {
|
||||
gArea.field_0x18 = 2;
|
||||
} else {
|
||||
if (sub_08057810()) {
|
||||
@@ -55,11 +55,11 @@ void Manager3_Main(Manager3* this) {
|
||||
}
|
||||
}
|
||||
if (sub_080002C0(this->unk_38, this->unk_3a, this->manager.unk_0e) == 0x3d) {
|
||||
sub_080577AC(this->unk_38 + gRoomControls.roomOriginX, this->unk_3a + gRoomControls.roomOriginY,
|
||||
this->manager.unk_0e);
|
||||
CreateMagicSparkles(this->unk_38 + gRoomControls.roomOriginX, this->unk_3a + gRoomControls.roomOriginY,
|
||||
this->manager.unk_0e);
|
||||
if (!this->manager.unk_0f) {
|
||||
this->manager.unk_0f = 1;
|
||||
SoundReq(SFX_152);
|
||||
SoundReq(SFX_NEAR_PORTAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,15 +69,15 @@ void Manager3_Main(Manager3* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080577AC(u32 baseX, u32 baseY, u32 layer) {
|
||||
void CreateMagicSparkles(u32 baseX, u32 baseY, u32 layer) {
|
||||
u32 r;
|
||||
int offsetX, offsetY;
|
||||
Entity* spark;
|
||||
r = Random();
|
||||
if ((r & 0x7) != 0)
|
||||
if (r & 0x7)
|
||||
return;
|
||||
spark = CreateObject(SPECIAL_FX, 0x26, 0);
|
||||
if (!spark)
|
||||
if (spark == NULL)
|
||||
return;
|
||||
offsetX = (r >> 0x8) & 0xF;
|
||||
offsetY = ((r >> 0x10) & 0xF);
|
||||
@@ -94,7 +94,7 @@ void sub_080577AC(u32 baseX, u32 baseY, u32 layer) {
|
||||
}
|
||||
|
||||
u32 sub_08057810(void) {
|
||||
if ((gPlayerState.flags.all & 0x80) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) &&
|
||||
if ((gPlayerState.flags & 0x80) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) &&
|
||||
(gPlayerState.heldObject == 0)) {
|
||||
switch (gPlayerState.field_0xa8) {
|
||||
case 0:
|
||||
|
||||
@@ -79,13 +79,13 @@ void sub_0805DF4C(Manager* this) {
|
||||
if (--this->unk_0e == 0) {
|
||||
this->action = 3;
|
||||
this->unk_0e = 0x1e;
|
||||
TextboxNoOverlapFollow(0x164f);
|
||||
MessageFromTarget(0x164f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0805DF98(Manager* this) {
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
if (this->unk_0e != 0) {
|
||||
this->unk_0e -= 1;
|
||||
} else {
|
||||
|
||||
@@ -37,7 +37,7 @@ void sub_0805E1F8(u32, u32);
|
||||
|
||||
void Manager39_Main(Manager39* this) {
|
||||
gUnk_08108E28[this->manager.action](this);
|
||||
if ((gRoomControls.roomID != this->unk_20) || (gTextBox.doTextBox & 0x7F)) {
|
||||
if ((gRoomControls.roomID != this->unk_20) || (gMessage.doTextBox & 0x7F)) {
|
||||
sub_0805E1D8(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ void Manager6_Main(Manager6* this) {
|
||||
for (i = this->warpList; i->posX != 0xFFFF; i++) {
|
||||
tmp = (i->unk_07.all & 0x3);
|
||||
if (((tmp & (gPlayerEntity.collisionLayer)) != 0) &&
|
||||
(((gPlayerState.flags.all & 0x80) != 0) || ((i->unk_07.b.unk2) != 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)) {
|
||||
DoExitTransition(GetCurrentRoomProperty(i->unk_06));
|
||||
|
||||
@@ -49,7 +49,7 @@ void sub_080585DC(ManagerA*);
|
||||
|
||||
void sub_08058408(ManagerA* this) {
|
||||
u32 tmp2;
|
||||
tmp2 = (gPlayerState.flags.all & 0x08);
|
||||
tmp2 = (gPlayerState.flags & 0x08);
|
||||
if (tmp2 != 0)
|
||||
return;
|
||||
if (!CheckPlayerInRegion(this->unk_20, this->unk_22, this->unk_24, this->unk_26))
|
||||
@@ -59,7 +59,7 @@ void sub_08058408(ManagerA* this) {
|
||||
return;
|
||||
case 2:
|
||||
sub_080585DC(this);
|
||||
if ((gPlayerState.flags.all & 0x80) == 0)
|
||||
if ((gPlayerState.flags & 0x80) == 0)
|
||||
return;
|
||||
case 0:
|
||||
default:
|
||||
@@ -118,7 +118,7 @@ extern void UnfreezeTime(void);
|
||||
void sub_08058514(ManagerA* this) {
|
||||
switch (this->manager.unk_0d) {
|
||||
case 1:
|
||||
if ((gPlayerState.flags.all & 0x1235) != 0)
|
||||
if ((gPlayerState.flags & 0x1235) != 0)
|
||||
return;
|
||||
if (gPlayerEntity.height.HALF.HI != 0)
|
||||
return;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "textbox.h"
|
||||
#include "script.h"
|
||||
#include "utils.h"
|
||||
#include "tiles.h"
|
||||
|
||||
void sub_08058ECC(ManagerF*);
|
||||
|
||||
@@ -335,14 +336,14 @@ void sub_0805930C(ManagerF* this) {
|
||||
}
|
||||
|
||||
void SetDirtTile(u32 tile) {
|
||||
SetTileType(0x1d, tile, 1);
|
||||
SetTileType(CUT_GRASS, tile, 1);
|
||||
SetTileType(0, tile, 2);
|
||||
SetTileType(0, tile - 0x40, 2);
|
||||
}
|
||||
|
||||
void sub_08059368(ManagerF* this) {
|
||||
this->manager.action = 1;
|
||||
if (this->unk_3c == gCurrentTextBox._28) {
|
||||
if (this->unk_3c == gTextRender.curToken.textIndex) {
|
||||
SetFlag(this->unk_3e);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -359,7 +360,7 @@ void sub_0805938C(ManagerF* this) {
|
||||
}
|
||||
|
||||
u32 sub_080593CC(ManagerF* this) {
|
||||
if (!(gPlayerState.flags.all & 0x80) && gPlayerState.swimState != 0 && gPlayerEntity.animationState == 0 &&
|
||||
if (!(gPlayerState.flags & 0x80) && gPlayerState.swimState != 0 && gPlayerEntity.animationState == 0 &&
|
||||
(gPlayerState.field_0x90.HALF.LO & 0xF00) == 0x400) {
|
||||
return sub_0806FCB8(&gPlayerEntity, this->unk_38, this->unk_3a + 0xC, 6);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user