diff options
Diffstat (limited to 'engine/overworld')
| -rw-r--r-- | engine/overworld/auto_movement.asm | 4 | ||||
| -rw-r--r-- | engine/overworld/missable_objects.asm | 4 | ||||
| -rw-r--r-- | engine/overworld/movement.asm | 11 | ||||
| -rw-r--r-- | engine/overworld/pathfinding.asm | 4 | ||||
| -rw-r--r-- | engine/overworld/push_boulder.asm | 2 |
5 files changed, 13 insertions, 12 deletions
diff --git a/engine/overworld/auto_movement.asm b/engine/overworld/auto_movement.asm index bed2ffb9..13d30cca 100644 --- a/engine/overworld/auto_movement.asm +++ b/engine/overworld/auto_movement.asm @@ -1,6 +1,6 @@ PlayerStepOutFromDoor:: - ld hl, wStatusFlags5 ; should this be wMovementFlags? - res BIT_EXITING_DOOR, [hl] + ld hl, wStatusFlags5 + res BIT_UNKNOWN_5_1, [hl] call IsPlayerStandingOnDoorTile jr nc, .notStandingOnDoor ld a, PAD_SELECT | PAD_START | PAD_CTRL_PAD diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm index 1660a894..8ea79980 100644 --- a/engine/overworld/missable_objects.asm +++ b/engine/overworld/missable_objects.asm @@ -178,10 +178,10 @@ MissableObjectFlagAction: ld a, b and a jr z, .reset - cp 2 + cp FLAG_TEST jr z, .read -.set +; set ld a, [hl] ld b, a ld a, d diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 8d02f0fe..a353c4f1 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -140,7 +140,7 @@ UpdateNPCSprite: ld b, a ld a, [wFontLoaded] bit BIT_FONT_LOADED, a - jp nz, notYetMoving + jp nz, NotYetMoving ld a, b cp $2 jp z, UpdateSpriteMovementDelay ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] == 2 @@ -389,14 +389,15 @@ UpdateSpriteMovementDelay: jr .moving .tickMoveCounter dec [hl] ; x#SPRITESTATEDATA2_MOVEMENTDELAY - jr nz, notYetMoving + jr nz, NotYetMoving .moving dec h ldh a, [hCurrentSpriteOffset] inc a ld l, a ld [hl], $1 ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] = 1 (mark as ready to move) -notYetMoving: + ; fallthrough +NotYetMoving: ld h, HIGH(wSpriteStateData1) ldh a, [hCurrentSpriteOffset] add SPRITESTATEDATA1_ANIMFRAMECOUNTER @@ -411,7 +412,7 @@ MakeNPCFacePlayer: ; disabled. This is only done when rubbing the S.S. Anne captain's back. ld a, [wStatusFlags3] bit BIT_NO_NPC_FACE_PLAYER, a - jr nz, notYetMoving + jr nz, NotYetMoving res BIT_FACE_PLAYER, [hl] ld a, [wPlayerDirection] bit PLAYER_DIR_BIT_UP, a @@ -435,7 +436,7 @@ MakeNPCFacePlayer: add $9 ld l, a ld [hl], c ; [x#SPRITESTATEDATA1_FACINGDIRECTION]: set facing direction - jr notYetMoving + jr NotYetMoving InitializeSpriteStatus: ld [hl], $1 ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] = ready diff --git a/engine/overworld/pathfinding.asm b/engine/overworld/pathfinding.asm index 878ca07d..d6e0d009 100644 --- a/engine/overworld/pathfinding.asm +++ b/engine/overworld/pathfinding.asm @@ -94,7 +94,7 @@ CalcPositionOfPlayerRelativeToNPC: ld a, [hli] ; NPC sprite screen Y position in pixels call CalcDifference jr nc, .NPCSouthOfOrAlignedWithPlayer -.NPCNorthOfPlayer +; NPC north of player push hl ld hl, hNPCPlayerRelativePosFlags bit BIT_PLAYER_LOWER_Y, [hl] @@ -122,7 +122,7 @@ CalcPositionOfPlayerRelativeToNPC: ld a, [hl] ; NPC sprite screen X position in pixels call CalcDifference jr nc, .NPCEastOfOrAlignedWithPlayer -.NPCWestOfPlayer +; NPC west of player push hl ld hl, hNPCPlayerRelativePosFlags bit BIT_PLAYER_LOWER_X, [hl] diff --git a/engine/overworld/push_boulder.asm b/engine/overworld/push_boulder.asm index 2328b07a..5e7393d2 100644 --- a/engine/overworld/push_boulder.asm +++ b/engine/overworld/push_boulder.asm @@ -43,7 +43,7 @@ TryPushingBoulder:: jr z, .pushBoulderLeft cp SPRITE_FACING_RIGHT jr z, .pushBoulderRight -.pushBoulderDown +; push boulder down bit B_PAD_DOWN, b ret z ld de, PushBoulderDownMovementData |
