mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 13:24:02 -05:00
Each was verified at score 0 against its NORTH_AMERICA, EUROPE and JAPAN targets before landing, with the address walk closing exactly in each region, and by a matching US build after. main_0200224C.c sub_02002228, ClampedLn main_020114F8.c ApplyGummiBoostsToTeamMember main_0200F798.c RemoveItemNoHoleCheck main_02062A58.c CanMonsterBeUsedForMission main_0205D11C.c CountAndPopulateValidMissionTableMonsters overlay_10_022BCC60.c ov10_022BCDF4 overlay_29_022E4338.c PlayEffectAnimationEntityStandard overlay_29_022EAC7C.c MusicTableIdxToMusicId overlay_29_022ECDC0.c ov29_022ECD84 overlay_29_022F0590.c ov29_022F0534 overlay_29_0230A9DC.c AftermathCheck dungeon_logic_6.c ov29_022EFB20 Every one sat at the head or tail of its .s, so all thirteen merge into an adjacent source file and no assembly file is split. sub_02002228 is one instruction and was taken only because it is the single function standing between ClampedLn and the end of its file. Ten call-site declarations are replaced by an include of the owning header, including three unprototyped `extern int ov29_...();` forms in src/overlay_29_02308FBC.c that became hard conflicts the moment these functions had real headers to contradict. Three implicit-conversion errors were fixed by correcting a declaration rather than by adding a cast, which is the better repair when the declaration is ours: RANDOM_MUSIC_ID_TABLE had no C declaration anywhere, so the u16 in the first draft was a guess. It is declared `enum music_id[30][4]` here; -enum min sizes that enum (max 999) to two bytes, so the layout is unchanged and the cast is unnecessary. GetBaseForm and IsMonsterMissionAllowed had no declaration either, and the invented `enum monster_id` parameters created the conversions. They take s16 here, matching the tree's own FemaleToMaleForm(s16) and HasMonsterBeenAttackedInDungeons(s16) for the same ids. One cast is kept deliberately: MUSIC_ID_TABLE entries carry a 0x8000 flag bit that the source tests and masks off, so an entry is not a valid music_id enumerator and typing that table as the enum would be false. Two generated headers are made self-contained -- overlay_29_022EAC7C.h named enum music_id and main_0200224C.h named struct fixed_point_64 without including anything, so each prototype built its own scoped tag and the definition read as a redeclaration with a different type. 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>
13 lines
258 B
C
13 lines
258 B
C
#ifndef PMDSKY_MAIN_0200F798_H
|
|
#define PMDSKY_MAIN_0200F798_H
|
|
|
|
#include "item.h"
|
|
|
|
u32 RemoveItemNoHoleCheck(s16 index);
|
|
s16 GetFirstUnequippedItemOfType(s16 type);
|
|
u32 RemoveItemNoHoleCheck(s16 index);
|
|
|
|
u32 RemoveFirstUnequippedItemOfType(s16 type);
|
|
|
|
#endif
|