diff --git a/dcb/src/game/exe/func.rs b/dcb/src/game/exe/func.rs index 3ec6571..f923c65 100644 --- a/dcb/src/game/exe/func.rs +++ b/dcb/src/game/exe/func.rs @@ -86,6 +86,7 @@ impl Func<&'static str> { Pos(0x80056284) => "^", Pos(0x80056288) => "^", Pos(0x8005628c) => "^", + Pos(0x800562a8) => "Initialize stack to (*StackStart - 0x10) | 0x80000000", Pos(0x800562f8) => "args: (0x8007f988, ???)", Pos(0x8005630c) => "args: (0x8007f98c)", Pos(0x80056324) => "args: (string_0, string_0)", diff --git a/dcb/src/game/exe/func/funcs.rs b/dcb/src/game/exe/func/funcs.rs index 9914243..609f545 100644 --- a/dcb/src/game/exe/func/funcs.rs +++ b/dcb/src/game/exe/func/funcs.rs @@ -140,7 +140,8 @@ impl Funcs { .iter() .zip(0..) .map(|(&target, idx)| { - let end_pos = returns.range(target..).next().copied().unwrap_or(target); + // Note: +8 for return + instruction after. + let end_pos = returns.range(target..).next().copied().unwrap_or(target) + 8; let labels = labels .range(target..end_pos) .zip(0..)