Skip to content

Add some missing Savemap fields, introduce fix_structs script#15

Merged
Xeeynamo merged 3 commits intoXeeynamo:mainfrom
maciej-trebacz:feat/savemap
Dec 10, 2025
Merged

Add some missing Savemap fields, introduce fix_structs script#15
Xeeynamo merged 3 commits intoXeeynamo:mainfrom
maciej-trebacz:feat/savemap

Conversation

@maciej-trebacz
Copy link
Contributor

@maciej-trebacz maciej-trebacz commented Dec 10, 2025

This PR does several things:

  1. Renames _work to Savemap and fills in some missing fields in the struct
  2. Adds a --fix-structs optional flag (can make it enabled by default later if you see value in it) that will automatically fix references to Savemap in the decompiled code

I've tested this on two world functions as a demonstraction of the above flag. This is what the script outputs (no manual adjustment necessary)

void func_800B77F4(s32 arg0)
{
    Savemap.countdown_timer_seconds = arg0;
    D_80116278 = 1;
    Savemap.memory_bank_1[95] = 1;
}

void func_800B7820(void)
{
    D_80116278 = 0;
    Savemap.memory_bank_1[95] = 0;
}

I've tried to bundle this with this PR but the build was failing with checksum errors, I don't know how to fix it though 🙂

@maciej-trebacz maciej-trebacz marked this pull request as ready for review December 10, 2025 13:10
Copy link
Owner

@Xeeynamo Xeeynamo left a comment

Choose a reason for hiding this comment

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

Looks good + script to fix savemap structs is an excellent idea. Thank you!

@Xeeynamo Xeeynamo merged commit 0a33b81 into Xeeynamo:main Dec 10, 2025
1 check passed
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