fix(main): align 5 forward declarations with their definitions (§376), byte-neutral

Each of these five had a TU forward declaration that contradicted the real signature,
which is what made gate_main drop their byte-correct drafts:

  func_800316F8  void f(void*)            -> void f(s32)        + cast at the one call
  func_8003602C  void f(void)             -> void f(s32)          (use is address-taken)
  func_80036260  void f(void)             -> int  f(void)         (use is address-taken)
  func_80038FFC  void f(u8**)             -> s32  f(s32*)       + cast at the one call
  func_80039C70  void f(void*,s16,u8)     -> void f(u8*,s16,s16)

Verified byte-identical with NO draft substituted, so any later gate failure is
attributable to the draft and not to this edit.

OPERATIONAL NOTE: gate_main's first action is , so an
UNCOMMITTED declaration edit is silently discarded and the gate then judges the drafts
against the old declarations. Commit alignment work before gating (R42's shape, seen
from the tool's side).
This commit is contained in:
Drew T
2026-09-02 13:32:32 -06:00
parent 483e2514a3
commit 11dda014ee
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -2996,7 +2996,7 @@ extern s32 D_800C7D2C;
extern void func_8002EFF8(s32 a0, s32 a1);
extern void func_8003D3B4(s32, s32);
extern void func_800314DC(struct Obj *);
extern void func_800316F8(void *);
extern void func_800316F8(s32); /* §376: the definition takes s32; cast at the use site */
extern void func_80031988(struct Ent30D80 *);
typedef struct VoiceF80 {
@@ -3048,7 +3048,7 @@ void func_80030F80(void)
*(s32 *)p -= 1;
if (*(s32 *)p == 0) {
func_8002EFF8(1, tbl[*(u16 *)(p + 0xA)]);
func_800316F8(p);
func_800316F8((s32)p);
}
} else {
if (p[0x4E] >= 2) {
+5 -5
View File
@@ -95,7 +95,7 @@ extern u32 CdMode(void);
extern void CdFlush(void);
extern void *CdReadyCallback(void *func);
extern void func_800377D8(void); /* this loader's CdlReadN ready-callback */
extern void func_80036260(void); /* sub-handler passed to func_80037CD8 */
extern int func_80036260(void); /* sub-handler passed to func_80037CD8; §376: the definition returns int */
extern void func_8002EC10(void);
extern void func_80037334(void);
extern void func_80037358(int posInt);
@@ -464,7 +464,7 @@ extern void func_80034DFC(s16);
extern s32 func_8003EDE8(s32, s32, s32);
extern void func_80035C4C(void);
extern void func_80036F98(void);
extern void func_8003602C(void);
extern void func_8003602C(s32); /* §376: the definition takes s32 (the use is address-taken and already cast) */
extern void func_80036FB0(s32, s32);
void func_80036D58(s16 arg0)
@@ -1876,7 +1876,7 @@ extern s16 D_800A4EF8;
extern u16 D_800A4EE0;
extern u8 D_800A4F16;
extern s32 func_80038FC4(u8 **);
extern void func_80038FFC(u8 **);
extern s32 func_80038FFC(s32 *); /* §376: the definition returns s32 and takes s32* */
void func_80038A58(void)
{
@@ -1975,7 +1975,7 @@ void func_80038A58(void)
*(s32 *)(p - 8) = 0;
do {
if (p[0x1E8] != 0) {
func_80038FFC((u8 **)base);
func_80038FFC((s32 *)base);
if (p[0x1E9] != 0) {
p[0x1EA] = 0;
p[0x1E8] = 0;
@@ -2209,7 +2209,7 @@ void func_80039F14(u8 *arg0, s16 arg1, u8 arg2) {
arg0[0x21] = b | 2;
}
extern void func_80039C70(void *arg0, s16 arg1, u8 arg2);
extern void func_80039C70(u8 *arg0, s16 arg1, s16 arg2); /* §376: matches the definition */
extern void func_80039DEC(void *arg0, s16 arg1, u8 arg2);
void func_80039F50(u8 **a0, s16 a1)