From c8dbc6dd98330aa71a6bfabc2947910e271e79d7 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 14 Apr 2016 17:02:37 -0700 Subject: [PATCH] misc asm cleanup --- Lua/inject/print.asm | 62 -------------------------------------- Lua/monitor debug text.lua | 2 +- patch/extra.asm | 3 +- 3 files changed, 2 insertions(+), 65 deletions(-) diff --git a/Lua/inject/print.asm b/Lua/inject/print.asm index 3314b51..6414414 100644 --- a/Lua/inject/print.asm +++ b/Lua/inject/print.asm @@ -42,32 +42,6 @@ str: .include "simple text.asm" -ObjectSpawnWrap: - // keep track of which objects we're spawning - // TODO: reset count on scene change - push 4, ra, 1 - - // stuff for jump-only hook - //li a0, 0x802237C4 - //mov a1, a3 - - //beqi a1, 2, + // don't bother loading gameplay_field_keep - lwu t0, spawn_count - sll t2, t0, 1 - la t1, spawned - addu t1, t1, t2 - addiu t0, t0, 1 - sw t0, spawn_count - sh a1, 0(t1) - jal @ObjectSpawn - nop -+: - jpop 4, ra, 1 -spawn_count: - .word 0 -spawned: - .halfword 0, 0, 0, 0, 0, 0, 0, 0 - // keep track of where we are in the buffer buffer_pos: .word 0 @@ -93,39 +67,3 @@ copy_loop: sw t0, buffer_pos jr nop - -// force objects to load - -/* jump-only hook -.org 0x80098180 - j ObjectSpawnWrap - nop -*/ - -.org @ObjectIndex - // we have space for 22 instructions - push 4, ra, 1 - //sll a1, a1, 0x10 - //sra a1, a1, 0x10 - mov t0, a0 - lbu t1, 8(a0) // remaining items - cl v0 --: - lh t2, 12(t0) // item's object number - // t2 = abs(t2) - bgez t2, + - nop - subu t2, r0, t2 -+: - beq a1, t2, + - subi t1, t1, 1 - addiu v0, v0, 1 - addi t0, t0, 68 - bnez t1, - - nop - jal ObjectSpawnWrap - nop - //subiu v0, r0, -1 -+: - jpop 4, ra, 1 - // 19 words diff --git a/Lua/monitor debug text.lua b/Lua/monitor debug text.lua index b7db1e2..94164c0 100644 --- a/Lua/monitor debug text.lua +++ b/Lua/monitor debug text.lua @@ -2,7 +2,7 @@ require "lib.setup" require "boilerplate" -local buffer = 0x700070 +local buffer = 0x700180 local vfc = A(0x168960, 4) diff --git a/patch/extra.asm b/patch/extra.asm index 8e80a9d..de569e5 100644 --- a/patch/extra.asm +++ b/patch/extra.asm @@ -1,5 +1,4 @@ -; note: we check the first byte here to determine if we've been loaded already - .word 0xDEADBEEF ; so this can't be 0x00xxxxxx + .word 0xDEADBEEF whatever: ; debugging stuff .word 0