rst $28 -> JumpTable

This commit is contained in:
yenatch
2013-07-04 15:42:01 -04:00
parent 37c009ca1c
commit 90c18c5cf3
3 changed files with 15 additions and 14 deletions

View File

@@ -6796,7 +6796,7 @@ BattleCommandac: ; 3658f
; jump ; jump
dec a dec a
ld hl, .ptrs ld hl, .ptrs
rst $28 rst JumpTable
ret ret
.ptrs .ptrs
dw BattleCommand19 ; paralyze dw BattleCommand19 ; paralyze

View File

@@ -16,9 +16,10 @@ INCLUDE "constants/script_constants.asm"
INCLUDE "constants/music_constants.asm" INCLUDE "constants/music_constants.asm"
; rst vectors ; macros require rst vectors to be defined
FarCall EQU $08 FarCall EQU $08
Bankswitch EQU $10 Bankswitch EQU $10
JumpTable EQU $28
dwb: MACRO dwb: MACRO

View File

@@ -7181,7 +7181,7 @@ _DoItemEffect: ; e722
ld a, [CurItem] ld a, [CurItem]
dec a dec a
ld hl, ItemEffects ld hl, ItemEffects
rst $28 rst JumpTable
ret ret
; e73c ; e73c
@@ -8558,7 +8558,7 @@ CheckRegisteredItem: ; 13345
rlca rlca
rlca rlca
ld hl, .Pockets ld hl, .Pockets
rst $28 rst JumpTable
ret ret
.Pockets .Pockets
@@ -8652,7 +8652,7 @@ UseRegisteredItem: ; 133c3
callba CheckItemMenu callba CheckItemMenu
ld a, [$d142] ld a, [$d142]
ld hl, .SwitchTo ld hl, .SwitchTo
rst $28 rst JumpTable
ret ret
.SwitchTo .SwitchTo
@@ -9068,7 +9068,7 @@ Function158cc: ; 0x158cc
rst $8 rst $8
ld a, [$d142] ld a, [$d142]
ld hl, JumpTable158e7 ld hl, JumpTable158e7
rst $28 rst JumpTable
pop af pop af
ld [$c2ce], a ld [$c2ce], a
ret ret
@@ -12295,7 +12295,7 @@ Function4484a: ; 0x4484a
ld a, [$cfa9] ld a, [$cfa9]
dec a dec a
ld hl, $4861 ld hl, $4861
rst $28 rst JumpTable
.asm_44860 .asm_44860
ret ret
@@ -13415,7 +13415,7 @@ StatsScreenMain: ; 0x4dcd2
ld a, [$cf63] ld a, [$cf63]
and $7f and $7f
ld hl, StatsScreenPointerTable ld hl, StatsScreenPointerTable
rst $28 rst JumpTable
call $5d3a ; check for keys? call $5d3a ; check for keys?
ld a, [$cf63] ld a, [$cf63]
bit 7, a bit 7, a
@@ -13565,7 +13565,7 @@ WritePartyMenuTilemap: ; 0x5005f
jr z, .asm_50084 ; 0x5007a $8 jr z, .asm_50084 ; 0x5007a $8
push hl push hl
ld hl, $4089 ld hl, $4089
rst $28 rst JumpTable
pop hl pop hl
jr .asm_50077 ; 0x50082 $f3 jr .asm_50077 ; 0x50082 $f3
.asm_50084 .asm_50084
@@ -17079,7 +17079,7 @@ INCBIN "baserom.gbc", $966b0, $96795 - $966b0
DoEvents: ; 96795 DoEvents: ; 96795
ld a, [$d433] ld a, [$d433]
ld hl, .pointers ld hl, .pointers
rst $28 rst JumpTable
ret ret
; 9679d ; 9679d
@@ -17416,7 +17416,7 @@ TryReadSign: ; 96a38
.IsSign .IsSign
ld a, [$d040] ld a, [$d040]
ld hl, .signs ld hl, .signs
rst $28 rst JumpTable
ret ret
.signs .signs
@@ -17535,7 +17535,7 @@ PlayerMovement: ; 96af0
callba DoPlayerMovement callba DoPlayerMovement
ld a, c ld a, c
ld hl, .pointers ld hl, .pointers
rst $28 rst JumpTable
ld a, c ld a, c
ret ret
; 96afd ; 96afd
@@ -17666,7 +17666,7 @@ ScriptEvents: ; 96c5e
.loop .loop
ld a, [ScriptMode] ld a, [ScriptMode]
ld hl, .modes ld hl, .modes
rst $28 rst JumpTable
call CheckScript call CheckScript
jr nz, .loop jr nz, .loop
ret ret
@@ -17720,7 +17720,7 @@ WaitScriptMovement: ; 96c91
RunScriptCommand: ; 96ca9 RunScriptCommand: ; 96ca9
call GetScriptByte call GetScriptByte
ld hl, ScriptCommandTable ld hl, ScriptCommandTable
rst $28 rst JumpTable
ret ret
; 96cb1 ; 96cb1