summaryrefslogtreecommitdiff
path: root/engine/scripting.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-12-10 01:47:10 -0500
committerGitHub <noreply@github.com>2017-12-10 01:47:10 -0500
commit94c7def4883fbdbcd3987a067443a2069b8bb610 (patch)
tree171c67509afba62571266bd6bebbfdb829d2a876 /engine/scripting.asm
parent89b9292db0898f8ad2b6ea8513a3190762eb58c8 (diff)
parentd554b997c590825f030bd1be71989653b16a2ae0 (diff)
Merge pull request #409 from roukaour/master
Document constants with comments, actual names, and more thorough usage
Diffstat (limited to 'engine/scripting.asm')
-rw-r--r--engine/scripting.asm24
1 files changed, 12 insertions, 12 deletions
diff --git a/engine/scripting.asm b/engine/scripting.asm
index 42976ad65..df22995b5 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -979,7 +979,7 @@ Script_cry:
ret
GetScriptPerson:
- and a
+ and a ; PLAYER?
ret z
cp LAST_TALKED
ret z
@@ -1355,19 +1355,19 @@ Script_earthquake:
; param (DecimalParam)
ld hl, EarthquakeMovement
- ld de, wd002
+ ld de, wEarthquakeMovementDataBuffer
ld bc, EarthquakeMovementEnd - EarthquakeMovement
call CopyBytes
call GetScriptByte
- ld [wd003], a
- and (1 << 6) - 1
- ld [wd005], a
+ ld [wEarthquakeMovementDataBuffer + 1], a
+ and %00111111
+ ld [wEarthquakeMovementDataBuffer + 3], a
ld b, BANK(.script)
ld de, .script
jp ScriptCall
.script
- applymovement PLAYER, wd002
+ applymovement PLAYER, wEarthquakeMovementDataBuffer
end
EarthquakeMovement:
@@ -2170,7 +2170,7 @@ Script_givepokeitem:
ld b, a
push bc
inc hl
- ld bc, MAIL_MAX_LENGTH
+ ld bc, MAIL_MSG_LENGTH
ld de, wd002
ld a, [ScriptBank]
call FarCopyBytes
@@ -2668,7 +2668,7 @@ Script_warp:
call GetScriptByte
ld [YCoord], a
ld a, -1
- ld [wd001], a
+ ld [DefaultSpawnpoint], a
ld a, MAPSETUP_WARP
ld [hMapEntryMethod], a
ld a, 1
@@ -2681,7 +2681,7 @@ Script_warp:
call GetScriptByte
call GetScriptByte
ld a, -1
- ld [wd001], a
+ ld [DefaultSpawnpoint], a
ld a, MAPSETUP_BADWARP
ld [hMapEntryMethod], a
ld a, 1
@@ -2955,9 +2955,9 @@ ExitScriptSubroutine:
ld e, [hl]
ld d, $0
ld hl, wScriptStack
- add hl,de
- add hl,de
- add hl,de
+ add hl, de
+ add hl, de
+ add hl, de
ld a, [hli]
ld b, a
and " "