mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Make the map setup commands match the actual function names better
These functions used as map setup commands are used in other places, too, so I can't prefix them under the same. The names should match except I won't repeat "map" in a map setup command name.
This commit is contained in:
parent
1c41b2e579
commit
739a60b33c
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
@ -215,16 +215,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
|
||||||
|
@ -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
|
||||||
|
19
home/map.asm
19
home/map.asm
@ -380,11 +380,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
|
||||||
@ -656,7 +656,7 @@ ClearObjectStructs::
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RestoreFacingAfterWarp::
|
GetWarpDestCoords::
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
@ -684,7 +684,7 @@ endr
|
|||||||
call .backup
|
call .backup
|
||||||
|
|
||||||
.skip
|
.skip
|
||||||
farcall GetCoordOfUpperLeftCorner
|
farcall GetMapScreenCoords
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.backup
|
.backup
|
||||||
@ -1437,7 +1437,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
|
||||||
@ -1449,9 +1449,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]
|
||||||
@ -1463,7 +1463,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
|
||||||
@ -1480,7 +1480,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]
|
||||||
@ -2259,7 +2258,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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user