mirror of
https://github.com/zeldaret/tmc
synced 2026-07-30 16:04:07 -04:00
cleanup
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_08056250(void);
|
||||
extern void sub_080570B8(Entity*);
|
||||
void sub_080570F8(void);
|
||||
|
||||
extern void (*const gUnk_08107C5C[])(Entity*);
|
||||
extern void (*const gUnk_08107C48[])(Entity*);
|
||||
@@ -25,7 +23,7 @@ void Manager1_Main(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080570B8(Entity* this) {
|
||||
static void sub_080570B8(Entity* this) {
|
||||
u8* pbVar1;
|
||||
|
||||
LoadGfxGroup(((u8*)&this->zVelocity)[0]);
|
||||
@@ -38,8 +36,8 @@ void sub_080570B8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080570F8(void) {
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
static void sub_080570F8(void) {
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
sub_08056250();
|
||||
}
|
||||
@@ -51,7 +49,7 @@ void sub_08057118(Entity* this) {
|
||||
((u8*)&this->zVelocity)[2] = 0;
|
||||
this->action = 1;
|
||||
gScreen.bg3.control = 0x1e04;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0x3648;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
RegisterTransitionManager(this, sub_080570B8, sub_080570F8);
|
||||
|
||||
@@ -15,7 +15,7 @@ void sub_08059A58(Manager12*);
|
||||
|
||||
void sub_08059A2C(Manager12*);
|
||||
|
||||
u32 sub_08056300(u16* arr);
|
||||
u32 CheckRegionsOnScreen(u16* arr);
|
||||
extern u16 gUnk_081083DA;
|
||||
extern u16 gUnk_081083F2;
|
||||
extern u16 gUnk_08108398;
|
||||
@@ -48,7 +48,7 @@ void Manager12_Main(Manager12* this) {
|
||||
this->field_0x21 = 0xff;
|
||||
this->field_0x20 = 0xff;
|
||||
RegisterTransitionManager(this, sub_08059A2C, NULL);
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
sub_08059A58(this);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ void sub_08059B18(void) {
|
||||
bool32 sub_08059C8C(Manager12* this, u32 param_2, u8* param_3, u16* param_4) {
|
||||
bool32 bVar2;
|
||||
|
||||
*param_3 = sub_08056300(param_4);
|
||||
*param_3 = CheckRegionsOnScreen(param_4);
|
||||
if ((*param_3 != 0xff) && (gRoomVars.unk_10[param_2] != *param_3)) {
|
||||
gRoomVars.unk_10[param_2] = *param_3;
|
||||
return TRUE;
|
||||
@@ -154,24 +154,24 @@ void TryLoadPrologueHyruleTown(void) {
|
||||
u32 tmp;
|
||||
|
||||
if (gRoomControls.areaID != AREA_FESTIVAL_TOWN) {
|
||||
tmp = sub_08056300(&gUnk_08108398);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_08108398);
|
||||
if (tmp != 0xff) {
|
||||
sub_08059CC0(0, tmp);
|
||||
}
|
||||
tmp = sub_08056300(&gUnk_081083AE);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_081083AE);
|
||||
if ((tmp != 0xff) && (sub_08059CC0(1, tmp), tmp == 2)) {
|
||||
sub_08059B18();
|
||||
}
|
||||
tmp = sub_08056300(&gUnk_081083C4);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_081083C4);
|
||||
if (tmp != 0xff) {
|
||||
sub_08059CC0(2, tmp);
|
||||
}
|
||||
} else {
|
||||
tmp = sub_08056300(&gUnk_081083DA);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_081083DA);
|
||||
if (tmp != 0xff) {
|
||||
sub_08059CC0(0, tmp);
|
||||
}
|
||||
tmp = sub_08056300(&gUnk_081083F2);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_081083F2);
|
||||
if (tmp != 0xff) {
|
||||
sub_08059CC0(2, tmp);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ void sub_08059E80(Manager14* this) {
|
||||
this->manager.action = 4;
|
||||
this->manager.unk_10 |= 0x20;
|
||||
gScreen.bg3.control = 0x1E04;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0x3E48;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
gScreen.bg3.xOffset = 0x80;
|
||||
@@ -142,7 +142,7 @@ void sub_0805A0C0(Manager14* this) {
|
||||
this->manager.unk_0f = 4;
|
||||
gScreen.controls.alphaBlend = gUnk_08108588[this->manager.unk_0e--];
|
||||
if (this->manager.unk_0e == 0xFF) {
|
||||
gScreen.lcd.displayControl &= ~0x800;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
sub_08056250();
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -179,7 +179,7 @@ void sub_0805A1D8(Manager14* this) {
|
||||
gScreen.bg3.xOffset = gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gRoomControls.bg3OffsetY.WORD -= 0x1000;
|
||||
gScreen.bg3.yOffset = gRoomControls.bg3OffsetY.HALF.HI;
|
||||
if (gScreen.lcd.displayControl & 0x800) {
|
||||
if (gScreen.lcd.displayControl & DISPCNT_BG3_ON) {
|
||||
sub_0805A114(6, this->unk_20 >> 1);
|
||||
if (this->unk_22 == 0 && (gMain.ticks & 0x1F) == 0) {
|
||||
this->unk_24++;
|
||||
@@ -194,6 +194,6 @@ void nullsub_495() {
|
||||
|
||||
void sub_0805A25C() {
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
gScreen.lcd.displayControl &= ~0x800;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
sub_08056250();
|
||||
}
|
||||
|
||||
+41
-39
@@ -46,7 +46,7 @@ void sub_0805A298(Manager15* this) {
|
||||
this->unk_23 = 2;
|
||||
}
|
||||
sub_0805AAF0(this->unk_23);
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
}
|
||||
sub_0805A8EC(this);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ void sub_0805A2E4(Manager15* this) {
|
||||
} else {
|
||||
this->manager.action = 3;
|
||||
}
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
}
|
||||
} else {
|
||||
gUnk_081085F8[this->manager.action](this);
|
||||
@@ -96,7 +96,7 @@ void sub_0805A394(Manager15* this) {
|
||||
}
|
||||
SetLocalFlag(LV1_16_1STEND);
|
||||
ClearRoomFlag(0);
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -117,11 +117,11 @@ void sub_0805A3D4(Manager15* this) {
|
||||
if (!CheckLocalFlag(this->unk_3e)) {
|
||||
ClearFlag(this->unk_3c);
|
||||
this->manager.action = 1;
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
} else {
|
||||
SetFlag(this->unk_3c);
|
||||
this->manager.action = 3;
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
}
|
||||
} else {
|
||||
gUnk_0810860C[this->manager.action](this);
|
||||
@@ -181,16 +181,16 @@ void sub_0805A500(Manager15* this) {
|
||||
if (CheckLocalFlag(0x36)) {
|
||||
this->unk_23 = 3;
|
||||
this->manager.action = 5;
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
} else {
|
||||
if (CheckLocalFlag(0x34)) {
|
||||
this->unk_23 = 4;
|
||||
this->manager.action = 3;
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
} else {
|
||||
this->unk_23 = 4;
|
||||
this->manager.action = 1;
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
}
|
||||
}
|
||||
sub_0805AAF0(this->unk_23);
|
||||
@@ -200,7 +200,7 @@ void sub_0805A500(Manager15* this) {
|
||||
sub_0805AA58(this);
|
||||
sub_0805A9CC(this);
|
||||
if (gRoomControls.unk2 == 1) {
|
||||
gScreen.lcd.displayControl |= 0x80 << 7;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON;
|
||||
this->manager.unk_0d = 1;
|
||||
return;
|
||||
}
|
||||
@@ -209,7 +209,7 @@ void sub_0805A500(Manager15* this) {
|
||||
this->manager.unk_0d = 0;
|
||||
if (this->unk_20 == gRoomControls.roomID)
|
||||
return;
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -281,12 +281,12 @@ void sub_0805A6E8(Manager15* this) {
|
||||
this->manager.action++;
|
||||
}
|
||||
this->unk_2c = 0x1000;
|
||||
tmp = gScreen.lcd.displayControl | 0x4800;
|
||||
tmp = gScreen.lcd.displayControl | DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
gScreen.lcd.displayControl = tmp;
|
||||
}
|
||||
|
||||
u32 sub_0805A73C(Manager15* this) {
|
||||
return CheckPlayerProximity(this->unk_38 - 0x6, this->unk_3a - 0x6, 0xC, 0xC);
|
||||
return CheckPlayerProximity(this->unk_38 - 6, this->unk_3a - 6, 12, 12);
|
||||
}
|
||||
|
||||
void sub_0805A758(Manager15* this) {
|
||||
@@ -304,10 +304,10 @@ void sub_0805A76C(Manager15* this) {
|
||||
this->manager.action++;
|
||||
sub_08004168(&gPlayerEntity);
|
||||
gPlayerEntity.animationState = 4;
|
||||
RequestPriorityDuration((Entity*)this, 0x258);
|
||||
RequestPriorityDuration((Entity*)this, 600);
|
||||
SetPlayerControl(0xFF);
|
||||
gUnk_02034490[0] = 1;
|
||||
gRoomControls.cameraTarget = 0;
|
||||
gRoomControls.cameraTarget = NULL;
|
||||
sub_08077B20();
|
||||
}
|
||||
}
|
||||
@@ -315,8 +315,8 @@ void sub_0805A76C(Manager15* this) {
|
||||
}
|
||||
|
||||
void sub_0805A7E4(Manager15* this) {
|
||||
if (gPlayerState.playerAction != 0x12) {
|
||||
gPlayerState.playerAction = 0x12;
|
||||
if (gPlayerState.playerAction != PLAYER_WARP) {
|
||||
gPlayerState.playerAction = PLAYER_WARP;
|
||||
gPlayerState.field_0x38 = 0;
|
||||
gPlayerState.field_0x39 = 0;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ void sub_0805A804(Manager15* this) {
|
||||
}
|
||||
this->manager.unk_0d = 1;
|
||||
this->manager.unk_10 |= 0x20;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
break;
|
||||
case 1:
|
||||
if (CheckLocalFlag(this->unk_3e))
|
||||
@@ -364,7 +364,7 @@ void sub_0805A804(Manager15* this) {
|
||||
void sub_0805AAC8(Manager15*);
|
||||
|
||||
void sub_0805A89C(Manager15* this) {
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
this->manager.action = 1;
|
||||
this->manager.unk_10 |= 0x20;
|
||||
this->manager.unk_0e = 8;
|
||||
@@ -383,7 +383,7 @@ void sub_0805A8EC(Manager15* this) {
|
||||
sub_0805AA58(this);
|
||||
sub_0805A94C(this);
|
||||
if (gRoomControls.unk2 == 1) {
|
||||
gScreen.lcd.displayControl |= 0x4000;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON;
|
||||
this->manager.unk_0d = 1;
|
||||
} else {
|
||||
if (!this->manager.unk_0d)
|
||||
@@ -391,7 +391,7 @@ void sub_0805A8EC(Manager15* this) {
|
||||
this->manager.unk_0d = 0;
|
||||
if (this->unk_20 == gRoomControls.roomID)
|
||||
return;
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
@@ -404,23 +404,23 @@ void sub_0805A94C(Manager15* this) {
|
||||
tmp2 = tmp1 + 0x100;
|
||||
if (tmp1 < 0)
|
||||
tmp1 = 0;
|
||||
if (tmp1 > 0xF0)
|
||||
tmp1 = 0xF0;
|
||||
if (tmp1 > DISPLAY_WIDTH)
|
||||
tmp1 = DISPLAY_WIDTH;
|
||||
if (tmp2 < 0)
|
||||
tmp2 = 0;
|
||||
if (tmp2 > 0xF0)
|
||||
tmp2 = 0xF0;
|
||||
if (tmp2 > DISPLAY_WIDTH)
|
||||
tmp2 = DISPLAY_WIDTH;
|
||||
gScreen.controls.window1HorizontalDimensions = (tmp1 << 8 | tmp2);
|
||||
tmp1 = -gScreen.bg3.yOffset;
|
||||
tmp2 = tmp1 + 0x100;
|
||||
if (tmp1 < 0)
|
||||
tmp1 = 0;
|
||||
if (tmp1 > 0xA0)
|
||||
tmp1 = 0xA0;
|
||||
if (tmp1 > DISPLAY_HEIGHT)
|
||||
tmp1 = DISPLAY_HEIGHT;
|
||||
if (tmp2 < 0)
|
||||
tmp2 = 0;
|
||||
if (tmp2 > 0xA0)
|
||||
tmp2 = 0xA0;
|
||||
if (tmp2 > DISPLAY_HEIGHT)
|
||||
tmp2 = DISPLAY_HEIGHT;
|
||||
gScreen.controls.window1VerticalDimensions = (tmp1 << 8 | tmp2);
|
||||
}
|
||||
|
||||
@@ -432,18 +432,18 @@ void sub_0805A9CC(Manager15* this) {
|
||||
tmp2 = tmp1 + 0x100;
|
||||
if (tmp1 < 0)
|
||||
tmp1 = 0;
|
||||
if (tmp1 > 0xF0)
|
||||
tmp1 = 0xF0;
|
||||
if (tmp1 > DISPLAY_WIDTH)
|
||||
tmp1 = DISPLAY_WIDTH;
|
||||
if (tmp2 < 0)
|
||||
tmp2 = 0;
|
||||
if (tmp2 > 0xF0)
|
||||
tmp2 = 0xF0;
|
||||
if (tmp2 > DISPLAY_WIDTH)
|
||||
tmp2 = DISPLAY_WIDTH;
|
||||
gScreen.controls.window1HorizontalDimensions = tmp1 << 8 | tmp2;
|
||||
tmp1 = gRoomControls.roomScrollY - this->unk_26 + this->unk_36;
|
||||
gScreen.bg3.yOffset = tmp1 & 0x3F;
|
||||
tmp3 = (&gBG3Buffer[((tmp1 / 0x40) << 8)]);
|
||||
gScreen.bg3.tilemap = (u32*)tmp3;
|
||||
gScreen.controls.window1VerticalDimensions = 0xa0;
|
||||
gScreen.controls.window1VerticalDimensions = DISPLAY_HEIGHT;
|
||||
if (this->unk_28 == tmp3)
|
||||
return;
|
||||
this->unk_28 = tmp3;
|
||||
@@ -483,14 +483,16 @@ void sub_0805AADC(u32 unk0) {
|
||||
void sub_0805AAF0(u32 unk0) {
|
||||
sub_0805AADC(unk0);
|
||||
gScreen.controls.layerFXControl = 0x3E48;
|
||||
gScreen.controls.alphaBlend = 0x1008;
|
||||
gScreen.bg3.control = 0x1E04;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(8, 16);
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(1);
|
||||
gScreen.bg3.tilemap = &gBG3Buffer;
|
||||
gScreen.bg3.xOffset = 0;
|
||||
gScreen.bg3.yOffset = 0;
|
||||
gScreen.bg3.updated = 1;
|
||||
gScreen.controls.windowInsideControl = 0x3F3F;
|
||||
gScreen.controls.windowOutsideControl = 0x37;
|
||||
gScreen.controls.window1HorizontalDimensions = 0xF0;
|
||||
gScreen.controls.window1VerticalDimensions = 0xA0;
|
||||
gScreen.controls.windowInsideControl =
|
||||
WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN0_CLR | WININ_WIN1_CLR;
|
||||
gScreen.controls.windowOutsideControl =
|
||||
WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR;
|
||||
gScreen.controls.window1HorizontalDimensions = DISPLAY_WIDTH;
|
||||
gScreen.controls.window1VerticalDimensions = DISPLAY_HEIGHT;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ void Manager18_Main(Manager18* this) {
|
||||
this->manager.unk_0e = 0;
|
||||
this->manager.unk_0f = 8;
|
||||
this->field_0x20 = gUnk_0810865C[0];
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805AEDC, sub_0805AF3C);
|
||||
} else {
|
||||
@@ -47,10 +47,10 @@ void Manager18_Main(Manager18* this) {
|
||||
}
|
||||
|
||||
void sub_0805AEDC(Manager18* this) {
|
||||
gScreen.bg3.control = 0x1e05;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.controls.layerFXControl = 0x3648;
|
||||
gScreen.controls.alphaBlend = (this != NULL) ? this->field_0x20 : 0x1000;
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(1);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = BLDCNT_TGT1_BG3 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD;
|
||||
gScreen.controls.alphaBlend = (this != NULL) ? this->field_0x20 : BLDALPHA_BLEND(0, 16);
|
||||
gScreen.bg3.xOffset = gRoomControls.roomScrollX + gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gScreen.bg3.yOffset = gRoomControls.roomScrollY + gRoomControls.bg3OffsetY.HALF.HI;
|
||||
if (this != NULL) {
|
||||
@@ -60,6 +60,6 @@ void sub_0805AEDC(Manager18* this) {
|
||||
|
||||
void sub_0805AF3C(Manager18* this) {
|
||||
this->manager.unk_10 &= 0xdf;
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ void Manager19_Main(Manager* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->unk_10 |= 0x20;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805AFFC, NULL);
|
||||
} else {
|
||||
@@ -30,8 +30,8 @@ void Manager19_Main(Manager* this) {
|
||||
}
|
||||
|
||||
void sub_0805AFFC(Manager* this) {
|
||||
gScreen.bg3.control = 0x1e03;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.bg3.control = BGCNT_PRIORITY(3) | BGCNT_SCREENBASE(30);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = gRoomControls.roomScrollX + gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gScreen.bg3.yOffset = gRoomControls.roomScrollY + gRoomControls.bg3OffsetY.HALF.HI;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ void sub_0805B328(Manager1A*);
|
||||
void sub_0805B048(Manager1A* this) {
|
||||
struct_08108764* tmp;
|
||||
Entity* obj;
|
||||
SetDefaultPriority((Entity*)&this->manager, 6);
|
||||
SetDefaultPriority((Entity*)&this->manager, PRIO_PLAYER_EVENT);
|
||||
MemClear(&this->unk_20, 0x20);
|
||||
this->manager.action = 1;
|
||||
this->unk_3f = gRoomControls.roomID;
|
||||
@@ -197,7 +197,7 @@ void sub_0805B2B0(Manager1A* this) {
|
||||
if (tmp2 > 12) {
|
||||
tmp2 = 12;
|
||||
}
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gRoomControls.bg3OffsetX.HALF.HI = gRoomControls.roomScrollX + this->unk_34 + tmp;
|
||||
gScreen.bg3.xOffset = gRoomControls.roomScrollX + this->unk_34 + tmp;
|
||||
gRoomControls.bg3OffsetY.HALF.HI = gRoomControls.roomScrollY + this->unk_36 + tmp2;
|
||||
@@ -211,7 +211,7 @@ void sub_0805B328(Manager1A* this) {
|
||||
tmp = &gUnk_08108764[this->manager.unk_0a];
|
||||
LoadResourceAsync(&gGlobalGfxAndPalettes[tmp->unk_0c->unk_00], 0x0600F000, 0x800);
|
||||
gScreen.bg3.control = 0x1E07;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gScreen.bg3.yOffset = gRoomControls.bg3OffsetY.HALF.HI;
|
||||
gScreen.controls.layerFXControl &= ~0x8;
|
||||
|
||||
@@ -29,7 +29,7 @@ void Manager1B_Main(Manager1B* this) {
|
||||
if (this->manager.action == 0) {
|
||||
this->manager.action = 1;
|
||||
this->manager.unk_10 |= 0x20;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (this->manager.unk_0a != 0) {
|
||||
RegisterTransitionManager(this, sub_0805B4B4, NULL);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ void sub_0805B4D0(u32 param_1) {
|
||||
|
||||
LoadGfxGroup(gUnk_08108C5C[param_1]);
|
||||
gScreen.bg3.control = 0x1e07;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = (gRoomControls.roomScrollX - gRoomControls.roomOriginX) >> 2;
|
||||
|
||||
uVar2 = (gRoomControls.roomScrollY - gRoomControls.roomOriginY) >> 1;
|
||||
|
||||
@@ -13,7 +13,7 @@ void Manager1D_Main(Manager* this) {
|
||||
void sub_0805B5E0(Manager* this) {
|
||||
this->action = 1;
|
||||
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.control = gUnk_08108C88[this->unk_0a];
|
||||
gRoomControls.bg3OffsetY.WORD = 0;
|
||||
gRoomControls.bg3OffsetX.WORD = 0;
|
||||
|
||||
@@ -53,7 +53,7 @@ void sub_080575C8(u32 param) {
|
||||
s32 bgOffset;
|
||||
|
||||
gUnk_0200B650 = 0;
|
||||
*(u16*)0x4000000 = 0;
|
||||
REG_DISPCNT = 0;
|
||||
LoadGfxGroup(param);
|
||||
gRoomVars.unk_10[0] = param;
|
||||
|
||||
@@ -62,7 +62,7 @@ void sub_080575C8(u32 param) {
|
||||
gScreen.bg3.yOffset = bgOffset & 0x3f;
|
||||
gScreen.bg3.xOffset = 0;
|
||||
gScreen.bg3.tilemap = &gMapDataTopSpecial[(bgOffset / 0x40) * 0x200];
|
||||
gScreen.bg3.control = 0x1d49;
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(29) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
gScreen.bg3.updated = 1;
|
||||
|
||||
bgOffset = (gRoomControls.roomScrollY - gRoomControls.roomOriginY);
|
||||
@@ -70,16 +70,17 @@ void sub_080575C8(u32 param) {
|
||||
gScreen.bg1.yOffset = bgOffset & 0x3f;
|
||||
gScreen.bg1.xOffset = 0;
|
||||
gScreen.bg1.tilemap = &gMapDataTopSpecial[0x2000 + (bgOffset / 0x40) * 0x200];
|
||||
gScreen.bg1.control = 0x1e49;
|
||||
gScreen.bg1.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
gScreen.bg1.updated = 1;
|
||||
gScreen.controls.layerFXControl = 0x3c48;
|
||||
gScreen.controls.alphaBlend = 0x609;
|
||||
gScreen.lcd.displayControl |= 0xa00;
|
||||
gScreen.controls.layerFXControl =
|
||||
BLDCNT_TGT1_BG3 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 6);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON | DISPCNT_BG1_ON;
|
||||
}
|
||||
|
||||
void sub_08057688(void) {
|
||||
gScreen.bg3.control = 0x1d48;
|
||||
gScreen.bg1.control = 0x1e48;
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(29) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
gScreen.bg1.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
}
|
||||
|
||||
void sub_080576A0(Manager2* this) {
|
||||
|
||||
@@ -42,7 +42,7 @@ void sub_0805D280(Manager2E* this) {
|
||||
if (this->manager.unk_0e == 0) {
|
||||
this->manager.unk_0e = 0x1e;
|
||||
}
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
void sub_0805D2C0(Manager2E* this) {
|
||||
@@ -80,7 +80,7 @@ void sub_0805D344(Manager2E* this) {
|
||||
this->manager.unk_0e = 0x1e;
|
||||
}
|
||||
this->manager.unk_0f = this->manager.unk_0e;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
void sub_0805D36C(Manager2E* this) {
|
||||
|
||||
@@ -16,7 +16,7 @@ void Manager2F_Main(Manager* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->unk_10 |= 0x20;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805D470, NULL);
|
||||
} else {
|
||||
@@ -34,7 +34,7 @@ void Manager2F_Main(Manager* this) {
|
||||
void sub_0805D470(Manager* this) {
|
||||
LoadGfxGroup(0x4c);
|
||||
gScreen.bg3.control = 0x1e07;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = gRoomControls.roomScrollX + gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gScreen.bg3.yOffset = gRoomControls.roomScrollY + gRoomControls.bg3OffsetY.HALF.HI;
|
||||
}
|
||||
|
||||
+16
-22
@@ -28,7 +28,7 @@ void Manager31_Main(Manager31* this) {
|
||||
s32 count;
|
||||
|
||||
if (this->manager.action == 0) {
|
||||
this->manager.action += 1;
|
||||
this->manager.action++;
|
||||
if (CheckGlobalFlag(GORON_KAKERA_L) != 0 && CheckGlobalFlag(GORON_KAKERA_M) != 0 &&
|
||||
CheckGlobalFlag(GORON_KAKERA_R) != 0) {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV2) == 0) {
|
||||
@@ -36,28 +36,22 @@ void Manager31_Main(Manager31* this) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV2);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV3) == 0) {
|
||||
if (CheckGlobalFlag(LV2_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV3);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV4) == 0) {
|
||||
if (CheckGlobalFlag(LV3_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV4);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV5) == 0 && CheckGlobalFlag(LV4_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV5);
|
||||
clearGlobalFlags:
|
||||
ClearGlobalFlag(GORON_KAKERA_L);
|
||||
ClearGlobalFlag(GORON_KAKERA_M);
|
||||
ClearGlobalFlag(GORON_KAKERA_R);
|
||||
}
|
||||
}
|
||||
} else if (CheckGlobalFlag(GORON_KAKERA_LV3) == 0) {
|
||||
if (CheckGlobalFlag(LV2_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV3);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else if (CheckGlobalFlag(GORON_KAKERA_LV4) == 0) {
|
||||
if (CheckGlobalFlag(LV3_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV4);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else if (CheckGlobalFlag(GORON_KAKERA_LV5) == 0 && CheckGlobalFlag(LV4_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV5);
|
||||
clearGlobalFlags:
|
||||
ClearGlobalFlag(GORON_KAKERA_L);
|
||||
ClearGlobalFlag(GORON_KAKERA_M);
|
||||
ClearGlobalFlag(GORON_KAKERA_R);
|
||||
}
|
||||
}
|
||||
this->itemActive[2] = 0;
|
||||
|
||||
@@ -73,7 +73,7 @@ void sub_0805D860(Manager32* this) {
|
||||
case 0:
|
||||
this->manager.unk_0d = 1;
|
||||
this->field_0x20 = 0x80;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
break;
|
||||
case 1:
|
||||
if (--this->field_0x20 == 0x10) {
|
||||
@@ -95,7 +95,7 @@ void sub_0805D860(Manager32* this) {
|
||||
default:
|
||||
if (--this->manager.unk_0e == 0) {
|
||||
sub_0801E104();
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
@@ -107,7 +107,7 @@ void sub_0805D900(Manager32* this) {
|
||||
this->manager.unk_0d = 1;
|
||||
this->manager.unk_0e = 0x2d;
|
||||
this->field_0x20 = 1;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
break;
|
||||
case 1:
|
||||
if (--this->manager.unk_0e == 0) {
|
||||
@@ -126,7 +126,7 @@ void sub_0805D900(Manager32* this) {
|
||||
this->field_0x20 += 4;
|
||||
if (this->field_0x20 > 0x80) {
|
||||
sub_0801E104();
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
DeleteThisEntity();
|
||||
}
|
||||
break;
|
||||
@@ -164,7 +164,7 @@ void sub_0805DA08(u32 x, u32 y, u32 param_3) {
|
||||
affineDstData->pa = ((gSineTable[(param_3 + i + y) & 0xff] * x) >> 8) + gScreen.bg3.xOffset;
|
||||
affineDstData = (struct BgAffineDstData*)&affineDstData->pb;
|
||||
}
|
||||
sub_0805622C(&gUnk_02017AA0[gUnk_03003DE4[0] * 0xa0], 0x400001c, 0xa2600001);
|
||||
sub_0805622C(&gUnk_02017AA0[gUnk_03003DE4[0] * 0xa0], REG_ADDR_BG3HOFS, 0xa2600001);
|
||||
}
|
||||
|
||||
void sub_0805DA90(Manager32* this, u32 param_2) {
|
||||
@@ -177,7 +177,7 @@ void sub_0805DA90(Manager32* this, u32 param_2) {
|
||||
AppendEntityToList((Entity*)manager, 8);
|
||||
}
|
||||
if (gArea.onEnter != NULL) {
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
RoomExitCallback();
|
||||
//! @bug: this always variable points to ROM, not a Manager*
|
||||
DeleteManager((Manager*)gArea.onEnter);
|
||||
|
||||
@@ -32,7 +32,7 @@ void CreateManager36(Entity* entity, ScriptExecutionContext* context) {
|
||||
manager->subtype = 0x36;
|
||||
manager->unk_0a = context->intVariable;
|
||||
AppendEntityToList((Entity*)manager, 6);
|
||||
SetDefaultPriority((Entity*)manager, 6);
|
||||
SetDefaultPriority((Entity*)manager, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ void sub_0805E140(Manager39* this) {
|
||||
this->unk_20 = gRoomControls.roomID;
|
||||
this->manager.unk_0e = 0x78;
|
||||
this->manager.unk_0f = 0x3c;
|
||||
SetDefaultPriority((Entity*)this, 7);
|
||||
SetDefaultPriority((Entity*)this, PRIO_HIGHEST);
|
||||
sub_0805E1F8(gUnk_08108DE8[gArea.locationIndex], CheckIsDungeon());
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void sub_0805E18C(Manager39* this) {
|
||||
if (this->manager.unk_0b) {
|
||||
if (!--this->manager.unk_0f) {
|
||||
this->manager.unk_0b = 0;
|
||||
gPlayerState.field_0x8b = 1;
|
||||
gPlayerState.controlMode = 1;
|
||||
ResetSystemPriority();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ void sub_08057E30();
|
||||
u32 sub_08057E40();
|
||||
void sub_08057E7C(u32);
|
||||
|
||||
extern u32 sub_08056300(const u16*);
|
||||
extern u32 CheckRegionsOnScreen(const u16*);
|
||||
|
||||
extern const u8 gGlobalGfxAndPalettes[];
|
||||
|
||||
@@ -66,7 +66,7 @@ void Manager7_Main(Manager7* this) {
|
||||
this->manager.unk_0e = 8;
|
||||
this->unk_20 = 0xFF;
|
||||
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
RegisterTransitionManager(this, sub_08057E30, 0);
|
||||
}
|
||||
if (sub_08057E40(this)) {
|
||||
@@ -113,7 +113,7 @@ void sub_08057E30(Manager7* this) {
|
||||
}
|
||||
|
||||
u32 sub_08057E40(Manager7* this) {
|
||||
u32 tmp = sub_08056300(gUnk_08108050);
|
||||
u32 tmp = CheckRegionsOnScreen(gUnk_08108050);
|
||||
if (tmp != 0xFF) {
|
||||
gRoomVars.unk_10[0] = tmp;
|
||||
return 1;
|
||||
@@ -124,7 +124,7 @@ u32 sub_08057E40(Manager7* this) {
|
||||
|
||||
void sub_08057E64() {
|
||||
u32 tmp;
|
||||
tmp = sub_08056300(gUnk_08108050);
|
||||
tmp = CheckRegionsOnScreen(gUnk_08108050);
|
||||
if (tmp != 0xFF) {
|
||||
sub_08057E7C(tmp);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void sub_08058514(ManagerA* this) {
|
||||
case 3:
|
||||
if (gPlayerEntity.action != 1 && gPlayerEntity.action != 9)
|
||||
return;
|
||||
gPlayerState.field_0x8b = 1;
|
||||
gPlayerState.controlMode = 1;
|
||||
ResetPlayerEventPriority();
|
||||
SetFlag(this->unk_3c);
|
||||
DeleteThisEntity();
|
||||
|
||||
@@ -42,7 +42,7 @@ void ManagerB_Init(ManagerB* this) {
|
||||
if (!this->unk_3c) {
|
||||
ManagerB_LoadFight(&this->manager);
|
||||
}
|
||||
SetDefaultPriority((Entity*)this, 3);
|
||||
SetDefaultPriority((Entity*)this, PRIO_NO_BLOCK);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -148,7 +148,7 @@ void ManagerBHelper_Main(Manager* this) {
|
||||
Entity* current;
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
SetDefaultPriority((Entity*)this, 3);
|
||||
SetDefaultPriority((Entity*)this, PRIO_NO_BLOCK);
|
||||
}
|
||||
// go through and check all monitored enemies.
|
||||
anyRemaining = 0;
|
||||
|
||||
@@ -286,7 +286,7 @@ void sub_08058D34() {
|
||||
LoadGfxGroup(0x16);
|
||||
tmp = gScreen.lcd.displayControl;
|
||||
tmp2 = 0;
|
||||
gScreen.lcd.displayControl |= 1;
|
||||
gScreen.lcd.displayControl |= DISPCNT_MODE_1;
|
||||
gScreen.bg2.control = 0xBC82;
|
||||
gScreen.bg1.control = 0x5E86;
|
||||
gScreen.bg1.xOffset = 0;
|
||||
|
||||
@@ -209,7 +209,7 @@ void sub_08059094(ManagerF* this) {
|
||||
void sub_080590E0(ManagerF* this) {
|
||||
if (!this->manager.action) {
|
||||
this->manager.action = 1;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
if (CheckLocalFlag(0x6c)) {
|
||||
if (CheckLocalFlag(0x4b)) {
|
||||
@@ -427,7 +427,7 @@ void sub_080594DC(ManagerF* this) {
|
||||
|
||||
#if defined(USA) || defined(DEMO_USA) || defined(DEMO_JP)
|
||||
void sub_08059548(ManagerF* this) {
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gPlayerEntity.action == 0x16) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user