Skip to content

Commit

Permalink
more accurate script names: refreshscreen -> reanchormap, and reloadm…
Browse files Browse the repository at this point in the history
…appart -> refreshmap (#1078)
  • Loading branch information
xCrystal committed Jan 7, 2024
1 parent f72f078 commit 7f3b879
Show file tree
Hide file tree
Showing 42 changed files with 115 additions and 115 deletions.
4 changes: 2 additions & 2 deletions docs/event_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ If <code><i>item_id</i></code> = `USE_SCRIPT_VAR`, then it uses `[wScriptVar]` i
## `$47`: `opentext`


## `$48`: <code>refreshscreen [<i>dummy</i>=0]</code>
## `$48`: <code>reanchormap [<i>dummy</i>=0]</code>


## `$49`: `closetext`
Expand Down Expand Up @@ -419,7 +419,7 @@ If <code><i>item_id</i></code> = `USE_SCRIPT_VAR`, then it uses `[wScriptVar]` i
## `$7B`: `reloadmap`


## `$7C`: `reloadmappart`
## `$7C`: `refreshmap`


## `$7D`: <code>writecmdqueue <i>queue_pointer</i></code>
Expand Down
4 changes: 2 additions & 2 deletions engine/events/itemfinder.asm
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ ItemFinder:
ret

.Script_FoundSomething:
reloadmappart
refreshmap
special UpdateTimePals
callasm .ItemfinderSound
writetext .ItemfinderItemNearbyText
closetext
end

.Script_FoundNothing:
reloadmappart
refreshmap
special UpdateTimePals
writetext .ItemfinderNopeText
closetext
Expand Down
36 changes: 18 additions & 18 deletions engine/events/overworld.asm
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ CheckMapForSomethingToCut:
ret

Script_CutFromMenu:
reloadmappart
refreshmap
special UpdateTimePals

Script_Cut:
callasm GetPartyNickname
writetext UseCutText
reloadmappart
refreshmap
callasm CutDownTreeOrGrass
closetext
end
Expand Down Expand Up @@ -307,7 +307,7 @@ UseFlash:
jp QueueScript

Script_UseFlash:
reloadmappart
refreshmap
special UpdateTimePals
writetext UseFlashTextScript
callasm BlindingFlash
Expand Down Expand Up @@ -608,7 +608,7 @@ FlyFunction:
ret

.FlyScript:
reloadmappart
refreshmap
callasm HideSprites
special UpdateTimePals
callasm FlyFromAnim
Expand Down Expand Up @@ -668,7 +668,7 @@ CheckMapCanWaterfall:
ret

Script_WaterfallFromMenu:
reloadmappart
refreshmap
special UpdateTimePals

Script_UsedWaterfall:
Expand Down Expand Up @@ -838,13 +838,13 @@ EscapeRopeOrDig:
text_end

.UsedEscapeRopeScript:
reloadmappart
refreshmap
special UpdateTimePals
writetext .UseEscapeRopeText
sjump .UsedDigOrEscapeRopeScript

.UsedDigScript:
reloadmappart
refreshmap
special UpdateTimePals
writetext .UseDigText

Expand Down Expand Up @@ -930,11 +930,11 @@ TeleportFunction:
text_end

.TeleportScript:
reloadmappart
refreshmap
special UpdateTimePals
writetext .TeleportReturnText
pause 60
reloadmappart
refreshmap
closetext
playsound SFX_WARP_TO
applymovement PLAYER, .TeleportFrom
Expand Down Expand Up @@ -1000,7 +1000,7 @@ SetStrengthFlag:
ret

Script_StrengthFromMenu:
reloadmappart
refreshmap
special UpdateTimePals

Script_UsedStrength:
Expand Down Expand Up @@ -1159,13 +1159,13 @@ TryWhirlpoolMenu:
ret

Script_WhirlpoolFromMenu:
reloadmappart
refreshmap
special UpdateTimePals

Script_UsedWhirlpool:
callasm GetPartyNickname
writetext UseWhirlpoolText
reloadmappart
refreshmap
callasm DisappearWhirlpool
closetext
end
Expand Down Expand Up @@ -1258,14 +1258,14 @@ HeadbuttNothingText:
text_end

HeadbuttFromMenuScript:
reloadmappart
refreshmap
special UpdateTimePals

HeadbuttScript:
callasm GetPartyNickname
writetext UseHeadbuttText

reloadmappart
refreshmap
callasm ShakeHeadbuttTree

callasm TreeMonEncounter
Expand Down Expand Up @@ -1355,7 +1355,7 @@ GetFacingObject:
ret

RockSmashFromMenuScript:
reloadmappart
refreshmap
special UpdateTimePals

RockSmashScript:
Expand Down Expand Up @@ -1582,7 +1582,7 @@ Fishing_CheckFacingUp:
ret

Script_FishCastRod:
reloadmappart
refreshmap
loadmem hBGMapMode, $0
special UpdateTimePals
loademote EMOTE_ROD
Expand Down Expand Up @@ -1704,7 +1704,7 @@ BikeFunction:
ret

Script_GetOnBike:
reloadmappart
refreshmap
special UpdateTimePals
loadvar VAR_MOVEMENT, PLAYER_BIKE
writetext GotOnBikeText
Expand All @@ -1724,7 +1724,7 @@ Overworld_DummyFunction: ; unreferenced
ret

Script_GetOffBike:
reloadmappart
refreshmap
special UpdateTimePals
loadvar VAR_MOVEMENT, PLAYER_NORMAL
writetext GotOffBikeText
Expand Down
2 changes: 1 addition & 1 deletion engine/events/sacred_ash.asm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CheckAnyFaintedMon:

SacredAshScript:
special HealParty
reloadmappart
refreshmap
playsound SFX_WARP_TO
special FadeOutToWhite
special FadeInFromWhite
Expand Down
2 changes: 1 addition & 1 deletion engine/events/squirtbottle.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _Squirtbottle:
ret

.SquirtbottleScript:
reloadmappart
refreshmap
special UpdateTimePals
callasm .CheckCanUseSquirtbottle
iffalse .SquirtbottleNothingScript
Expand Down
2 changes: 1 addition & 1 deletion engine/events/sweet_scent.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SweetScentFromMenu:
ret

.SweetScent:
reloadmappart
refreshmap
special UpdateTimePals
callasm GetPartyNickname
writetext UseSweetScentText
Expand Down
2 changes: 1 addition & 1 deletion engine/events/whiteout.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Script_BattleWhiteout::
sjump Script_Whiteout

OverworldWhiteoutScript::
refreshscreen
reanchormap
callasm OverworldBGMap

Script_Whiteout:
Expand Down
10 changes: 5 additions & 5 deletions engine/overworld/scripting.asm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ ScriptCommandTable:
dw Script_itemnotify ; 45
dw Script_pocketisfull ; 46
dw Script_opentext ; 47
dw Script_refreshscreen ; 48
dw Script_reanchormap ; 48
dw Script_closetext ; 49
dw Script_writeunusedbyte ; 4a
dw Script_farwritetext ; 4b
Expand Down Expand Up @@ -188,7 +188,7 @@ ScriptCommandTable:
dw Script_changemapblocks ; 79
dw Script_changeblock ; 7a
dw Script_reloadmap ; 7b
dw Script_reloadmappart ; 7c
dw Script_refreshmap ; 7c
dw Script_writecmdqueue ; 7d
dw Script_delcmdqueue ; 7e
dw Script_playmusic ; 7f
Expand Down Expand Up @@ -2157,7 +2157,7 @@ Script_changeblock:
call BufferScreen
ret

Script_reloadmappart::
Script_refreshmap::
xor a
ldh [hBGMapMode], a
call LoadOverworldTilemapAndAttrmapPals
Expand Down Expand Up @@ -2192,8 +2192,8 @@ Script_opentext:
call OpenText
ret

Script_refreshscreen:
call RefreshScreen
Script_reanchormap:
call ReanchorMap
call GetScriptByte
ret

Expand Down
6 changes: 3 additions & 3 deletions engine/overworld/select_menu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ UseRegisteredItem:
ret

.Party:
call RefreshScreen
call ReanchorMap
call FadeToMenu
call DoItemEffect
call CloseSubmenu
Expand All @@ -148,7 +148,7 @@ UseRegisteredItem:
ret

.Overworld:
call RefreshScreen
call ReanchorMap
ld a, 1
ld [wUsingItemWithSelect], a
call DoItemEffect
Expand All @@ -163,7 +163,7 @@ UseRegisteredItem:
ret

.CantUse:
call RefreshScreen
call ReanchorMap

._cantuse
call CantUseItem
Expand Down
2 changes: 1 addition & 1 deletion engine/phone/phone.asm
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ WrongNumber:
text_end

Script_ReceivePhoneCall:
refreshscreen
reanchormap
callasm RingTwice_StartCall
memcall wCallerContact + PHONE_CONTACT_SCRIPT2_BANK
waitbutton
Expand Down
2 changes: 1 addition & 1 deletion engine/pokemon/breeding.asm
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ DoEggStep::
jr .loop

OverworldHatchEgg::
call RefreshScreen
call ReanchorMap
call LoadStandardMenuHeader
call HatchEggs
call ExitAllMenus
Expand Down
2 changes: 1 addition & 1 deletion home/window.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RefreshScreen::
ReanchorMap::
call ClearWindowData
ldh a, [hROMBank]
push af
Expand Down
14 changes: 7 additions & 7 deletions macros/scripts/events.asm
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,12 @@ MACRO opentext
db opentext_command
ENDM

const refreshscreen_command ; $48
MACRO refreshscreen
const reanchormap_command ; $48
MACRO reanchormap
if _NARG == 0
refreshscreen 0
reanchormap 0
else
db refreshscreen_command
db reanchormap_command
db \1 ; dummy
endc
ENDM
Expand Down Expand Up @@ -789,9 +789,9 @@ MACRO reloadmap
db reloadmap_command
ENDM

const reloadmappart_command ; $7c
MACRO reloadmappart
db reloadmappart_command
const refreshmap_command ; $7c
MACRO refreshmap
db refreshmap_command
ENDM

const writecmdqueue_command ; $7d
Expand Down
6 changes: 3 additions & 3 deletions maps/BrunosRoom.asm
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ BrunosRoomDoorsCallback:

BrunosRoomDoorLocksBehindYouScript:
applymovement PLAYER, BrunosRoom_EnterMovement
refreshscreen $86
reanchormap $86
playsound SFX_STRENGTH
earthquake 80
changeblock 4, 14, $2a ; wall
reloadmappart
refreshmap
closetext
setscene SCENE_BRUNOSROOM_NOOP
setevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED
Expand All @@ -59,7 +59,7 @@ BrunoScript_Battle:
closetext
playsound SFX_ENTER_DOOR
changeblock 4, 2, $16 ; open door
reloadmappart
refreshmap
closetext
setevent EVENT_BRUNOS_ROOM_EXIT_OPEN
waitsfx
Expand Down
2 changes: 1 addition & 1 deletion maps/BurnedTower1F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ BurnedTowerRivalBattleScript:
playsound SFX_ENTER_DOOR
waitsfx
changeblock 10, 8, $25 ; hole
reloadmappart
refreshmap
pause 15
applymovement PLAYER, BurnedTower1FMovement_PlayerStartsToFall
playsound SFX_KINESIS
Expand Down
4 changes: 2 additions & 2 deletions maps/BurnedTowerB1F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ ReleaseTheBeasts:
setevent EVENT_BURNED_TOWER_MORTY
setevent EVENT_BURNED_TOWER_1F_EUSINE
appear BURNEDTOWERB1F_EUSINE
refreshscreen
reanchormap
changeblock 6, 14, $1b ; ladder
reloadmappart
refreshmap
closetext
setscene SCENE_BURNEDTOWERB1F_NOOP
end
Expand Down

0 comments on commit 7f3b879

Please sign in to comment.