Address comments on PR 322

This commit is contained in:
PikalaxALT
2015-10-24 19:49:19 -04:00
parent 69ee070021
commit 4d17f6e1f6
28 changed files with 754 additions and 936 deletions

View File

@ -8696,11 +8696,11 @@ Function3f6d0: ; 3f6d0
ld [wd267], a ld [wd267], a
ld [wd232], a ld [wd232], a
ld [wd0d8], a ld [wd0d8], a
ld [wKeyItemsPocketPointerLocation], a ld [wKeyItemsPocketCursor], a
ld [wItemsPocketPointerLocation], a ld [wItemsPocketCursor], a
ld [wd0d2], a ld [wd0d2], a
ld [CurMoveNum], a ld [CurMoveNum], a
ld [wBallsPocketPointerLocation], a ld [wBallsPocketCursor], a
ld [wd0d6], a ld [wd0d6], a
ld [wd0e4], a ld [wd0e4], a
ld [wd0e0], a ld [wd0e0], a

View File

@ -1,8 +1,8 @@
const_def const_value SET $f0
const MAPSETUP_00 const MAPSETUP_00
const MAPSETUP_01 const MAPSETUP_WARP
const MAPSETUP_02 const MAPSETUP_02
const MAPSETUP_03 const MAPSETUP_RELOADMAP
const MAPSETUP_04 const MAPSETUP_04
const MAPSETUP_05 const MAPSETUP_05
const MAPSETUP_06 const MAPSETUP_06
@ -10,4 +10,55 @@
const MAPSETUP_08 const MAPSETUP_08
const MAPSETUP_09 const MAPSETUP_09
const MAPSETUP_10 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

View File

@ -1,11 +1,11 @@
; trainer groups ; trainer groups
enum_start enum_start
trainerclass PHONE ; 0 trainerclass TRAINER_NONE ; 0
const MOM_PHONE const PHONECONTACT_MOM
const OAK_PHONE const PHONECONTACT_BIKESHOP
const BILL_PHONE const PHONECONTACT_BILL
const ELM_PHONE const PHONECONTACT_ELM
const BUENA_PHONE const PHONECONTACT_BUENA
trainerclass FALKNER ; 1 trainerclass FALKNER ; 1

View File

@ -13,7 +13,7 @@ Predef_StartBattle: ; 8c20f
ld [hl], $1 ld [hl], $1
.loop .loop
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
bit 7, a bit 7, a
jr nz, .done jr nz, .done
call FlashyTransitionToBattle call FlashyTransitionToBattle
@ -72,7 +72,7 @@ Function8c26d: ; 8c26d
call DelayFrame call DelayFrame
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
xor a xor a
rept 2 rept 2
ld [hli], a ld [hli], a
@ -146,7 +146,7 @@ INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
FlashyTransitionToBattle: ; 8c314 FlashyTransitionToBattle: ; 8c314
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .jumptable
@ -230,7 +230,7 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
ld hl, .StartingPoints ld hl, .StartingPoints
add hl, de add hl, de
ld a, [hl] ld a, [hl]
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 8c38f (23:438f) ; 8c38f (23:438f)
@ -242,11 +242,11 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
StartTrainerBattle_Finish: ; 8c393 (23:4393) StartTrainerBattle_Finish: ; 8c393 (23:4393)
call ClearSprites call ClearSprites
ld a, $80 ld a, $80
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
StartTrainerBattle_NextScene: ; 8c39c (23:439c) StartTrainerBattle_NextScene: ; 8c39c (23:439c)
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
inc [hl] inc [hl]
ret ret
@ -331,7 +331,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408)
.end .end
ld a, $20 ld a, $20
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
.DoSineWave: ; 8c419 (23:4419) .DoSineWave: ; 8c419 (23:4419)
@ -416,7 +416,7 @@ endr
xor a xor a
ld [hBGMapMode], a ; $ff00+$d4 ld [hBGMapMode], a ; $ff00+$d4
ld a, $20 ld a, $20
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 8c490 (23:4490) ; 8c490 (23:4490)
@ -540,7 +540,7 @@ StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
xor a xor a
ld [hBGMapMode], a ; $ff00+$d4 ld [hBGMapMode], a ; $ff00+$d4
ld a, $20 ld a, $20
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
.BlackOutRandomTile: ; 8c5b8 (23:45b8) .BlackOutRandomTile: ; 8c5b8 (23:45b8)
@ -836,7 +836,7 @@ StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
.done .done
ld a, $20 ld a, $20
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 8c792 (23:4792) ; 8c792 (23:4792)

View File

@ -124,7 +124,7 @@ Function109847:: ; 109847
jr z, .asm_10984f jr z, .asm_10984f
ld a, $40 ld a, $40
.asm_10984f .asm_10984f
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ld a, [rSVBK] ld a, [rSVBK]
push af push af
@ -225,7 +225,7 @@ Function1098fd: ; 1098fd
ld a, [hJoypadDown] ld a, [hJoypadDown]
and $1 and $1
ret z ret z
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
bit 7, a bit 7, a
ret ret
; 109908 ; 109908
@ -234,7 +234,7 @@ Function109908: ; 109908
ld a, [hJoypadDown] ld a, [hJoypadDown]
and $2 and $2
ret z ret z
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
bit 6, a bit 6, a
ret z ret z
ld hl, CreditsPos ld hl, CreditsPos
@ -255,7 +255,7 @@ Function109908: ; 109908
; 109926 ; 109926
Function109926: ; 109926 Function109926: ; 109926
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
and $f and $f
ld e, a ld e, a
ld d, 0 ld d, 0
@ -287,12 +287,12 @@ Jumptable_109937: ; 109937 (42:5937)
Function109951: ; 109951 (42:5951) Function109951: ; 109951 (42:5951)
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
inc [hl] inc [hl]
ret ret
Function109956: ; 109956 (42:5956) Function109956: ; 109956 (42:5956)
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
ld a, [hl] ld a, [hl]
and $f0 and $f0
ld [hl], a ld [hl], a
@ -348,7 +348,7 @@ Function1099a3: ; 1099a3 (42:59a3)
ParseCredits: ; 1099aa ParseCredits: ; 1099aa
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
bit 7, [hl] bit 7, [hl]
jp nz, .done jp nz, .done
@ -488,7 +488,7 @@ endr
.end .end
; Stop execution. ; Stop execution.
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
set 7, [hl] set 7, [hl]
ld a, $20 ld a, $20
ld [MusicFade], a ld [MusicFade], a

View File

@ -138,19 +138,19 @@ EnterMap: ; 9673e
call ClearAllScriptFlags3 call ClearAllScriptFlags3
ld a, [hMapEntryMethod] ld a, [hMapEntryMethod]
cp ($f << 4) + MAPSETUP_07 cp MAPSETUP_07
jr nz, .dontset jr nz, .dontset
call SetAll_ScriptFlags3 call SetAll_ScriptFlags3
.dontset .dontset
ld a, [hMapEntryMethod] ld a, [hMapEntryMethod]
cp ($f << 4) + MAPSETUP_03 cp MAPSETUP_RELOADMAP
jr nz, .dontresetpoison jr nz, .dontresetpoison
xor a xor a
ld [PoisonStepCount], a ld [PoisonStepCount], a
.dontresetpoison .dontresetpoison
xor a ; ($0 << 4) + MAPSETUP_00 xor a ; end map entry
ld [hMapEntryMethod], a ld [hMapEntryMethod], a
ld a, 2 ; HandleMap ld a, 2 ; HandleMap
ld [MapStatus], a ld [MapStatus], a
@ -320,7 +320,7 @@ PlayerEvents: ; 9681f
pop af pop af
ld [ScriptRunning], a ld [ScriptRunning], a
call Function96beb call DoPlayerEvent
ld a, [ScriptRunning] ld a, [ScriptRunning]
cp 4 cp 4
jr z, .ok2 jr z, .ok2
@ -361,7 +361,7 @@ CheckTileEvent: ; 96874
callba CheckMovingOffEdgeOfMap callba CheckMovingOffEdgeOfMap
jr c, .return4 jr c, .return4
call Function2238 call CheckWarpTile
jr c, .return6 jr c, .return6
.bit2 .bit2
@ -436,7 +436,11 @@ SetUpFiveStepWildEncounterCooldown: ; 968d1
ret ret
; 968d7 ; 968d7
SetMinTwoStepWildEncounterCooldown: mobile ; 968d7 ret_968d7: ; 968d7
ret
;968d8
SetMinTwoStepWildEncounterCooldown: ; 968d8
ld a, [wWildEncounterCooldown] ld a, [wWildEncounterCooldown]
cp 2 cp 2
ret nc ret nc
@ -453,7 +457,7 @@ Dummy_CheckScriptFlags3Bit5: ; 968e4
; 968ec ; 968ec
DoMapTrigger: ; 968ec DoMapTrigger: ; 968ec
ld a, [wdc07] ld a, [wCurrMapTriggerCount]
and a and a
jr z, .nope jr z, .nope
@ -464,7 +468,7 @@ DoMapTrigger: ; 968ec
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, wdc08 ld hl, wCurrMapTriggerHeaderPointer
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -852,7 +856,7 @@ PlayerMovement: ; 96af0
; 96b10 ; 96b10
.seven ; 96b10 .seven ; 96b10
call SetMinTwoStepWildEncounterCooldown ; mobile call ret_968d7 ; mobile
xor a xor a
ld c, a ld c, a
ret ret
@ -1040,7 +1044,7 @@ DoRepelStep: ; 96bd7
ret ret
; 96beb ; 96beb
Function96beb: ; 96beb DoPlayerEvent: ; 96beb
ld a, [ScriptRunning] ld a, [ScriptRunning]
and a and a
ret z ret z
@ -1093,16 +1097,16 @@ HatchEggScript: ; 96c2f
WarpToNewMapScript: ; 96c34 WarpToNewMapScript: ; 96c34
warpsound warpsound
newloadmap ($f << 4) + MAPSETUP_05 newloadmap MAPSETUP_05
end end
; 96c38 ; 96c38
FallIntoMapScript: ; 96c38 FallIntoMapScript: ; 96c38
newloadmap ($f << 4) + MAPSETUP_06 newloadmap MAPSETUP_06
playsound SFX_KINESIS playsound SFX_KINESIS
applymovement PLAYER, MovementData_0x96c48 applymovement PLAYER, MovementData_0x96c48
playsound SFX_STRENGTH playsound SFX_STRENGTH
scall UnknownScript_0x96c4a scall LandAfterPitfallScript
end end
; 96c48 ; 96c48
@ -1111,7 +1115,7 @@ MovementData_0x96c48: ; 96c48
step_end step_end
; 96c4a ; 96c4a
UnknownScript_0x96c4a: ; 96c4a LandAfterPitfallScript: ; 96c4a
earthquake 16 earthquake 16
end end
; 96c4d ; 96c4d

View File

@ -32,170 +32,170 @@ MapSetupScripts: ; 15377
; 1538f ; 1538f
MapSetupScript4: ; 1538f MapSetupScript4: ; 1538f
map_prolong_sprites db map_prolong_sprites
MapSetupScript12: ; 15390 MapSetupScript12: ; 15390
map_fade_out_palettes db map_fade_out_palettes
map_keep_roam db map_keep_roam
MapSetupScript1: ; 15392 MapSetupScript1: ; 15392
map_lcd_off db map_lcd_off
map_sound_off db map_sound_off
map_load_spawn db map_load_spawn
map_attributes db map_attributes
map_change_callback db map_change_callback
map_spawn_coord db map_spawn_coord
map_player_coord db map_player_coord
map_anchor_screen db map_anchor_screen
map_load_blocks db map_load_blocks
map_buffer_screen db map_buffer_screen
map_load_graphics db map_load_graphics
map_time_of_day db map_time_of_day
map_load_objects db map_load_objects
map_lcd_on db map_lcd_on
map_palettes db map_palettes
map_face_down db map_face_down
map_sprites db map_sprites
map_bike_music db map_bike_music
map_max_volume db map_max_volume
map_fade_in_palettes db map_fade_in_palettes
map_animations_on db map_animations_on
map_wildmons db map_wildmons
map_end_setup_script db map_end_setup_script
MapSetupScript11: ; 153a9 MapSetupScript11: ; 153a9
map_load_spawn db map_load_spawn
map_attributes db map_attributes
map_change_callback db map_change_callback
map_spawn_coord db map_spawn_coord
map_player_coord db map_player_coord
map_anchor_screen db map_anchor_screen
map_load_blocks db map_load_blocks
map_buffer_screen db map_buffer_screen
map_lcd_off db map_lcd_off
map_load_graphics db map_load_graphics
map_time_of_day db map_time_of_day
map_fade_out_music db map_fade_out_music
map_lcd_on db map_lcd_on
map_load_objects db map_load_objects
map_palettes db map_palettes
map_face_down db map_face_down
map_sprites db map_sprites
map_fade_music db map_fade_music
map_fade_in_palettes db map_fade_in_palettes
map_animations_on db map_animations_on
map_wildmons db map_wildmons
map_end_setup_script db map_end_setup_script
MapSetupScript7: ; 153bf MapSetupScript7: ; 153bf
map_animations_off db map_animations_off
map_load_connection db map_load_connection
map_attributes db map_attributes
map_change_callback db map_change_callback
map_player_coord db map_player_coord
map_load_blocks db map_load_blocks
map_load_tileset_header db map_load_tileset_header
map_save_screen db map_save_screen
map_load_objects db map_load_objects
map_fade_music db map_fade_music
map_palettes db map_palettes
map_stop_script db map_stop_script
map_keep_palettes db map_keep_palettes
map_wildmons db map_wildmons
map_update_roam db map_update_roam
map_animations_on db map_animations_on
map_end_setup_script db map_end_setup_script
MapSetupScript6: ; 153d0 MapSetupScript6: ; 153d0
map_prolong_sprites db map_prolong_sprites
MapSetupScript5: ; 153d1 MapSetupScript5: ; 153d1
map_fade_out_palettes db map_fade_out_palettes
MapSetupScript9: ; 153d2 MapSetupScript9: ; 153d2
map_load_warp db map_load_warp
map_attributes db map_attributes
map_warp_face db map_warp_face
map_change_callback db map_change_callback
map_player_coord db map_player_coord
map_load_blocks db map_load_blocks
map_buffer_screen db map_buffer_screen
map_lcd_off db map_lcd_off
map_load_graphics db map_load_graphics
map_time_of_day db map_time_of_day
map_fade_out_music db map_fade_out_music
map_lcd_on db map_lcd_on
map_load_objects db map_load_objects
map_palettes db map_palettes
map_sprites db map_sprites
map_fade_music db map_fade_music
map_fade_in_palettes db map_fade_in_palettes
map_animations_on db map_animations_on
map_wildmons db map_wildmons
map_update_roam db map_update_roam
map_end_setup_script db map_end_setup_script
MapSetupScript3: ; 153e7 MapSetupScript3: ; 153e7
map_fade db map_fade
map_clear_bg_palettes db map_clear_bg_palettes
map_lcd_off db map_lcd_off
map_sound_off db map_sound_off
map_load_blocks db map_load_blocks
map_connection_blocks db map_connection_blocks
map_load_graphics db map_load_graphics
map_time_of_day db map_time_of_day
map_lcd_on db map_lcd_on
map_palettes db map_palettes
map_sprites db map_sprites
map_music_force db map_music_force
map_fade_in_palettes db map_fade_in_palettes
map_animations_on db map_animations_on
map_wildmons db map_wildmons
map_end_setup_script db map_end_setup_script
MapSetupScript8: ; 153f7 MapSetupScript8: ; 153f7
map_fade db map_fade
map_lcd_off db map_lcd_off
map_sound_off db map_sound_off
map_change_callback db map_change_callback
map_load_blocks db map_load_blocks
map_buffer_screen db map_buffer_screen
map_load_graphics db map_load_graphics
map_time_of_day db map_time_of_day
map_lcd_on db map_lcd_on
map_palettes db map_palettes
map_sprites db map_sprites
map_bike_music db map_bike_music
map_fade_in_palettes db map_fade_in_palettes
map_animations_on db map_animations_on
map_wildmons db map_wildmons
map_text_scroll_off db map_text_scroll_off
map_end_setup_script db map_end_setup_script
MapSetupScript2: ; 15408 MapSetupScript2: ; 15408
map_lcd_off db map_lcd_off
map_sound_off db map_sound_off
map_attributes_2 db map_attributes_2
map_anchor_screen db map_anchor_screen
map_start_callback db map_start_callback
map_load_blocks db map_load_blocks
map_connection_blocks db map_connection_blocks
map_buffer_screen db map_buffer_screen
map_load_graphics db map_load_graphics
map_time_of_day db map_time_of_day
map_lcd_on db map_lcd_on
map_palettes db map_palettes
map_sprites db map_sprites
map_bike_music db map_bike_music
map_fade_in_palettes db map_fade_in_palettes
map_animations_on db map_animations_on
map_wildmons db map_wildmons
map_end_setup_script db map_end_setup_script
MapSetupScript10: ; 1541a MapSetupScript10: ; 1541a
map_load_blocks db map_load_blocks
map_connection_blocks db map_connection_blocks
map_end_setup_script db map_end_setup_script
ReadMapSetupScript: ; 1541d ReadMapSetupScript: ; 1541d

View File

@ -5,7 +5,7 @@ Pack: ; 10000
call Function1068a call Function1068a
.loop .loop
call JoyTextDelay call JoyTextDelay
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
bit 7, a bit 7, a
jr nz, .done jr nz, .done
call Function10026 call Function10026
@ -21,7 +21,7 @@ Pack: ; 10000
; 10026 ; 10026
Function10026: ; 10026 Function10026: ; 10026
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
ld hl, Jumptable_10030 ld hl, Jumptable_10030
call Function1086b call Function1086b
jp [hl] jp [hl]
@ -47,7 +47,7 @@ Function10046: ; 10046 (4:4046)
ld [hBGMapMode], a ; $ff00+$d4 ld [hBGMapMode], a ; $ff00+$d4
call Function10955 call Function10955
ld a, [wcf64] ld a, [wcf64]
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
call Function10a40 call Function10a40
ret ret
@ -63,15 +63,15 @@ Function10056: ; 10056 (4:4056)
Function10067: ; 10067 (4:4067) Function10067: ; 10067 (4:4067)
ld hl, MenuDataHeader_0x10a4f ld hl, MenuDataHeader_0x10a4f
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wItemsPocketPointerLocation] ld a, [wItemsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0df] ld a, [wd0df]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0df], a ld [wd0df], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wItemsPocketPointerLocation], a ld [wItemsPocketCursor], a
ld b, $7 ld b, $7
ld c, $3 ld c, $3
call Function108d4 call Function108d4
@ -91,15 +91,15 @@ Function10094: ; 10094 (4:4094)
Function100a6: ; 100a6 (4:40a6) Function100a6: ; 100a6 (4:40a6)
ld hl, MenuDataHeader_0x10a7f ld hl, MenuDataHeader_0x10a7f
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wKeyItemsPocketPointerLocation] ld a, [wKeyItemsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0e0] ld a, [wd0e0]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e0], a ld [wd0e0], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wKeyItemsPocketPointerLocation], a ld [wKeyItemsPocketCursor], a
ld b, $3 ld b, $3
ld c, $7 ld c, $7
call Function108d4 call Function108d4
@ -221,15 +221,15 @@ Function10186: ; 10186 (4:4186)
Function10198: ; 10198 (4:4198) Function10198: ; 10198 (4:4198)
ld hl, MenuDataHeader_0x10aaf ld hl, MenuDataHeader_0x10aaf
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wBallsPocketPointerLocation] ld a, [wBallsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0e1] ld a, [wd0e1]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e1], a ld [wd0e1], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wBallsPocketPointerLocation], a ld [wBallsPocketCursor], a
ld b, $1 ld b, $1
ld c, $5 ld c, $5
call Function108d4 call Function108d4
@ -494,7 +494,7 @@ Function10311: ; 10311
and a and a
jr z, .Oak jr z, .Oak
ld a, $a ld a, $a
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 10364 (4:4364) ; 10364 (4:4364)
@ -537,19 +537,19 @@ Function1039d: ; 1039d
.asm_103aa .asm_103aa
xor a xor a
ld [wBallsPocketPointerLocation], a ld [wBallsPocketCursor], a
ld [wd0e1], a ld [wd0e1], a
ret ret
.asm_103b2 .asm_103b2
xor a xor a
ld [wItemsPocketPointerLocation], a ld [wItemsPocketCursor], a
ld [wd0df], a ld [wd0df], a
ret ret
.asm_103ba .asm_103ba
xor a xor a
ld [wKeyItemsPocketPointerLocation], a ld [wKeyItemsPocketCursor], a
ld [wd0e0], a ld [wd0e0], a
ret ret
; 103c2 ; 103c2
@ -613,7 +613,7 @@ Function103fd: ; 103fd
call PrintText call PrintText
jr .asm_10427 jr .asm_10427
.asm_10453 .asm_10453
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
push af push af
ld a, [wcf64] ld a, [wcf64]
push af push af
@ -626,7 +626,7 @@ Function103fd: ; 103fd
pop af pop af
ld [wcf64], a ld [wcf64], a
pop af pop af
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
.asm_10475 .asm_10475
pop af pop af
ld [Options], a ld [Options], a
@ -660,7 +660,7 @@ BattlePack: ; 10493
call Function1068a call Function1068a
.asm_1049b .asm_1049b
call JoyTextDelay call JoyTextDelay
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
bit 7, a bit 7, a
jr nz, .asm_104ad jr nz, .asm_104ad
call Function104b9 call Function104b9
@ -676,7 +676,7 @@ BattlePack: ; 10493
; 104b9 ; 104b9
Function104b9: ; 104b9 Function104b9: ; 104b9
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
ld hl, Jumptable_104c3 ld hl, Jumptable_104c3
call Function1086b call Function1086b
jp [hl] jp [hl]
@ -702,7 +702,7 @@ Function104d9: ; 104d9 (4:44d9)
ld [hBGMapMode], a ; $ff00+$d4 ld [hBGMapMode], a ; $ff00+$d4
call Function10955 call Function10955
ld a, [wcf64] ld a, [wcf64]
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
call Function10a40 call Function10a40
ret ret
@ -718,15 +718,15 @@ Function104e9: ; 104e9 (4:44e9)
Function104fa: ; 104fa (4:44fa) Function104fa: ; 104fa (4:44fa)
ld hl, MenuDataHeader_0x10a4f ld hl, MenuDataHeader_0x10a4f
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wItemsPocketPointerLocation] ld a, [wItemsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0df] ld a, [wd0df]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0df], a ld [wd0df], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wItemsPocketPointerLocation], a ld [wItemsPocketCursor], a
ld b, $7 ld b, $7
ld c, $3 ld c, $3
call Function108d4 call Function108d4
@ -746,15 +746,15 @@ Function10527: ; 10527 (4:4527)
Function10539: ; 10539 (4:4539) Function10539: ; 10539 (4:4539)
ld hl, MenuDataHeader_0x10a7f ld hl, MenuDataHeader_0x10a7f
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wKeyItemsPocketPointerLocation] ld a, [wKeyItemsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0e0] ld a, [wd0e0]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e0], a ld [wd0e0], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wKeyItemsPocketPointerLocation], a ld [wKeyItemsPocketCursor], a
ld b, $3 ld b, $3
ld c, $7 ld c, $7
call Function108d4 call Function108d4
@ -797,15 +797,15 @@ Function10594: ; 10594 (4:4594)
Function105a6: ; 105a6 (4:45a6) Function105a6: ; 105a6 (4:45a6)
ld hl, MenuDataHeader_0x10aaf ld hl, MenuDataHeader_0x10aaf
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wBallsPocketPointerLocation] ld a, [wBallsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0e1] ld a, [wd0e1]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e1], a ld [wd0e1], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wBallsPocketPointerLocation], a ld [wBallsPocketCursor], a
ld b, $1 ld b, $1
ld c, $5 ld c, $5
call Function108d4 call Function108d4
@ -931,7 +931,7 @@ Function105dc: ; 105dc (4:45dc)
jr z, .asm_10684 jr z, .asm_10684
.asm_1067e: ; 1067e (4:467e) .asm_1067e: ; 1067e (4:467e)
ld a, $a ld a, $a
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
.asm_10684: ; 10684 (4:4684) .asm_10684: ; 10684 (4:4684)
@ -947,7 +947,7 @@ Function105dc: ; 105dc (4:45dc)
Function1068a: ; 1068a Function1068a: ; 1068a
xor a xor a
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ld a, [wd0d6] ld a, [wd0d6]
and $3 and $3
ld [wcf65], a ld [wcf65], a
@ -965,7 +965,7 @@ Function1068a: ; 1068a
Function106a5: ; 106a5 Function106a5: ; 106a5
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ld [wcf64], a ld [wcf64], a
ld [wcf65], a ld [wcf65], a
ld [wcf66], a ld [wcf66], a
@ -984,7 +984,7 @@ Function106be: ; 106be
; 106c7 ; 106c7
Function106c7: ; 106c7 Function106c7: ; 106c7
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
ld hl, Jumptable_106d1 ld hl, Jumptable_106d1
call Function1086b call Function1086b
jp [hl] jp [hl]
@ -1003,15 +1003,15 @@ Jumptable_106d1: ; 106d1 (4:46d1)
call InitPocket call InitPocket
ld hl, MenuDataHeader_0x10a67 ld hl, MenuDataHeader_0x10a67
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wItemsPocketPointerLocation] ld a, [wItemsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0df] ld a, [wd0df]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0df], a ld [wd0df], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wItemsPocketPointerLocation], a ld [wItemsPocketCursor], a
ret ret
.KeyItemsPocket: ; 106ff (4:46ff) .KeyItemsPocket: ; 106ff (4:46ff)
@ -1019,15 +1019,15 @@ Jumptable_106d1: ; 106d1 (4:46d1)
call InitPocket call InitPocket
ld hl, MenuDataHeader_0x10a97 ld hl, MenuDataHeader_0x10a97
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wKeyItemsPocketPointerLocation] ld a, [wKeyItemsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0e0] ld a, [wd0e0]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e0], a ld [wd0e0], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wKeyItemsPocketPointerLocation], a ld [wKeyItemsPocketCursor], a
ret ret
.TMHMPocket: ; 10726 (4:4726) .TMHMPocket: ; 10726 (4:4726)
@ -1044,15 +1044,15 @@ Jumptable_106d1: ; 106d1 (4:46d1)
call InitPocket call InitPocket
ld hl, MenuDataHeader_0x10ac7 ld hl, MenuDataHeader_0x10ac7
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [wBallsPocketPointerLocation] ld a, [wBallsPocketCursor]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ld a, [wd0e1] ld a, [wd0e1]
ld [wd0e4], a ld [wd0e4], a
call Function350c call Function350c
ld a, [wd0e4] ld a, [wd0e4]
ld [wd0e1], a ld [wd0e1], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wBallsPocketPointerLocation], a ld [wBallsPocketCursor], a
ret ret
InitPocket: ; 10762 (4:4762) InitPocket: ; 10762 (4:4762)
@ -1093,10 +1093,10 @@ Function1076f: ; 1076f
ret ret
.asm_10795 .asm_10795
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
dec a dec a
and $3 and $3
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
push de push de
ld de, SFX_UNKNOWN_62 ld de, SFX_UNKNOWN_62
call PlaySFX call PlaySFX
@ -1105,10 +1105,10 @@ Function1076f: ; 1076f
ret ret
.asm_107a8 .asm_107a8
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
inc a inc a
and $3 and $3
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
push de push de
ld de, SFX_UNKNOWN_62 ld de, SFX_UNKNOWN_62
call PlaySFX call PlaySFX
@ -1134,7 +1134,7 @@ Function107bb: ; 107bb
; 107d7 ; 107d7
Function107d7: ; 107d7 Function107d7: ; 107d7
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
ld hl, Jumptable_107e1 ld hl, Jumptable_107e1
call Function1086b call Function1086b
jp [hl] jp [hl]
@ -1238,7 +1238,7 @@ Function1085a: ; 1085a (4:485a)
ret ret
Function10866: ; 10866 (4:4866) Function10866: ; 10866 (4:4866)
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
inc [hl] inc [hl]
ret ret
@ -1255,14 +1255,14 @@ endr
; 10874 ; 10874
Function10874: ; 10874 (4:4874) Function10874: ; 10874 (4:4874)
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
set 7, [hl] set 7, [hl]
xor a xor a
ld [wcf66], a ld [wcf66], a
ret ret
Function1087e: ; 1087e (4:487e) Function1087e: ; 1087e (4:487e)
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
set 7, [hl] set 7, [hl]
ld a, $1 ld a, $1
ld [wcf66], a ld [wcf66], a
@ -1346,12 +1346,12 @@ Function108d4: ; 108d4 (4:48d4)
ret ret
.asm_108fa .asm_108fa
ld a, $9 ld a, $9
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
scf scf
ret ret
.asm_10901 .asm_10901
ld a, b ld a, b
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ld [wcf64], a ld [wcf64], a
push de push de
ld de, SFX_UNKNOWN_62 ld de, SFX_UNKNOWN_62
@ -1361,7 +1361,7 @@ Function108d4: ; 108d4 (4:48d4)
ret ret
.asm_10912 .asm_10912
ld a, c ld a, c
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ld [wcf64], a ld [wcf64], a
push de push de
ld de, SFX_UNKNOWN_62 ld de, SFX_UNKNOWN_62

View File

@ -99,7 +99,7 @@ GetRemainingSpaceInPhoneList: ; 90040
; 90066 ; 90066
PermanentNumbers: ; 90066 PermanentNumbers: ; 90066
db MOM_PHONE, ELM_PHONE, -1 db PHONECONTACT_MOM, PHONECONTACT_ELM, -1
; 90069 ; 90069
@ -428,7 +428,7 @@ LoadCallerScript: ; 9020d (24:420d)
; 90233 (24:4233) ; 90233 (24:4233)
WrongNumber: ; 90233 WrongNumber: ; 90233
db PHONE, PHONE_00 db TRAINER_NONE, PHONE_00
dba .script dba .script
.script: .script:
writetext .text writetext .text
@ -776,17 +776,17 @@ phone: MACRO
dba \7 ; script 2 dba \7 ; script 2
ENDM ENDM
phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone PHONE, MOM_PHONE, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONECONTACT_MOM, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript
phone PHONE, OAK_PHONE, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONECONTACT_BIKESHOP, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone PHONE, BILL_PHONE, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2 phone TRAINER_NONE, PHONECONTACT_BILL, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2
phone PHONE, ELM_PHONE, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2 phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2
phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2 phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2
phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2 phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2
phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2 phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2
phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, 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 PHONE, 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 COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2
phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2 phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2
phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2 phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2
@ -801,7 +801,7 @@ ENDM
phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2 phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2
phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2 phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2
phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2 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 LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2
phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2 phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2
phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2 phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2
@ -813,7 +813,7 @@ ENDM
phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2 phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2
phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2 phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2
phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2 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 ; 90627
SpecialPhoneCallList: ; 90627 SpecialPhoneCallList: ; 90627

View File

@ -28,7 +28,7 @@ Pokedex: ; 40000
.main .main
call JoyTextDelay call JoyTextDelay
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
bit 7, a bit 7, a
jr nz, .exit jr nz, .exit
call Function4010b call Function4010b
@ -75,7 +75,7 @@ ENDC
call ByteFill call ByteFill
xor a xor a
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ld [wcf64], a ld [wcf64], a
ld [wcf65], a ld [wcf65], a
ld [wcf66], a ld [wcf66], a
@ -173,7 +173,7 @@ Function400ed: ; 400ed
; 4010b ; 4010b
Function4010b: ; 4010b Function4010b: ; 4010b
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
ld hl, Jumptable_40115 ld hl, Jumptable_40115
call Function41432 call Function41432
jp [hl] jp [hl]
@ -198,12 +198,12 @@ Jumptable_40115: ; 40115 (10:4115)
Function40131: ; 40131 (10:4131) Function40131: ; 40131 (10:4131)
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
inc [hl] inc [hl]
ret ret
Function40136: ; 40136 (10:4136) Function40136: ; 40136 (10:4136)
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
set 7, [hl] set 7, [hl]
ret ret
@ -283,7 +283,7 @@ Function401ae: ; 401ae (10:41ae)
call Function40bd0 call Function40bd0
ret z ret z
ld a, $2 ld a, $2
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ld a, $0 ld a, $0
ld [wcf64], a ld [wcf64], a
ret ret
@ -291,7 +291,7 @@ Function401ae: ; 401ae (10:41ae)
.select .select
call Function41401 call Function41401
ld a, $7 ld a, $7
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
xor a xor a
ld [hSCX], a ; $ff00+$cf ld [hSCX], a ; $ff00+$cf
ld a, $a7 ld a, $a7
@ -302,7 +302,7 @@ Function401ae: ; 401ae (10:41ae)
.start .start
call Function41401 call Function41401
ld a, $5 ld a, $5
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
xor a xor a
ld [hSCX], a ; $ff00+$cf ld [hSCX], a ; $ff00+$cf
ld a, $a7 ld a, $a7
@ -312,7 +312,7 @@ Function401ae: ; 401ae (10:41ae)
.b .b
ld a, $d ld a, $d
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
Function40217: ; 40217 (10:4217) Function40217: ; 40217 (10:4217)
@ -372,7 +372,7 @@ Function40258: ; 40258 (10:4258)
.asm_40288 .asm_40288
call MaxVolume call MaxVolume
ld a, [wcf64] ld a, [wcf64]
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 40292 (10:4292) ; 40292 (10:4292)
@ -408,7 +408,7 @@ Function402aa: ; 402aa (10:42aa)
call Function41423 call Function41423
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
call PlayCry call PlayCry
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
dec [hl] dec [hl]
ret ret
; 402e8 (10:42e8) ; 402e8 (10:42e8)
@ -478,11 +478,11 @@ Function4034f: ; 4034f
push af push af
ld a, [wcf64] ld a, [wcf64]
push af push af
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
push af push af
callba Function8442c callba Function8442c
pop af pop af
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
pop af pop af
ld [wcf64], a ld [wcf64], a
pop af pop af
@ -552,7 +552,7 @@ Function403be: ; 403be (10:43be)
.asm_403ea .asm_403ea
call Function41401 call Function41401
ld a, $0 ld a, $0
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 403f3 (10:43f3) ; 403f3 (10:43f3)
@ -604,13 +604,13 @@ Function40417: ; 40417 (10:4417)
.asm_40431 .asm_40431
call Function41401 call Function41401
ld a, $0 ld a, $0
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
Function4043a: ; 4043a (10:443a) Function4043a: ; 4043a (10:443a)
call Function41401 call Function41401
ld a, $b ld a, $b
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
Function40443: ; 40443 (10:4443) Function40443: ; 40443 (10:4443)
@ -656,7 +656,7 @@ Function40471: ; 40471 (10:4471)
.asm_40495 .asm_40495
call Function41401 call Function41401
ld a, $0 ld a, $0
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 4049e (10:449e) ; 4049e (10:449e)
@ -710,14 +710,14 @@ Function404b7: ; 404b7
ld [wc7d1], a ld [wc7d1], a
call Function41401 call Function41401
ld a, $9 ld a, $9
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 40501 ; 40501
Function40501: ; 40501 Function40501: ; 40501
call Function41401 call Function41401
ld a, $0 ld a, $0
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 4050a ; 4050a
@ -779,7 +779,7 @@ Function40562: ; 40562 (10:4562)
call Function40bd0 call Function40bd0
ret z ret z
ld a, $2 ld a, $2
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ld a, $9 ld a, $9
ld [wcf64], a ld [wcf64], a
ret ret
@ -795,7 +795,7 @@ Function40562: ; 40562 (10:4562)
call ClearSprites call ClearSprites
call Function40bdc call Function40bdc
ld a, $5 ld a, $5
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
xor a xor a
ld [hSCX], a ; $ff00+$cf ld [hSCX], a ; $ff00+$cf
ld a, $a7 ld a, $a7
@ -827,7 +827,7 @@ Function405df: ; 405df (10:45df)
.asm_405eb .asm_405eb
call Function41401 call Function41401
ld a, $7 ld a, $7
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
call DelayFrame call DelayFrame
call Function41a24 call Function41a24
jr nz, .asm_40603 jr nz, .asm_40603

View File

@ -529,7 +529,7 @@ Script_interpretmenu: ; 0x96f41
ld a, [ScriptBank] ld a, [ScriptBank]
ld hl, InterpretMenu ld hl, InterpretMenu
rst FarCall rst FarCall
ld a, [wPocketPointerLocationBuffer] ld a, [wPocketCursorBuffer]
jr nc, .ok jr nc, .ok
xor a xor a
.ok .ok
@ -1585,7 +1585,7 @@ Script_reloadmap: ; 0x97491
xor a xor a
ld [wd459], a ld [wd459], a
ld a, ($f << 4) + MAPSETUP_03 ld a, MAPSETUP_RELOADMAP
ld [hMapEntryMethod], a ld [hMapEntryMethod], a
ld a, $1 ld a, $1
call LoadMapStatus call LoadMapStatus
@ -2840,7 +2840,7 @@ Script_warp: ; 0x97a1d
ld [YCoord], a ld [YCoord], a
ld a, -1 ld a, -1
ld [wd001], a ld [wd001], a
ld a, ($f << 4) + MAPSETUP_01 ld a, MAPSETUP_WARP
ld [hMapEntryMethod], a ld [hMapEntryMethod], a
ld a, 1 ld a, 1
call LoadMapStatus call LoadMapStatus
@ -2852,7 +2852,7 @@ Script_warp: ; 0x97a1d
call GetScriptByte call GetScriptByte
ld a, -1 ld a, -1
ld [wd001], a ld [wd001], a
ld a, ($f << 4) + MAPSETUP_11 ld a, MAPSETUP_BADWARP
ld [hMapEntryMethod], a ld [hMapEntryMethod], a
ld a, 1 ld a, 1
call LoadMapStatus call LoadMapStatus

View File

@ -9,7 +9,7 @@ _TitleScreen: ; 10ed67
ld [hBGMapMode], a ld [hBGMapMode], a
; Reset timing variables ; Reset timing variables
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
ld [hli], a ; cf63 ; Scene? ld [hli], a ; cf63 ; Scene?
ld [hli], a ; cf64 ld [hli], a ; cf64
ld [hli], a ; cf65 ; Timer lo ld [hli], a ; cf65 ; Timer lo

View File

@ -247,7 +247,7 @@ Function8b0e2: ; 8b0e2
ld hl, .MenuDataHeader ld hl, .MenuDataHeader
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [MenuSelection] ld a, [MenuSelection]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
xor a xor a
ld [wcf76], a ld [wcf76], a
ld [hBGMapMode], a ld [hBGMapMode], a

View File

@ -62,7 +62,7 @@ Kurt_SelectApricorn: ; 88055
ld hl, .MenuDataHeader ld hl, .MenuDataHeader
call CopyMenuDataHeader call CopyMenuDataHeader
ld a, [MenuSelection] ld a, [MenuSelection]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call Function352f call Function352f

View File

@ -4,9 +4,9 @@ Special_BankOfMom: ; 16218
ld a, $1 ld a, $1
ld [hInMenu], a ld [hInMenu], a
xor a xor a
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
.asm_16223 .asm_16223
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
bit 7, a bit 7, a
jr nz, .asm_1622f jr nz, .asm_1622f
call Function16233 call Function16233
@ -19,7 +19,7 @@ Special_BankOfMom: ; 16218
; 16233 ; 16233
Function16233: ; 16233 Function16233: ; 16233
ld a, [wJumptableEntryIndexBuffer] ld a, [wJumptableIndex]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .jumptable
@ -57,7 +57,7 @@ endr
ld a, $2 ld a, $2
.done_0 .done_0
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 1626a ; 1626a
@ -79,7 +79,7 @@ endr
ld hl, UnknownText_0x16653 ld hl, UnknownText_0x16653
call PrintText call PrintText
ld a, $8 ld a, $8
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 16290 ; 16290
@ -96,7 +96,7 @@ endr
ld a, $7 ld a, $7
.done_2 .done_2
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 162a8 ; 162a8
@ -133,7 +133,7 @@ endr
ld a, $6 ld a, $6
.done_3 .done_3
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 162e0 ; 162e0
@ -201,7 +201,7 @@ endr
ld a, $7 ld a, $7
.done_4 .done_4
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 16373 ; 16373
@ -269,7 +269,7 @@ endr
ld a, $7 ld a, $7
.done_5 .done_5
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 16406 ; 16406
@ -283,14 +283,14 @@ endr
ld hl, UnknownText_0x16685 ld hl, UnknownText_0x16685
call PrintText call PrintText
ld a, $8 ld a, $8
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
.StopSavingMoney .StopSavingMoney
ld a, $80 ld a, $80
ld [wBankOfMomMode], a ld [wBankOfMomMode], a
ld a, $7 ld a, $7
ld [wJumptableEntryIndexBuffer], a ld [wJumptableIndex], a
ret ret
; 1642d ; 1642d
@ -299,7 +299,7 @@ endr
call PrintText call PrintText
.JustDoWhatYouCan: ; 16433 .JustDoWhatYouCan: ; 16433
ld hl, wJumptableEntryIndexBuffer ld hl, wJumptableIndex
set 7, [hl] set 7, [hl]
ret ret
; 16439 ; 16439

View File

@ -214,7 +214,7 @@ Function222a:: ; 222a
ret ret
; 2238 ; 2238
Function2238:: ; 2238 CheckWarpTile:: ; 2238
call Function2252 call Function2252
ret nc ret nc
push bc push bc
@ -258,11 +258,11 @@ Function2266:: ; 2266
ld a, [MapX] ld a, [MapX]
sub $4 sub $4
ld d, a ld d, a
ld a, [wdbfb] ld a, [wCurrMapWarpCount]
and a and a
ret z ret z
ld c, a ld c, a
ld hl, wdbfc ld hl, wCurrMapWarpHeaderPointer
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -294,7 +294,7 @@ Function2266:: ; 2266
pop hl pop hl
call Function22a3 call Function22a3
ret nc ret nc
ld a, [wdbfb] ld a, [wCurrMapWarpCount]
inc a inc a
sub c sub c
ld c, a ld c, a
@ -325,7 +325,7 @@ Function22a7:: ; 22a7
Function22b4:: ; 22b4 Function22b4:: ; 22b4
push bc push bc
ld hl, wdbfc ld hl, wCurrMapWarpHeaderPointer
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -439,8 +439,8 @@ Function234f:: ; 234f
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
call Function23ac call ReadMapTriggers
call Function23c3 call ReadMapCallbacks
ret ret
; 235c ; 235c
@ -507,12 +507,12 @@ GetMapConnection:: ; 23a3
; 23ac ; 23ac
Function23ac:: ; 23ac ReadMapTriggers:: ; 23ac
ld a, [hli] ; trigger count ld a, [hli] ; trigger count
ld c, a ld c, a
ld [wdc07], a ; current map trigger count ld [wCurrMapTriggerCount], a ; current map trigger count
ld a, l ld a, l
ld [wdc08], a ; map trigger pointer ld [wCurrMapTriggerHeaderPointer], a ; map trigger pointer
ld a, h ld a, h
ld [wdc09], a ld [wdc09], a
ld a, c ld a, c
@ -524,14 +524,14 @@ Function23ac:: ; 23ac
ret ret
; 23c3 ; 23c3
Function23c3:: ; 23c3 ReadMapCallbacks:: ; 23c3
ld a, [hli] ld a, [hli]
ld c, a ld c, a
ld [wdc0a], a ld [wCurrMapCallbackCount], a
ld a, l ld a, l
ld [wdc0b], a ld [wCurrMapCallbackHeaderPointer], a
ld a, h ld a, h
ld [wdc0b + 1], a ld [wCurrMapCallbackHeaderPointer + 1], a
ld a, c ld a, c
and a and a
ret z ret z
@ -544,9 +544,9 @@ Function23c3:: ; 23c3
ReadWarps:: ; 23da ReadWarps:: ; 23da
ld a, [hli] ld a, [hli]
ld c, a ld c, a
ld [wdbfb], a ld [wCurrMapWarpCount], a
ld a, l ld a, l
ld [wdbfc], a ld [wCurrMapWarpHeaderPointer], a
ld a, h ld a, h
ld [wdbfd], a ld [wdbfd], a
ld a, c ld a, c
@ -562,7 +562,7 @@ ReadCoordEvents:: ; 23f1
ld c, a ld c, a
ld [wCurrentMapXYTriggerCount], a ld [wCurrentMapXYTriggerCount], a
ld a, l ld a, l
ld [wdbff], a ld [wCurrentMapXYTriggerHeaderPointer], a
ld a, h ld a, h
ld [wdc00], a ld [wdc00], a
ld a, c ld a, c
@ -1002,11 +1002,11 @@ RunMapCallback:: ; 263b
; 2653 ; 2653
Function2653:: ; 2653 Function2653:: ; 2653
ld a, [wdc0a] ld a, [wCurrMapCallbackCount]
ld c, a ld c, a
and a and a
ret z ret z
ld hl, wdc0b ld hl, wCurrMapCallbackHeaderPointer
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -1898,7 +1898,7 @@ CheckCurrentMapXYTriggers:: ; 2ad4
CheckStandingOnXYTrigger:: ; 2ae7 CheckStandingOnXYTrigger:: ; 2ae7
; Checks to see if you are standing on an xy-trigger. If yes, copies the trigger to EngineBuffer1 and sets carry. ; 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 a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a

View File

@ -16,7 +16,7 @@ CopyMenuDataHeader::
; 0x1d4b ; 0x1d4b
Function1d4b:: ; 1d4b Function1d4b:: ; 1d4b
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
ret ret
; 1d4f ; 1d4f
@ -410,7 +410,7 @@ Function1f2a:: ; 1f2a
ld a, [hl] ld a, [hl]
ld [MenuSelection], a ld [MenuSelection], a
ld a, [wcfa9] ld a, [wcfa9]
ld [wPocketPointerLocationBuffer], a ld [wPocketCursorBuffer], a
and a and a
ret ret
@ -571,7 +571,7 @@ InterpretMenu:: ; 202a
ld a, [hROMBank] ld a, [hROMBank]
ld [wcf94], a ld [wcf94], a
callba Function2400e callba Function2400e
ld a, [wPocketPointerLocationBuffer] ld a, [wPocketCursorBuffer]
ret ret
; 2039 ; 2039
@ -579,7 +579,7 @@ Function2039:: ; 2039
ld a, [hROMBank] ld a, [hROMBank]
ld [wcf94], a ld [wcf94], a
callba Function24022 callba Function24022
ld a, [wPocketPointerLocationBuffer] ld a, [wPocketCursorBuffer]
ret ret
; 2048 ; 2048
@ -587,7 +587,7 @@ Function2048:: ; 2048
ld a, [hROMBank] ld a, [hROMBank]
ld [wcf94], a ld [wcf94], a
callba Function2403c callba Function2403c
ld a, [wPocketPointerLocationBuffer] ld a, [wPocketCursorBuffer]
ret ret
; 2057 ; 2057

View File

@ -14,7 +14,6 @@ INCLUDE "macros/predef.asm"
INCLUDE "macros/rst.asm" INCLUDE "macros/rst.asm"
INCLUDE "macros/mobile.asm" INCLUDE "macros/mobile.asm"
INCLUDE "macros/trainer.asm" INCLUDE "macros/trainer.asm"
INCLUDE "macros/map_setup.asm"

View File

@ -1,236 +0,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 maps 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 arent 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 HIROs 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

514
main.asm

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More