Decompile manager32

This commit is contained in:
octorock
2021-09-26 14:05:32 +02:00
parent 08659c4001
commit 9283aa5afe
45 changed files with 236 additions and 947 deletions
+13 -13
View File
@@ -40,7 +40,6 @@ extern Unknown gUnk_08108468[];
extern Unknown gUnk_08108408[];
extern const u8 gGlobalGfxAndPalettes[];
void Manager12_Main(Manager12* this) {
if (this->manager.action == 0) {
this->manager.action = 1;
@@ -87,22 +86,23 @@ void sub_08059A58(Manager12* this) {
}
}
#define COMMON(tmp2, tmp1) ((tmp2) >> 4 & 0x3f) | (((tmp1)+0x188U) >> 4 & 0x3f) << 6
#define COMMON(tmp2, tmp1) ((tmp2) >> 4 & 0x3f) | (((tmp1) + 0x188U) >> 4 & 0x3f) << 6
void sub_08059B18(void) {
u32 loopVar;
u32 innerLoopVar;
if (CheckGlobalFlag(TATEKAKE_HOUSE) != 0) {
for(loopVar = 0; loopVar < 4; ++loopVar) {
for(innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
sub_0807B9B8(loopVar * 0x10 + 0x4ab + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
for (loopVar = 0; loopVar < 4; ++loopVar) {
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
sub_0807B9B8(loopVar * 0x10 + 0x4ab + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10),
1);
}
}
for(loopVar = 0; loopVar < 3; ++loopVar) {
for(innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
sub_0807B9B8(loopVar * 0x10 + 0x440 + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 2);
for (loopVar = 0; loopVar < 3; ++loopVar) {
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
sub_0807B9B8(loopVar * 0x10 + 0x440 + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10),
2);
}
}
sub_0807B9B8(0xd6, 0x5c2, 2);
@@ -110,9 +110,10 @@ void sub_08059B18(void) {
LoadResourceAsync(&gUnk_086E8460, 0x6001800, 0x800);
} else {
if (CheckGlobalFlag(TATEKAKE_TOCHU) != 0) {
for(loopVar = 0; loopVar < 5; ++loopVar) {
for(innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
sub_0807B9B8(loopVar * 0x10 + 0x4a6 + innerLoopVar, COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
for (loopVar = 0; loopVar < 5; ++loopVar) {
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
sub_0807B9B8(loopVar * 0x10 + 0x4a6 + innerLoopVar,
COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
}
}
sub_0807B9B8(0x444, 0x602, 2);
@@ -135,7 +136,6 @@ bool32 sub_08059C8C(Manager12* this, u32 param_2, u8* param_3, u16* param_4) {
}
}
void sub_08059CC0(u32 param_1, u32 param_2) {
Unknown* unknown;
+2 -2
View File
@@ -2,7 +2,7 @@
#include "room.h"
#include "object.h"
typedef struct{
typedef struct {
Manager manager;
u32 bitfield;
} Manager13;
@@ -41,7 +41,7 @@ void Manager13_Main(Manager13* this) {
while ((spawnData->x != 0) && (type2 < 0x20)) {
u32 bitfieldFlag = 1 << type2;
if ((((this->bitfield & bitfieldFlag) == 0) &&
(CheckRectOnScreen(spawnData->x, spawnData->y, 0x10, 0x10) != 0))) {
(CheckRectOnScreen(spawnData->x, spawnData->y, 0x10, 0x10) != 0))) {
Entity* object = CreateObject(OBJECT_1C, spawnData->type, type2);
if (object != NULL) {
object->frameIndex = spawnData->frameIndex;
+4 -7
View File
@@ -427,7 +427,7 @@ void sub_0805A94C(Manager15* this) {
gScreen.controls.window1VerticalDimensions = (tmp1 << 8 | tmp2);
}
NONMATCH("asm/non_matching/manager15/sub_0805A9CC.inc", void sub_0805A9CC(Manager15* this)) {
void sub_0805A9CC(Manager15* this) {
int tmp1, tmp2;
void* tmp3;
gScreen.affine.bg3xOffset = gRoomControls.roomScrollX - this->unk_24 + this->unk_34;
@@ -444,17 +444,14 @@ NONMATCH("asm/non_matching/manager15/sub_0805A9CC.inc", void sub_0805A9CC(Manage
gScreen.controls.window1HorizontalDimensions = tmp1 << 8 | tmp2;
tmp1 = gRoomControls.roomScrollY - this->unk_26 + this->unk_36;
gScreen.affine.bg3yOffset = tmp1 & 0x3F;
if (tmp1 < 0)
tmp1 += 0x3F;
tmp3 = (&gBG3Buffer[(tmp1 >> 6 << 9)]);
gScreen.affine.bg2Tilemap = (u32*)tmp3; // TODO .unk5
tmp3 = (&gBG3Buffer[((tmp1 / 0x40) << 8)]);
gScreen.affine.bg3Tilemap = (u32*)tmp3;
gScreen.controls.window1VerticalDimensions = 0xa0;
if (this->unk_28 == tmp3)
return;
this->unk_28 = tmp3;
gScreen.affine.bg2Updated = 1; // TODO .unk4
gScreen.affine.bg3Updated = 1;
}
END_NONMATCH
extern struct { u8 unk_00[0x20]; } gUnk_085A97A0[];
extern u16 gUnk_081085B8[];
+1 -2
View File
@@ -31,8 +31,7 @@ void Manager18_Main(Manager18* this) {
DeleteThisEntity();
}
} else {
if ((gUnk_0810865C[this->manager.unk_0e] != 0) &&
(--this->manager.unk_0f == 0)) {
if ((gUnk_0810865C[this->manager.unk_0e] != 0) && (--this->manager.unk_0f == 0)) {
this->manager.unk_0f = 4;
if (gUnk_0810865C[++this->manager.unk_0e] != 0) {
this->field_0x20 = gUnk_0810865C[this->manager.unk_0e];
+2 -3
View File
@@ -51,8 +51,7 @@ void sub_0805B448(Manager1B* this) {
}
void sub_0805B474(Manager1B* this) {
s32 tmp = ((gRoomControls.roomScrollY - gRoomControls.roomOriginY) * 0x60) /
(gRoomControls.height - 0xa0);
s32 tmp = ((gRoomControls.roomScrollY - gRoomControls.roomOriginY) * 0x60) / (gRoomControls.height - 0xa0);
gScreen.affine.bg3yOffset = gRoomControls.roomOriginY + tmp;
gScreen.affine.bg3xOffset = gRoomControls.roomScrollX - ((gRoomControls.width - 0x100) / 2);
}
@@ -79,5 +78,5 @@ void sub_0805B4D0(u32 param_1) {
if (iVar1 < 0) {
iVar1 = 0;
}
gScreen.affine.bg3yOffset = uVar2 + iVar1+gUnk_08108C44[param_1];
gScreen.affine.bg3yOffset = uVar2 + iVar1 + gUnk_08108C44[param_1];
}
+5 -5
View File
@@ -34,7 +34,7 @@ void sub_0805754C(Manager2* this) {
bgOffset = (gRoomControls.roomScrollY - gRoomControls.roomOriginY);
bgOffset += bgOffset >> 3;
gScreen.affine.bg3yOffset = bgOffset & 0x3f;
gScreen.affine.bg3Tilemap = gMapDataTopSpecial + (bgOffset/0x40) * 0x200;
gScreen.affine.bg3Tilemap = gMapDataTopSpecial + (bgOffset / 0x40) * 0x200;
if (this->field_0x38 != gScreen.affine.bg3Tilemap) {
this->field_0x38 = gScreen.affine.bg3Tilemap;
gScreen.affine.bg3Updated = 1;
@@ -42,7 +42,7 @@ void sub_0805754C(Manager2* this) {
bgOffset = (gRoomControls.roomScrollY - gRoomControls.roomOriginY);
bgOffset += bgOffset >> 2;
gScreen.bg.bg1yOffset = bgOffset & 0x3f;
gScreen.bg.bg1Tilemap = gMapDataTopSpecial + 0x2000+ (bgOffset/0x40) * 0x200;
gScreen.bg.bg1Tilemap = gMapDataTopSpecial + 0x2000 + (bgOffset / 0x40) * 0x200;
if (this->field_0x3c != gScreen.bg.bg1Tilemap) {
this->field_0x3c = gScreen.bg.bg1Tilemap;
gScreen.bg.bg1Updated = 1;
@@ -55,14 +55,14 @@ void sub_080575C8(u32 param) {
gUnk_0200B650 = 0;
*(u16*)0x4000000 = 0;
LoadGfxGroup(param);
gRoomVars.unk_10 = param;
gRoomVars.unk_10[0] = param;
bgOffset = (gRoomControls.roomScrollY - gRoomControls.roomOriginY);
bgOffset += bgOffset >> 3;
gScreen.affine.bg3yOffset = bgOffset & 0x3f;
gScreen.affine.bg3xOffset = 0;
gScreen.affine.bg3Tilemap = &gMapDataTopSpecial[(bgOffset / 0x40) * 0x200];
gScreen.affine.bg3Control = 0x1d49;
gScreen.affine.bg3Control = 0x1d49;
gScreen.affine.bg3Updated = 1;
bgOffset = (gRoomControls.roomScrollY - gRoomControls.roomOriginY);
@@ -83,7 +83,7 @@ void sub_08057688(void) {
}
void sub_080576A0(Manager2* this) {
LoadGfxGroup(gRoomVars.unk_10);
LoadGfxGroup(gRoomVars.unk_10[0]);
this->field_0x38 = NULL;
this->field_0x3c = NULL;
sub_0805754C(this);
+2 -1
View File
@@ -22,7 +22,8 @@ typedef struct {
bool32 sub_0805B8CC(u32);
/*
Spawns MINISH_SIZED_ENTRANCE at the locations in the room property this->manager.unk_0a when they are visible on the screen.
Spawns MINISH_SIZED_ENTRANCE at the locations in the room property this->manager.unk_0a when they are visible on the
screen.
*/
void Manager21_Main(Manager21* this) {
MinishEntranceSpawnData* spawnData;
+8 -12
View File
@@ -46,7 +46,7 @@ void sub_0805BC8C(Manager23* this) {
}
void sub_0805BCD4(Manager23* this) {
switch(this->manager.action) {
switch (this->manager.action) {
case 0:
this->manager.action = 1;
this->manager.unk_0f = 0x1e;
@@ -76,8 +76,8 @@ void sub_0805BD5C(Manager23* this) {
if (CheckFlags(this->field_0x3e) != 0) {
sub_0805BE94(this);
}
this->field_0x20 = ((s16)this->field_0x38 >> 4 & 0x3fU) |
((s32)((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
this->field_0x20 =
((s16)this->field_0x38 >> 4 & 0x3fU) | ((s32)((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
this->manager.action = 1;
} else {
if (GetTileType(this->field_0x20, this->manager.unk_0b) == 0x76) {
@@ -88,7 +88,6 @@ void sub_0805BD5C(Manager23* this) {
}
}
void sub_0805BDB4(Manager23* this) {
u8 bVar1;
u16 uVar2;
@@ -99,8 +98,8 @@ void sub_0805BDB4(Manager23* this) {
if (CheckFlags(this->field_0x3e) != 0 || CheckFlags(this->field_0x3c) != 0) {
sub_0805BE94(this);
}
this->field_0x20 = ((s16)this->field_0x38 >> 4 & 0x3fU) |
(((s32)(this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
this->field_0x20 =
((s16)this->field_0x38 >> 4 & 0x3fU) | (((s32)(this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
this->manager.action = 1;
break;
@@ -135,15 +134,12 @@ void sub_0805BDB4(Manager23* this) {
void sub_0805BE70(Manager23* this, u32 param_2) {
SetTileType(param_2,
((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) |
((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) | ((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
this->manager.unk_0b);
}
void sub_0805BE94(Manager23* this) {
SetTileType(0x76,
((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) |
((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
SetTileType(0x76, ((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) | ((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
this->manager.unk_0b);
sub_0805308C(this->manager.unk_0e);
DeleteThisEntity();
@@ -152,7 +148,7 @@ void sub_0805BE94(Manager23* this) {
void sub_0805BEC4(Manager23* this) {
Entity* object = CreateObject(OBJECT_2A, 1, 0);
if (object != NULL) {
*(s8*)(&object->flags+1) = ((*(s8*)(&object->flags+1)) & (-0x10)) | 3;
*(s8*)(&object->flags + 1) = ((*(s8*)(&object->flags + 1)) & (-0x10)) | 3;
object->x.HALF.HI = this->field_0x38 + gRoomControls.roomOriginX;
object->y.HALF.HI = this->field_0x3a + gRoomControls.roomOriginY;
object->collisionLayer = this->manager.unk_0b;
+7 -9
View File
@@ -29,9 +29,8 @@ void Manager31_Main(Manager31* this) {
if (this->manager.action == 0) {
this->manager.action += 1;
if (CheckGlobalFlag(GORON_KAKERA_L) != 0
&& CheckGlobalFlag(GORON_KAKERA_M) != 0
&& CheckGlobalFlag(GORON_KAKERA_R) != 0) {
if (CheckGlobalFlag(GORON_KAKERA_L) != 0 && CheckGlobalFlag(GORON_KAKERA_M) != 0 &&
CheckGlobalFlag(GORON_KAKERA_R) != 0) {
if (CheckGlobalFlag(GORON_KAKERA_LV2) == 0) {
if (CheckGlobalFlag(LV1_CLEAR) != 0) {
SetGlobalFlag(GORON_KAKERA_LV2);
@@ -48,13 +47,11 @@ void Manager31_Main(Manager31* this) {
if (CheckGlobalFlag(LV3_CLEAR) != 0) {
SetGlobalFlag(GORON_KAKERA_LV4);
goto clearGlobalFlags;
}
} else {
if (CheckGlobalFlag(GORON_KAKERA_LV5) == 0
&& CheckGlobalFlag(LV4_CLEAR) != 0) {
if (CheckGlobalFlag(GORON_KAKERA_LV5) == 0 && CheckGlobalFlag(LV4_CLEAR) != 0) {
SetGlobalFlag(GORON_KAKERA_LV5);
clearGlobalFlags:
clearGlobalFlags:
ClearGlobalFlag(GORON_KAKERA_L);
ClearGlobalFlag(GORON_KAKERA_M);
ClearGlobalFlag(GORON_KAKERA_R);
@@ -70,7 +67,8 @@ clearGlobalFlags:
count = 0;
for (count = 0; count < 3;) {
if (CheckGlobalFlag(GORON_KAKERA_L + count) == 0) {
Entity* object = CreateObject(SHOP_ITEM, 0x5c, ((s32)Random() % spawnData->maxType) + spawnData->minType);
Entity* object =
CreateObject(SHOP_ITEM, 0x5c, ((s32)Random() % spawnData->maxType) + spawnData->minType);
if (object != NULL) {
object->actionDelay = 1;
object->field_0xf = count;
@@ -91,7 +89,7 @@ clearGlobalFlags:
if (CheckGlobalFlag(GORON_KAKERA_L + count) == 0) {
if ((s8)this->itemActive[count] >= FALSE) {
} else {
SetGlobalFlag(GORON_KAKERA_L + count);
SetGlobalFlag(GORON_KAKERA_L + count);
}
}
}
+175 -8
View File
@@ -1,17 +1,184 @@
#include "manager.h"
#include "screen.h"
#include "structures.h"
#include "room.h"
#include "functions.h"
#include "area.h"
#include "utils.h"
#include "gba/types.h"
ASM_FUNC("asm/non_matching/manager32/Manager32_Main.inc", void Manager32_Main())
typedef struct {
Manager manager;
u32 field_0x20;
u32 field_0x24;
u32 field_0x28;
} Manager32;
ASM_FUNC("asm/non_matching/manager32/sub_0805D7DC.inc", void sub_0805D7DC())
extern void (*const gUnk_08108D7C[])(Manager32*);
void sub_0805D9D8(Manager32*);
void sub_0805DA08(u32, u32, u32);
ASM_FUNC("asm/non_matching/manager32/sub_0805D860.inc", void sub_0805D860())
extern void sub_080528F0();
ASM_FUNC("asm/non_matching/manager32/sub_0805D900.inc", void sub_0805D900())
extern u8 gUnk_08108D74[];
ASM_FUNC("asm/non_matching/manager32/sub_0805D98C.inc", void sub_0805D98C())
extern struct BgAffineDstData gUnk_02017AA0[];
extern u8 gUnk_03003DE4[0xC];
extern void sub_0805622C(struct BgAffineDstData*, u32, u32);
ASM_FUNC("asm/non_matching/manager32/sub_0805D9D8.inc", void sub_0805D9D8())
void Manager32_Main(Manager32* this) {
gUnk_08108D7C[this->manager.action](this);
this->field_0x24 = gScreenTransition.frameCount << 4;
sub_0805D9D8(this);
sub_0805DA08(this->field_0x20, this->field_0x28, this->field_0x24);
}
ASM_FUNC("asm/non_matching/manager32/sub_0805DA08.inc", void sub_0805DA08())
void sub_0805D7DC(Manager32* this) {
u32 index;
ASM_FUNC("asm/non_matching/manager32/sub_0805DA90.inc", void sub_0805DA90())
this->manager.action = (this->manager.unk_0a == 0) ? 1 : 2;
this->field_0x20 = 0;
this->field_0x24 = 0;
switch (gRoomControls.areaID) {
case 7:
default:
index = 0;
break;
case 3:
index = 1;
break;
case 0x81:
index = 2;
break;
case 0x80:
index = 3;
break;
case 0x88:
index = 4;
break;
case 0x78:
index = 5;
break;
case 0x38:
index = 6;
break;
}
LoadGfxGroup(gUnk_08108D74[index]);
gScreen.affine.bg3Control = 0x1e04;
}
void sub_0805D860(Manager32* this) {
switch (this->manager.unk_0d) {
case 0:
this->manager.unk_0d = 1;
this->field_0x20 = 0x80;
gScreen.lcd.displayControl |= 0x800;
break;
case 1:
if (--this->field_0x20 == 0x10) {
this->manager.unk_0d = 2;
this->manager.unk_0e = 0x2d;
}
break;
case 2:
if (--this->manager.unk_0e == 0) {
this->manager.unk_0d = 3;
}
break;
case 3:
if (--this->field_0x20 == 0) {
this->manager.unk_0d = 4;
this->manager.unk_0e = 0x3c;
}
break;
default:
if (--this->manager.unk_0e == 0) {
sub_0801E104();
gScreen.lcd.displayControl &= 0xf7ff;
DeleteThisEntity();
}
}
}
void sub_0805D900(Manager32* this) {
switch (this->manager.unk_0d) {
case 0:
this->manager.unk_0d = 1;
this->manager.unk_0e = 0x2d;
this->field_0x20 = 1;
gScreen.lcd.displayControl |= 0x800;
break;
case 1:
if (--this->manager.unk_0e == 0) {
this->manager.unk_0d = 2;
this->manager.unk_0e = 0x14;
}
break;
case 2:
this->field_0x20 += 1;
if (--this->manager.unk_0e != 0) {
return;
}
this->manager.unk_0d = 3;
break;
default:
this->field_0x20 += 4;
if (this->field_0x20 > 0x80) {
sub_0801E104();
gScreen.lcd.displayControl &= 0xf7ff;
DeleteThisEntity();
}
break;
}
}
void sub_0805D98C(Manager32* this) {
if ((gInput.heldKeys & 0x40) != 0) {
this->field_0x20 -= 1;
}
if ((gInput.heldKeys & 0x80) != 0) {
this->field_0x20 += 1;
}
if ((gInput.heldKeys & 0x20) != 0) {
this->field_0x28 -= 1;
}
if ((gInput.heldKeys & 0x10) != 0) {
this->field_0x28 += 1;
}
}
void sub_0805D9D8(Manager32* this) {
// TODO find out the actual type of the parent of this manager.
Manager* pMVar1 = this->manager.parent;
if (pMVar1 != NULL) {
gScreen.affine.bg3xOffset = 0x80 - (*(s16*)&pMVar1[1].unk_0e - gRoomControls.roomScrollX);
gScreen.affine.bg3yOffset = 0x8c - (*(s16*)(pMVar1[1].unk_11 + 1) - gRoomControls.roomScrollY);
}
}
void sub_0805DA08(u32 x, u32 y, u32 param_3) {
u32 i;
struct BgAffineDstData* affineDstData = &gUnk_02017AA0[gUnk_03003DE4[0] * 0xa0];
for (i = 0; i < 0xa0; ++i, y += 0x17) {
affineDstData->pa = ((gSineTable[(param_3 + i + y) & 0xff] * x) >> 8) + gScreen.affine.bg3xOffset;
affineDstData = (struct BgAffineDstData*)&affineDstData->pb;
}
sub_0805622C(&gUnk_02017AA0[gUnk_03003DE4[0] * 0xa0], 0x400001c, 0xa2600001);
}
void sub_0805DA90(Manager32* this, u32 param_2) {
Manager* manager = GetEmptyManager();
if (manager != NULL) {
manager->type = 9;
manager->subtype = 0x32;
manager->unk_0a = param_2;
manager->parent = &this->manager;
AppendEntityToList((Entity*)manager, 8);
}
if (gArea.unk3 != 0) {
gScreen.lcd.displayControl &= 0xf7ff;
sub_080528F0();
DeleteManager((Manager*)gArea.unk3);
}
}
+1 -4
View File
@@ -11,10 +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.height.HALF.HI < -0x18 && gPlayerState.field_0xa8 == 0x14) {
this->action += 1;
this->unk_0e = 0x5a;
SoundReq(SFX_10A);
+1 -1
View File
@@ -48,7 +48,7 @@ void sub_0805DBF0(Manager34* this) {
if (this->field_0x20 < 0x78) {
if ((this->field_0x20 & 0xf) == 0) {
SoundReq(SFX_126);
SoundReq(SFX_126);
}
} else if (0xd1 >= this->field_0x20) {
if ((this->field_0x20 & 0x1f) == 0) {
+3 -3
View File
@@ -37,7 +37,7 @@ void sub_0805DE68(Manager* this) {
gScreenTransition.field_0x38 = 0;
gScreenTransition.field_0x39 = 0x0f;
*(u8*)&gScreenTransition.field_0x3a = 0x20;
*((u8*)&gScreenTransition.field_0x3a+1) = 0x20;
*((u8*)&gScreenTransition.field_0x3a + 1) = 0x20;
#if !defined(EU) && !defined(JP) && !defined(DEMO_JP)
gSave.unk498 = 0x1194;
#endif
@@ -48,8 +48,8 @@ void sub_0805DEB8(Manager* this) {
s32 distY;
Entity* object;
distX = gPlayerEntity.x.HALF.HI - (gRoomControls.roomOriginX+0x88);
distY = gPlayerEntity.y.HALF.HI - (gRoomControls.roomOriginY+0x40);
distX = gPlayerEntity.x.HALF.HI - (gRoomControls.roomOriginX + 0x88);
distY = gPlayerEntity.y.HALF.HI - (gRoomControls.roomOriginY + 0x40);
if (distX * distX + distY * distY < 0x901) {
this->action = 2;
this->unk_0d = 0;
+4 -4
View File
@@ -70,7 +70,7 @@ void Manager7_Main(Manager7* this) {
sub_08052D74(this, sub_08057E30, 0);
}
if (sub_08057E40(this)) {
tmp = gRoomVars.unk_10;
tmp = (u32)gRoomVars.unk_10[0];
if (this->unk_20 != tmp) {
this->unk_20 = tmp;
this->manager.unk_0e = 0;
@@ -109,13 +109,13 @@ void Manager7_Main(Manager7* this) {
#endif
void sub_08057E30(Manager7* this) {
sub_08057E7C(gRoomVars.unk_10);
sub_08057E7C(gRoomVars.unk_10[0]);
}
u32 sub_08057E40(Manager7* this) {
u32 tmp = sub_08056300(gUnk_08108050);
if (tmp != 0xFF) {
gRoomVars.unk_10 = tmp;
gRoomVars.unk_10[0] = tmp;
return 1;
} else {
return 0;
@@ -143,6 +143,6 @@ void sub_08057E7C(u32 unk1) {
for (tmp = 0; tmp < 8; tmp++, tmp2 += 2) {
DmaSet(3, &gGlobalGfxAndPalettes[tmp2[0]], tmp2[1], 0x84000400);
}
gRoomVars.unk_10 = unk1;
gRoomVars.unk_10[0] = unk1;
}
#endif
+2 -2
View File
@@ -30,7 +30,7 @@ void Manager8_Main(Manager8* this) {
}
void sub_08057EFC(Manager8* this) {
LoadGfxGroup(gRoomVars.unk_10);
LoadGfxGroup((u32)gRoomVars.unk_10[0]);
sub_08058034();
this->unk_3c = 0;
this->unk_38 = 0;
@@ -110,7 +110,7 @@ void sub_080580B0(u32 unk1) {
gUnk_0200B650 = 0;
REG_DISPCNT = 0;
LoadGfxGroup(unk1);
gRoomVars.unk_10 = unk1;
gRoomVars.unk_10[0] = unk1;
sub_08058034();
tmp = gRoomControls.roomScrollX - gRoomControls.roomOriginX; // r7
tmp = tmp + (tmp >> 3) + (0x400 - gRoomControls.width) / 2;
-49
View File
@@ -1,49 +0,0 @@
#include "manager.h"
ASM_FUNC("asm/non_matching/managerF/ManagerF_Main.inc", void ManagerF_Main())
ASM_FUNC("asm/non_matching/managerF/sub_08058EE4.inc", void sub_08058EE4())
ASM_FUNC("asm/non_matching/managerF/sub_08058F44.inc", void sub_08058F44())
ASM_FUNC("asm/non_matching/managerF/sub_08058F84.inc", void sub_08058F84())
ASM_FUNC("asm/non_matching/managerF/sub_08058FB0.inc", void sub_08058FB0())
ASM_FUNC("asm/non_matching/managerF/sub_08059064.inc", void sub_08059064())
ASM_FUNC("asm/non_matching/managerF/sub_08059094.inc", void sub_08059094())
ASM_FUNC("asm/non_matching/managerF/sub_080590E0.inc", void sub_080590E0())
ASM_FUNC("asm/non_matching/managerF/sub_08059124.inc", void sub_08059124())
ASM_FUNC("asm/non_matching/managerF/sub_080591CC.inc", void sub_080591CC())
ASM_FUNC("asm/non_matching/managerF/sub_08059220.inc", void sub_08059220())
ASM_FUNC("asm/non_matching/managerF/sub_08059278.inc", void sub_08059278())
ASM_FUNC("asm/non_matching/managerF/sub_08059290.inc", void sub_08059290())
ASM_FUNC("asm/non_matching/managerF/sub_080592A4.inc", void sub_080592A4())
ASM_FUNC("asm/non_matching/managerF/sub_080592EC.inc", void sub_080592EC())
ASM_FUNC("asm/non_matching/managerF/sub_0805930C.inc", void sub_0805930C())
ASM_FUNC("asm/non_matching/managerF/SetDirtTile.inc", void SetDirtTile())
ASM_FUNC("asm/non_matching/managerF/sub_08059368.inc", void sub_08059368())
ASM_FUNC("asm/non_matching/managerF/sub_0805938C.inc", void sub_0805938C())
ASM_FUNC("asm/non_matching/managerF/sub_080593CC.inc", void sub_080593CC())
ASM_FUNC("asm/non_matching/managerF/sub_08059424.inc", void sub_08059424())
ASM_FUNC("asm/non_matching/managerF/sub_0805947C.inc", void sub_0805947C())
ASM_FUNC("asm/non_matching/managerF/sub_080594DC.inc", void sub_080594DC())
ASM_FUNC("asm/non_matching/managerF/sub_08059548.inc", void sub_08059548())