diff options
-rwxr-xr-x | constants/script_constants.asm | 5 | ||||
-rwxr-xr-x | engine/events/field_moves.asm | 10 |
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
|