summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rwxr-xr-xengine/events/bug_contest/contest.asm18
-rwxr-xr-xengine/events/forced_movement.asm2
-rw-r--r--[-rwxr-xr-x]engine/events/hidden_item.asm (renamed from engine/events/misc_scripts_2.asm)23
-rwxr-xr-xengine/events/misc_scripts.asm8
-rwxr-xr-xengine/events/overworld.asm71
-rw-r--r--engine/events/repel.asm10
-rwxr-xr-xengine/events/std_collision.asm2
-rwxr-xr-xengine/events/whiteout.asm7
-rwxr-xr-xengine/items/pack.asm (renamed from engine/pack.asm)0
-rwxr-xr-xengine/items/tmhm2.asm (renamed from engine/learn_tm.asm)0
-rw-r--r--engine/menus/naming_screen.asm (renamed from engine/namingscreen.asm)0
-rw-r--r--engine/pokemon/bills_pc_top.asm (renamed from engine/billspctop.asm)0
12 files changed, 71 insertions, 70 deletions
diff --git a/engine/events/bug_contest/contest.asm b/engine/events/bug_contest/contest.asm
index 88c300e9..6a3f7799 100755
--- a/engine/events/bug_contest/contest.asm
+++ b/engine/events/bug_contest/contest.asm
@@ -2,16 +2,16 @@ GiveParkBalls:
xor a
ld [wContestMon], a
ld a, 20
- ld [wParkBalls], a
+ ld [wParkBallsRemaining], a
farcall StartBugContestTimer
ret
BugCatchingContestBattleScript::
- writecode VAR_BATTLETYPE, BATTLETYPE_CONTEST
+ loadvar VAR_BATTLETYPE, BATTLETYPE_CONTEST
randomwildmon
startbattle
reloadmapafterbattle
- copybytetovar wParkBalls
+ readmem wParkBallsRemaining
iffalse BugCatchingContestOutOfBallsScript
end
@@ -20,22 +20,22 @@ BugCatchingContestOverScript::
opentext
writetext BugCatchingContestTimeUpText
waitbutton
- jump $79CD
-
+ sjump BugCatchingContestReturnToGateScript
+
BugCatchingContestOutOfBallsScript:
playsound SFX_ELEVATOR_END
opentext
writetext BugCatchingContestIsOverText
waitbutton
-
+
BugCatchingContestReturnToGateScript:
closetext
jumpstd bugcontestresultswarp
-
+
BugCatchingContestTimeUpText:
text_far _BugCatchingContestTimeUpText
- db "@"
+ text_end
BugCatchingContestIsOverText:
text_far _BugCatchingContestIsOverText
- db "@" \ No newline at end of file
+ text_end
diff --git a/engine/events/forced_movement.asm b/engine/events/forced_movement.asm
index 69f27bfe..fcd2793f 100755
--- a/engine/events/forced_movement.asm
+++ b/engine/events/forced_movement.asm
@@ -1,5 +1,5 @@
Script_ForcedMovement::
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal DOWN, .down
ifequal UP, .up
ifequal LEFT, .left
diff --git a/engine/events/misc_scripts_2.asm b/engine/events/hidden_item.asm
index 294dc6a0..b61a6205 100755..100644
--- a/engine/events/misc_scripts_2.asm
+++ b/engine/events/hidden_item.asm
@@ -1,28 +1,17 @@
-RepelWoreOffScript::
- opentext
- writetext .RepelWoreOffText
- waitbutton
- closetext
- end
-
-.RepelWoreOffText:
- text_far _RepelWoreOffText
- db "@"
-
HiddenItemScript::
opentext
- copybytetovar wHiddenItemID
- itemtotext STRING_BUFFER_3, USE_SCRIPT_VAR
+ readmem wHiddenItemID
+ getitemname STRING_BUFFER_3, USE_SCRIPT_VAR
writetext .PlayerFoundItemText
giveitem ITEM_FROM_MEM
iffalse .bag_full
callasm SetMemEvent
specialsound
itemnotify
- jump .finish
+ sjump .finish
.bag_full
- buttonsound
+ promptbutton
writetext .ButNoSpaceText
waitbutton
@@ -32,11 +21,11 @@ HiddenItemScript::
.PlayerFoundItemText:
text_far _PlayerFoundItemText
- db "@"
+ text_end
.ButNoSpaceText:
text_far _ButNoSpaceText
- db "@"
+ text_end
SetMemEvent:
ld hl, wHiddenItemEvent
diff --git a/engine/events/misc_scripts.asm b/engine/events/misc_scripts.asm
index b08d313e..e9006332 100755
--- a/engine/events/misc_scripts.asm
+++ b/engine/events/misc_scripts.asm
@@ -29,17 +29,17 @@ FindItemInBallScript::
.FoundItemText:
text_far _FoundItemText
- db "@"
+ text_end
.CantCarryItemText:
text_far _CantCarryItemText
- db "@"
+ text_end
.TryReceiveItem:
xor a
ld [wScriptVar], a
ld a, [wItemBallItemID]
- ld [wDeciramBuffer], a
+ ld [wNamedObjectIndexBuffer], a
call GetItemName
ld hl, wStringBuffer3
call CopyName2
@@ -52,4 +52,4 @@ FindItemInBallScript::
ret nc
ld a, $1
ld [wScriptVar], a
- ret \ No newline at end of file
+ ret
diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm
index 7cc64dff..2ec6d857 100755
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -409,16 +409,18 @@ AlreadySurfing:
SurfFromMenuScript:
special UpdateTimePals
+
UsedSurfScript:
- writetext UsedSurfText
+ writetext UsedSurfText ; "used SURF!"
waitbutton
closetext
- copybytetovar wBuffer2
- writevarcode VAR_MOVEMENT
+ readmem wBuffer2
+ writevar VAR_MOVEMENT
special ReplacePlayerSprite
special PlayMapMusic
+; step into the water (slow_step DIR, step_end)
special SurfStartStep
- applymovement 0, wMovementBuffer
+ applymovement PLAYER, wMovementBuffer
end
UsedSurfText:
@@ -591,7 +593,7 @@ FlyScript:
farscall Script_AbortBugContest
special WarpToSpawnPoint
callasm DelayLoadingNewSprites ; 1560c
- writecode VAR_MOVEMENT, PLAYER_NORMAL
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_TELEPORT
callasm FlyToAnimation
special WaitSFX
@@ -806,7 +808,7 @@ UsedEscapeRopeScript: ; cc2e reloadmappart
reloadmappart
special UpdateTimePals
writetext Text_UsedEscapeRope ; cc24
- jump ContinueDigEscapeRopeScript
+ sjump ContinueDigEscapeRopeScript
UsedDigScript:
reloadmappart
@@ -819,7 +821,7 @@ ContinueDigEscapeRopeScript:
applymovement PLAYER, DigOutMovementData
farscall Script_AbortBugContest
special WarpToSpawnPoint
- writecode VAR_MOVEMENT, PLAYER_NORMAL
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_DOOR
playsound SFX_WARP_FROM
applymovement PLAYER, DigReturnMovementData
@@ -906,7 +908,7 @@ TeleportScript: ; ccbe
applymovement PLAYER, TeleportFromMovementData
farscall Script_AbortBugContest
special WarpToSpawnPoint
- writecode VAR_MOVEMENT, PLAYER_NORMAL
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_TELEPORT
playsound SFX_WARP_FROM
applymovement PLAYER, TeleportToMovementData
@@ -969,7 +971,7 @@ Script_StrengthFromMenu: ; cd2c
Script_UsedStrength:
callasm GetStrengthUserSpeciesAndSetFlag
writetext Text_UsedStrength
- copybytetovar wBuffer6
+ readmem wBuffer6
cry 0
pause 3
writetext Text_AllowedToMoveBoulders
@@ -988,7 +990,7 @@ AskStrengthScript: ; cd4e
callasm TryStrengthOW
iffalse .ask
ifequal 1, .not_able
- jump .already_active
+ sjump .already_active
.not_able
jumptext Text_MonMayBeAbleToMove
@@ -1315,10 +1317,11 @@ RockSmashScript:
special WaitSFX
playsound SFX_STRENGTH
earthquake 84
- applymovement2 RockSmashMovementData
+ applymovementlasttalked RockSmashMovementData
disappear -2
+
callasm RockMonEncounter
- copybytetovar wd117
+ readmem wTempWildMonSpecies
iffalse .skip_battle
randomwildmon
startbattle
@@ -1421,7 +1424,7 @@ Fish_CheckMap:
ld a, d
and a
jr z, .asm_cff1
- ld [wd117], a
+ ld [wTempWildMonSpecies], a
ld a, e
ld [wCurPartyLevel], a
ld a, $4
@@ -1464,7 +1467,7 @@ Fish_NoFish:
Script_NotEvenANibble: ; d021
scall Script_FishCastRod
writetext Text_NotEvenANibble
- jump Script_NotEvenANibble_Continue
+ sjump Script_NotEvenANibble_Continue
Script_NotEvenANibble2:
scall Script_FishCastRod
@@ -1479,7 +1482,7 @@ Script_GotABite:
callasm Fish_CheckFacingUp
iffalse .not_facing_up
applymovement 0, Movement_Fishing_BiteFacingUp
- jump .continue
+ sjump .continue
.not_facing_up
applymovement 0, Movement_Fishing_BiteNotFacingUp
@@ -1530,7 +1533,7 @@ Fish_CheckFacingUp: ; d06d
Script_FishCastRod: ; d07d
reloadmappart
- loadvar hBGMapMode, 0
+ loadmem hBGMapMode, $0
special UpdateTimePals
loademote EMOTE_ROD
callasm LoadFishingGFX
@@ -1657,15 +1660,15 @@ CheckBikePermission: ; d12e (3:512e)
Script_GetOnBike: ; d14b
reloadmappart
special UpdateTimePals
- writecode VAR_MOVEMENT, PLAYER_BIKE
- writetext Text_GotOnTheBike
+ loadvar VAR_MOVEMENT, PLAYER_BIKE
+ writetext GotOnBikeText
waitbutton
closetext
special ReplacePlayerSprite
end
Script_GetOnBike_Register:
- writecode VAR_MOVEMENT, PLAYER_BIKE
+ loadvar VAR_MOVEMENT, PLAYER_BIKE
closetext
special ReplacePlayerSprite
end
@@ -1676,8 +1679,8 @@ Script_GetOnBike_Register:
Script_GetOffBike:
reloadmappart
special UpdateTimePals
- writecode VAR_MOVEMENT, PLAYER_NORMAL
- writetext Text_GotOffTheBike
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
+ writetext GotOffBikeText
waitbutton
FinishGettingOffBike:
closetext
@@ -1686,26 +1689,26 @@ FinishGettingOffBike:
end
Script_GetOffBike_Register:
- writecode VAR_MOVEMENT, PLAYER_NORMAL
- jump FinishGettingOffBike
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
+ sjump FinishGettingOffBike
-Script_CantGetOffBike: ; d17e
- writetext Text_CantGetOffBike
+Script_CantGetOffBike:
+ writetext .CantGetOffBikeText
waitbutton
closetext
end
-Text_CantGetOffBike:
- text_far Text_CantGetOffBike_
- db "@"
+.CantGetOffBikeText:
+ text_far _CantGetOffBikeText
+ text_end
-Text_GotOnTheBike:
- text_far Text_GotOnTheBike_
- db "@"
+GotOnBikeText:
+ text_far _GotOnBikeText
+ text_end
-Text_GotOffTheBike:
- text_far Text_GotOffTheBike_
- db "@"
+GotOffBikeText:
+ text_far _GotOffBikeText
+ text_end
TryCutOW: ; d193
diff --git a/engine/events/repel.asm b/engine/events/repel.asm
new file mode 100644
index 00000000..e324239c
--- /dev/null
+++ b/engine/events/repel.asm
@@ -0,0 +1,10 @@
+RepelWoreOffScript::
+ opentext
+ writetext .RepelWoreOffText
+ waitbutton
+ closetext
+ end
+
+.RepelWoreOffText:
+ text_far _RepelWoreOffText
+ text_end
diff --git a/engine/events/std_collision.asm b/engine/events/std_collision.asm
index 0e06b03c..8c54c041 100755
--- a/engine/events/std_collision.asm
+++ b/engine/events/std_collision.asm
@@ -26,4 +26,4 @@ CheckFacingTileForStdScript::
INCLUDE "data/events/collision_stdscripts.asm"
Script_JumpStdFromRAM:
- jump wJumpStdScriptBuffer
+ sjump wJumpStdScriptBuffer
diff --git a/engine/events/whiteout.asm b/engine/events/whiteout.asm
index 01d7b388..bcab820b 100755
--- a/engine/events/whiteout.asm
+++ b/engine/events/whiteout.asm
@@ -1,6 +1,6 @@
Script_BattleWhiteout::
callasm BattleBGMap
- jump Script_Whiteout
+ sjump Script_Whiteout
Script_OverworldWhiteout::
refreshscreen
@@ -25,9 +25,8 @@ Script_Whiteout:
jumpstd bugcontestresultswarp
.WhitedOutText:
- ; is out of useable #MON! whited out!
- text_far UnknownText_0x1c0a4e
- db "@"
+ text_far _WhitedOutText
+ text_end
OverworldBGMap:
call ClearPalettes
diff --git a/engine/pack.asm b/engine/items/pack.asm
index a8c1fedc..a8c1fedc 100755
--- a/engine/pack.asm
+++ b/engine/items/pack.asm
diff --git a/engine/learn_tm.asm b/engine/items/tmhm2.asm
index a7a135d9..a7a135d9 100755
--- a/engine/learn_tm.asm
+++ b/engine/items/tmhm2.asm
diff --git a/engine/namingscreen.asm b/engine/menus/naming_screen.asm
index ca0eb213..ca0eb213 100644
--- a/engine/namingscreen.asm
+++ b/engine/menus/naming_screen.asm
diff --git a/engine/billspctop.asm b/engine/pokemon/bills_pc_top.asm
index 749718db..749718db 100644
--- a/engine/billspctop.asm
+++ b/engine/pokemon/bills_pc_top.asm