fix goriya left right movement velocity and animation starting frame
This commit is contained in:
@@ -96,6 +96,7 @@ Sprite_Goriya_Main:
|
||||
|
||||
Goriya_WalkingLeft:
|
||||
{
|
||||
%StartOnFrame(4)
|
||||
%PlayAnimation(4, 5, 10)
|
||||
JSR Sprite_Goriya_Move
|
||||
RTS
|
||||
@@ -103,6 +104,7 @@ Sprite_Goriya_Main:
|
||||
|
||||
Goriya_WalkingRight:
|
||||
{
|
||||
%StartOnFrame(6)
|
||||
%PlayAnimation(6, 7, 10)
|
||||
JSR Sprite_Goriya_Move
|
||||
RTS
|
||||
@@ -221,7 +223,7 @@ Sprite_Goriya_Move:
|
||||
Goriya_MoveLeft:
|
||||
{
|
||||
STZ.w SprYSpeed, X
|
||||
LDA.b #GoriyaMovementSpeed : STA.w SprXSpeed, X
|
||||
LDA.b #-GoriyaMovementSpeed : STA.w SprXSpeed, X
|
||||
%GotoAction(2)
|
||||
LDA.b #$02 : STA.w SprMiscE, X
|
||||
RTS
|
||||
@@ -230,7 +232,7 @@ Sprite_Goriya_Move:
|
||||
Goriya_MoveRight:
|
||||
{
|
||||
STZ.w SprYSpeed, X
|
||||
LDA.b #-GoriyaMovementSpeed : STA.w SprXSpeed, X
|
||||
LDA.b #GoriyaMovementSpeed : STA.w SprXSpeed, X
|
||||
%GotoAction(3)
|
||||
LDA.b #$03 : STA.w SprMiscE, X
|
||||
RTS
|
||||
@@ -323,6 +325,7 @@ Sprite_Goriya_Draw:
|
||||
dw 0, -9
|
||||
dw -1, -10
|
||||
.chr
|
||||
; Body Head
|
||||
db $E4, $C0
|
||||
db $E4, $C0
|
||||
db $C6, $C2
|
||||
@@ -344,73 +347,73 @@ Sprite_Goriya_Draw:
|
||||
|
||||
Sprite_Boomerang_Draw:
|
||||
{
|
||||
JSL Sprite_PrepOamCoord
|
||||
JSL Sprite_OAM_AllocateDeferToPlayer
|
||||
JSL Sprite_PrepOamCoord
|
||||
JSL Sprite_OAM_AllocateDeferToPlayer
|
||||
|
||||
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
|
||||
LDA .start_index, Y : STA $06
|
||||
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
|
||||
LDA .start_index, Y : STA $06
|
||||
|
||||
|
||||
PHX
|
||||
LDX .nbr_of_tiles, Y ;amount of tiles -1
|
||||
LDY.b #$00
|
||||
.nextTile
|
||||
PHX
|
||||
LDX .nbr_of_tiles, Y ;amount of tiles -1
|
||||
LDY.b #$00
|
||||
.nextTile
|
||||
|
||||
PHX ; Save current Tile Index?
|
||||
|
||||
TXA : CLC : ADC $06 ; Add Animation Index Offset
|
||||
PHX ; Save current Tile Index?
|
||||
|
||||
TXA : CLC : ADC $06 ; Add Animation Index Offset
|
||||
|
||||
PHA ; Keep the value with animation index offset?
|
||||
PHA ; Keep the value with animation index offset?
|
||||
|
||||
ASL A : TAX
|
||||
ASL A : TAX
|
||||
|
||||
REP #$20
|
||||
REP #$20
|
||||
|
||||
LDA $00 : STA ($90), Y
|
||||
AND.w #$0100 : STA $0E
|
||||
INY
|
||||
LDA $02 : STA ($90), Y
|
||||
CLC : ADC #$0010 : CMP.w #$0100
|
||||
SEP #$20
|
||||
BCC .on_screen_y
|
||||
LDA $00 : STA ($90), Y
|
||||
AND.w #$0100 : STA $0E
|
||||
INY
|
||||
LDA $02 : STA ($90), Y
|
||||
CLC : ADC #$0010 : CMP.w #$0100
|
||||
SEP #$20
|
||||
BCC .on_screen_y
|
||||
|
||||
LDA.b #$F0 : STA ($90), Y ;Put the sprite out of the way
|
||||
STA $0E
|
||||
.on_screen_y
|
||||
LDA.b #$F0 : STA ($90), Y ;Put the sprite out of the way
|
||||
STA $0E
|
||||
.on_screen_y
|
||||
|
||||
PLX ; Pullback Animation Index Offset (without the *2 not 16bit anymore)
|
||||
INY
|
||||
LDA .chr, X : STA ($90), Y
|
||||
INY
|
||||
LDA .properties, X : STA ($90), Y
|
||||
PLX ; Pullback Animation Index Offset (without the *2 not 16bit anymore)
|
||||
INY
|
||||
LDA .chr, X : STA ($90), Y
|
||||
INY
|
||||
LDA .properties, X : STA ($90), Y
|
||||
|
||||
PHY
|
||||
|
||||
TYA : LSR #2 : TAY
|
||||
|
||||
LDA #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
|
||||
|
||||
PLY : INY
|
||||
|
||||
PLX : DEX : BPL .nextTile
|
||||
PHY
|
||||
|
||||
TYA : LSR #2 : TAY
|
||||
|
||||
LDA #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
|
||||
|
||||
PLY : INY
|
||||
|
||||
PLX : DEX : BPL .nextTile
|
||||
|
||||
PLX
|
||||
PLX
|
||||
|
||||
RTS
|
||||
RTS
|
||||
|
||||
|
||||
.start_index
|
||||
db $00, $01, $02, $03
|
||||
.nbr_of_tiles
|
||||
db 0, 0, 0, 0
|
||||
.chr
|
||||
db $26
|
||||
db $26
|
||||
db $26
|
||||
db $26
|
||||
.properties
|
||||
db $32
|
||||
db $B2
|
||||
db $F2
|
||||
db $72
|
||||
.start_index
|
||||
db $00, $01, $02, $03
|
||||
.nbr_of_tiles
|
||||
db 0, 0, 0, 0
|
||||
.chr
|
||||
db $26
|
||||
db $26
|
||||
db $26
|
||||
db $26
|
||||
.properties
|
||||
db $32
|
||||
db $B2
|
||||
db $F2
|
||||
db $72
|
||||
}
|
||||
Reference in New Issue
Block a user