Skip to content

Decompile 59EA0, 5D120, 5E230, 60CF0, and map .rodata#34

Open
queueRAM wants to merge 6 commits into
Drahsid:masterfrom
queueRAM:decomp_59EA0_5D120
Open

Decompile 59EA0, 5D120, 5E230, 60CF0, and map .rodata#34
queueRAM wants to merge 6 commits into
Drahsid:masterfrom
queueRAM:decomp_59EA0_5D120

Conversation

@queueRAM

@queueRAM queueRAM commented Jun 29, 2026

Copy link
Copy Markdown
Contributor
  • Decompile 59EA0, 5D120, 5E230, 60CF0
  • Map .rodata for 59EA0, 5E230, 60CF0

@queueRAM queueRAM changed the title Decompile 59EA0, 5D120, and map .rodata Decompile 59EA0, 5D120, 5E230, and map .rodata Jun 29, 2026
@queueRAM queueRAM changed the title Decompile 59EA0, 5D120, 5E230, and map .rodata Decompile 59EA0, 5D120, 5E230, 60CF0, and map .rodata Jun 29, 2026

@Drahsid Drahsid left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do this match when using the base address and correcting the indices?

Comment thread src/5E230.c Outdated
Comment thread src/5E230.c Outdated
queueRAM and others added 5 commits June 30, 2026 14:45
- Decompile 59EA0
- Decompile 5D120
- Map .rodata for 59EA0

Co-authored-by: Dominik Peters <github@d-peters.com>
Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com>
Co-authored-by: Drahsid <Drahsid@gmail.com>
Co-authored-by: Dominik Peters <github@d-peters.com>
- Add overlays.h and add OVERLAY#_DISPATCH_TABLE_VRAM
- Correct 5E230 dispatch table calls to use overlay indexes
- Cleanup code comments
@queueRAM queueRAM force-pushed the decomp_59EA0_5D120 branch from e5c5c2d to 76d43e1 Compare June 30, 2026 21:45
Comment thread src/5D120.c
Comment on lines +103 to +135
void func_8005C8A4(void) {
if (gCamShakeTime == 0) {
gCamShakeV = 0;
}
else {
if (!(gCamShakeTime & 1)) {
gCamShakeV = gCamShakeMag / 0x10000;
}
else {
gCamShakeV = -gCamShakeMag / 0x10000;
}
gCamShakeTime--;
switch (gCamShakeType) {
case 1:
if (!(gCamShakeTime & 1)) {
gCamShakeMag -= gCamShakeMagDelta * 2;
}
break;
case 2:
if (!(gCamShakeTime & 2)) {
gCamShakeV = func_8005C708(gCamShakeMag / 0x10000);
}
break;
default:
gCamShakeMag -= gCamShakeMagDelta;
break;
}
if (((D_800CCC78[8 * gCurrentScene] == 1) && (gCamShakeV < 0)) ||
((D_800CCC78[8 * gCurrentScene] == 2) && (gCamShakeV > 0))) {
gCamShakeV = 0;
}
}
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gCamShakeMag / 0x10000 looks like fixed point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants