summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPokeglitch <pokeglitchx@gmail.com>2018-06-18 09:00:51 -0400
committerPokeglitch <pokeglitchx@gmail.com>2018-06-18 09:00:51 -0400
commit966b29e8116218a6ac409d1fa253a7f1fd6c4fc2 (patch)
treea93bfea16eda1e2209bac5e7db37451f309d653a
parentf7ec78851ca170a91e6f00ff48cf97f27ec14bea (diff)
Removed SCRIPT_FINISHED constant, it was misleading
-rwxr-xr-xconstants/script_constants.asm5
-rwxr-xr-xengine/events/field_moves.asm10
2 files changed, 5 insertions, 10 deletions
diff --git a/constants/script_constants.asm b/constants/script_constants.asm
index 702e400..d2bb335 100755
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -15,8 +15,3 @@ SCRIPT_FINISHED_F EQU 7
SCRIPT_FINISHED_MASK EQU 1 << SCRIPT_FINISHED_F
SCRIPT_SUCCESS EQU $f
SCRIPT_FAIL EQU 0
-
-; Some script don't combine the return value with the flag
-; Instead, they load this into the wFieldMoveScriptID, and keep
-; the return value in a
-SCRIPT_FINISHED EQU -1
diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm
index 2c72b07..49729d2 100755
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -216,7 +216,7 @@ TrySurf: ; 03:50f8
DoSurf: ; 03:5113
queue_ba SurfScript
- ld a, SCRIPT_FINISHED
+ ld a, -1
ld [wFieldMoveScriptID], a
scf
ld a, SCRIPT_SUCCESS
@@ -225,7 +225,7 @@ DoSurf: ; 03:5113
FailSurf: ; 03:5124
ld hl, Text_CantSurfHere
call MenuTextBoxBackup
- ld a, SCRIPT_FINISHED
+ ld a, -1
ld [wFieldMoveScriptID], a
scf
ld a, SCRIPT_FAIL
@@ -341,7 +341,7 @@ ShowFlyMap: ; 03:51ea
ret
.dont_fly
call UpdateTimePals
- ld a, SCRIPT_FINISHED
+ ld a, -1
ld [wFieldMoveScriptID], a
scf
ld a, SCRIPT_FAIL
@@ -352,7 +352,7 @@ DoFly: ; 03:521f
inc a
ld [wDefaultSpawnPoint], a
queue_ba FlyScript
- ld a, SCRIPT_FINISHED
+ ld a, -1
ld [wFieldMoveScriptID], a
scf
ld a, SCRIPT_SUCCESS
@@ -361,7 +361,7 @@ DoFly: ; 03:521f
FailFly: ; 03:5237
ld hl, Text_CantUseFlyHere
call MenuTextBoxBackup
- ld a, SCRIPT_FINISHED
+ ld a, -1
ld [wFieldMoveScriptID], a
scf
ld a, SCRIPT_FAIL