mirror of
https://github.com/pret/pmd-sky.git
synced 2026-08-04 17:58:21 -05:00
Decompile eight ground-mode setters from asm into src/main_02065B3C.c: SetActorTalkMainAndActorTalkSub, SetActorTalkMain, SetActorTalkSub, SetActorEventMain, SetRandomRequestNpcs1And2, SetRandomRequestNpc03KindVar, SetAllEventNpcs and SetNewFriendActor. Identify the global they write, _020B0B08, as a 28-byte table of slots keyed by the special members of enum script_entity_id (ENTITY_TALK_MAIN 46 through ENTITY_NPC_DEMO_PARTNER 59). Every slot offset is corroborated by both a writer above and the reader that resolves it at the matching entity id: sub_0206549C, reached via GetScriptEntityMonsterId, and sub_02065050, reached via GetActorMatchingStorageId. Name the type struct special_actors and relabel the symbol _020B0B08 -> SPECIAL_ACTORS at its definition in asm/main_rodata_020A2808.s and at every reference. Extracting the block splits asm/main_0205EDA4.s: the trailing functions move verbatim into asm/main_02065BD8.s, the affected .inc files are regenerated, and main.lsf gains the two new objects. Add enum script_entity_id to include/enums.h, taken from pmdsky-debug, since struct special_actors refers to it. No comments are added to any pmd-sky file; comments cannot be checked by the matching build, so the code is left to stand on its own. 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>
35 lines
1.3 KiB
C
35 lines
1.3 KiB
C
#ifndef PMDSKY_MAIN_02065B3C_H
|
|
#define PMDSKY_MAIN_02065B3C_H
|
|
|
|
#include "enums.h"
|
|
|
|
struct special_actors {
|
|
enum monster_id event_npc02;
|
|
enum monster_id event_npc01;
|
|
enum monster_id demo_partner;
|
|
enum monster_id event_npc04;
|
|
enum monster_id event_npc03;
|
|
enum monster_id demo_hero;
|
|
enum monster_id new_friend;
|
|
enum monster_id random_request_npc02;
|
|
enum monster_id random_request_npc01;
|
|
enum script_entity_id event_npc_sub;
|
|
enum script_entity_id event_npc_main;
|
|
enum script_entity_id talk_sub;
|
|
enum script_entity_id talk_main;
|
|
u8 padding[2];
|
|
};
|
|
|
|
extern struct special_actors SPECIAL_ACTORS;
|
|
|
|
void SetActorTalkMainAndActorTalkSub(enum script_entity_id talk_main, enum script_entity_id talk_sub);
|
|
void SetActorTalkMain(enum script_entity_id talk_main);
|
|
void SetActorTalkSub(enum script_entity_id talk_sub);
|
|
void SetActorEventMain(enum script_entity_id event_npc_main);
|
|
void SetRandomRequestNpcs1And2(enum monster_id random_request_npc01, enum monster_id random_request_npc02);
|
|
void SetRandomRequestNpc03KindVar(enum monster_id kind);
|
|
void SetAllEventNpcs(enum monster_id event_npc01, enum monster_id event_npc02, enum monster_id event_npc03, enum monster_id event_npc04);
|
|
void SetNewFriendActor(enum monster_id new_friend);
|
|
|
|
#endif
|