Skip to content

Decompile unk_02031904 (Pokeathlon save data)#472

Closed
amyanger wants to merge 1 commit intopret:masterfrom
amyanger:decomp/unk_02031904
Closed

Decompile unk_02031904 (Pokeathlon save data)#472
amyanger wants to merge 1 commit intopret:masterfrom
amyanger:decomp/unk_02031904

Conversation

@amyanger
Copy link
Copy Markdown
Contributor

Summary

  • Decompile 23 functions from unk_02031904.s managing the POKEATHLON_SAV struct (0xB80 bytes)
  • Define full POKEATHLON_SAV struct layout in save_pokeathlon.h (previously opaque)
  • Functions cover: save system hooks (sizeof/Init/Get), athlete point management (add/sub/get, capped at 99,999), prize unlock flags (27 bits), daily shop tracking, and per-pokemon event participation bitfields
  • Delete dead asm/unk_02031904.s and asm/include/unk_02031904.inc
  • Update main.lsf to point to new C object

Functions decompiled

Function Purpose
Save_Pokeathlon_sizeof Returns struct size (0xB80)
Save_Pokeathlon_Init Zeros struct, sets 0xFFFF sentinels in sub-arrays
Save_Pokeathlon_Get Save array accessor
sub_02031974 Identity (returns base pointer)
sub_02031978 / sub_0203197C / sub_02031984 / sub_02031990 / sub_0203199C Sub-region accessors
sub_020319A4 No-op
sub_020319A8 / sub_020319F8 Per-pokemon participation bit get/set
sub_020319DC / sub_020319E4 / sub_020319F0 Duplicate sub-region accessors
SavePokeathlon_AddAthletePoints / SubAthletePoints / GetAthletePoints Athlete point management
sub_02031A78 / sub_02031A98 Prize flag get/set (27 bits)
sub_02031AB8 / sub_02031ACC / sub_02031AE4 Daily shop flag get/set/clear

Test plan

  • Compiles cleanly with MWCC (-W error enabled, zero warnings)
  • All callers compile with updated headers
  • Struct sizeof matches expected 0xB80

Decompile 23 functions managing the POKEATHLON_SAV struct:
save system hooks, athlete point management, prize flags,
daily shop tracking, and pokemon participation bitfields.
@adrienntindall
Copy link
Copy Markdown
Collaborator

#468 was opened 2 days ago to make this exact change, why are you submitting a PR now to decompile the exact same function?

@nathanfallet
Copy link
Copy Markdown
Contributor

And it's not even matching. So what's the 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.

3 participants