summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rwxr-xr-xengine/battle/core.asm4
-rw-r--r--engine/battle/init_battle_variables.asm2
-rwxr-xr-xengine/hidden_object_functions7.asm2
-rwxr-xr-xengine/items/items.asm8
-rwxr-xr-xengine/menu/main_menu.asm4
-rw-r--r--engine/overworld/movement.asm26
6 files changed, 23 insertions, 23 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 93ccdef5..42d7f5e6 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6296,7 +6296,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
predef WriteMonMoves ; get moves based on current level
.loadMovePPs
ld hl, wEnemyMonMoves
- ld de, wEnemyMonSpecial + 1
+ ld de, wEnemyMonPP - 1
predef LoadMovePPs
ld hl, W_MONHBASESTATS
ld de, wEnemyMonBaseStats
@@ -6957,7 +6957,7 @@ InitBattle_Common: ; 3efeb (f:6feb)
ld [wLetterPrintingDelayFlags], a
pop af
ld [wMapPalOffset], a
- ld a, [wd0d4]
+ ld a, [wSavedTilesetType]
ld [hTilesetType], a
scf
ret
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm
index d5ee7816..3c926858 100644
--- a/engine/battle/init_battle_variables.asm
+++ b/engine/battle/init_battle_variables.asm
@@ -1,6 +1,6 @@
InitBattleVariables: ; 525af (14:65af)
ld a, [hTilesetType]
- ld [wd0d4], a
+ ld [wSavedTilesetType], a
xor a
ld [wActionResultOrTookBattleTurn], a
ld [wBattleResult], a
diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm
index f7deae66..397d2a02 100755
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -78,7 +78,7 @@ SafariZoneGameOver: ; 1e9b0 (7:69b0)
ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
xor a
- ld [wd528], a
+ ld [wPlayerMovingDirection], a
ld a, SAFARI_ZONE_ENTRANCE
ld [H_DOWNARROWBLINKCNT1], a
ld a, $3
diff --git a/engine/items/items.asm b/engine/items/items.asm
index f9f76278..000940d2 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -591,14 +591,14 @@ ItemUseSurfboard: ; d9b4 (3:59b4)
jp LoadWalkingPlayerSpriteGraphics
; uses a simulated button press to make the player move forward
.makePlayerMoveForward
- ld a,[wd52a] ; direction the player is going
- bit 3,a
+ ld a,[wPlayerDirection] ; direction the player is going
+ bit PLAYER_DIR_BIT_UP,a
ld b,D_UP
jr nz,.storeSimulatedButtonPress
- bit 2,a
+ bit PLAYER_DIR_BIT_DOWN,a
ld b,D_DOWN
jr nz,.storeSimulatedButtonPress
- bit 1,a
+ bit PLAYER_DIR_BIT_LEFT,a
ld b,D_LEFT
jr nz,.storeSimulatedButtonPress
ld b,D_RIGHT
diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm
index eeaa4594..3ed2f443 100755
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -107,8 +107,8 @@ MainMenu: ; 5af2 (1:5af2)
.pressedA
call GBPalWhiteOutWithDelay3
call ClearScreen
- ld a,4
- ld [wd52a],a
+ ld a,PLAYER_DIR_DOWN
+ ld [wPlayerDirection],a
ld c,10
call DelayFrames
ld a,[wNumHoFTeams]
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm
index f618261e..be10fd69 100644
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -25,24 +25,24 @@ UpdatePlayerSprite: ; 4e31 (1:4e31)
ld a, [wWalkCounter]
and a
jr nz, .moving
- ld a, [wd528]
+ ld a, [wPlayerMovingDirection]
; check if down
- bit 2, a
+ bit PLAYER_DIR_BIT_DOWN, a
jr z, .checkIfUp
xor a ; ld a, SPRITE_FACING_DOWN
jr .next
.checkIfUp
- bit 3, a
+ bit PLAYER_DIR_BIT_UP, a
jr z, .checkIfLeft
ld a, SPRITE_FACING_UP
jr .next
.checkIfLeft
- bit 1, a
+ bit PLAYER_DIR_BIT_LEFT, a
jr z, .checkIfRight
ld a, SPRITE_FACING_LEFT
jr .next
.checkIfRight
- bit 0, a
+ bit PLAYER_DIR_BIT_RIGHT, a
jr z, .notMoving
ld a, SPRITE_FACING_RIGHT
jr .next
@@ -405,23 +405,23 @@ InitializeSpriteFacingDirection: ; 507f (1:507f)
bit 5, a
jr nz, notYetMoving
res 7, [hl]
- ld a, [wd52a]
- bit 3, a
+ ld a, [wPlayerDirection]
+ bit PLAYER_DIR_BIT_UP, a
jr z, .notFacingDown
- ld c, $0 ; make sprite face down
+ ld c, SPRITE_FACING_DOWN
jr .facingDirectionDetermined
.notFacingDown
- bit 2, a
+ bit PLAYER_DIR_BIT_DOWN, a
jr z, .notFacingUp
- ld c, $4 ; make sprite face up
+ ld c, SPRITE_FACING_UP
jr .facingDirectionDetermined
.notFacingUp
- bit 1, a
+ bit PLAYER_DIR_BIT_LEFT, a
jr z, .notFacingRight
- ld c, $c ; make sprite face right
+ ld c, SPRITE_FACING_RIGHT
jr .facingDirectionDetermined
.notFacingRight
- ld c, $8 ; make sprite face left
+ ld c, SPRITE_FACING_LEFT
.facingDirectionDetermined
ld a, [H_CURRENTSPRITEOFFSET]
add $9