update village dog sprite

This commit is contained in:
scawful
2024-05-27 19:52:46 -04:00
parent 5715271b60
commit 3d62fc3449

View File

@@ -138,14 +138,13 @@ Sprite_VillageDog_Main:
%GotoAction(0) %GotoAction(0)
.no_collision .no_collision
LDA.b #$0A ; Speed LDA.b #$0A
JSL Sprite_ApplySpeedTowardsPlayer JSL Sprite_ApplySpeedTowardsPlayer
STZ $06 : STZ $07 STZ $06 : STZ $07
JSL Sprite_MoveLong JSL Sprite_MoveLong
JSL Sprite_CheckIfLifted JSL Sprite_CheckIfLifted
LDA.w SprTimerD, X : BNE + LDA.w SprTimerD, X : BNE +
%GotoAction(0) %GotoAction(0)
+ +
RTS RTS
@@ -166,7 +165,7 @@ Sprite_VillageDog_Main:
%GotoAction(0) %GotoAction(0)
.no_collision .no_collision
LDA.b #$0A ; Speed LDA.b #$0A
JSL Sprite_ApplySpeedTowardsPlayer JSL Sprite_ApplySpeedTowardsPlayer
STZ $06 : STZ $07 STZ $06 : STZ $07
JSL Sprite_MoveLong JSL Sprite_MoveLong
@@ -209,31 +208,26 @@ Sprite_VillageDog_Main:
CheckIfPlayerIsNearby: CheckIfPlayerIsNearby:
{ {
REP #$20 REP #$20
LDA $22 : CLC : ADC #$0012 : CMP $0FD8 : BCC .left LDA $22 : CLC : ADC #$0012 : CMP $0FD8 : BCC .out
LDA $22 : SEC : SBC #$0012 : CMP $0FD8 : BCS .right LDA $22 : SEC : SBC #$0012 : CMP $0FD8 : BCS .out
LDA $20 : CLC : ADC #$001A : CMP $0FDA : BCC .out
LDA $20 : SEC : SBC #$001A : CMP $0FDA : BCS .out
SEP #$21
RTS ; Return with carry set
LDA $20 : CLC : ADC #$001A : CMP $0FDA : BCC .up .out
LDA $20 : SEC : SBC #$001A : CMP $0FDA : BCS .down
SEP #$21 : RTS ; Return with carry set
.left
.right
.up
.down
SEP #$20 SEP #$20
CLC : RTS ; Return with carry cleared CLC
RTS ; Return with carry cleared
} }
ShowMessageIfMinish: ShowMessageIfMinish:
{ {
LDA $02B2 : CMP.b #$05 : BNE .not_minish LDA $02B2 : CMP.b #$05 : BNE .not_minish
%ShowSolicitedMessage($18) : JMP .continue %ShowSolicitedMessage($18) : JMP .continue
.not_minish .not_minish
%ShowSolicitedMessage($1B) %ShowSolicitedMessage($1B)
.continue .continue
RTS RTS
} }
@@ -242,12 +236,12 @@ Sprite_VillageDog_Draw:
JSL Sprite_PrepOamCoord JSL Sprite_PrepOamCoord
JSL Sprite_OAM_AllocateDeferToPlayer JSL Sprite_OAM_AllocateDeferToPlayer
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame LDA $0DC0, X : CLC : ADC $0D90, X : TAY ; Animation Frame
LDA .start_index, Y : STA $06 LDA .start_index, Y : STA $06
PHX PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1 LDX .nbr_of_tiles, Y ; amount of tiles -1
LDY.b #$00 LDY.b #$00
.nextTile .nextTile