mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-30 06:12:17 -05:00
Decompile two more callees of the actor cluster, from asm/main_02055894.s and asm/main_020151E4.s. Each splits its file; the trailing functions move verbatim into asm/main_02056504.s and asm/main_0201E3AC.s, the affected .inc files are regenerated, and main.lsf gains the four objects. sub_020564B0 takes a member index and reports whether it is the appointed leader's. It repeats the roster read that GetAppointedLeaderMemberIdx performs -- active_team selects one of the number_active_team_members fields, and that value indexes active_roster_member_idxs -- and compares the result against its argument, returning false if either the argument or the intermediate is -1. With this, both NPC-collection filters are accounted for: GetAdventureNpcIds excludes the appointed leader, and GetUnitNpcIds excludes the three main characters. sub_0201E380 writes one palette entry. It converts an 8-bit RGB triple through Rgb8ToRgb5 into the halfword at index (c << 8) + d of the table its first argument points at, then sets a byte at index c in a second table, which reads as marking that palette dirty. That first argument is a struct with a halfword pointer at 0x18 and a byte pointer at 0x1c. No global has that type -- callers pass an interior offset of whatever _020AFC70 points at -- so it takes the address of the function that receives it, struct unk_0201E380, with fields named for their offsets. The parameter was previously declared u8* while only the call site was understood, so sub_02064F94 now casts at that call site; it was rebuilt to confirm it stays byte-identical. src/main_02056D70.c likewise drops its local extern for sub_020564B0 in favour of the new header. No other names are introduced. Rgb8ToRgb5, TEAM_MEMBER_TABLE_PTR, struct team_member_table and its fields all already exist, and both functions keep their sub_ names. No comments are added to any pmd-sky file. Authored by Claude (Opus 4.8) under human direction. Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9 lines
119 B
C
9 lines
119 B
C
#ifndef PMDSKY_MAIN_020564B0_H
|
|
#define PMDSKY_MAIN_020564B0_H
|
|
|
|
#include "util.h"
|
|
|
|
bool8 sub_020564B0(int idx);
|
|
|
|
#endif
|