diff options
Diffstat (limited to 'engine/overworld')
| -rwxr-xr-x | engine/overworld/card_key.asm | 2 | ||||
| -rwxr-xr-x | engine/overworld/cinnabar_lab.asm | 10 | ||||
| -rw-r--r-- | engine/overworld/movement.asm | 14 | ||||
| -rw-r--r-- | engine/overworld/special_warps.asm | 2 | 
4 files changed, 16 insertions, 12 deletions
| diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm index 62d1d4fb..3560c8e8 100755 --- a/engine/overworld/card_key.asm +++ b/engine/overworld/card_key.asm @@ -50,7 +50,7 @@ PrintCardKeyText: ; 525d8 (14:65d8)  .replaceCardKeyDoorTileBlock  	ld [wNewTileBlockID], a  	predef ReplaceTileBlock -	ld hl, wd126 +	ld hl, wCurrentMapScriptFlags  	set 5, [hl]  	ld a, SFX_GO_INSIDE  	jp PlaySound diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm index f81324e0..f7c5e326 100755 --- a/engine/overworld/cinnabar_lab.asm +++ b/engine/overworld/cinnabar_lab.asm @@ -48,9 +48,9 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)  .choseDomeFossil  	ld b, KABUTO  .fossilSelected -	ld [W_FOSSILITEM], a +	ld [wFossilItem], a  	ld a, b -	ld [W_FOSSILMON], a +	ld [wFossilMon], a  	call LoadFossilItemAndMonName  	ld hl, LabFossil_610ae  	call PrintText @@ -60,7 +60,7 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)  	jr nz, .cancelledGivingFossil  	ld hl, LabFossil_610b3  	call PrintText -	ld a, [W_FOSSILITEM] +	ld a, [wFossilItem]  	ld [hItemToRemoveID], a  	callba RemoveItemByID  	ld hl, LabFossil_610b8 @@ -113,11 +113,11 @@ PrintFossilsInBag: ; 610c2 (18:50c2)  ; loads the names of the fossil item and the resulting mon  LoadFossilItemAndMonName: ; 610eb (18:50eb) -	ld a, [W_FOSSILMON] +	ld a, [wFossilMon]  	ld [wd11e], a  	call GetMonName  	call CopyStringToCF4B -	ld a, [W_FOSSILITEM] +	ld a, [wFossilItem]  	ld [wd11e], a  	call GetItemName  	ret diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 5f929ce3..d69e2fbc 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -118,8 +118,8 @@ UpdateNPCSprite: ; 4e3e (1:4e3e)  	ld l, a  	inc l  	ld a, [hl]        ; c1x1 -	bit 7, a -	jp nz, InitializeSpriteFacingDirection  ; c1x1 >= $80 +	bit 7, a ; is the face player flag set? +	jp nz, MakeNPCFacePlayer  	ld b, a  	ld a, [wFontLoaded]  	bit 0, a @@ -156,7 +156,7 @@ UpdateNPCSprite: ; 4e3e (1:4e3e)  	call LoadDEPlusA ; a = [wNPCMovementDirections + movement byte 1]  	cp $e0  	jp z, ChangeFacingDirection -	cp $ff +	cp STAY  	jr nz, .next  ; reached end of wNPCMovementDirections list  	ld [hl], a ; store $ff in movement byte 1, disabling scripted movement @@ -167,7 +167,7 @@ UpdateNPCSprite: ; 4e3e (1:4e3e)  	ld [wWastedByteCD3A], a  	ret  .next -	cp $fe +	cp WALK  	jr nz, .asm_4ecb  ; current NPC movement data is $fe. this seems buggy  	ld [hl], $1     ; set movement byte 1 to $1 @@ -359,7 +359,11 @@ notYetMoving: ; 4fc5 (1:4fc5)  	ld [hl], $0             ; c1x8 = 0 (walk animation frame)  	jp UpdateSpriteImage -InitializeSpriteFacingDirection: ; 4fd1 (1:4fd1) +MakeNPCFacePlayer: ; 507f (1:507f) +; Make an NPC face the player if the player has spoken to him or her. + +; Check if the behaviour of the NPC facing the player when spoken to is +; disabled. This is only done when rubbing the S.S. Anne captain's back.  	ld a, [wd72d]  	bit 5, a  	jr nz, notYetMoving diff --git a/engine/overworld/special_warps.asm b/engine/overworld/special_warps.asm index 29000d98..8c1b4159 100644 --- a/engine/overworld/special_warps.asm +++ b/engine/overworld/special_warps.asm @@ -69,7 +69,7 @@ LoadSpecialWarpData: ; 6073 (1:6073)  	xor a  	jr .done  .notFirstMap -	ld a, [wLastMap] +	ld a, [wLastMap] ; this value is overwritten before it's ever read  	ld hl, wd732  	bit 4, [hl] ; used dungeon warp (jumped down hole/waterfall)?  	jr nz, .usedDunegonWarp | 
