Files
pmd-sky/include/main_020332AC.h
cecilarmitais c61f8ec2d7 Decomp 49 functions in five groups
Eighth 5x10 batch; 49 of 50 matched at score 0 and land here.

  overlay_11_022FAC54  LiveObject accessors
  overlay_11_022E46FC  coroutine table and special recruitment
  main_020325AC        further inventory-menu paging
  overlay_17_0238A754  menu state setters
  main_0201BAC8        OAM attribute copying

New placeholder structs: unk_022FD1A0, unk_02324FA0, unk_02320904,
unk_C_ROUTINES, unk_0238BE00, unk_0201BCCC with unk_oam_sub and unk_oam_elem.
struct unk_020332AC gains field_0xBC and field_0xD0, splitting two byte arrays
without changing its size; no already-landed function changes.

GetCoroutineInfo is NOT here. It reaches 30 -- two rows, a register swap between
the base pointer and the record pointer, with every instruction otherwise
identical. Eight structural variants and six declaration orderings were tried;
restructuring around a record pointer took it from 500 to 30 and nothing since
has moved it. It stays as assembly.

Two matching findings, both in docs/MATCHING_TIPS.md. A switch needs a fourth
case before MWCC emits a binary split rather than a flat compare chain, which is
now the second batch where that closed a function. And x == 4 || x == 5 folds
into a range test at every width tried, where the target keeps cmp/cmpne; the
double negation !(x != 4 && x != 5) blocks the fold and keeps the arm order.

Authored by Claude (Opus 5) under human direction. Confirmed by a matching
build: build/pmdsky.us/pmdsky.us.nds: OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 23:04:46 -07:00

37 lines
957 B
C

#ifndef PMDSKY_MAIN_020332AC_H
#define PMDSKY_MAIN_020332AC_H
struct unk_020332AC {
s32 field_0x0;
s32 field_0x4;
u8 field_0x8[8];
u32 field_0x10;
u8 field_0x14[0xA0];
s32 field_0xB4;
s32 field_0xB8;
s32 field_0xBC;
u8 field_0xC0[4];
s32 field_0xC4;
s32 field_0xC8;
s32 field_0xCC;
s32 field_0xD0;
u8 field_0xD4[0x10];
s32 field_0xE4;
s32 field_0xE8;
s32 field_0xEC;
s32 field_0xF0;
};
void InventoryMenuPreviousPage(struct unk_020332AC *m);
void InventoryMenuNext10Pages(struct unk_020332AC *m);
void InventoryMenuPrevious10Pages(struct unk_020332AC *m);
void sub_0203330C(struct unk_020332AC *m, s32 a);
s32 sub_02033350(struct unk_020332AC *m, s32 i);
s32 sub_0203336C(struct unk_020332AC *m);
s32 sub_02033390(struct unk_020332AC *m);
s32 sub_020333B4(struct unk_020332AC *m);
s32 sub_020333D8(struct unk_020332AC *m, s32 idx);
void sub_020333FC(struct unk_020332AC *m);
#endif