aboutsummaryrefslogtreecommitdiffstats
path: root/engine/pikachu
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2024-09-25 00:45:00 -0500
committerdannye <33dannye@gmail.com>2024-09-25 00:45:00 -0500
commita02a98ee7ada1a658e28698484058be2796dc0df (patch)
tree945986054565bd8b5212fc755415096050d1d3a8 /engine/pikachu
parentUse long option flags for rgbgfx, same as tools/gfx (diff)
parentUse `const_skip` (diff)
downloadpokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.gz
pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.xz
pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/pikachu')
-rw-r--r--engine/pikachu/pikachu_emotions.asm14
-rw-r--r--engine/pikachu/pikachu_follow.asm32
-rw-r--r--engine/pikachu/pikachu_movement.asm6
3 files changed, 26 insertions, 26 deletions
diff --git a/engine/pikachu/pikachu_emotions.asm b/engine/pikachu/pikachu_emotions.asm
index 71020138..de6230a6 100644
--- a/engine/pikachu/pikachu_emotions.asm
+++ b/engine/pikachu/pikachu_emotions.asm
@@ -2,18 +2,18 @@ IsPlayerTalkingToPikachu::
ld a, [wd436]
and a
ret z
- ldh a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndex]
cp $f
ret nz
call InitializePikachuTextID
xor a
- ldh [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndex], a
ld [wd436], a
ret
InitializePikachuTextID::
ld a, TEXT_PIKACHU_ANIM ; display
- ldh [hSpriteIndexOrTextID], a
+ ldh [hTextID], a
xor a
ld [wPlayerMovingDirection], a
ld a, $1
@@ -166,8 +166,8 @@ StarterPikachuEmotionCommand_subcmd:
StarterPikachuEmotionCommand_nop2:
IF DEF(_DEBUG)
push hl
- ld hl, wd732
- bit 1, [hl]
+ ld hl, wStatusFlags6
+ bit BIT_DEBUG_MODE, [hl]
pop hl
ret z
push de
@@ -213,8 +213,8 @@ REPT 5
ENDR
IF DEF(_DEBUG)
push hl
- ld hl, wd732
- bit 1, [hl]
+ ld hl, wStatusFlags6
+ bit BIT_DEBUG_MODE, [hl]
pop hl
ret z
push de
diff --git a/engine/pikachu/pikachu_follow.asm b/engine/pikachu/pikachu_follow.asm
index 9575c341..a33da505 100644
--- a/engine/pikachu/pikachu_follow.asm
+++ b/engine/pikachu/pikachu_follow.asm
@@ -364,7 +364,7 @@ SpawnPikachu_::
bit 7, [hl]
jp nz, Func_fc745
ld a, [wFontLoaded]
- bit 0, a
+ bit BIT_FONT_LOADED, a
jp nz, Func_fc76a
call CheckPikachuFollowingPlayer
jp nz, Func_fc76a
@@ -915,8 +915,8 @@ TryDoubleAddPikachuStepVectorToScreenPixelCoords:
ld a, [wWalkBikeSurfState]
cp $1 ; biking
jr nz, AddPikachuStepVectorToScreenPixelCoords
- ld a, [wd736]
- bit 6, a
+ ld a, [wMovementFlags]
+ bit BIT_LEDGE_OR_FISHING, a
jr nz, AddPikachuStepVectorToScreenPixelCoords
DoubleAddPikachuStepVectorToScreenPixelCoords:
ld hl, wSpritePikachuStateData1YStepVector - wSpritePikachuStateData1
@@ -987,8 +987,8 @@ UpdatePikachuWalkingSprite:
dec a
swap a
ld d, a
- ld a, [wd736]
- bit 7, a
+ ld a, [wMovementFlags]
+ bit BIT_SPINNING, a
jr nz, .copy_player
ld hl, wSpritePikachuStateData1FacingDirection - wSpritePikachuStateData1
add hl, bc
@@ -996,7 +996,7 @@ UpdatePikachuWalkingSprite:
or d
ld d, a
ld a, [wFontLoaded]
- bit 0, a
+ bit BIT_FONT_LOADED, a
jr z, .normal_get_sprite_index
call Func_fcae2
ret c
@@ -1257,8 +1257,8 @@ CheckAbsoluteValueLessThan2:
Func_fcc08::
call Func_fcc23
ret nc
- ld a, [wd736]
- bit 6, a
+ ld a, [wMovementFlags]
+ bit BIT_LEDGE_OR_FISHING, a
jr nz, .asm_fcc1b
call Func_fcc42
ret c
@@ -1294,13 +1294,13 @@ Func_fcc23:
Func_fcc42:
xor a
ld a, [wPlayerDirection]
- bit 3, a
+ bit PLAYER_DIR_BIT_UP, a
jr nz, .asm_fcc58
- bit 2, a
+ bit PLAYER_DIR_BIT_DOWN, a
jr nz, .asm_fcc5b
- bit 1, a
+ bit PLAYER_DIR_BIT_LEFT, a
jr nz, .asm_fcc5e
- bit 0, a
+ bit PLAYER_DIR_BIT_RIGHT, a
jr nz, .asm_fcc61
scf
ret
@@ -1332,13 +1332,13 @@ Func_fcc64:
set 6, [hl]
xor a
ld a, [wPlayerDirection]
- bit 3, a
+ bit PLAYER_DIR_BIT_UP, a
jr nz, .asm_fcc86
- bit 2, a
+ bit PLAYER_DIR_BIT_DOWN, a
jr nz, .asm_fcc89
- bit 1, a
+ bit PLAYER_DIR_BIT_LEFT, a
jr nz, .asm_fcc8c
- bit 0, a
+ bit PLAYER_DIR_BIT_RIGHT, a
jr nz, .asm_fcc8f
scf
ret
diff --git a/engine/pikachu/pikachu_movement.asm b/engine/pikachu/pikachu_movement.asm
index 87f17539..d789f152 100644
--- a/engine/pikachu/pikachu_movement.asm
+++ b/engine/pikachu/pikachu_movement.asm
@@ -154,10 +154,10 @@ AnimatePikachuShadow:
ld hl, wPikachuMovementFlags
bit 6, [hl]
res 6, [hl]
- ld hl, wd736
- res 6, [hl]
+ ld hl, wMovementFlags
+ res BIT_LEDGE_OR_FISHING, [hl]
ret z
- set 6, [hl]
+ set BIT_LEDGE_OR_FISHING, [hl]
call LoadPikachuShadowOAMData
ret