ref: 4d17f6e1f6d41b91f5a5de71984a7c6f2bd0041c
parent: 69ee070021bfbc36cf30df446c802f3648b3d5fe
author: PikalaxALT <[email protected]>
date: Sat Oct 24 15:49:19 EDT 2015
Address comments on PR 322
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -8696,11 +8696,11 @@
ld [wd267], a
ld [wd232], a
ld [wd0d8], a
- ld [wKeyItemsPocketPointerLocation], a
- ld [wItemsPocketPointerLocation], a
+ ld [wKeyItemsPocketCursor], a
+ ld [wItemsPocketCursor], a
ld [wd0d2], a
ld [CurMoveNum], a
- ld [wBallsPocketPointerLocation], a
+ ld [wBallsPocketCursor], a
ld [wd0d6], a
ld [wd0e4], a
ld [wd0e0], a
--- a/constants/map_setup_constants.asm
+++ b/constants/map_setup_constants.asm
@@ -1,8 +1,8 @@
- const_def
+const_value SET $f0
const MAPSETUP_00
- const MAPSETUP_01
+ const MAPSETUP_WARP
const MAPSETUP_02
- const MAPSETUP_03
+ const MAPSETUP_RELOADMAP
const MAPSETUP_04
const MAPSETUP_05
const MAPSETUP_06
@@ -10,4 +10,55 @@
const MAPSETUP_08
const MAPSETUP_09
const MAPSETUP_10
- const MAPSETUP_11
+ const MAPSETUP_BADWARP
+
+; Command descriptions from Condensation water's scripting compendium. const_def
+ const_def
+
+ const map_lcd_on
+ const map_lcd_off
+ const map_sound_off
+ const map_music
+ const map_start_music
+ const map_fade_music
+ const map_fade
+ const map_bike_music
+ const map_music_force
+ const map_max_volume
+ const map_load_blocks
+ const map_connection_blocks
+ const map_save_screen
+ const map_buffer_screen
+ const map_load_graphics
+ const map_load_tileset_header
+ const map_time_of_day
+ const map_palettes
+ const map_wildmons
+ const map_sprites
+ const map_change_callback
+ const map_start_callback
+ const map_load_objects
+ const map_load_spawn
+ const map_load_connection
+ const map_load_warp
+ const map_attributes
+ const map_attributes_2
+ const map_clear_bg_palettes
+ const map_fade_out_palettes
+ const map_fade_in_palettes
+ const map_anchor_screen
+ const map_warp_face
+ const map_face_down
+ const map_spawn_coord
+ const map_player_coord
+ const map_prolong_sprites
+ const map_delay_sprites
+ const map_update_roam
+ const map_keep_roam
+ const map_fade_out_music
+ const map_animations_on
+ const map_animations_off
+ const map_keep_palettes
+ const map_text_scroll_off
+ const map_stop_script
+map_end_setup_script EQU -1
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -1,11 +1,11 @@
; trainer groups
enum_start
- trainerclass PHONE ; 0
- const MOM_PHONE
- const OAK_PHONE
- const BILL_PHONE
- const ELM_PHONE
- const BUENA_PHONE
+ trainerclass TRAINER_NONE ; 0
+ const PHONECONTACT_MOM
+ const PHONECONTACT_BIKESHOP
+ const PHONECONTACT_BILL
+ const PHONECONTACT_ELM
+ const PHONECONTACT_BUENA
trainerclass FALKNER ; 1
--- a/engine/battle_start.asm
+++ b/engine/battle_start.asm
@@ -13,7 +13,7 @@
ld [hl], $1
.loop
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .done
call FlashyTransitionToBattle
@@ -72,7 +72,7 @@
call DelayFrame
xor a
ld [hBGMapMode], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
xor a
rept 2
ld [hli], a
@@ -146,7 +146,7 @@
FlashyTransitionToBattle: ; 8c314
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, .jumptable
@@ -230,7 +230,7 @@
ld hl, .StartingPoints
add hl, de
ld a, [hl]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 8c38f (23:438f)
@@ -242,11 +242,11 @@
StartTrainerBattle_Finish: ; 8c393 (23:4393)
call ClearSprites
ld a, $80
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
StartTrainerBattle_NextScene: ; 8c39c (23:439c)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -331,7 +331,7 @@
.end
ld a, $20
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.DoSineWave: ; 8c419 (23:4419)
@@ -416,7 +416,7 @@
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld a, $20
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 8c490 (23:4490)
@@ -540,7 +540,7 @@
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld a, $20
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.BlackOutRandomTile: ; 8c5b8 (23:45b8)
@@ -836,7 +836,7 @@
.done
ld a, $20
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 8c792 (23:4792)
--- a/engine/credits.asm
+++ b/engine/credits.asm
@@ -124,7 +124,7 @@
jr z, .asm_10984f
ld a, $40
.asm_10984f
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, [rSVBK]
push af
@@ -225,7 +225,7 @@
ld a, [hJoypadDown]
and $1
ret z
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
ret
; 109908
@@ -234,7 +234,7 @@
ld a, [hJoypadDown]
and $2
ret z
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 6, a
ret z
ld hl, CreditsPos
@@ -255,7 +255,7 @@
; 109926
Function109926: ; 109926
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
and $f
ld e, a
ld d, 0
@@ -287,12 +287,12 @@
Function109951: ; 109951 (42:5951)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
Function109956: ; 109956 (42:5956)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
ld a, [hl]
and $f0
ld [hl], a
@@ -348,7 +348,7 @@
ParseCredits: ; 1099aa
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
bit 7, [hl]
jp nz, .done
@@ -488,7 +488,7 @@
.end
; Stop execution.
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ld a, $20
ld [MusicFade], a
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -138,19 +138,19 @@
call ClearAllScriptFlags3
ld a, [hMapEntryMethod]
- cp ($f << 4) + MAPSETUP_07
+ cp MAPSETUP_07
jr nz, .dontset
call SetAll_ScriptFlags3
.dontset
ld a, [hMapEntryMethod]
- cp ($f << 4) + MAPSETUP_03
+ cp MAPSETUP_RELOADMAP
jr nz, .dontresetpoison
xor a
ld [PoisonStepCount], a
.dontresetpoison
- xor a ; ($0 << 4) + MAPSETUP_00
+ xor a ; end map entry
ld [hMapEntryMethod], a
ld a, 2 ; HandleMap
ld [MapStatus], a
@@ -320,7 +320,7 @@
pop af
ld [ScriptRunning], a
- call Function96beb
+ call DoPlayerEvent
ld a, [ScriptRunning]
cp 4
jr z, .ok2
@@ -361,7 +361,7 @@
callba CheckMovingOffEdgeOfMap
jr c, .return4
- call Function2238
+ call CheckWarpTile
jr c, .return6
.bit2
@@ -436,7 +436,11 @@
ret
; 968d7
-SetMinTwoStepWildEncounterCooldown: mobile ; 968d7
+ret_968d7: ; 968d7
+ ret
+;968d8
+
+SetMinTwoStepWildEncounterCooldown: ; 968d8
ld a, [wWildEncounterCooldown]
cp 2
ret nc
@@ -453,7 +457,7 @@
; 968ec
DoMapTrigger: ; 968ec
- ld a, [wdc07]
+ ld a, [wCurrMapTriggerCount]
and a
jr z, .nope
@@ -464,7 +468,7 @@
ld e, a
ld d, 0
- ld hl, wdc08
+ ld hl, wCurrMapTriggerHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -852,7 +856,7 @@
; 96b10
.seven ; 96b10
- call SetMinTwoStepWildEncounterCooldown ; mobile
+ call ret_968d7 ; mobile
xor a
ld c, a
ret
@@ -1040,7 +1044,7 @@
ret
; 96beb
-Function96beb: ; 96beb
+DoPlayerEvent: ; 96beb
ld a, [ScriptRunning]
and a
ret z
@@ -1093,16 +1097,16 @@
WarpToNewMapScript: ; 96c34
warpsound
- newloadmap ($f << 4) + MAPSETUP_05
+ newloadmap MAPSETUP_05
end
; 96c38
FallIntoMapScript: ; 96c38
- newloadmap ($f << 4) + MAPSETUP_06
+ newloadmap MAPSETUP_06
playsound SFX_KINESIS
applymovement PLAYER, MovementData_0x96c48
playsound SFX_STRENGTH
- scall UnknownScript_0x96c4a
+ scall LandAfterPitfallScript
end
; 96c48
@@ -1111,7 +1115,7 @@
step_end
; 96c4a
-UnknownScript_0x96c4a: ; 96c4a
+LandAfterPitfallScript: ; 96c4a
earthquake 16
end
; 96c4d
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -32,170 +32,170 @@
; 1538f
MapSetupScript4: ; 1538f
- map_prolong_sprites
+ db map_prolong_sprites
MapSetupScript12: ; 15390
- map_fade_out_palettes
- map_keep_roam
+ db map_fade_out_palettes
+ db map_keep_roam
MapSetupScript1: ; 15392
- map_lcd_off
- map_sound_off
- map_load_spawn
- map_attributes
- map_change_callback
- map_spawn_coord
- map_player_coord
- map_anchor_screen
- map_load_blocks
- map_buffer_screen
- map_load_graphics
- map_time_of_day
- map_load_objects
- map_lcd_on
- map_palettes
- map_face_down
- map_sprites
- map_bike_music
- map_max_volume
- map_fade_in_palettes
- map_animations_on
- map_wildmons
- map_end_setup_script
+ db map_lcd_off
+ db map_sound_off
+ db map_load_spawn
+ db map_attributes
+ db map_change_callback
+ db map_spawn_coord
+ db map_player_coord
+ db map_anchor_screen
+ db map_load_blocks
+ db map_buffer_screen
+ db map_load_graphics
+ db map_time_of_day
+ db map_load_objects
+ db map_lcd_on
+ db map_palettes
+ db map_face_down
+ db map_sprites
+ db map_bike_music
+ db map_max_volume
+ db map_fade_in_palettes
+ db map_animations_on
+ db map_wildmons
+ db map_end_setup_script
MapSetupScript11: ; 153a9
- map_load_spawn
- map_attributes
- map_change_callback
- map_spawn_coord
- map_player_coord
- map_anchor_screen
- map_load_blocks
- map_buffer_screen
- map_lcd_off
- map_load_graphics
- map_time_of_day
- map_fade_out_music
- map_lcd_on
- map_load_objects
- map_palettes
- map_face_down
- map_sprites
- map_fade_music
- map_fade_in_palettes
- map_animations_on
- map_wildmons
- map_end_setup_script
+ db map_load_spawn
+ db map_attributes
+ db map_change_callback
+ db map_spawn_coord
+ db map_player_coord
+ db map_anchor_screen
+ db map_load_blocks
+ db map_buffer_screen
+ db map_lcd_off
+ db map_load_graphics
+ db map_time_of_day
+ db map_fade_out_music
+ db map_lcd_on
+ db map_load_objects
+ db map_palettes
+ db map_face_down
+ db map_sprites
+ db map_fade_music
+ db map_fade_in_palettes
+ db map_animations_on
+ db map_wildmons
+ db map_end_setup_script
MapSetupScript7: ; 153bf
- map_animations_off
- map_load_connection
- map_attributes
- map_change_callback
- map_player_coord
- map_load_blocks
- map_load_tileset_header
- map_save_screen
- map_load_objects
- map_fade_music
- map_palettes
- map_stop_script
- map_keep_palettes
- map_wildmons
- map_update_roam
- map_animations_on
- map_end_setup_script
+ db map_animations_off
+ db map_load_connection
+ db map_attributes
+ db map_change_callback
+ db map_player_coord
+ db map_load_blocks
+ db map_load_tileset_header
+ db map_save_screen
+ db map_load_objects
+ db map_fade_music
+ db map_palettes
+ db map_stop_script
+ db map_keep_palettes
+ db map_wildmons
+ db map_update_roam
+ db map_animations_on
+ db map_end_setup_script
MapSetupScript6: ; 153d0
- map_prolong_sprites
+ db map_prolong_sprites
MapSetupScript5: ; 153d1
- map_fade_out_palettes
+ db map_fade_out_palettes
MapSetupScript9: ; 153d2
- map_load_warp
- map_attributes
- map_warp_face
- map_change_callback
- map_player_coord
- map_load_blocks
- map_buffer_screen
- map_lcd_off
- map_load_graphics
- map_time_of_day
- map_fade_out_music
- map_lcd_on
- map_load_objects
- map_palettes
- map_sprites
- map_fade_music
- map_fade_in_palettes
- map_animations_on
- map_wildmons
- map_update_roam
- map_end_setup_script
+ db map_load_warp
+ db map_attributes
+ db map_warp_face
+ db map_change_callback
+ db map_player_coord
+ db map_load_blocks
+ db map_buffer_screen
+ db map_lcd_off
+ db map_load_graphics
+ db map_time_of_day
+ db map_fade_out_music
+ db map_lcd_on
+ db map_load_objects
+ db map_palettes
+ db map_sprites
+ db map_fade_music
+ db map_fade_in_palettes
+ db map_animations_on
+ db map_wildmons
+ db map_update_roam
+ db map_end_setup_script
MapSetupScript3: ; 153e7
- map_fade
- map_clear_bg_palettes
- map_lcd_off
- map_sound_off
- map_load_blocks
- map_connection_blocks
- map_load_graphics
- map_time_of_day
- map_lcd_on
- map_palettes
- map_sprites
- map_music_force
- map_fade_in_palettes
- map_animations_on
- map_wildmons
- map_end_setup_script
+ db map_fade
+ db map_clear_bg_palettes
+ db map_lcd_off
+ db map_sound_off
+ db map_load_blocks
+ db map_connection_blocks
+ db map_load_graphics
+ db map_time_of_day
+ db map_lcd_on
+ db map_palettes
+ db map_sprites
+ db map_music_force
+ db map_fade_in_palettes
+ db map_animations_on
+ db map_wildmons
+ db map_end_setup_script
MapSetupScript8: ; 153f7
- map_fade
- map_lcd_off
- map_sound_off
- map_change_callback
- map_load_blocks
- map_buffer_screen
- map_load_graphics
- map_time_of_day
- map_lcd_on
- map_palettes
- map_sprites
- map_bike_music
- map_fade_in_palettes
- map_animations_on
- map_wildmons
- map_text_scroll_off
- map_end_setup_script
+ db map_fade
+ db map_lcd_off
+ db map_sound_off
+ db map_change_callback
+ db map_load_blocks
+ db map_buffer_screen
+ db map_load_graphics
+ db map_time_of_day
+ db map_lcd_on
+ db map_palettes
+ db map_sprites
+ db map_bike_music
+ db map_fade_in_palettes
+ db map_animations_on
+ db map_wildmons
+ db map_text_scroll_off
+ db map_end_setup_script
MapSetupScript2: ; 15408
- map_lcd_off
- map_sound_off
- map_attributes_2
- map_anchor_screen
- map_start_callback
- map_load_blocks
- map_connection_blocks
- map_buffer_screen
- map_load_graphics
- map_time_of_day
- map_lcd_on
- map_palettes
- map_sprites
- map_bike_music
- map_fade_in_palettes
- map_animations_on
- map_wildmons
- map_end_setup_script
+ db map_lcd_off
+ db map_sound_off
+ db map_attributes_2
+ db map_anchor_screen
+ db map_start_callback
+ db map_load_blocks
+ db map_connection_blocks
+ db map_buffer_screen
+ db map_load_graphics
+ db map_time_of_day
+ db map_lcd_on
+ db map_palettes
+ db map_sprites
+ db map_bike_music
+ db map_fade_in_palettes
+ db map_animations_on
+ db map_wildmons
+ db map_end_setup_script
MapSetupScript10: ; 1541a
- map_load_blocks
- map_connection_blocks
- map_end_setup_script
+ db map_load_blocks
+ db map_connection_blocks
+ db map_end_setup_script
ReadMapSetupScript: ; 1541d
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -5,7 +5,7 @@
call Function1068a
.loop
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .done
call Function10026
@@ -21,7 +21,7 @@
; 10026
Function10026: ; 10026
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, Jumptable_10030
call Function1086b
jp [hl]
@@ -47,7 +47,7 @@
ld [hBGMapMode], a ; $ff00+$d4
call Function10955
ld a, [wcf64]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Function10a40
ret
@@ -63,8 +63,8 @@
Function10067: ; 10067 (4:4067)
ld hl, MenuDataHeader_0x10a4f
call CopyMenuDataHeader
- ld a, [wItemsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wItemsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0df]
ld [wd0e4], a
call Function350c
@@ -71,7 +71,7 @@
ld a, [wd0e4]
ld [wd0df], a
ld a, [wcfa9]
- ld [wItemsPocketPointerLocation], a
+ ld [wItemsPocketCursor], a
ld b, $7
ld c, $3
call Function108d4
@@ -91,8 +91,8 @@
Function100a6: ; 100a6 (4:40a6)
ld hl, MenuDataHeader_0x10a7f
call CopyMenuDataHeader
- ld a, [wKeyItemsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wKeyItemsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0e0]
ld [wd0e4], a
call Function350c
@@ -99,7 +99,7 @@
ld a, [wd0e4]
ld [wd0e0], a
ld a, [wcfa9]
- ld [wKeyItemsPocketPointerLocation], a
+ ld [wKeyItemsPocketCursor], a
ld b, $3
ld c, $7
call Function108d4
@@ -221,8 +221,8 @@
Function10198: ; 10198 (4:4198)
ld hl, MenuDataHeader_0x10aaf
call CopyMenuDataHeader
- ld a, [wBallsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wBallsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0e1]
ld [wd0e4], a
call Function350c
@@ -229,7 +229,7 @@
ld a, [wd0e4]
ld [wd0e1], a
ld a, [wcfa9]
- ld [wBallsPocketPointerLocation], a
+ ld [wBallsPocketCursor], a
ld b, $1
ld c, $5
call Function108d4
@@ -494,7 +494,7 @@
and a
jr z, .Oak
ld a, $a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 10364 (4:4364)
@@ -537,19 +537,19 @@
.asm_103aa
xor a
- ld [wBallsPocketPointerLocation], a
+ ld [wBallsPocketCursor], a
ld [wd0e1], a
ret
.asm_103b2
xor a
- ld [wItemsPocketPointerLocation], a
+ ld [wItemsPocketCursor], a
ld [wd0df], a
ret
.asm_103ba
xor a
- ld [wKeyItemsPocketPointerLocation], a
+ ld [wKeyItemsPocketCursor], a
ld [wd0e0], a
ret
; 103c2
@@ -613,7 +613,7 @@
call PrintText
jr .asm_10427
.asm_10453
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
ld a, [wcf64]
push af
@@ -626,7 +626,7 @@
pop af
ld [wcf64], a
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
.asm_10475
pop af
ld [Options], a
@@ -660,7 +660,7 @@
call Function1068a
.asm_1049b
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_104ad
call Function104b9
@@ -676,7 +676,7 @@
; 104b9
Function104b9: ; 104b9
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, Jumptable_104c3
call Function1086b
jp [hl]
@@ -702,7 +702,7 @@
ld [hBGMapMode], a ; $ff00+$d4
call Function10955
ld a, [wcf64]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Function10a40
ret
@@ -718,8 +718,8 @@
Function104fa: ; 104fa (4:44fa)
ld hl, MenuDataHeader_0x10a4f
call CopyMenuDataHeader
- ld a, [wItemsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wItemsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0df]
ld [wd0e4], a
call Function350c
@@ -726,7 +726,7 @@
ld a, [wd0e4]
ld [wd0df], a
ld a, [wcfa9]
- ld [wItemsPocketPointerLocation], a
+ ld [wItemsPocketCursor], a
ld b, $7
ld c, $3
call Function108d4
@@ -746,8 +746,8 @@
Function10539: ; 10539 (4:4539)
ld hl, MenuDataHeader_0x10a7f
call CopyMenuDataHeader
- ld a, [wKeyItemsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wKeyItemsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0e0]
ld [wd0e4], a
call Function350c
@@ -754,7 +754,7 @@
ld a, [wd0e4]
ld [wd0e0], a
ld a, [wcfa9]
- ld [wKeyItemsPocketPointerLocation], a
+ ld [wKeyItemsPocketCursor], a
ld b, $3
ld c, $7
call Function108d4
@@ -797,8 +797,8 @@
Function105a6: ; 105a6 (4:45a6)
ld hl, MenuDataHeader_0x10aaf
call CopyMenuDataHeader
- ld a, [wBallsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wBallsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0e1]
ld [wd0e4], a
call Function350c
@@ -805,7 +805,7 @@
ld a, [wd0e4]
ld [wd0e1], a
ld a, [wcfa9]
- ld [wBallsPocketPointerLocation], a
+ ld [wBallsPocketCursor], a
ld b, $1
ld c, $5
call Function108d4
@@ -931,7 +931,7 @@
jr z, .asm_10684
.asm_1067e: ; 1067e (4:467e)
ld a, $a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_10684: ; 10684 (4:4684)
@@ -947,7 +947,7 @@
Function1068a: ; 1068a
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, [wd0d6]
and $3
ld [wcf65], a
@@ -965,7 +965,7 @@
Function106a5: ; 106a5
xor a
ld [hBGMapMode], a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -984,7 +984,7 @@
; 106c7
Function106c7: ; 106c7
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, Jumptable_106d1
call Function1086b
jp [hl]
@@ -1003,8 +1003,8 @@
call InitPocket
ld hl, MenuDataHeader_0x10a67
call CopyMenuDataHeader
- ld a, [wItemsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wItemsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0df]
ld [wd0e4], a
call Function350c
@@ -1011,7 +1011,7 @@
ld a, [wd0e4]
ld [wd0df], a
ld a, [wcfa9]
- ld [wItemsPocketPointerLocation], a
+ ld [wItemsPocketCursor], a
ret
.KeyItemsPocket: ; 106ff (4:46ff)
@@ -1019,8 +1019,8 @@
call InitPocket
ld hl, MenuDataHeader_0x10a97
call CopyMenuDataHeader
- ld a, [wKeyItemsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wKeyItemsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0e0]
ld [wd0e4], a
call Function350c
@@ -1027,7 +1027,7 @@
ld a, [wd0e4]
ld [wd0e0], a
ld a, [wcfa9]
- ld [wKeyItemsPocketPointerLocation], a
+ ld [wKeyItemsPocketCursor], a
ret
.TMHMPocket: ; 10726 (4:4726)
@@ -1044,8 +1044,8 @@
call InitPocket
ld hl, MenuDataHeader_0x10ac7
call CopyMenuDataHeader
- ld a, [wBallsPocketPointerLocation]
- ld [wPocketPointerLocationBuffer], a
+ ld a, [wBallsPocketCursor]
+ ld [wPocketCursorBuffer], a
ld a, [wd0e1]
ld [wd0e4], a
call Function350c
@@ -1052,7 +1052,7 @@
ld a, [wd0e4]
ld [wd0e1], a
ld a, [wcfa9]
- ld [wBallsPocketPointerLocation], a
+ ld [wBallsPocketCursor], a
ret
InitPocket: ; 10762 (4:4762)
@@ -1093,10 +1093,10 @@
ret
.asm_10795
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
dec a
and $3
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
push de
ld de, SFX_UNKNOWN_62
call PlaySFX
@@ -1105,10 +1105,10 @@
ret
.asm_107a8
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
inc a
and $3
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
push de
ld de, SFX_UNKNOWN_62
call PlaySFX
@@ -1134,7 +1134,7 @@
; 107d7
Function107d7: ; 107d7
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, Jumptable_107e1
call Function1086b
jp [hl]
@@ -1238,7 +1238,7 @@
ret
Function10866: ; 10866 (4:4866)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -1255,7 +1255,7 @@
; 10874
Function10874: ; 10874 (4:4874)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
xor a
ld [wcf66], a
@@ -1262,7 +1262,7 @@
ret
Function1087e: ; 1087e (4:487e)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ld a, $1
ld [wcf66], a
@@ -1346,12 +1346,12 @@
ret
.asm_108fa
ld a, $9
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
scf
ret
.asm_10901
ld a, b
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
push de
ld de, SFX_UNKNOWN_62
@@ -1361,7 +1361,7 @@
ret
.asm_10912
ld a, c
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
push de
ld de, SFX_UNKNOWN_62
--- a/engine/phone.asm
+++ b/engine/phone.asm
@@ -99,7 +99,7 @@
; 90066
PermanentNumbers: ; 90066
- db MOM_PHONE, ELM_PHONE, -1
+ db PHONECONTACT_MOM, PHONECONTACT_ELM, -1
; 90069
@@ -428,7 +428,7 @@
; 90233 (24:4233)
WrongNumber: ; 90233
- db PHONE, PHONE_00
+ db TRAINER_NONE, PHONE_00
dba .script
.script:
writetext .text
@@ -776,17 +776,17 @@
dba \7 ; script 2
ENDM
- phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone PHONE, MOM_PHONE, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript
- phone PHONE, OAK_PHONE, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone PHONE, BILL_PHONE, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2
- phone PHONE, ELM_PHONE, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONECONTACT_MOM, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONECONTACT_BIKESHOP, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONECONTACT_BILL, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2
+ phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2
phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2
phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2
phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2
- phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2
phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2
phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2
@@ -801,7 +801,7 @@
phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2
phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2
phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2
- phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2
phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2
phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2
@@ -813,7 +813,7 @@
phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2
phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2
phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2
- phone PHONE, BUENA_PHONE, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2
+ phone TRAINER_NONE, PHONECONTACT_BUENA, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2
; 90627
SpecialPhoneCallList: ; 90627
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -28,7 +28,7 @@
.main
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .exit
call Function4010b
@@ -75,7 +75,7 @@
call ByteFill
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -173,7 +173,7 @@
; 4010b
Function4010b: ; 4010b
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, Jumptable_40115
call Function41432
jp [hl]
@@ -198,12 +198,12 @@
Function40131: ; 40131 (10:4131)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
Function40136: ; 40136 (10:4136)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -283,7 +283,7 @@
call Function40bd0
ret z
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, $0
ld [wcf64], a
ret
@@ -291,7 +291,7 @@
.select
call Function41401
ld a, $7
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [hSCX], a ; $ff00+$cf
ld a, $a7
@@ -302,7 +302,7 @@
.start
call Function41401
ld a, $5
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [hSCX], a ; $ff00+$cf
ld a, $a7
@@ -312,7 +312,7 @@
.b
ld a, $d
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function40217: ; 40217 (10:4217)
@@ -372,7 +372,7 @@
.asm_40288
call MaxVolume
ld a, [wcf64]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 40292 (10:4292)
@@ -408,7 +408,7 @@
call Function41423
ld a, [CurPartySpecies]
call PlayCry
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
dec [hl]
ret
; 402e8 (10:42e8)
@@ -478,11 +478,11 @@
push af
ld a, [wcf64]
push af
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
callba Function8442c
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
pop af
ld [wcf64], a
pop af
@@ -552,7 +552,7 @@
.asm_403ea
call Function41401
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 403f3 (10:43f3)
@@ -604,13 +604,13 @@
.asm_40431
call Function41401
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function4043a: ; 4043a (10:443a)
call Function41401
ld a, $b
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function40443: ; 40443 (10:4443)
@@ -656,7 +656,7 @@
.asm_40495
call Function41401
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 4049e (10:449e)
@@ -710,7 +710,7 @@
ld [wc7d1], a
call Function41401
ld a, $9
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 40501
@@ -717,7 +717,7 @@
Function40501: ; 40501
call Function41401
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 4050a
@@ -779,7 +779,7 @@
call Function40bd0
ret z
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, $9
ld [wcf64], a
ret
@@ -795,7 +795,7 @@
call ClearSprites
call Function40bdc
ld a, $5
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [hSCX], a ; $ff00+$cf
ld a, $a7
@@ -827,7 +827,7 @@
.asm_405eb
call Function41401
ld a, $7
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call DelayFrame
call Function41a24
jr nz, .asm_40603
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -529,7 +529,7 @@
ld a, [ScriptBank]
ld hl, InterpretMenu
rst FarCall
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
jr nc, .ok
xor a
.ok
@@ -1585,7 +1585,7 @@
xor a
ld [wd459], a
- ld a, ($f << 4) + MAPSETUP_03
+ ld a, MAPSETUP_RELOADMAP
ld [hMapEntryMethod], a
ld a, $1
call LoadMapStatus
@@ -2840,7 +2840,7 @@
ld [YCoord], a
ld a, -1
ld [wd001], a
- ld a, ($f << 4) + MAPSETUP_01
+ ld a, MAPSETUP_WARP
ld [hMapEntryMethod], a
ld a, 1
call LoadMapStatus
@@ -2852,7 +2852,7 @@
call GetScriptByte
ld a, -1
ld [wd001], a
- ld a, ($f << 4) + MAPSETUP_11
+ ld a, MAPSETUP_BADWARP
ld [hMapEntryMethod], a
ld a, 1
call LoadMapStatus
--- a/engine/title.asm
+++ b/engine/title.asm
@@ -9,7 +9,7 @@
ld [hBGMapMode], a
; Reset timing variables
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
ld [hli], a ; cf63 ; Scene?
ld [hli], a ; cf64
ld [hli], a ; cf65 ; Timer lo
--- a/event/buena.asm
+++ b/event/buena.asm
@@ -247,7 +247,7 @@
ld hl, .MenuDataHeader
call CopyMenuDataHeader
ld a, [MenuSelection]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
xor a
ld [wcf76], a
ld [hBGMapMode], a
--- a/event/kurt.asm
+++ b/event/kurt.asm
@@ -62,7 +62,7 @@
ld hl, .MenuDataHeader
call CopyMenuDataHeader
ld a, [MenuSelection]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
xor a
ld [hBGMapMode], a
call Function352f
--- a/event/mom.asm
+++ b/event/mom.asm
@@ -4,9 +4,9 @@
ld a, $1
ld [hInMenu], a
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
.asm_16223
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_1622f
call Function16233
@@ -19,7 +19,7 @@
; 16233
Function16233: ; 16233
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, .jumptable
@@ -57,7 +57,7 @@
ld a, $2
.done_0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 1626a
@@ -79,7 +79,7 @@
ld hl, UnknownText_0x16653
call PrintText
ld a, $8
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 16290
@@ -96,7 +96,7 @@
ld a, $7
.done_2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 162a8
@@ -133,7 +133,7 @@
ld a, $6
.done_3
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 162e0
@@ -201,7 +201,7 @@
ld a, $7
.done_4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 16373
@@ -269,7 +269,7 @@
ld a, $7
.done_5
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 16406
@@ -283,7 +283,7 @@
ld hl, UnknownText_0x16685
call PrintText
ld a, $8
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.StopSavingMoney
@@ -290,7 +290,7 @@
ld a, $80
ld [wBankOfMomMode], a
ld a, $7
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 1642d
@@ -299,7 +299,7 @@
call PrintText
.JustDoWhatYouCan: ; 16433
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; 16439
--- a/home/map.asm
+++ b/home/map.asm
@@ -214,7 +214,7 @@
ret
; 2238
-Function2238:: ; 2238
+CheckWarpTile:: ; 2238
call Function2252
ret nc
push bc
@@ -258,11 +258,11 @@
ld a, [MapX]
sub $4
ld d, a
- ld a, [wdbfb]
+ ld a, [wCurrMapWarpCount]
and a
ret z
ld c, a
- ld hl, wdbfc
+ ld hl, wCurrMapWarpHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -294,7 +294,7 @@
pop hl
call Function22a3
ret nc
- ld a, [wdbfb]
+ ld a, [wCurrMapWarpCount]
inc a
sub c
ld c, a
@@ -325,7 +325,7 @@
Function22b4:: ; 22b4
push bc
- ld hl, wdbfc
+ ld hl, wCurrMapWarpHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -439,8 +439,8 @@
ld a, [hli]
ld h, [hl]
ld l, a
- call Function23ac
- call Function23c3
+ call ReadMapTriggers
+ call ReadMapCallbacks
ret
; 235c
@@ -507,12 +507,12 @@
; 23ac
-Function23ac:: ; 23ac
+ReadMapTriggers:: ; 23ac
ld a, [hli] ; trigger count
ld c, a
- ld [wdc07], a ; current map trigger count
+ ld [wCurrMapTriggerCount], a ; current map trigger count
ld a, l
- ld [wdc08], a ; map trigger pointer
+ ld [wCurrMapTriggerHeaderPointer], a ; map trigger pointer
ld a, h
ld [wdc09], a
ld a, c
@@ -524,14 +524,14 @@
ret
; 23c3
-Function23c3:: ; 23c3
+ReadMapCallbacks:: ; 23c3
ld a, [hli]
ld c, a
- ld [wdc0a], a
+ ld [wCurrMapCallbackCount], a
ld a, l
- ld [wdc0b], a
+ ld [wCurrMapCallbackHeaderPointer], a
ld a, h
- ld [wdc0b + 1], a
+ ld [wCurrMapCallbackHeaderPointer + 1], a
ld a, c
and a
ret z
@@ -544,9 +544,9 @@
ReadWarps:: ; 23da
ld a, [hli]
ld c, a
- ld [wdbfb], a
+ ld [wCurrMapWarpCount], a
ld a, l
- ld [wdbfc], a
+ ld [wCurrMapWarpHeaderPointer], a
ld a, h
ld [wdbfd], a
ld a, c
@@ -562,7 +562,7 @@
ld c, a
ld [wCurrentMapXYTriggerCount], a
ld a, l
- ld [wdbff], a
+ ld [wCurrentMapXYTriggerHeaderPointer], a
ld a, h
ld [wdc00], a
ld a, c
@@ -1002,11 +1002,11 @@
; 2653
Function2653:: ; 2653
- ld a, [wdc0a]
+ ld a, [wCurrMapCallbackCount]
ld c, a
and a
ret z
- ld hl, wdc0b
+ ld hl, wCurrMapCallbackHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -1898,7 +1898,7 @@
CheckStandingOnXYTrigger:: ; 2ae7
; Checks to see if you are standing on an xy-trigger. If yes, copies the trigger to EngineBuffer1 and sets carry.
- ld hl, wdbff
+ ld hl, wCurrentMapXYTriggerHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -16,7 +16,7 @@
; 0x1d4b
Function1d4b:: ; 1d4b
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ret
; 1d4f
@@ -410,7 +410,7 @@
ld a, [hl]
ld [MenuSelection], a
ld a, [wcfa9]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
and a
ret
@@ -571,7 +571,7 @@
ld a, [hROMBank]
ld [wcf94], a
callba Function2400e
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ret
; 2039
@@ -579,7 +579,7 @@
ld a, [hROMBank]
ld [wcf94], a
callba Function24022
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ret
; 2048
@@ -587,7 +587,7 @@
ld a, [hROMBank]
ld [wcf94], a
callba Function2403c
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ret
; 2057
--- a/macros.asm
+++ b/macros.asm
@@ -14,7 +14,6 @@
INCLUDE "macros/rst.asm"
INCLUDE "macros/mobile.asm"
INCLUDE "macros/trainer.asm"
-INCLUDE "macros/map_setup.asm"
--- a/macros/map_setup.asm
+++ /dev/null
@@ -1,236 +1,0 @@
-; Command descriptions from Condensation water's scripting compendium. enum_start
- enum_start
-
- enum map_lcd_on_command
-map_lcd_on: MACRO ; 00 = Turn LCD on
- db map_lcd_on_command
-ENDM
-
- enum map_lcd_off_command
-map_lcd_off: MACRO ; 01 = Turn LCD off
- db map_lcd_off_command
-ENDM
-
- enum map_sound_off_command
-map_sound_off: MACRO ; 02 = Turn speakers off
- db map_sound_off_command
-ENDM
-
- enum map_music_command
-map_music: MACRO ; 03 = Music check for current map/ special check for bug catcher contest
- db map_music_command
-ENDM
-
- enum map_start_music_command
-map_start_music: MACRO ; 04 = Start map music anew
- db map_start_music_command
-ENDM
-
- enum map_fade_music_command
-map_fade_music: MACRO ; 05 = Music check for current map / special check for Bug Contest/ music with FadeOut (old) and FadeIn
- db map_fade_music_command
-ENDM
-
- enum map_fade_command
-map_fade: MACRO ; 06 = Fade out music + screen
- db map_fade_command
-ENDM
-
- enum map_bike_music_command
-map_bike_music: MACRO ; 07 = If HIRO is on bike = bike music, else play map music
- db map_bike_music_command
-ENDM
-
- enum map_music_force_command
-map_music_force: MACRO ; 08 = Play map music
- db map_music_force_command
-ENDM
-
- enum map_max_volume_command
-map_max_volume: MACRO ; 09 = Turn music to highest volume
- db map_max_volume_command
-ENDM
-
- enum map_load_blocks_command
-map_load_blocks: MACRO ; 0A = Write map data to MapRAM
- db map_load_blocks_command
-ENDM
-
- enum map_connection_blocks_command
-map_connection_blocks: MACRO ; 0B = Compute map’s connection pars and write into MapRAM
- db map_connection_blocks_command
-ENDM
-
- enum map_save_screen_command
-map_save_screen: MACRO ; 0C = Write current part of map into temporary memory
- db map_save_screen_command
-ENDM
-
- enum map_buffer_screen_command
-map_buffer_screen: MACRO ; 0D = Write current part of map into read-from memory
- db map_buffer_screen_command
-ENDM
-
- enum map_load_graphics_command
-map_load_graphics: MACRO ; 0E = Write tileset header to ram/ load tileset/ load sprite tiles/ load special tiles
- db map_load_graphics_command
-ENDM
-
- enum map_load_tileset_header_command
-map_load_tileset_header: MACRO ; 0F = Write tileset header to ram
- db map_load_tileset_header_command
-ENDM
-
- enum map_time_of_day_command
-map_time_of_day: MACRO ; 10 = Compute time of day/ Update screen
- db map_time_of_day_command
-ENDM
-
- enum map_palettes_command
-map_palettes: MACRO ; 11 = Load map palettes
- db map_palettes_command
-ENDM
-
- enum map_wildmons_command
-map_wildmons: MACRO ; 12 = Load probabilities for wild Pokémon battles
- db map_wildmons_command
-ENDM
-
- enum map_sprites_command
-map_sprites: MACRO ; 13 = Delete sprite data and draw new sprites
- db map_sprites_command
-ENDM
-
- enum map_change_callback_command
-map_change_callback: MACRO ; 14 = Check 2nd script header for 05 and 03 callbacks
- db map_change_callback_command
-ENDM
-
- enum map_start_callback_command
-map_start_callback: MACRO ; 15 = Check 2nd script header for 03 callbacks
- db map_start_callback_command
-ENDM
-
- enum map_load_objects_command
-map_load_objects: MACRO ; 16 = Analyze people data anew and check 2nd script header for 02 callbacks
- db map_load_objects_command
-ENDM
-
- enum map_load_spawn_command
-map_load_spawn: MACRO ; 17 = Writes arrival data for arrival by flying/Blackout from table 05:5319 to ram
- db map_load_spawn_command
-ENDM
-
- enum map_load_connection_command
-map_load_connection: MACRO ; 18 = Writes arrival data for entering a map by connection to ram
- db map_load_connection_command
-ENDM
-
- enum map_load_warp_command
-map_load_warp: MACRO ; 19 = Write warp data to ram when entering warp
- db map_load_warp_command
-ENDM
-
- enum map_attributes_command
-map_attributes: MACRO ; 1A = Load complete map data (primary, secondary, event, script headers)
- db map_attributes_command
-ENDM
-
- enum map_attributes_2_command
-map_attributes_2: MACRO ; 1B = Same as 1A, but some settings aren’t loaded new from the rom, such as hide function of the people events
- db map_attributes_2_command
-ENDM
-
- enum map_clear_bg_palettes_command
-map_clear_bg_palettes: MACRO ; 1C = Fill palette data with FFFF (=white)
- db map_clear_bg_palettes_command
-ENDM
-
- enum map_fade_out_palettes_command
-map_fade_out_palettes: MACRO ; 1D = All BG pallet color are converted to 0|0 (Pal0, Col0), all sprite colors to x|0 (FadeOut)
- db map_fade_out_palettes_command
-ENDM
-
- enum map_fade_in_palettes_command
-map_fade_in_palettes: MACRO ; 1E = Palette FadeIn
- db map_fade_in_palettes_command
-ENDM
-
- enum map_anchor_screen_command
-map_anchor_screen: MACRO ; 1F = Compute position of upper left-most block visible on screen
- db map_anchor_screen_command
-ENDM
-
- enum map_warp_face_command
-map_warp_face: MACRO ; 20 = Position computation when HIRO leaves a warp
- db map_warp_face_command
-ENDM
-
- enum map_face_down_command
-map_face_down: MACRO ; 21 = Set HIRO’s facing to “down”
- db map_face_down_command
-ENDM
-
- enum map_spawn_coord_command
-map_spawn_coord: MACRO ; 22 = Prepare HIRO data for arrival by flight
- db map_spawn_coord_command
-ENDM
-
- enum map_player_coord_command
-map_player_coord: MACRO ; 23 = Compute HIRO x/y data anew
- db map_player_coord_command
-ENDM
-
- enum map_prolong_sprites_command
-map_prolong_sprites: MACRO ; 24 = Prolong old sprites before removing them
- db map_prolong_sprites_command
-ENDM
-
- enum map_delay_sprites_command
-map_delay_sprites: MACRO ; 25 = Delay rendering new sprites
- db map_delay_sprites_command
-ENDM
-
- enum map_update_roam_command
-map_update_roam: MACRO ; 26 = Compute chances to meet Raikou, Entei or Suicune
- db map_update_roam_command
-ENDM
-
- enum map_keep_roam_command
-map_keep_roam: MACRO ; 27 = Recover chances to meet Raikou, Entei or Suicune
- db map_keep_roam_command
-ENDM
-
- enum map_fade_out_music_command
-map_fade_out_music: MACRO ; 28 = Temporarily stop music playing
- db map_fade_out_music_command
-ENDM
-
- enum map_animations_on_command
-map_animations_on: MACRO ; 29 = Activate animations
- db map_animations_on_command
-ENDM
-
- enum map_animations_off_command
-map_animations_off: MACRO ; 2A = Deactivate animations
- db map_animations_off_command
-ENDM
-
- enum map_keep_palettes_command
-map_keep_palettes: MACRO ; 2B = Recover all palettes
- db map_keep_palettes_command
-ENDM
-
- enum map_text_scroll_off_command
-map_text_scroll_off: MACRO ; 2C = Turn off text scroll (for town name overlays)
- db map_text_scroll_off_command
-ENDM
-
- enum map_stop_script_command
-map_stop_script: MACRO ; 2D = Deactivate code prolonging
- db map_stop_script_command
-ENDM
-
-map_end_setup_script: MACRO
- db -1
-ENDM
\ No newline at end of file
--- a/main.asm
+++ b/main.asm
@@ -1134,7 +1134,7 @@
; 627b
Function627b: ; 627b
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .done_title
call TitleScreenScene
@@ -1181,7 +1181,7 @@
; 62b7
Function62b7: ; 62b7
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; 62bc
@@ -1222,7 +1222,7 @@
.done
; Next scene
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
xor a
ld [hLCDStatCustom], a
@@ -1240,7 +1240,7 @@
TitleScreenTimer: ; 62f6
; Next scene
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
; Start a timer
@@ -1324,13 +1324,13 @@
ld [wcf64], a
; Return to the intro sequence.
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
.end
; Next scene
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
; Fade out the title screen music
@@ -1349,7 +1349,7 @@
ld [wcf64], a
; Return to the intro sequence.
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; 6375
@@ -1369,7 +1369,7 @@
ld [wcf64], a
; Back to the intro.
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; 6389
@@ -9748,7 +9748,7 @@
call LoadMenuDataHeader
ld a, $1
.asm_e44b
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call Function32f9
xor a
ld [wcf76], a
@@ -9755,7 +9755,7 @@
ld [hBGMapMode], a ; $ff00+$d4
call Function1e5d
jr c, .asm_e46b
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
push af
ld a, [MenuSelection]
ld hl, Jumptable_e4ba
@@ -10760,7 +10760,7 @@
Function11915: ; 11915
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_11930
call Function11968
@@ -10806,7 +10806,7 @@
; 11968
Function11968: ; 11968
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, $0
ld hl, Jumptable_11977
@@ -10843,7 +10843,7 @@
ld hl, $e
add hl, bc
ld [hl], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -10897,7 +10897,7 @@
.asm_119eb
call Function11bf7
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -11327,7 +11327,7 @@
ld [wc3bf], a
ld [hSCX], a
ld [wc3c0], a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [hBGMapMode], a
ld [wc6d2], a
@@ -11500,7 +11500,7 @@
Function11fc0: ; 11fc0 (4:5fc0)
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_11fdb
call Function12008
@@ -11535,7 +11535,7 @@
ret
Function12008: ; 12008 (4:6008)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_12017
@@ -11566,7 +11566,7 @@
ld hl, $e
add hl, bc
ld [hl], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -11636,7 +11636,7 @@
.asm_120a1
call Function11bf7
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -12441,7 +12441,7 @@
call LoadMenuDataHeader
call .SetUpMenuItems
ld a, [wd0d2]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call .DrawMenuAccount_
call MenuFunc_1e7f
call .DrawBugContestStatusBox
@@ -12457,13 +12457,13 @@
call UpdateTimePals
call .SetUpMenuItems
ld a, [wd0d2]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
.Select
call .GetInput
jr c, .Exit
call .DrawMenuAccount
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ld [wd0d2], a
call PlayClickSFX
call Function1bee
@@ -18363,7 +18363,7 @@
ld c, $12
call TextBox
ld a, [wd0d7]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ld a, [wd0dd]
ld [wd0e4], a
call Function350c
@@ -18939,7 +18939,7 @@
ld hl, MenuDataHeader_0x15e18
call CopyMenuDataHeader
ld a, [WalkingX]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ld a, [WalkingY]
ld [wd0e4], a
call Function350c
@@ -20498,7 +20498,7 @@
call PlaceString
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Function16cc8
call WaitBGMap
@@ -20528,12 +20528,12 @@
jr .asm_16c6b
.asm_16c82
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
callba Function84560
call RestartMapMusic
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
jr .asm_16c6b
.asm_16c95
@@ -20555,7 +20555,7 @@
ret
.asm_16cad
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
ld a, [hl]
and a
jr nz, .asm_16cb6
@@ -20566,7 +20566,7 @@
jr .asm_16cc4
.asm_16cb9
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
ld a, [hl]
cp $1a
jr c, .asm_16cc3
@@ -20581,7 +20581,7 @@
; 16cc8
Function16cc8: ; 16cc8
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp 26
jr z, Function16d20
inc a
@@ -21434,7 +21434,7 @@
Function1728f: ; 1728f (5:728f)
ld a, [wd265]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, [CurSpecies]
push af
ld de, MUSIC_NONE
@@ -21448,7 +21448,7 @@
call FarCopyBytes
callba Function8cf53
ld de, VTiles2 tile $00
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
call Function1723c
ld de, VTiles2 tile $31
ld a, EGG
@@ -21506,11 +21506,11 @@
hlcoord 6, 3
ld b, $98
ld c, $0
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
call Function17254
call Function17418
call WaitSFX
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld [CurPartySpecies], a
hlcoord 6, 3
ld d, $0
@@ -22052,7 +22052,7 @@
ld c, a
ld a, [wcfa3]
call SimpleMultiply
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
and a
ret
; 24085
@@ -22097,7 +22097,7 @@
ld c, a
ld a, [wcfaa]
add c
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
and a
ret
@@ -22183,7 +22183,7 @@
call Function24193
ld a, [wcfa4]
ld e, a
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ld b, a
xor a
ld d, $0
@@ -22817,7 +22817,7 @@
.asm_244a9
ld [hli], a
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
and a
jr z, .asm_244b7
ld c, a
@@ -23241,7 +23241,7 @@
.skip
ld a, [wd0e4]
ld c, a
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
add c
ld b, a
ld a, [wd144]
@@ -23254,7 +23254,7 @@
xor a
ld [wd0e4], a
ld a, $1
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
.asm_24763
ret
@@ -23312,7 +23312,7 @@
ld [wcfa8], a
ld a, [wcfa3]
ld b, a
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
and a
jr z, .asm_247c8
cp b
@@ -24430,9 +24430,9 @@
ld hl, BattleMenuDataHeader
call LoadMenuDataHeader
ld a, [wd0d2]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call Function2039
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ld [wd0d2], a
call ExitMenu
ret
@@ -24453,9 +24453,9 @@
Function24f19: ; 24f19
ld a, [wd0d2]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call InterpretMenu
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ld [wd0d2], a
call ExitMenu
ret
@@ -24804,7 +24804,7 @@
.asm_25117
call UpdateTime
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_25132
ld a, [hJoyLast]
@@ -24846,7 +24846,7 @@
call GetSGBLayout
call Function32f9
call WaitBGMap
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
xor a
rept 3
ld [hli], a
@@ -24855,7 +24855,7 @@
ret
Function2518e: ; 2518e (9:518e)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, $0
ld hl, Jumptable_2519d
@@ -24878,12 +24878,12 @@
Function251ab: ; 251ab (9:51ab)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
Function251b0: ; 251b0 (9:51b0)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -24910,7 +24910,7 @@
ret
.asm_251e3
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 251e9 (9:51e9)
@@ -24919,7 +24919,7 @@
and a
ret z
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 251f4
@@ -24954,7 +24954,7 @@
ret
.asm_25235
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 2523b (9:523b)
@@ -24963,13 +24963,13 @@
and a
ret z
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 25246
Function25246: ; 25246
ld a, $6
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function2524c: ; 2524c (9:524c)
@@ -25003,11 +25003,11 @@
ret
.asm_2528d
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_25293
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function25299: ; 25299 (9:5299)
@@ -25695,7 +25695,7 @@
ld [wd1ef], a
.asm_2676f
ld a, [wd1ef]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call Function26806
call Function1e5d
ld a, [wcfa9]
@@ -29400,7 +29400,7 @@
Function28fdb: ; 28fdb
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call WhiteBGMap
call ClearSprites
call ClearTileMap
@@ -29466,7 +29466,7 @@
; 29082
Function29082: ; 29082
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_2909b
call Function290a0
@@ -29484,7 +29484,7 @@
; 290a0
Function290a0: ; 290a0
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, JumpTable290af
@@ -29549,7 +29549,7 @@
; 2910f
Function2910f: ; 2910f
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; 29114
@@ -29560,7 +29560,7 @@
inc hl
ld d, [hl]
ld a, [de]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
inc de
ld [hl], d
dec hl
@@ -29569,7 +29569,7 @@
; 29123
Function29123: ; 29123
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; 29129
@@ -33597,7 +33597,7 @@
ld [wcfa7], a
ld a, $f3
ld [wcfa8], a
- ld a, [wTMHMPocketPointerLocation]
+ ld a, [wTMHMPocketCursor]
inc a
ld [wcfa9], a
ld a, $1
@@ -33610,7 +33610,7 @@
ld b, a
ld a, [wcfa9]
dec a
- ld [wTMHMPocketPointerLocation], a
+ ld [wTMHMPocketCursor], a
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld a, [wcfa6]
@@ -36568,7 +36568,7 @@
call Function352f
call UpdateSprites
ld a, [wd0f1]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ld a, [OBPals + 8 * 6]
ld [wd0e4], a
call Function350c
@@ -37087,7 +37087,7 @@
call WaitBGMap
ld a, [PlayerGender]
inc a
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call Function1bc9
call PlayClickSFX
call ExitMenu
@@ -37131,7 +37131,7 @@
ld b, $c
ld c, $8
call Function48cdc
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ld b, a
ld a, [wd0e4]
ld c, a
@@ -37142,7 +37142,7 @@
jr c, .asm_4833f
sub $29
inc a
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ld a, $29
.asm_4833f
ld [wd0e4], a
@@ -37155,7 +37155,7 @@
ld d, a
pop bc
ld a, b
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ld a, c
ld [wd0e4], a
ld a, d
@@ -37204,7 +37204,7 @@
.asm_483af
ld hl, wcfa9
ld a, [hl]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
scf
.asm_483b7
pop bc
@@ -39493,7 +39493,7 @@
ld [wcf64], a
ld d, $0
.loop
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .done
push bc
@@ -39548,7 +39548,7 @@
lb bc, BANK(SpecialCelebiGFX), $10
call Request2bpp
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 49935
@@ -39561,7 +39561,7 @@
ret
.asm_4993e
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; 49944
@@ -42097,7 +42097,7 @@
ld a, $b
ld [wMenuBorderLeftCoord], a
ld a, $1
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call Function1c10
ld hl, wcfa5
set 6, [hl]
@@ -43964,7 +43964,7 @@
ld [$ffde], a ; disable overworld tile animations
ld a, [wc2c6] ; whether sprite is to be mirrorred
push af
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld b, a
ld a, [wcf64]
ld c, a
@@ -43983,7 +43983,7 @@
; restore old values
ld a, b
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, c
ld [wcf64], a
pop af
@@ -43995,7 +43995,7 @@
StatsScreenMain: ; 0x4dcd2
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld a, [wcf64]
and $fc
@@ -44002,12 +44002,12 @@
or $1
ld [wcf64], a
.loop ; 4dce3
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
and $7f
ld hl, StatsScreenPointerTable
rst JumpTable
call Function4dd3a ; check for keys?
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr z, .loop
ret
@@ -44015,7 +44015,7 @@
StatsScreenBattle: ; 4dcf7
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld a, [wcf64]
and $fc
@@ -44023,7 +44023,7 @@
ld [wcf64], a
.asm_4dd08
callba Function100dd2
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
and $7f
ld hl, StatsScreenPointerTable
rst JumpTable
@@ -44030,7 +44030,7 @@
call Function4dd3a
callba Function100dfd
jr c, .asm_4dd29
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr z, .asm_4dd08
@@ -44070,14 +44070,14 @@
ret
Function4dd62: ; 4dd62 (13:5d62)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
and $80
or h
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function4dd6c: ; 4dd6c (13:5d6c)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -44104,9 +44104,9 @@
EggStatsInit: ; 4dda1
call EggStatsScreen
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
inc a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 0x4ddac
@@ -44131,9 +44131,9 @@
call Function4dfb6
ld hl, wcf64
res 4, [hl]
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
inc a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function4ddd6: ; 4ddd6 (13:5dd6)
@@ -44149,9 +44149,9 @@
Function4dde6: ; 4dde6 (13:5de6)
call IsSFXPlaying
ret nc
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
inc a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function4ddf2: ; 4ddf2 (13:5df2)
@@ -45452,7 +45452,7 @@
ret nz
ld de, SFX_EVOLVED
call PlaySFX
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
ld a, [hl]
push af
ld [hl], $0
@@ -45469,12 +45469,12 @@
dec c
jr nz, .asm_4e7c4
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 4e7cf
Function4e7cf: ; 4e7cf
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
ld a, [hl]
cp $20
ret nc
@@ -45499,7 +45499,7 @@
call Function3b2a
ld hl, $000b
add hl, bc
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
and $e
sla a
pop de
@@ -50229,11 +50229,11 @@
ld de, MUSIC_NONE
call PlayMusic
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf66], a
ld [wd003], a
.asm_818de
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_818f0
call Function81a74
@@ -50491,7 +50491,7 @@
Function81a74: ; 81a74
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $4
jr nc, .asm_81a8b
ld hl, hJoyLast
@@ -50503,7 +50503,7 @@
jr nz, .asm_81aab
.asm_81a8b
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_81acf
@@ -50538,7 +50538,7 @@
.asm_81aba
ld [wcf66], a
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 81ac3
@@ -50647,7 +50647,7 @@
.asm_81ba9
ld a, $1
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 81baf
@@ -50718,7 +50718,7 @@
.asm_81c2a
call WaitBGMap
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 81c33
@@ -50743,7 +50743,7 @@
ld a, $1
ld [hCGBPalUpdate], a
ld a, $3
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
pop af
ld [rSVBK], a
ret
@@ -50778,7 +50778,7 @@
ld de, wc608 + 2
call Function81ca7
ld a, $3
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 81ca7
@@ -50826,7 +50826,7 @@
.asm_81cdf
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_81ce5
@@ -50842,7 +50842,7 @@
add hl, bc
call Function818fd
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 81d02
@@ -50934,7 +50934,7 @@
Function81d7b: ; 81d7b
call Function81e67
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function81d84: ; 81d84
@@ -50960,7 +50960,7 @@
ld [wd004], a
call Function81df4
ld a, $5
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 81daf
@@ -50974,12 +50974,12 @@
.asm_81dbb
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 81dc1
Function81dc1: ; 81dc1
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; 81dc7
@@ -51276,7 +51276,7 @@
ld [hl], a
hlcoord 1, 15
ld [hl], a
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $3
jr nz, .asm_81fc9
ld a, [wcf64]
@@ -51349,7 +51349,7 @@
TilesetColorTest:
ret
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -51392,7 +51392,7 @@
call Function821f4
call Function8220f
call Function3200
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, $40
ld [hWY], a
ret
@@ -51740,12 +51740,12 @@
ld a, [GBPrinter]
ld [wcbfb], a
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 84022
Function84022: ; 84022
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_84031
@@ -51783,12 +51783,12 @@
Function84059: ; 84059 (21:4059)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
Function8405e: ; 8405e (21:405e)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
dec [hl]
ret
@@ -51795,7 +51795,7 @@
Function84063: ; 84063 (21:4063)
xor a
ld [wca89], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -51805,7 +51805,7 @@
Function84071: ; 84071 (21:4071)
ld a, $1
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function84077: ; 84077 (21:4077)
@@ -51845,7 +51845,7 @@
Function840c5: ; 840c5 (21:40c5)
ld a, $6
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld hl, Unknown_842c9
call Function841e2
xor a
@@ -51937,7 +51937,7 @@
ld [wca88], a
ld [wca89], a
ld a, $e
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function84180: ; 84180 (21:4180)
@@ -51957,7 +51957,7 @@
ret
.asm_8419b
ld a, $12
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function841a1: ; 841a1 (21:41a1)
@@ -51981,7 +51981,7 @@
and $f0
ret nz
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function841c3: ; 841c3 (21:41c3)
@@ -52339,7 +52339,7 @@
call JoyTextDelay
call Function846f6
jr c, .asm_8440f
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_8440d
call Function84022
@@ -52557,11 +52557,11 @@
call JoyTextDelay
call Function846f6
jr c, .asm_845c0
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_845c0
call Function84022
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $2
jr nc, .asm_845b5
ld a, $3
@@ -53307,7 +53307,7 @@
Function864c3: ; 864c3
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Function8671c
jr c, .done
ld de, SCREEN_WIDTH
@@ -53532,13 +53532,13 @@
Function86650: ; 86650
call LoadFontsBattleExtra
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
.asm_86657
call Function8671c
ret c
call Function86665
ret c
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
jr .asm_86657
; 86665
@@ -53647,7 +53647,7 @@
Function8671c: ; 8671c
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp NUM_HOF_TEAMS
jr nc, .asm_86746
ld hl, sHallOfFame
@@ -54293,13 +54293,13 @@
Function8c940: ; 8c940
ld a, e
and $1
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Function8c96d
call WaitSFX
ld de, SFX_PLACE_PUZZLE_PIECE_DOWN
call PlaySFX
.asm_8c952
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_8c96c
ld a, $90
@@ -54335,7 +54335,7 @@
; 8ca0c
Function8ca0c: ; 8ca0c
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_8ca1b
@@ -54365,7 +54365,7 @@
ld [hl], $84
ld a, $20
ld [wcf64], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
rept 2
inc [hl]
endr
@@ -54383,7 +54383,7 @@
call Function8ca73
ld a, $20
ld [wcf64], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -54390,7 +54390,7 @@
Function8ca5c: ; 8ca5c (23:4a5c)
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
Function8ca64: ; 8ca64 (23:4a64)
@@ -54401,7 +54401,7 @@
dec [hl]
ret
.asm_8ca6d
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -54508,7 +54508,7 @@
ld a, $80
ld [wcf64], a
.asm_8cb14
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_8cb2e
ld a, $0
@@ -54545,7 +54545,7 @@
ld a, $40
ld [wcf64], a
.asm_8cb60
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_8cb7a
ld a, $0
@@ -54594,7 +54594,7 @@
ld e, $84
callba Function8e9bc
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function8cbc8: ; 8cbc8 (23:4bc8)
@@ -54612,7 +54612,7 @@
call PlaySFX
ret
.asm_8cbe0
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -54675,7 +54675,7 @@
push af
ld [hl], $1
.loop
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
and a
jr z, .initialize
bit 7, a
@@ -54782,7 +54782,7 @@
ld c, $4
call Request2bpp
call Function8cda6
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
xor a
ld [hli], a
ld a, [wd192]
@@ -54928,7 +54928,7 @@
; 8cdf7
Function8cdf7: ; 8cdf7
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_8ce06
@@ -54952,7 +54952,7 @@
; 8ce14
Function8ce14: ; 8ce14
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; 8ce19
@@ -55056,7 +55056,7 @@
Function8cea2: ; 8cea2
ld a, $80
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld de, SFX_TRAIN_ARRIVED
call PlaySFX
ret
@@ -59327,7 +59327,7 @@
.loop
call UpdateTime
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .done
call Function90f04
@@ -59374,7 +59374,7 @@
ld [rLCDC], a
call Function90d70
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -59530,7 +59530,7 @@
Function90d9e: ; 90d9e (24:4d9e)
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [wcf64], a
ret
@@ -59738,7 +59738,7 @@
ret
Function90f04: ; 90f04 (24:4f04)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_90f13
@@ -59770,7 +59770,7 @@
call Function90da8
ld hl, UnknownText_0x914d3
call PrintText
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
call Function91492
ret
@@ -59815,7 +59815,7 @@
ret
.asm_90f75
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -59866,7 +59866,7 @@
.kanto
ld a, 5
.done
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Function91492
ret
@@ -59880,7 +59880,7 @@
ld [wc6d5], a
ld a, b
ld [wc6d6], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -59928,7 +59928,7 @@
call Function91480
ret
.cancel
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -60076,7 +60076,7 @@
add hl, bc
ld [hl], $8
call _UpdateRadioStation
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -60122,12 +60122,12 @@
ret
.cancel
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
Function91156: ; 91156 (24:5156)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
xor a
ld [wc6d2], a
@@ -60180,7 +60180,7 @@
ret
.b
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -60207,13 +60207,13 @@
call Function91342
jr c, .asm_911e5
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
.asm_911e5
ld a, $8
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function911eb: ; 911eb (24:51eb)
@@ -60244,7 +60244,7 @@
ld a, $1
ld [hInMenu], a
call Function912b7
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
.asm_91234
@@ -60252,7 +60252,7 @@
ld hl, OutOfServiceAreaText
call PrintText
ld a, $8
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld hl, UnknownText_0x914ce
call PrintText
ret
@@ -60276,7 +60276,7 @@
ret z
callba HangUp
ld a, $8
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld hl, UnknownText_0x914ce
call PrintText
ret
@@ -60645,7 +60645,7 @@
ld de, SFX_READ_TEXT_2
call PlaySFX
ld a, c
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, b
ld [wcf64], a
call Function914ab
@@ -62131,7 +62131,7 @@
ld [hli], a
ld [hl], $40
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, $ff
ld [wc709], a
ld de, MUSIC_GAME_CORNER
@@ -62158,7 +62158,7 @@
ret
Function927af: ; 927af (24:67af)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_927d1
call Function92844
@@ -62254,7 +62254,7 @@
; 92844
Function92844: ; 92844 (24:6844)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_92853
@@ -62291,7 +62291,7 @@
Function92879: ; 92879 (24:6879)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -62308,7 +62308,7 @@
call Function9307c
jr nc, .asm_92899
ld a, $12
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_92899
call Function92879
@@ -62499,15 +62499,15 @@
call Function930e9
jr c, .asm_929ea
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_929ea
ld a, $12
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function929f0: ; 929f0 (24:69f0)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -65125,11 +65125,11 @@
ret
.asm_b92a8
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
callab Function845d4
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
jr .asm_b929a
; b92b8
@@ -66577,7 +66577,7 @@
call DmgToCgbObjPals
call DelayFrame
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, $2
ld [wcf64], a
ld [wcf65], a
@@ -66584,7 +66584,7 @@
ld de, MUSIC_GAME_CORNER
call PlayMusic
.MasterLoop
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .leavethegame
call .CardFlip
@@ -66600,7 +66600,7 @@
ret
.CardFlip: ; e0191 (38:4191)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, .Jumptable
@@ -66625,7 +66625,7 @@
; e01b0
.Increment: ; e01b0
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; e01b5
@@ -66641,7 +66641,7 @@
.SaidNo
ld a, $7
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e01cd
@@ -66665,7 +66665,7 @@
ld hl, .NotEnoughCoinsText
call Functione0489
ld a, $7
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.deduct
@@ -66862,7 +66862,7 @@
.LoopAround
ld a, $1
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e0356
@@ -66879,7 +66879,7 @@
; 0xe0360
.Quit: ; e0360
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; e0366
@@ -68283,7 +68283,7 @@
ld [hSCY], a
ld [hSCX], a
ld [rWY], a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -68301,7 +68301,7 @@
call DelayFrame
.asm_e1217
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_e123d
call Functione12ca
@@ -68409,7 +68409,7 @@
; e12ca
Functione12ca: ; e12ca
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_e12d9
@@ -68583,7 +68583,7 @@
ld [wd0ec], a
Functione13de: ; e13de
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -69131,7 +69131,7 @@
ld [hSCY], a ; $ff00+$d0
ld [hSCX], a ; $ff00+$cf
ld [rWY], a ; $ff00+$4a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
ld a, $e3
@@ -69143,7 +69143,7 @@
ret
Functione1ebb: ; e1ebb (38:5ebb)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_e1ed0
call Functione1ed2
@@ -69156,7 +69156,7 @@
ret
Functione1ed2: ; e1ed2 (38:5ed2)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_e1ee1
@@ -69183,7 +69183,7 @@
Functione1ef3: ; e1ef3
call Functione2152
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; e1efb
@@ -69191,13 +69191,13 @@
Functione1efb: ; e1efb
call Functione00ed
jr nc, .asm_e1f06
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
.asm_e1f06
call Functione209d
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
xor a
ld [wc708], a
@@ -69226,7 +69226,7 @@
call Function3b2a
ld a, $5
ld [wc702], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; e1f42
@@ -69241,7 +69241,7 @@
and a
jr nz, .asm_e1f58
ld a, $7
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_e1f58
@@ -69248,7 +69248,7 @@
dec [hl]
xor a
ld [wcf64], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
Functione1f61: ; e1f61
@@ -69271,7 +69271,7 @@
call Functione2128
xor a
ld [wcf64], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; e1f8b
@@ -69299,7 +69299,7 @@
call Functione2128
ld a, $40
ld [wc708], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
Functione1fba: ; e1fba
@@ -69313,7 +69313,7 @@
.asm_e1fc3
call Functione2010
ld a, $3
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e1fcc
@@ -69347,19 +69347,19 @@
.asm_e1ff9
call Functiona80
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
Functione2000: ; e2000
call Functione00ed
jr nc, .asm_e200b
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
.asm_e200b
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e2010
@@ -69618,7 +69618,7 @@
; e21a1
Functione21a1: ; e21a1 (38:61a1)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $7
jr nc, .asm_e21c8
call JoyTextDelay
@@ -69729,7 +69729,7 @@
call DelayFrame
.asm_e23b4
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_e23c6
call Functione23d5
@@ -69746,7 +69746,7 @@
ret
Functione23d5: ; e23d5 (38:63d5)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, Jumptable_e23df
call Functione33df
jp [hl]
@@ -69808,18 +69808,18 @@
cp $ff
jr z, .asm_e2457
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e2452 (38:6452)
.asm_e2452
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
dec [hl]
ret
.asm_e2457
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Functione245d: ; e245d (38:645d)
@@ -69871,7 +69871,7 @@
call Functione307c
jr c, .asm_e24c1
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [wcb2b], a
ld [wcb2a], a
@@ -69918,7 +69918,7 @@
callba Functione039
call Functione3180
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [wcb2b], a
ld [wcb2a], a
@@ -69933,7 +69933,7 @@
BillsPCDepositFuncCancel: ; e2537 (38:6537)
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e253d (38:653d)
@@ -69991,7 +69991,7 @@
call DelayFrame
.asm_e25a7
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_e25b9
call Functione25c8
@@ -70008,7 +70008,7 @@
ret
Functione25c8: ; e25c8 (38:65c8)
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, .jumptable
call Functione33df
jp [hl]
@@ -70072,18 +70072,18 @@
cp $ff
jr z, .asm_e264f
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e264a (38:664a)
.asm_e264a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
dec [hl]
ret
.asm_e264f
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e2655
@@ -70136,7 +70136,7 @@
call TryWithdrawPokemon
jr c, .FailedWithdraw
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [wcb2b], a
ld [wcb2a], a
@@ -70181,7 +70181,7 @@
callba Functione039
call Functione3180
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [wcb2b], a
ld [wcb2a], a
@@ -70196,7 +70196,7 @@
.cancel: ; e272b (38:672b)
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e2731 (38:6731)
@@ -70240,7 +70240,7 @@
call DelayFrame
.asm_e2781
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_e2793
call Functione27a2
@@ -70259,7 +70259,7 @@
; e27a2
Functione27a2: ; e27a2
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, Jumptable_e27ac
call Functione33df
jp [hl]
@@ -70325,7 +70325,7 @@
ld [wcb2b], a
ld [wcb2a], a
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_e2823
@@ -70335,16 +70335,16 @@
cp $ff
jr z, .asm_e2837
ld a, $2
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
dec [hl]
ret
.asm_e2837
ld a, $6
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e283d
@@ -70402,7 +70402,7 @@
ld a, [wcb2e]
ld [wcb31], a
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e28a5
@@ -70420,7 +70420,7 @@
Functione28bd: ; e28bd
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e28c3
@@ -70484,7 +70484,7 @@
ld [wcb2b], a
ld [wcb2a], a
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_e2938
@@ -70492,11 +70492,11 @@
jr c, .asm_e2946
call Functione31e7
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_e2946
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
dec [hl]
ret
@@ -70508,7 +70508,7 @@
ld a, [wcb31]
ld [wcb2e], a
ld a, $0
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e2963
@@ -70522,7 +70522,7 @@
xor a
call ByteFill
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -70531,12 +70531,12 @@
ret
Functione298d: ; e298d (38:698d)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
Functione2992: ; e2992 (38:6992)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -72384,7 +72384,7 @@
ld de, StringOptions
call PlaceString
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld c, $6 ;number of items on the menu minus 1 (for cancel)
.asm_e41f3 ;this next will display the settings of each option when the menu is opened
push bc
@@ -72392,13 +72392,13 @@
ld [hJoyLast], a
call GetOptionPointer
pop bc
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
dec c
jr nz, .asm_e41f3
call Functione4512
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
inc a
ld [hBGMapMode], a
call WaitBGMap
@@ -72450,7 +72450,7 @@
GetOptionPointer: ; e42d6
- ld a, [wJumptableEntryIndexBuffer] ;load the cursor position to a
+ ld a, [wJumptableIndex] ;load the cursor position to a
ld e, a ;copy it to de
ld d, 0
ld hl, .Pointers
@@ -72890,7 +72890,7 @@
; e452a
OptionsControl: ; e452a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
ld a, [hJoyLast]
cp D_DOWN
jr z, .DownPressed
@@ -72947,7 +72947,7 @@
jr nz, .asm_e4564
hlcoord 1, 2
ld bc, $0028
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
call AddNTimes
ld [hl], $ed
ret
@@ -72986,7 +72986,7 @@
ld a, [hJoyLast]
and BUTTONS
jr nz, .asm_e45de
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_e45e3
call Functione4670
@@ -73042,7 +73042,7 @@
add hl, bc
ld [hl], $30
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [hSCX], a
@@ -73066,7 +73066,7 @@
; e4670
Functione4670: ; e4670
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_e467f
@@ -73087,7 +73087,7 @@
; e4687
Functione4687: ; e4687
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; e468c
@@ -73156,7 +73156,7 @@
ret
.asm_e46e7
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; e46ed
@@ -73334,7 +73334,7 @@
ld a, [hJoyLast]
and BUTTONS
jr nz, .ShutOffMusic
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .done
call IntroSceneJumper
@@ -73373,12 +73373,12 @@
ld [hInMenu], a
xor a
ld [$ffde], a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; e490f
IntroSceneJumper: ; e490f
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, IntroScenes
@@ -73424,7 +73424,7 @@
NextIntroScene: ; e4956 (39:4956)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -74461,7 +74461,7 @@
ret
.done
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
@@ -76537,7 +76537,7 @@
NPCTrade:: ; fcba8
ld a, e
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Functionfcc59
ld b, CHECK_FLAG
call TradeFlagAction
@@ -76592,7 +76592,7 @@
Functionfcc07: ; fcc07
call DisableSpriteUpdates
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
ld a, [wcf64]
push af
@@ -76600,7 +76600,7 @@
pop af
ld [wcf64], a
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Function2b74
ret
; fcc23
@@ -76636,7 +76636,7 @@
TradeFlagAction: ; fcc4a
ld hl, wd960
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld c, a
predef FlagPredef
ld a, c
@@ -76818,7 +76818,7 @@
GetTradeAttribute: ; 0xfcdc2
ld d, 0
push de
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
and $f
swap a
ld e, a
--- a/misc/mobile_22.asm
+++ b/misc/mobile_22.asm
@@ -247,7 +247,7 @@
add $5
ld [hl], a
pop af
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call BackUpTiles
call Function8923c
call Function89209
@@ -2194,7 +2194,7 @@
push af
call CopyMenuDataHeader
pop af
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call Function8923c
call Function1c89
call Function1c10
@@ -3050,7 +3050,7 @@
call Function8a3b2
pop bc
ld a, c
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ld [MenuSelection], a
call Function1c89
call Function1c10
--- a/misc/mobile_22_2.asm
+++ b/misc/mobile_22_2.asm
@@ -803,7 +803,7 @@
ld hl, MenuDataHeader_0x8b867
call CopyMenuDataHeader
ld a, [wd030]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ld a, [wd031]
ld [wd0e4], a
ld a, [wd032]
@@ -881,7 +881,7 @@
Function8b84b: ; 8b84b
ld [wd0e4], a
ld a, [wcfa9]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
ret
; 8b855
--- a/misc/mobile_40.asm
+++ b/misc/mobile_40.asm
@@ -1786,12 +1786,12 @@
ld a, BANK(BattleMenuDataHeader)
ld [wcf94], a
ld a, [wd0d2]
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
call Function100e72
call Function100b45
callba Function8e85
call Function100ed4
- ld a, [wPocketPointerLocationBuffer]
+ ld a, [wPocketCursorBuffer]
ld [wd0d2], a
call ExitMenu
ret
@@ -1818,7 +1818,7 @@
ld c, a
ld a, [wcfa3]
call SimpleMultiply
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
and a
ret
; 100b7a
@@ -6612,12 +6612,12 @@
; 102c87
Function102c87: ; 102c87
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
ld a, [wcf64]
push af
ld a, [wcd4c]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, [PartyCount]
ld [wcf64], a
ld a, $0
@@ -6632,7 +6632,7 @@
ld bc, $011a
call Function102d3e
ld a, [wcd4d]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, [OTPartyCount]
ld [wcf64], a
ld a, $5
@@ -6649,18 +6649,18 @@
pop af
ld [wcf64], a
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 102cee
Function102cee: ; 102cee
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
dec a
call Function102d34
ld de, DefaultFlypoint
ld bc, $002f
call CopyBytes
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld c, a
ld a, $6
sub c
@@ -6669,7 +6669,7 @@
ld hl, $0000
call AddNTimes
push hl
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
dec a
call Function102d34
ld d, h
@@ -7688,7 +7688,7 @@
ld a, [wdc40]
and $f
jr z, .asm_103622
- ld [wPocketPointerLocationBuffer], a
+ ld [wPocketCursorBuffer], a
.asm_103622
call InterpretMenu2
--- a/misc/mobile_42.asm
+++ b/misc/mobile_42.asm
@@ -124,7 +124,7 @@
Function1080b7: ; 1080b7
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call WhiteBGMap
call ClearSprites
call ClearTileMap
@@ -187,7 +187,7 @@
Function108157: ; 108157
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call WhiteBGMap
call ClearSprites
call ClearTileMap
@@ -310,7 +310,7 @@
; 10824b
Function10824b: ; 10824b
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_10825a
call Function10827b
@@ -335,7 +335,7 @@
; 10827b
Function10827b: ; 10827b
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_10828a
@@ -372,7 +372,7 @@
; 1082b2
Function1082b2: ; 1082b2
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; 1082b7
@@ -383,7 +383,7 @@
inc hl
ld d, [hl]
ld a, [de]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
inc de
ld [hl], d
dec hl
@@ -392,7 +392,7 @@
; 1082c6
Function1082c6: ; 1082c6
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; 1082cc
--- a/misc/mobile_45.asm
+++ b/misc/mobile_45.asm
@@ -703,7 +703,7 @@
ld a, d
or e
jr z, .asm_114559
- ld hl, wdc07
+ ld hl, wCurrMapTriggerCount
ld e, [hl]
inc hl
ld d, [hl]
@@ -1537,7 +1537,7 @@
ld [hl], d
dec hl
ld [hl], e
- ld hl, wdc07
+ ld hl, wCurrMapTriggerCount
ld e, [hl]
inc hl
ld d, [hl]
@@ -3860,7 +3860,7 @@
ld c, [hl]
inc hl
ld b, [hl]
- ld a, [wdc0a]
+ ld a, [wCurrMapCallbackCount]
cp b
jp c, .asm_1156b1
jr nz, .asm_115631
@@ -3874,7 +3874,7 @@
jr z, .asm_1156a9
ld a, [wdc09]
ld l, a
- ld a, [wdc0a]
+ ld a, [wCurrMapCallbackCount]
ld h, a
ld a, c
cpl
@@ -3887,7 +3887,7 @@
ld a, l
ld [wdc09], a
ld a, h
- ld [wdc0a], a
+ ld [wCurrMapCallbackCount], a
.asm_11564d
ld a, $3
cp b
@@ -3929,13 +3929,13 @@
ld a, [wCurrentMapSignpostCount]
ld [$ff8c], a
ld [$4000], a
- ld hl, wdc07
+ ld hl, wCurrMapTriggerCount
ld e, [hl]
inc hl
ld d, [hl]
ld hl, wdc24
call Function115d6a
- ld hl, wdc07
+ ld hl, wCurrMapTriggerCount
ld [hl], e
inc hl
ld [hl], d
@@ -4017,7 +4017,7 @@
jp Function11425c
.asm_115716
- ld hl, wdc0a
+ ld hl, wCurrMapCallbackCount
ld a, [hli]
cpl
ld e, a
@@ -4262,9 +4262,9 @@
ld b, [hl]
inc hl
push hl
- ld a, [wdc0a]
+ ld a, [wCurrMapCallbackCount]
ld l, a
- ld a, [wdc0b]
+ ld a, [wCurrMapCallbackHeaderPointer]
ld h, a
cp b
jr c, .asm_1158bb
@@ -4284,12 +4284,12 @@
inc bc
add hl, bc
ld a, l
- ld [wdc0a], a
+ ld [wCurrMapCallbackCount], a
ld a, h
- ld [wdc0b], a
+ ld [wCurrMapCallbackHeaderPointer], a
pop bc
pop hl
- ld hl, wdc07
+ ld hl, wCurrMapTriggerCount
ld a, [hli]
ld [wCurrentMapSignpostCount], a
ld [$ff8c], a
@@ -4299,7 +4299,7 @@
ld d, [hl]
ld hl, PartyMon5Speed
call Function115d6a
- ld hl, wdc07
+ ld hl, wCurrMapTriggerCount
ld a, [wCurrentMapSignpostCount]
ld [hli], a
ld a, e
@@ -4615,7 +4615,7 @@
jp Function11425c
.asm_115a45
- ld hl, wdc0a
+ ld hl, wCurrMapCallbackCount
ld a, [hli]
cpl
ld e, a
@@ -4826,9 +4826,9 @@
ld b, [hl]
inc hl
push hl
- ld a, [wdc0a]
+ ld a, [wCurrMapCallbackCount]
ld l, a
- ld a, [wdc0b]
+ ld a, [wCurrMapCallbackHeaderPointer]
ld h, a
cp b
jr c, .asm_115b36
@@ -4848,12 +4848,12 @@
inc bc
add hl, bc
ld a, l
- ld [wdc0a], a
+ ld [wCurrMapCallbackCount], a
ld a, h
- ld [wdc0b], a
+ ld [wCurrMapCallbackHeaderPointer], a
pop bc
pop hl
- ld hl, wdc07
+ ld hl, wCurrMapTriggerCount
ld a, [hli]
ld [wCurrentMapSignpostCount], a
ld [$ff8c], a
@@ -4863,7 +4863,7 @@
ld d, [hl]
ld hl, wdc26
call Function115d6a
- ld hl, wdc07
+ ld hl, wCurrMapTriggerCount
ld a, [wCurrentMapSignpostCount]
ld [hli], a
ld a, e
@@ -8168,7 +8168,7 @@
Function117a94: ; 0x117a94
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -8190,7 +8190,7 @@
Function117acd: ; 0x117acd
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_117ae2 ; 0x117ad5 $b
call Function117ae9
@@ -8202,7 +8202,7 @@
ret
Function117ae9: ; 0x117ae9
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, $0
ld hl, Pointers117af8
@@ -8306,7 +8306,7 @@
call ExitMenu
callba Function104061
ld a, $80
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function117bb6:
@@ -8325,11 +8325,11 @@
ld [wc303], a
callba Function17f555
ld a, $80
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_117be1
ld a, $80
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_117be7
ld a, [rSVBK]
@@ -8411,7 +8411,7 @@
pop af
ld [rSVBK], a
ld a, $80
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
Function117c89:
@@ -8464,7 +8464,7 @@
db "@"
Function117cdd: ; 0x117cdd
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
@@ -11817,7 +11817,7 @@
ld [wc702], a
ld a, [wcd81]
ld [wc74e], a
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
ld a, [wcf64]
push af
@@ -11840,7 +11840,7 @@
pop af
ld [wcf64], a
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
callba Function115dc3
jp Function119e2e
; 11984e
@@ -11853,7 +11853,7 @@
and a
jr nz, .asm_1198a8
callba Function170000
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
ld a, [wcf64]
push af
@@ -11876,7 +11876,7 @@
pop af
ld [wcf64], a
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
callba Function115dc3
jp Function119e2e
@@ -11887,7 +11887,7 @@
.asm_1198a8
callba Function17005a
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
push af
ld a, [wcf64]
push af
@@ -11910,7 +11910,7 @@
pop af
ld [wcf64], a
pop af
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
callba Function115dc3
jp Function119e2e
; 1198ee
@@ -14343,7 +14343,7 @@
call DelayFrame
.asm_11ac82
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_11aca8
call Function11b314
@@ -14444,7 +14444,7 @@
xor a
call ByteFill
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -14456,7 +14456,7 @@
; 11ad6e
Function11ad6e: ; 11ad6e
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld hl, Jumptable_11ad78
call Function11b239
jp [hl]
@@ -14475,13 +14475,13 @@
; 11ad8a
Function11ad8a: ; 11ad8a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; 11ad8f
Function11ad8f: ; 11ad8f
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
; 11ad95
@@ -14522,7 +14522,7 @@
ret z
call PlayClickSFX
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
jr .asm_11ae2e
.asm_11ade6
@@ -14643,7 +14643,7 @@
ld a, $7f
ld [hl], a
ld a, $1
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
jr .asm_11aef7
.asm_11aec1
@@ -14734,7 +14734,7 @@
ld a, $7f
ld [hl], a
ld a, $1
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
jr .asm_11afaa
.asm_11af77
@@ -14765,7 +14765,7 @@
cp $2
jr z, .asm_11af6a
ld a, $6
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
xor a
ld [ScriptVar], a
@@ -15057,7 +15057,7 @@
jr .asm_11b148
.asm_11b141
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
ld a, $7
ld [hl], a
ret
@@ -15090,7 +15090,7 @@
.asm_11b16c
ld [wcd30], a
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 11b175
@@ -15411,7 +15411,7 @@
Function11b31b: ; 11b31b
ld hl, Unknown_11b350
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $2
jr c, .asm_11b349
ld a, [wc7d1]
@@ -15419,7 +15419,7 @@
jr nc, .asm_11b344
cp $3
jr c, .asm_11b349
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $2
jr z, .asm_11b349
cp $3
@@ -15553,7 +15553,7 @@
ld [hli], a
cp $41
jr c, .asm_11b42b
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $4
jr z, .asm_11b43b
cp $5
@@ -15592,7 +15592,7 @@
Function11b44b: ; 11b44b
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -15604,7 +15604,7 @@
.asm_11b45c
call Function11b46a
call DelayFrame
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $4
jr nz, .asm_11b45c
ret
@@ -15611,7 +15611,7 @@
; 11b46a
Function11b46a: ; 11b46a
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_11b479
@@ -15813,7 +15813,7 @@
.asm_11b57f
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 11b585
@@ -15913,7 +15913,7 @@
.asm_11b64c
call Function11b65a
call DelayFrame
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $1
jr nz, .asm_11b64c
ret
@@ -15920,7 +15920,7 @@
; 11b65a
Function11b65a: ; 11b65a
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_11b669
@@ -16677,7 +16677,7 @@
Function11c0c6: ; 11c0c6
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld l, a
ld a, [wcf64]
ld h, a
@@ -16687,7 +16687,7 @@
ld [hli], a
push de
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, $12
ld [wcf64], a
ld a, $6
@@ -16720,9 +16720,9 @@
.asm_11c102
cp e
jr nc, .asm_11c11c
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
inc a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [hl], $4e
rra
jr c, .asm_11c113
@@ -16763,7 +16763,7 @@
call PlaceWholeStringInBoxAtOnce
pop hl
ld a, l
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, h
ld [wcf64], a
ret
@@ -16856,7 +16856,7 @@
Function11c1ca: ; 11c1ca
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -16938,7 +16938,7 @@
call JoyTextDelay
ld a, [hJoyPressed]
ld [hJoypadPressed], a
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_11c2a2
call Function11c2ac
@@ -16953,7 +16953,7 @@
; 11c2ac
Function11c2ac: ; 11c2ac
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_11c2bb
@@ -17219,7 +17219,7 @@
.asm_11c472
call Function11c4a5
.asm_11c475
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call PlayClickSFX
ret
.asm_11c47c
@@ -17383,7 +17383,7 @@
.asm_11c59f
ld hl, wcd24
set 1, [hl]
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call PlayClickSFX
ret
@@ -17599,7 +17599,7 @@
.asm_11c6fa
ld a, $15
.asm_11c6fc
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld hl, wcd24
set 3, [hl]
call PlayClickSFX
@@ -18119,7 +18119,7 @@
ld hl, wcd24
set 4, [hl]
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call PlayClickSFX
ret
.asm_11c9f7
@@ -18271,7 +18271,7 @@
ld [wcd2a], a
ret
.asm_11caf3
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
.asm_11caf9
@@ -18280,7 +18280,7 @@
ld hl, wcd24
set 4, [hl]
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld a, [wcd35]
cp $ff
ret nz
@@ -18389,7 +18389,7 @@
ld d, a
hlcoord 1, 14
call PlaceString
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
inc hl
ld a, $10
@@ -18404,7 +18404,7 @@
ld hl, wcd24
set 4, [hl]
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
.asm_11cbeb
ld a, [hl]
@@ -18490,7 +18490,7 @@
and a
ret z
ld a, $4
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
; 11cd10 (47:4d10)
@@ -18551,7 +18551,7 @@
.asm_11cd7d
ld a, $15
.asm_11cd7f
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld hl, wcd24
set 5, [hl]
call PlayClickSFX
@@ -18692,7 +18692,7 @@
.asm_11ce96
ld a, $13
.asm_11ce98
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld hl, wcd24
set 2, [hl]
call PlayClickSFX
@@ -18778,7 +18778,7 @@
; 11cfb5
Function11cfb5: ; 11cfb5 (47:4fb5)
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; 11cfba (47:4fba)
@@ -21327,7 +21327,7 @@
Function16c031: ; 16c031
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [DefaultFlypoint], a
ld [wd003], a
@@ -22784,7 +22784,7 @@
Function170215: ; 170215
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
call Function17022c
ret
; 17021d
@@ -22795,7 +22795,7 @@
Function17021e: ; 17021e
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@@ -22806,7 +22806,7 @@
.asm_17022c
call Jumpto_BattleTowerBattleFunction
call DelayFrame
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
cp $1
jr nz, .asm_17022c
ret
@@ -22813,7 +22813,7 @@
; 17023a
Jumpto_BattleTowerBattleFunction: ; 17023a
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_BattleTowerBattleFunctions
@@ -22871,7 +22871,7 @@
pop af
ld [Options], a
ld a, $1
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ret
@@ -23229,7 +23229,7 @@
call ClearScreen
.asm_1704fa
call JoyTextDelay
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
bit 7, a
jr nz, .asm_17050f
call Function170510
@@ -23241,7 +23241,7 @@
; 170510
Function170510: ; 170510
- ld a, [wJumptableEntryIndexBuffer]
+ ld a, [wJumptableIndex]
ld e, a
ld d, 0
ld hl, Jumptable_17051f
@@ -23332,12 +23332,12 @@
ret
.asm_1705ac
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
set 7, [hl]
ret
Function1705b2:
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
inc [hl]
ret
; 1705b7
--- a/misc/mobile_5f.asm
+++ b/misc/mobile_5f.asm
@@ -521,7 +521,7 @@
Function17d2c0: ; 17d2c0
xor a
- ld [wJumptableEntryIndexBuffer], a
+ ld [wJumptableIndex], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
--- a/misc/unused_title.asm
+++ b/misc/unused_title.asm
@@ -9,7 +9,7 @@
xor a
ld [hBGMapMode], a
- ld hl, wJumptableEntryIndexBuffer
+ ld hl, wJumptableIndex
rept 3
ld [hli], a
endr
--- a/wram.asm
+++ b/wram.asm
@@ -1186,7 +1186,7 @@
wNamedObjectTypeBuffer:: ds 1
ds 1
-wJumptableEntryIndexBuffer:: ds 1
+wJumptableIndex:: ds 1
wNrOfBeatenBattleTowerTrainers::
wMomBankDigitCursorPosition::
wIntroSceneFrameCounter::
@@ -1235,7 +1235,7 @@
wcf86:: ds 1
wcf87:: ds 1
-wPocketPointerLocationBuffer:: ds 2
+wPocketCursorBuffer:: ds 2
wcf8a:: ds 7 ; menu data 2 bank?
wcf91:: ds 1
@@ -1500,10 +1500,10 @@
wd0d6:: ds 1
wd0d7:: ds 1
wd0d8:: ds 1
-wItemsPocketPointerLocation:: ds 1
-wKeyItemsPocketPointerLocation:: ds 1
-wBallsPocketPointerLocation:: ds 1
-wTMHMPocketPointerLocation:: ds 1
+wItemsPocketCursor:: ds 1
+wKeyItemsPocketCursor:: ds 1
+wBallsPocketCursor:: ds 1
+wTMHMPocketCursor:: ds 1
wd0dd:: ds 2
wd0df:: ds 1
wd0e0:: ds 1
@@ -2365,11 +2365,11 @@
ds 2
wCurrentCaller:: ds 2
-wdbfb:: ds 1
-wdbfc:: ds 1
+wCurrMapWarpCount:: ds 1
+wCurrMapWarpHeaderPointer:: ds 1
wdbfd:: ds 1
wCurrentMapXYTriggerCount:: ds 1
-wdbff:: ds 1
+wCurrentMapXYTriggerHeaderPointer:: ds 1
wdc00:: ds 1
wCurrentMapSignpostCount:: ds 1
wdc02:: ds 1
@@ -2377,11 +2377,11 @@
wdc04:: ds 1
wdc05:: ds 1
wdc06:: ds 1
-wdc07:: ds 1
-wdc08:: ds 1
+wCurrMapTriggerCount:: ds 1
+wCurrMapTriggerHeaderPointer:: ds 1
wdc09:: ds 1
-wdc0a:: ds 1
-wdc0b:: ds 2
+wCurrMapCallbackCount:: ds 1
+wCurrMapCallbackHeaderPointer:: ds 2
wdc0d:: ds 1
wdc0e:: ds 1