summaryrefslogtreecommitdiff
path: root/src/manager
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-01-26 18:36:29 +0200
committerTal Hayon <talhayon1@gmail.com>2022-01-26 18:36:29 +0200
commit81d8e5cd0ca106f05b4f66344cef06238dd752dc (patch)
tree57ff7f670d6512ce240d0d049d417d0f24eec36b /src/manager
parent6e509c40bd0fe499d5a4f52974b3e2d0295c6796 (diff)
Decompile sub_08057450
Diffstat (limited to 'src/manager')
-rw-r--r--src/manager/manager1.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/manager/manager1.c b/src/manager/manager1.c
index 9701738e..8664caab 100644
--- a/src/manager/manager1.c
+++ b/src/manager/manager1.c
@@ -209,25 +209,15 @@ void sub_080573AC(Entity* this) {
}
}
-NONMATCH("asm/non_matching/manager1/sub_08057450.inc", void sub_08057450(Entity* this)) {
+void sub_08057450(Entity* this) {
s32 y;
- // register s32 temp asm("r2");
- s32 temp;
- s32 y2;
gScreen.bg3.xOffset = 0x10;
y = gRoomControls.scroll_y;
y -= gRoomControls.origin_y;
y >>= 2;
- // Removing temp messes with r1/r2 with regards to y
- temp = 0x3f;
- gScreen.bg3.yOffset = y & temp;
-
- if (y < 0) {
- y += 0x3f;
- }
-
- gScreen.bg3.tilemap = &gBG3Buffer[(y >> 6) << 8];
+ gScreen.bg3.yOffset = y & 0x3f;
+ gScreen.bg3.tilemap = &gBG3Buffer[(y / 0x40) << 8];
if ((void*)this->z.WORD != gScreen.bg3.tilemap) {
this->z.WORD = (u32)gScreen.bg3.tilemap;
gScreen.bg3.updated = 1;
@@ -250,7 +240,6 @@ NONMATCH("asm/non_matching/manager1/sub_08057450.inc", void sub_08057450(Entity*
ZV(this)[3] = (ZV(this)[3] + 1) & 3;
}
}
-END_NONMATCH
const u16 gUnk_08107C1C[] = {
0x1000, 0xF01, 0xE02, 0xD03, 0xC04, 0xB05, 0xA06, 0x907, 0x908, 0x909,