shithub: pokecrystal

Download patch

ref: 90c18c5cf320be70b0507deda0dd7611052f2bec
parent: 37c009ca1c1bd510b050e9801d3d3311cb552aba
author: yenatch <[email protected]>
date: Thu Jul 4 11:42:01 EDT 2013

rst $28 -> JumpTable

--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -6796,7 +6796,7 @@
 ; jump
 	dec a
 	ld hl, .ptrs
-	rst $28
+	rst JumpTable
 	ret
 .ptrs
 	dw BattleCommand19 ; paralyze
--- a/constants.asm
+++ b/constants.asm
@@ -16,9 +16,10 @@
 INCLUDE "constants/music_constants.asm"
 
 
-; rst vectors
+; macros require rst vectors to be defined
 FarCall    EQU $08
 Bankswitch EQU $10
+JumpTable  EQU $28
 
 
 dwb: MACRO
--- a/main.asm
+++ b/main.asm
@@ -7181,7 +7181,7 @@
 	ld a, [CurItem]
 	dec a
 	ld hl, ItemEffects
-	rst $28
+	rst JumpTable
 	ret
 ; e73c
 
@@ -8558,7 +8558,7 @@
 	rlca
 	rlca
 	ld hl, .Pockets
-	rst $28
+	rst JumpTable
 	ret
 
 .Pockets
@@ -8652,7 +8652,7 @@
 	callba CheckItemMenu
 	ld a, [$d142]
 	ld hl, .SwitchTo
-	rst $28
+	rst JumpTable
 	ret
 
 .SwitchTo
@@ -9068,7 +9068,7 @@
 	rst $8
 	ld a, [$d142]
 	ld hl, JumpTable158e7
-	rst $28
+	rst JumpTable
 	pop af
 	ld [$c2ce], a
 	ret
@@ -12295,7 +12295,7 @@
 	ld a, [$cfa9]
 	dec a
 	ld hl, $4861
-	rst $28
+	rst JumpTable
 
 .asm_44860
 	ret
@@ -13415,7 +13415,7 @@
 	ld a, [$cf63]
 	and $7f
 	ld hl, StatsScreenPointerTable
-	rst $28
+	rst JumpTable
 	call $5d3a ; check for keys?
 	ld a, [$cf63]
 	bit 7, a
@@ -13565,7 +13565,7 @@
 	jr z, .asm_50084 ; 0x5007a $8
 	push hl
 	ld hl, $4089
-	rst $28
+	rst JumpTable
 	pop hl
 	jr .asm_50077 ; 0x50082 $f3
 .asm_50084
@@ -17079,7 +17079,7 @@
 DoEvents: ; 96795
 	ld a, [$d433]
 	ld hl, .pointers
-	rst $28
+	rst JumpTable
 	ret
 ; 9679d
 
@@ -17416,7 +17416,7 @@
 .IsSign
 	ld a, [$d040]
 	ld hl, .signs
-	rst $28
+	rst JumpTable
 	ret
 
 .signs
@@ -17535,7 +17535,7 @@
 	callba DoPlayerMovement
 	ld a, c
 	ld hl, .pointers
-	rst $28
+	rst JumpTable
 	ld a, c
 	ret
 ; 96afd
@@ -17666,7 +17666,7 @@
 .loop
 	ld a, [ScriptMode]
 	ld hl, .modes
-	rst $28
+	rst JumpTable
 	call CheckScript
 	jr nz, .loop
 	ret
@@ -17720,7 +17720,7 @@
 RunScriptCommand: ; 96ca9
 	call GetScriptByte
 	ld hl, ScriptCommandTable
-	rst $28
+	rst JumpTable
 	ret
 ; 96cb1