From c3c9d632e0a554a8b7b51bce58fead6722ba46c8 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 9 Jan 2016 09:19:21 -0800 Subject: [PATCH] skip loading scene/room actors/objects --- Lua/inject/spawn mm.asm | 21 +++++++++++++++++++++ Lua/inject/spawn.asm | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Lua/inject/spawn mm.asm b/Lua/inject/spawn mm.asm index e4c4cc3..db6a5b9 100644 --- a/Lua/inject/spawn mm.asm +++ b/Lua/inject/spawn mm.asm @@ -20,3 +20,24 @@ [upgrades_2_offset]: 0xBA .include "spawn.asm" + +[whatever]: 0x807D0000 // stupid hack since i can't store/restore PC (not yet!) +.org @whatever + push 5, ra + lhu t0, 0(a1) + andi t0, t0, 0x07FF + bnei t0, 0x0C5, + // skip if not title screen actor + nop + jal 0x800BB2D0 // original code + nop ++: + jpop 5, ra + +.org 0x800B9430 // part of scene actor loading routine + jal @whatever + +.org 0x8012FC18 // scene command 0x0B (objects) + // don't load any objects manually, + // since spawn.asm handles that automatically + jr + nop diff --git a/Lua/inject/spawn.asm b/Lua/inject/spawn.asm index 3c06311..1e33893 100644 --- a/Lua/inject/spawn.asm +++ b/Lua/inject/spawn.asm @@ -98,7 +98,7 @@ simple_spawn: // args: a0 (actor to spawn) li t9, 0x0000007F sw t9, 0x28(sp) // unknown li t9, 0x000003FF - sw t9, 0x2C(sp) // unknown + sw t9, 0x2C(sp) // spawn time? (probably MM only) li t9, 0x00000000 sw t9, 0x30(sp) // unknown jal @actor_spawn