mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Merge pull request #660 from mid-kid/master
Make the map setup commands match the actual function names better
This commit is contained in:
commit
94ebdab6d3
@ -6,7 +6,7 @@
|
|||||||
; FadeMusic
|
; FadeMusic
|
||||||
; PlayStereoSFX
|
; PlayStereoSFX
|
||||||
|
|
||||||
_MapSetup_Sound_Off::
|
_InitSound::
|
||||||
; restart sound operation
|
; restart sound operation
|
||||||
; clear all relevant hardware registers & wram
|
; clear all relevant hardware registers & wram
|
||||||
push hl
|
push hl
|
||||||
@ -62,7 +62,7 @@ MusicFadeRestart:
|
|||||||
push af
|
push af
|
||||||
ld a, [wMusicFadeID]
|
ld a, [wMusicFadeID]
|
||||||
push af
|
push af
|
||||||
call _MapSetup_Sound_Off
|
call _InitSound
|
||||||
pop af
|
pop af
|
||||||
ld [wMusicFadeID], a
|
ld [wMusicFadeID], a
|
||||||
pop af
|
pop af
|
||||||
@ -2797,7 +2797,7 @@ ChannelPointers:
|
|||||||
|
|
||||||
ClearChannels::
|
ClearChannels::
|
||||||
; runs ClearChannel for all 4 channels
|
; runs ClearChannel for all 4 channels
|
||||||
; doesn't seem to be used, but functionally identical to MapSetup_Sound_Off
|
; doesn't seem to be used, but functionally identical to InitSound
|
||||||
ld hl, rNR50
|
ld hl, rNR50
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
@ -15,55 +15,53 @@
|
|||||||
const MAPSETUP_FLY ; fc
|
const MAPSETUP_FLY ; fc
|
||||||
|
|
||||||
; MapSetupCommands indexes (see engine/overworld/map_setup.asm)
|
; MapSetupCommands indexes (see engine/overworld/map_setup.asm)
|
||||||
; Names taken from Condensation water's scripting compendium
|
|
||||||
; https://hax.iimarck.us/files/scriptingcodes_eng.htm
|
|
||||||
const_def
|
const_def
|
||||||
const map_lcd_on ; 00
|
const map_enable_lcd ; 00
|
||||||
const map_lcd_off ; 01
|
const map_disable_lcd ; 01
|
||||||
const map_sound_off ; 02
|
const map_init_sound ; 02
|
||||||
const map_music ; 03
|
const map_play_music ; 03
|
||||||
const map_start_music ; 04
|
const map_restart_music ; 04
|
||||||
const map_fade_music ; 05
|
const map_fade_to_music ; 05
|
||||||
const map_fade ; 06
|
const map_fade_music_and_palettes ; 06
|
||||||
const map_bike_music ; 07
|
const map_play_music_bike ; 07
|
||||||
const map_music_force ; 08
|
const map_force_music ; 08
|
||||||
const map_max_volume ; 09
|
const map_fade_in_music ; 09
|
||||||
const map_load_blocks ; 0a
|
const map_load_block_data ; 0a
|
||||||
const map_connection_blocks ; 0b
|
const map_load_connection_block_data ; 0b
|
||||||
const map_save_screen ; 0c
|
const map_save_screen ; 0c
|
||||||
const map_buffer_screen ; 0d
|
const map_buffer_screen ; 0d
|
||||||
const map_load_graphics ; 0e
|
const map_load_graphics ; 0e
|
||||||
const map_load_tileset ; 0f
|
const map_load_tileset ; 0f
|
||||||
const map_time_of_day ; 10
|
const map_load_time_of_day ; 10
|
||||||
const map_palettes ; 11
|
const map_load_palettes ; 11
|
||||||
const map_wildmons ; 12
|
const map_load_wild_mon_data ; 12
|
||||||
const map_sprites ; 13
|
const map_refresh_sprites ; 13
|
||||||
const map_change_callback ; 14
|
const map_handle_new ; 14
|
||||||
const map_start_callback ; 15
|
const map_handle_continue ; 15
|
||||||
const map_load_objects ; 16
|
const map_load_objects ; 16
|
||||||
const map_load_spawn ; 17
|
const map_enter_spawn_point ; 17
|
||||||
const map_load_connection ; 18
|
const map_enter_connection ; 18
|
||||||
const map_load_warp ; 19
|
const map_enter_warp ; 19
|
||||||
const map_load_attributes ; 1a
|
const map_load_attributes ; 1a
|
||||||
const map_load_attributes_2 ; 1b
|
const map_load_attributes_no_objects ; 1b
|
||||||
const map_clear_bg_palettes ; 1c
|
const map_clear_bg_palettes ; 1c
|
||||||
const map_fade_out_palettes ; 1d
|
const map_fade_out_palettes ; 1d
|
||||||
const map_fade_in_palettes ; 1e
|
const map_fade_in_palettes ; 1e
|
||||||
const map_anchor_screen ; 1f
|
const map_get_screen_coords ; 1f
|
||||||
const map_warp_face ; 20
|
const map_get_warp_dest_coords ; 20
|
||||||
const map_face_down ; 21
|
const map_spawn_in_facing_down ; 21
|
||||||
const map_spawn_coord ; 22
|
const map_spawn_player ; 22
|
||||||
const map_player_coord ; 23
|
const map_refresh_player_coords ; 23
|
||||||
const map_prolong_sprites ; 24
|
const map_reset_player_object_action ; 24
|
||||||
const map_delay_sprites ; 25
|
const map_skip_update_sprites ; 25
|
||||||
const map_update_roam ; 26
|
const map_update_roam_mons ; 26
|
||||||
const map_keep_roam ; 27
|
const map_jump_roam_mons ; 27
|
||||||
const map_fade_out_music ; 28
|
const map_fade_out_music ; 28
|
||||||
const map_animations_on ; 29
|
const map_activate_anims ; 29
|
||||||
const map_animations_off ; 2a
|
const map_suspend_anims ; 2a
|
||||||
const map_keep_palettes ; 2b
|
const map_apply_palettes ; 2b
|
||||||
const map_text_scroll_off ; 2c
|
const map_enable_text_acceleration ; 2c
|
||||||
const map_stop_script ; 2d
|
const map_init_name_sign ; 2d
|
||||||
map_end EQU -1
|
map_end EQU -1
|
||||||
|
|
||||||
; callback types
|
; callback types
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; link types
|
; wLinkMode
|
||||||
const_def
|
const_def
|
||||||
const LINK_NULL ; 0
|
const LINK_NULL ; 0
|
||||||
const LINK_TIMECAPSULE ; 1
|
const LINK_TIMECAPSULE ; 1
|
||||||
|
@ -14,163 +14,163 @@ MapSetupScripts:
|
|||||||
dw MapSetupScript_Fly
|
dw MapSetupScript_Fly
|
||||||
|
|
||||||
MapSetupScript_Teleport:
|
MapSetupScript_Teleport:
|
||||||
db map_prolong_sprites
|
db map_reset_player_object_action
|
||||||
MapSetupScript_Fly:
|
MapSetupScript_Fly:
|
||||||
db map_fade_out_palettes
|
db map_fade_out_palettes
|
||||||
db map_keep_roam
|
db map_jump_roam_mons
|
||||||
MapSetupScript_Warp:
|
MapSetupScript_Warp:
|
||||||
db map_lcd_off
|
db map_disable_lcd
|
||||||
db map_sound_off
|
db map_init_sound
|
||||||
db map_load_spawn
|
db map_enter_spawn_point
|
||||||
db map_load_attributes
|
db map_load_attributes
|
||||||
db map_change_callback
|
db map_handle_new
|
||||||
db map_spawn_coord
|
db map_spawn_player
|
||||||
db map_player_coord
|
db map_refresh_player_coords
|
||||||
db map_anchor_screen
|
db map_get_screen_coords
|
||||||
db map_load_blocks
|
db map_load_block_data
|
||||||
db map_buffer_screen
|
db map_buffer_screen
|
||||||
db map_load_graphics
|
db map_load_graphics
|
||||||
db map_time_of_day
|
db map_load_time_of_day
|
||||||
db map_load_objects
|
db map_load_objects
|
||||||
db map_lcd_on
|
db map_enable_lcd
|
||||||
db map_palettes
|
db map_load_palettes
|
||||||
db map_face_down
|
db map_spawn_in_facing_down
|
||||||
db map_sprites
|
db map_refresh_sprites
|
||||||
db map_bike_music
|
db map_play_music_bike
|
||||||
db map_max_volume
|
db map_fade_in_music
|
||||||
db map_fade_in_palettes
|
db map_fade_in_palettes
|
||||||
db map_animations_on
|
db map_activate_anims
|
||||||
db map_wildmons
|
db map_load_wild_mon_data
|
||||||
db map_end
|
db map_end
|
||||||
|
|
||||||
MapSetupScript_BadWarp:
|
MapSetupScript_BadWarp:
|
||||||
db map_load_spawn
|
db map_enter_spawn_point
|
||||||
db map_load_attributes
|
db map_load_attributes
|
||||||
db map_change_callback
|
db map_handle_new
|
||||||
db map_spawn_coord
|
db map_spawn_player
|
||||||
db map_player_coord
|
db map_refresh_player_coords
|
||||||
db map_anchor_screen
|
db map_get_screen_coords
|
||||||
db map_load_blocks
|
db map_load_block_data
|
||||||
db map_buffer_screen
|
db map_buffer_screen
|
||||||
db map_lcd_off
|
db map_disable_lcd
|
||||||
db map_load_graphics
|
db map_load_graphics
|
||||||
db map_time_of_day
|
db map_load_time_of_day
|
||||||
db map_fade_out_music
|
db map_fade_out_music
|
||||||
db map_lcd_on
|
db map_enable_lcd
|
||||||
db map_load_objects
|
db map_load_objects
|
||||||
db map_palettes
|
db map_load_palettes
|
||||||
db map_face_down
|
db map_spawn_in_facing_down
|
||||||
db map_sprites
|
db map_refresh_sprites
|
||||||
db map_fade_music
|
db map_fade_to_music
|
||||||
db map_fade_in_palettes
|
db map_fade_in_palettes
|
||||||
db map_animations_on
|
db map_activate_anims
|
||||||
db map_wildmons
|
db map_load_wild_mon_data
|
||||||
db map_end
|
db map_end
|
||||||
|
|
||||||
MapSetupScript_Connection:
|
MapSetupScript_Connection:
|
||||||
db map_animations_off
|
db map_suspend_anims
|
||||||
db map_load_connection
|
db map_enter_connection
|
||||||
db map_load_attributes
|
db map_load_attributes
|
||||||
db map_change_callback
|
db map_handle_new
|
||||||
db map_player_coord
|
db map_refresh_player_coords
|
||||||
db map_load_blocks
|
db map_load_block_data
|
||||||
db map_load_tileset
|
db map_load_tileset
|
||||||
db map_save_screen
|
db map_save_screen
|
||||||
db map_load_objects
|
db map_load_objects
|
||||||
db map_fade_music
|
db map_fade_to_music
|
||||||
db map_palettes
|
db map_load_palettes
|
||||||
db map_stop_script
|
db map_init_name_sign
|
||||||
db map_keep_palettes
|
db map_apply_palettes
|
||||||
db map_wildmons
|
db map_load_wild_mon_data
|
||||||
db map_update_roam
|
db map_update_roam_mons
|
||||||
db map_animations_on
|
db map_activate_anims
|
||||||
db map_end
|
db map_end
|
||||||
|
|
||||||
MapSetupScript_Fall:
|
MapSetupScript_Fall:
|
||||||
db map_prolong_sprites
|
db map_reset_player_object_action
|
||||||
MapSetupScript_Door:
|
MapSetupScript_Door:
|
||||||
db map_fade_out_palettes
|
db map_fade_out_palettes
|
||||||
MapSetupScript_Train:
|
MapSetupScript_Train:
|
||||||
db map_load_warp
|
db map_enter_warp
|
||||||
db map_load_attributes
|
db map_load_attributes
|
||||||
db map_warp_face
|
db map_get_warp_dest_coords
|
||||||
db map_change_callback
|
db map_handle_new
|
||||||
db map_player_coord
|
db map_refresh_player_coords
|
||||||
db map_load_blocks
|
db map_load_block_data
|
||||||
db map_buffer_screen
|
db map_buffer_screen
|
||||||
db map_lcd_off
|
db map_disable_lcd
|
||||||
db map_load_graphics
|
db map_load_graphics
|
||||||
db map_time_of_day
|
db map_load_time_of_day
|
||||||
db map_fade_out_music
|
db map_fade_out_music
|
||||||
db map_lcd_on
|
db map_enable_lcd
|
||||||
db map_load_objects
|
db map_load_objects
|
||||||
db map_palettes
|
db map_load_palettes
|
||||||
db map_sprites
|
db map_refresh_sprites
|
||||||
db map_fade_music
|
db map_fade_to_music
|
||||||
db map_fade_in_palettes
|
db map_fade_in_palettes
|
||||||
db map_animations_on
|
db map_activate_anims
|
||||||
db map_wildmons
|
db map_load_wild_mon_data
|
||||||
db map_update_roam
|
db map_update_roam_mons
|
||||||
db map_end
|
db map_end
|
||||||
|
|
||||||
MapSetupScript_ReloadMap:
|
MapSetupScript_ReloadMap:
|
||||||
db map_fade
|
db map_fade_music_and_palettes
|
||||||
db map_clear_bg_palettes
|
db map_clear_bg_palettes
|
||||||
db map_lcd_off
|
db map_disable_lcd
|
||||||
db map_sound_off
|
db map_init_sound
|
||||||
db map_load_blocks
|
db map_load_block_data
|
||||||
db map_connection_blocks
|
db map_load_connection_block_data
|
||||||
db map_load_graphics
|
db map_load_graphics
|
||||||
db map_time_of_day
|
db map_load_time_of_day
|
||||||
db map_lcd_on
|
db map_enable_lcd
|
||||||
db map_palettes
|
db map_load_palettes
|
||||||
db map_sprites
|
db map_refresh_sprites
|
||||||
db map_music_force
|
db map_force_music
|
||||||
db map_fade_in_palettes
|
db map_fade_in_palettes
|
||||||
db map_animations_on
|
db map_activate_anims
|
||||||
db map_wildmons
|
db map_load_wild_mon_data
|
||||||
db map_end
|
db map_end
|
||||||
|
|
||||||
MapSetupScript_LinkReturn:
|
MapSetupScript_LinkReturn:
|
||||||
db map_fade
|
db map_fade_music_and_palettes
|
||||||
db map_lcd_off
|
db map_disable_lcd
|
||||||
db map_sound_off
|
db map_init_sound
|
||||||
db map_change_callback
|
db map_handle_new
|
||||||
db map_load_blocks
|
db map_load_block_data
|
||||||
db map_buffer_screen
|
db map_buffer_screen
|
||||||
db map_load_graphics
|
db map_load_graphics
|
||||||
db map_time_of_day
|
db map_load_time_of_day
|
||||||
db map_lcd_on
|
db map_enable_lcd
|
||||||
db map_palettes
|
db map_load_palettes
|
||||||
db map_sprites
|
db map_refresh_sprites
|
||||||
db map_bike_music
|
db map_play_music_bike
|
||||||
db map_fade_in_palettes
|
db map_fade_in_palettes
|
||||||
db map_animations_on
|
db map_activate_anims
|
||||||
db map_wildmons
|
db map_load_wild_mon_data
|
||||||
db map_text_scroll_off
|
db map_enable_text_acceleration
|
||||||
db map_end
|
db map_end
|
||||||
|
|
||||||
MapSetupScript_Continue:
|
MapSetupScript_Continue:
|
||||||
db map_lcd_off
|
db map_disable_lcd
|
||||||
db map_sound_off
|
db map_init_sound
|
||||||
db map_load_attributes_2
|
db map_load_attributes_no_objects
|
||||||
db map_anchor_screen
|
db map_get_screen_coords
|
||||||
db map_start_callback
|
db map_handle_continue
|
||||||
db map_load_blocks
|
db map_load_block_data
|
||||||
db map_connection_blocks
|
db map_load_connection_block_data
|
||||||
db map_buffer_screen
|
db map_buffer_screen
|
||||||
db map_load_graphics
|
db map_load_graphics
|
||||||
db map_time_of_day
|
db map_load_time_of_day
|
||||||
db map_lcd_on
|
db map_enable_lcd
|
||||||
db map_palettes
|
db map_load_palettes
|
||||||
db map_sprites
|
db map_refresh_sprites
|
||||||
db map_bike_music
|
db map_play_music_bike
|
||||||
db map_fade_in_palettes
|
db map_fade_in_palettes
|
||||||
db map_animations_on
|
db map_activate_anims
|
||||||
db map_wildmons
|
db map_load_wild_mon_data
|
||||||
db map_end
|
db map_end
|
||||||
|
|
||||||
MapSetupScript_Submenu:
|
MapSetupScript_Submenu:
|
||||||
db map_load_blocks
|
db map_load_block_data
|
||||||
db map_connection_blocks
|
db map_load_connection_block_data
|
||||||
db map_end
|
db map_end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
MAP_NAME_SIGN_START EQU $60
|
MAP_NAME_SIGN_START EQU $60
|
||||||
|
|
||||||
ReturnFromMapSetupScript::
|
InitMapNameSign::
|
||||||
xor a
|
xor a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes
|
farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes
|
||||||
|
@ -617,7 +617,7 @@ FlyFunction:
|
|||||||
callasm FlyFromAnim
|
callasm FlyFromAnim
|
||||||
farscall Script_AbortBugContest
|
farscall Script_AbortBugContest
|
||||||
special WarpToSpawnPoint
|
special WarpToSpawnPoint
|
||||||
callasm DelayLoadingNewSprites
|
callasm SkipUpdateMapSprites
|
||||||
loadvar VAR_MOVEMENT, PLAYER_NORMAL
|
loadvar VAR_MOVEMENT, PLAYER_NORMAL
|
||||||
newloadmap MAPSETUP_FLY
|
newloadmap MAPSETUP_FLY
|
||||||
callasm FlyToAnim
|
callasm FlyToAnim
|
||||||
|
@ -2088,7 +2088,7 @@ EnterTimeCapsule:
|
|||||||
call DelayFrames
|
call DelayFrames
|
||||||
xor a
|
xor a
|
||||||
ldh [hVBlank], a
|
ldh [hVBlank], a
|
||||||
inc a
|
inc a ; LINK_TIMECAPSULE
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ INCLUDE "data/maps/setup_scripts.asm"
|
|||||||
ReadMapSetupScript:
|
ReadMapSetupScript:
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp -1
|
cp map_end
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
@ -62,52 +62,52 @@ MapSetupCommands:
|
|||||||
; entries correspond to command indexes in constants/map_setup_constants.asm
|
; entries correspond to command indexes in constants/map_setup_constants.asm
|
||||||
dba EnableLCD ; 00
|
dba EnableLCD ; 00
|
||||||
dba DisableLCD ; 01
|
dba DisableLCD ; 01
|
||||||
dba MapSetup_Sound_Off ; 02
|
dba InitSound ; 02
|
||||||
dba PlayMapMusic ; 03
|
dba PlayMapMusic ; 03
|
||||||
dba RestartMapMusic ; 04
|
dba RestartMapMusic ; 04
|
||||||
dba FadeToMapMusic ; 05
|
dba FadeToMapMusic ; 05
|
||||||
dba RotatePalettesRightMapAndMusic ; 06
|
dba FadeMapMusicAndPalettes ; 06
|
||||||
dba EnterMapMusic ; 07
|
dba PlayMapMusicBike ; 07
|
||||||
dba ForceMapMusic ; 08
|
dba ForceMapMusic ; 08
|
||||||
dba FadeInMusic ; 09
|
dba FadeInMusic ; 09
|
||||||
dba LoadBlockData ; 0a (callback 1)
|
dba LoadBlockData ; 0a (callback 1)
|
||||||
dba LoadNeighboringBlockData ; 0b
|
dba LoadConnectionBlockData ; 0b
|
||||||
dba SaveScreen ; 0c
|
dba SaveScreen ; 0c
|
||||||
dba BufferScreen ; 0d
|
dba BufferScreen ; 0d
|
||||||
dba LoadGraphics ; 0e
|
dba LoadMapGraphics ; 0e
|
||||||
dba LoadTileset ; 0f
|
dba LoadMapTileset ; 0f
|
||||||
dba LoadMapTimeOfDay ; 10
|
dba LoadMapTimeOfDay ; 10
|
||||||
dba LoadMapPalettes ; 11
|
dba LoadMapPalettes ; 11
|
||||||
dba LoadWildMonData ; 12
|
dba LoadWildMonData ; 12
|
||||||
dba RefreshMapSprites ; 13
|
dba RefreshMapSprites ; 13
|
||||||
dba HandleNewMap ; 14
|
dba HandleNewMap ; 14
|
||||||
dba InitCommandQueue ; 15
|
dba HandleContinueMap ; 15
|
||||||
dba LoadObjectsRunCallback_02 ; 16
|
dba LoadMapObjects ; 16
|
||||||
dba LoadSpawnPoint ; 17
|
dba EnterMapSpawnPoint ; 17
|
||||||
dba EnterMapConnection ; 18
|
dba EnterMapConnection ; 18
|
||||||
dba LoadWarpData ; 19
|
dba EnterMapWarp ; 19
|
||||||
dba LoadMapAttributes ; 1a
|
dba LoadMapAttributes ; 1a
|
||||||
dba LoadMapAttributes_SkipPeople ; 1b
|
dba LoadMapAttributes_SkipObjects ; 1b
|
||||||
dba ClearBGPalettes ; 1c
|
dba ClearBGPalettes ; 1c
|
||||||
dba FadeOutPalettes ; 1d
|
dba FadeOutPalettes ; 1d
|
||||||
dba FadeInPalettes ; 1e
|
dba FadeInPalettes ; 1e
|
||||||
dba GetCoordOfUpperLeftCorner ; 1f
|
dba GetMapScreenCoords ; 1f
|
||||||
dba RestoreFacingAfterWarp ; 20
|
dba GetWarpDestCoords ; 20
|
||||||
dba SpawnInFacingDown ; 21
|
dba SpawnInFacingDown ; 21
|
||||||
dba SpawnPlayer ; 22
|
dba SpawnPlayer ; 22
|
||||||
dba RefreshPlayerCoords ; 23
|
dba RefreshPlayerCoords ; 23
|
||||||
dba DelayClearingOldSprites ; 24
|
dba ResetPlayerObjectAction ; 24
|
||||||
dba DelayLoadingNewSprites ; 25
|
dba SkipUpdateMapSprites ; 25
|
||||||
dba UpdateRoamMons ; 26
|
dba UpdateRoamMons ; 26
|
||||||
dba JumpRoamMons ; 27
|
dba JumpRoamMons ; 27
|
||||||
dba FadeOldMapMusic ; 28
|
dba FadeOutMapMusic ; 28
|
||||||
dba ActivateMapAnims ; 29
|
dba ActivateMapAnims ; 29
|
||||||
dba SuspendMapAnims ; 2a
|
dba SuspendMapAnims ; 2a
|
||||||
dba RetainOldPalettes ; 2b
|
dba ApplyMapPalettes ; 2b
|
||||||
dba DontScrollText ; 2c
|
dba EnableTextAcceleration ; 2c
|
||||||
dba ReturnFromMapSetupScript ; 2d
|
dba InitMapNameSign ; 2d
|
||||||
|
|
||||||
DontScrollText:
|
EnableTextAcceleration:
|
||||||
xor a
|
xor a
|
||||||
ld [wDisableTextAcceleration], a
|
ld [wDisableTextAcceleration], a
|
||||||
ret
|
ret
|
||||||
@ -122,7 +122,7 @@ SuspendMapAnims:
|
|||||||
ldh [hMapAnims], a
|
ldh [hMapAnims], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadObjectsRunCallback_02:
|
LoadMapObjects:
|
||||||
ld a, MAPCALLBACK_OBJECTS
|
ld a, MAPCALLBACK_OBJECTS
|
||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
farcall LoadObjectMasks
|
farcall LoadObjectMasks
|
||||||
@ -132,12 +132,12 @@ LoadObjectsRunCallback_02:
|
|||||||
; unused
|
; unused
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DelayClearingOldSprites:
|
ResetPlayerObjectAction:
|
||||||
ld hl, wPlayerSpriteSetupFlags
|
ld hl, wPlayerSpriteSetupFlags
|
||||||
set PLAYERSPRITESETUP_RESET_ACTION_F, [hl]
|
set PLAYERSPRITESETUP_RESET_ACTION_F, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DelayLoadingNewSprites:
|
SkipUpdateMapSprites:
|
||||||
ld hl, wPlayerSpriteSetupFlags
|
ld hl, wPlayerSpriteSetupFlags
|
||||||
set PLAYERSPRITESETUP_SKIP_RELOAD_GFX_F, [hl]
|
set PLAYERSPRITESETUP_SKIP_RELOAD_GFX_F, [hl]
|
||||||
ret
|
ret
|
||||||
@ -216,16 +216,16 @@ CheckReplaceKrisSprite:
|
|||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
FadeOldMapMusic:
|
FadeOutMapMusic:
|
||||||
ld a, 6
|
ld a, 6
|
||||||
call SkipMusic
|
call SkipMusic
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RetainOldPalettes:
|
ApplyMapPalettes:
|
||||||
farcall _UpdateTimePals
|
farcall _UpdateTimePals
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RotatePalettesRightMapAndMusic:
|
FadeMapMusicAndPalettes:
|
||||||
ld e, 0
|
ld e, 0
|
||||||
ld a, [wMusicFadeID]
|
ld a, [wMusicFadeID]
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
INCLUDE "data/maps/spawn_points.asm"
|
INCLUDE "data/maps/spawn_points.asm"
|
||||||
|
|
||||||
LoadSpawnPoint:
|
EnterMapSpawnPoint:
|
||||||
; loads the spawn point in wDefaultSpawnpoint
|
; loads the spawn point in wDefaultSpawnpoint
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
|
@ -6,7 +6,7 @@ HandleNewMap:
|
|||||||
call ResetBikeFlags
|
call ResetBikeFlags
|
||||||
ld a, MAPCALLBACK_NEWMAP
|
ld a, MAPCALLBACK_NEWMAP
|
||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
InitCommandQueue:
|
HandleContinueMap:
|
||||||
farcall ClearCmdQueue
|
farcall ClearCmdQueue
|
||||||
ld a, MAPCALLBACK_CMDQUEUE
|
ld a, MAPCALLBACK_CMDQUEUE
|
||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
@ -149,7 +149,7 @@ EnterMapConnection:
|
|||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadWarpData:
|
EnterMapWarp:
|
||||||
call .SaveDigWarp
|
call .SaveDigWarp
|
||||||
call .SetSpawn
|
call .SetSpawn
|
||||||
ld a, [wNextWarp]
|
ld a, [wNextWarp]
|
||||||
@ -295,8 +295,8 @@ LoadMapTimeOfDay:
|
|||||||
ldh [rVBK], a
|
ldh [rVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadGraphics:
|
LoadMapGraphics:
|
||||||
call LoadTileset
|
call LoadMapTileset
|
||||||
call LoadTilesetGFX
|
call LoadTilesetGFX
|
||||||
xor a
|
xor a
|
||||||
ldh [hMapAnims], a
|
ldh [hMapAnims], a
|
||||||
@ -313,7 +313,7 @@ LoadMapPalettes:
|
|||||||
|
|
||||||
RefreshMapSprites:
|
RefreshMapSprites:
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
farcall ReturnFromMapSetupScript
|
farcall InitMapNameSign
|
||||||
call GetMovementPermissions
|
call GetMovementPermissions
|
||||||
farcall RefreshPlayerSprite
|
farcall RefreshPlayerSprite
|
||||||
farcall CheckReplaceKrisSprite
|
farcall CheckReplaceKrisSprite
|
||||||
@ -325,7 +325,7 @@ RefreshMapSprites:
|
|||||||
call SafeUpdateSprites
|
call SafeUpdateSprites
|
||||||
.skip
|
.skip
|
||||||
ld a, [wPlayerSpriteSetupFlags]
|
ld a, [wPlayerSpriteSetupFlags]
|
||||||
and %00011100
|
and (1 << PLAYERSPRITESETUP_FEMALE_TO_MALE_F) | (1 << 3) | (1 << 4)
|
||||||
ld [wPlayerSpriteSetupFlags], a
|
ld [wPlayerSpriteSetupFlags], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -386,7 +386,7 @@ CheckMovingOffEdgeOfMap::
|
|||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetCoordOfUpperLeftCorner::
|
GetMapScreenCoords::
|
||||||
ld hl, wOverworldMapBlocks
|
ld hl, wOverworldMapBlocks
|
||||||
ld a, [wXCoord]
|
ld a, [wXCoord]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
|
@ -1309,7 +1309,7 @@ ExitPokegearRadio_HandleMusic:
|
|||||||
cp RESTART_MAP_MUSIC
|
cp RESTART_MAP_MUSIC
|
||||||
jr z, .restart_map_music
|
jr z, .restart_map_music
|
||||||
cp ENTER_MAP_MUSIC
|
cp ENTER_MAP_MUSIC
|
||||||
call z, EnterMapMusic
|
call z, PlayMapMusicBike
|
||||||
xor a
|
xor a
|
||||||
ld [wPokegearRadioMusicPlaying], a
|
ld [wPokegearRadioMusicPlaying], a
|
||||||
ret
|
ret
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
; Audio interfaces.
|
; Audio interfaces.
|
||||||
|
|
||||||
MapSetup_Sound_Off::
|
InitSound::
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
@ -8,11 +8,11 @@ MapSetup_Sound_Off::
|
|||||||
|
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(_MapSetup_Sound_Off)
|
ld a, BANK(_InitSound)
|
||||||
ldh [hROMBank], a
|
ldh [hROMBank], a
|
||||||
ld [MBC3RomBank], a
|
ld [MBC3RomBank], a
|
||||||
|
|
||||||
call _MapSetup_Sound_Off
|
call _InitSound
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ldh [hROMBank], a
|
ldh [hROMBank], a
|
||||||
@ -71,7 +71,7 @@ PlayMusic::
|
|||||||
|
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(_PlayMusic) ; aka BANK(_MapSetup_Sound_Off)
|
ld a, BANK(_PlayMusic) ; aka BANK(_InitSound)
|
||||||
ldh [hROMBank], a
|
ldh [hROMBank], a
|
||||||
ld [MBC3RomBank], a
|
ld [MBC3RomBank], a
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ PlayMusic::
|
|||||||
jr .end
|
jr .end
|
||||||
|
|
||||||
.nomusic
|
.nomusic
|
||||||
call _MapSetup_Sound_Off
|
call _InitSound
|
||||||
|
|
||||||
.end
|
.end
|
||||||
pop af
|
pop af
|
||||||
@ -359,7 +359,8 @@ PlayMapMusic::
|
|||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
||||||
EnterMapMusic::
|
PlayMapMusicBike::
|
||||||
|
; If the player's on a bike, play the bike music instead of the map music
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
|
@ -272,9 +272,9 @@ Request1bpp::
|
|||||||
|
|
||||||
ldh a, [hTilesPerCycle]
|
ldh a, [hTilesPerCycle]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ldh [hTilesPerCycle], a
|
ldh [hTilesPerCycle], a
|
||||||
|
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp LINK_MOBILE
|
cp LINK_MOBILE
|
||||||
jr nz, .NotMobile
|
jr nz, .NotMobile
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Reset::
|
Reset::
|
||||||
di
|
di
|
||||||
call MapSetup_Sound_Off
|
call InitSound
|
||||||
xor a
|
xor a
|
||||||
ldh [hMapAnims], a
|
ldh [hMapAnims], a
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
@ -162,7 +162,7 @@ Init::
|
|||||||
|
|
||||||
predef InitSGBBorder ; SGB init
|
predef InitSGBBorder ; SGB init
|
||||||
|
|
||||||
call MapSetup_Sound_Off
|
call InitSound
|
||||||
xor a
|
xor a
|
||||||
ld [wMapMusic], a
|
ld [wMapMusic], a
|
||||||
jp GameInit
|
jp GameInit
|
||||||
|
@ -338,6 +338,12 @@ JoyTextDelay::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
WaitPressAorB_BlinkCursor::
|
WaitPressAorB_BlinkCursor::
|
||||||
|
; Show a blinking cursor in the lower right-hand
|
||||||
|
; corner of a textbox and wait until A or B is
|
||||||
|
; pressed.
|
||||||
|
;
|
||||||
|
; NOTE: The cursor has to be shown before calling
|
||||||
|
; this function or no cursor will be shown at all.
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndexBuffer]
|
||||||
push af
|
push af
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndexBuffer]
|
||||||
@ -373,6 +379,9 @@ SimpleWaitPressAorB::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
PromptButton::
|
PromptButton::
|
||||||
|
; Show a blinking cursor in the lower right-hand
|
||||||
|
; corner of a textbox and wait until A or B is
|
||||||
|
; pressed, afterwards, play a sound.
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .link
|
jr nz, .link
|
||||||
|
19
home/map.asm
19
home/map.asm
@ -381,11 +381,11 @@ LoadMapAttributes::
|
|||||||
call CopyMapPartialAndAttributes
|
call CopyMapPartialAndAttributes
|
||||||
call SwitchToMapScriptsBank
|
call SwitchToMapScriptsBank
|
||||||
call ReadMapScripts
|
call ReadMapScripts
|
||||||
xor a ; do not skip object_events
|
xor a ; do not skip object events
|
||||||
call ReadMapEvents
|
call ReadMapEvents
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadMapAttributes_SkipPeople::
|
LoadMapAttributes_SkipObjects::
|
||||||
call CopyMapPartialAndAttributes
|
call CopyMapPartialAndAttributes
|
||||||
call SwitchToMapScriptsBank
|
call SwitchToMapScriptsBank
|
||||||
call ReadMapScripts
|
call ReadMapScripts
|
||||||
@ -657,7 +657,7 @@ ClearObjectStructs::
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RestoreFacingAfterWarp::
|
GetWarpDestCoords::
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
@ -685,7 +685,7 @@ endr
|
|||||||
call .backup
|
call .backup
|
||||||
|
|
||||||
.skip
|
.skip
|
||||||
farcall GetCoordOfUpperLeftCorner
|
farcall GetMapScreenCoords
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.backup
|
.backup
|
||||||
@ -1438,7 +1438,7 @@ SaveScreen::
|
|||||||
.vertical
|
.vertical
|
||||||
ld b, SCREEN_META_WIDTH
|
ld b, SCREEN_META_WIDTH
|
||||||
ld c, SCREEN_META_HEIGHT - 1
|
ld c, SCREEN_META_HEIGHT - 1
|
||||||
jr SaveScreen_LoadNeighbor
|
jr SaveScreen_LoadConnection
|
||||||
|
|
||||||
.left
|
.left
|
||||||
ld de, wScreenSave + 1
|
ld de, wScreenSave + 1
|
||||||
@ -1450,9 +1450,9 @@ SaveScreen::
|
|||||||
.horizontal
|
.horizontal
|
||||||
ld b, SCREEN_META_WIDTH - 1
|
ld b, SCREEN_META_WIDTH - 1
|
||||||
ld c, SCREEN_META_HEIGHT
|
ld c, SCREEN_META_HEIGHT
|
||||||
jr SaveScreen_LoadNeighbor
|
jr SaveScreen_LoadConnection
|
||||||
|
|
||||||
LoadNeighboringBlockData::
|
LoadConnectionBlockData::
|
||||||
ld hl, wOverworldMapAnchor
|
ld hl, wOverworldMapAnchor
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
@ -1464,7 +1464,7 @@ LoadNeighboringBlockData::
|
|||||||
ld b, SCREEN_META_WIDTH
|
ld b, SCREEN_META_WIDTH
|
||||||
ld c, SCREEN_META_HEIGHT
|
ld c, SCREEN_META_HEIGHT
|
||||||
|
|
||||||
SaveScreen_LoadNeighbor::
|
SaveScreen_LoadConnection::
|
||||||
.row
|
.row
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
@ -1481,7 +1481,6 @@ SaveScreen_LoadNeighbor::
|
|||||||
ld e, a
|
ld e, a
|
||||||
jr nc, .okay
|
jr nc, .okay
|
||||||
inc d
|
inc d
|
||||||
|
|
||||||
.okay
|
.okay
|
||||||
pop hl
|
pop hl
|
||||||
ldh a, [hConnectionStripLength]
|
ldh a, [hConnectionStripLength]
|
||||||
@ -2260,7 +2259,7 @@ GetFishingGroup::
|
|||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadTileset::
|
LoadMapTileset::
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ CloseText::
|
|||||||
ld a, $90
|
ld a, $90
|
||||||
ldh [hWY], a
|
ldh [hWY], a
|
||||||
call ReplaceKrisSprite
|
call ReplaceKrisSprite
|
||||||
farcall ReturnFromMapSetupScript
|
farcall InitMapNameSign
|
||||||
farcall LoadOverworldFont
|
farcall LoadOverworldFont
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ BigDollScript:
|
|||||||
GameConsoleScript:
|
GameConsoleScript:
|
||||||
describedecoration DECODESC_CONSOLE
|
describedecoration DECODESC_CONSOLE
|
||||||
|
|
||||||
PlayersHousePosterScript:
|
PosterScript:
|
||||||
conditional_event EVENT_PLAYERS_ROOM_POSTER, .Script
|
conditional_event EVENT_PLAYERS_ROOM_POSTER, .Script
|
||||||
|
|
||||||
.Script:
|
.Script:
|
||||||
@ -125,7 +125,7 @@ PlayersHouse2F_MapEvents:
|
|||||||
bg_event 2, 1, BGEVENT_UP, PlayersHousePCScript
|
bg_event 2, 1, BGEVENT_UP, PlayersHousePCScript
|
||||||
bg_event 3, 1, BGEVENT_READ, PlayersHouseRadioScript
|
bg_event 3, 1, BGEVENT_READ, PlayersHouseRadioScript
|
||||||
bg_event 5, 1, BGEVENT_READ, PlayersHouseBookshelfScript
|
bg_event 5, 1, BGEVENT_READ, PlayersHouseBookshelfScript
|
||||||
bg_event 6, 0, BGEVENT_IFSET, PlayersHousePosterScript
|
bg_event 6, 0, BGEVENT_IFSET, PosterScript
|
||||||
|
|
||||||
db 4 ; object events
|
db 4 ; object events
|
||||||
object_event 4, 2, SPRITE_CONSOLE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GameConsoleScript, EVENT_PLAYERS_HOUSE_2F_CONSOLE
|
object_event 4, 2, SPRITE_CONSOLE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GameConsoleScript, EVENT_PLAYERS_HOUSE_2F_CONSOLE
|
||||||
|
@ -1089,9 +1089,9 @@ Function1006dc:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1006fd:
|
MobileBattleResetTimer:
|
||||||
ld a, $04
|
ld a, BANK(sMobileBattleTimer)
|
||||||
ld hl, $a800
|
ld hl, sMobileBattleTimer
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1272,7 +1272,7 @@ Function100826:
|
|||||||
.asm_100830
|
.asm_100830
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ccf
|
ccf
|
||||||
ld a, [wBGMapBufferPtrs]
|
ld a, [wcd70]
|
||||||
adc [hl]
|
adc [hl]
|
||||||
sub $3c
|
sub $3c
|
||||||
jr nc, .asm_10083c
|
jr nc, .asm_10083c
|
||||||
@ -7543,7 +7543,7 @@ Function10378c:
|
|||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
farcall Function1006fd
|
farcall MobileBattleResetTimer
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.failed_to_save
|
.failed_to_save
|
||||||
|
@ -691,7 +691,7 @@ Function1163c0:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
farcall ReloadMapPart
|
farcall ReloadMapPart
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp $4
|
cp LINK_MOBILE
|
||||||
jr z, .asm_11642a
|
jr z, .asm_11642a
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [wMusicFade], a
|
ld [wMusicFade], a
|
||||||
|
@ -7324,7 +7324,7 @@ Function11b7e5:
|
|||||||
farcall Function17d1f1
|
farcall Function17d1f1
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wForceEvolution], a
|
ld [wForceEvolution], a
|
||||||
ld a, $2
|
ld a, LINK_TRADECENTER
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
farcall EvolvePokemon
|
farcall EvolvePokemon
|
||||||
xor a
|
xor a
|
||||||
|
@ -295,7 +295,7 @@ Function17d0f3:
|
|||||||
farcall Function17d1f1
|
farcall Function17d1f1
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wForceEvolution], a
|
ld [wForceEvolution], a
|
||||||
ld a, $2
|
ld a, LINK_TRADECENTER
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
farcall EvolvePokemon
|
farcall EvolvePokemon
|
||||||
xor a
|
xor a
|
||||||
|
2
sram.asm
2
sram.asm
@ -260,7 +260,7 @@ s4_a60e:: dw ; a60e
|
|||||||
|
|
||||||
ds $1f0
|
ds $1f0
|
||||||
|
|
||||||
sMobileBattleTimer:: ds 3
|
sMobileBattleTimer:: ds 3 ; a800
|
||||||
|
|
||||||
|
|
||||||
SECTION "SRAM Mobile 2", SRAM
|
SECTION "SRAM Mobile 2", SRAM
|
||||||
|
Loading…
Reference in New Issue
Block a user