Update minecart switch and dynamic track logic
This commit is contained in:
@@ -4,17 +4,17 @@
|
|||||||
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
|
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
|
||||||
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
|
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
|
||||||
!Health = 01 ; Number of Health the sprite have
|
!Health = 01 ; Number of Health the sprite have
|
||||||
!Damage = 08 ; (08 is a whole heart), 04 is half heart
|
!Damage = 00 ; (08 is a whole heart), 04 is half heart
|
||||||
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
||||||
!ImperviousAll = 00 ; 00 = Can be attack, 01 = attack will clink on it
|
!ImperviousAll = 00 ; 00 = Can be attack, 01 = attack will clink on it
|
||||||
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
||||||
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||||
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
||||||
!Hitbox = 00 ; 00 to 31, can be viewed in sprite draw tool
|
!Hitbox = 01 ; 00 to 31, can be viewed in sprite draw tool
|
||||||
!Persist = 01 ; 01 = your sprite continue to live offscreen
|
!Persist = 01 ; 01 = your sprite continue to live offscreen
|
||||||
!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room)
|
!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room)
|
||||||
!CollisionLayer = 00 ; 01 = will check both layer for collision
|
!CollisionLayer = 00 ; 01 = will check both layer for collision
|
||||||
!CanFall = 00 ; 01 sprite can fall in hole, 01 = can't fall
|
!CanFall = 01 ; 01 sprite can fall in hole, 01 = can't fall
|
||||||
!DeflectArrow = 00 ; 01 = deflect arrows
|
!DeflectArrow = 00 ; 01 = deflect arrows
|
||||||
!WaterSprite = 00 ; 01 = can only walk shallow water
|
!WaterSprite = 00 ; 01 = can only walk shallow water
|
||||||
!Blockable = 00 ; 01 = can be blocked by link's shield?
|
!Blockable = 00 ; 01 = can be blocked by link's shield?
|
||||||
@@ -50,6 +50,7 @@ Sprite_LeverSwitch_Prep:
|
|||||||
{
|
{
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
|
||||||
|
LDA.b #$80 : STA $0CAA, X
|
||||||
LDA SprSubtype, X : STA SprAction, X
|
LDA SprSubtype, X : STA SprAction, X
|
||||||
|
|
||||||
PLB
|
PLB
|
||||||
@@ -71,11 +72,15 @@ Sprite_LeverSwitch_Main:
|
|||||||
{
|
{
|
||||||
%PlayAnimation(0,0,4)
|
%PlayAnimation(0,0,4)
|
||||||
|
|
||||||
|
LDA SprTimerA, X : BNE .NoDamage
|
||||||
|
|
||||||
JSL Sprite_CheckDamageFromPlayerLong
|
JSL Sprite_CheckDamageFromPlayerLong
|
||||||
BCC .NoDamage
|
BCC .NoDamage
|
||||||
|
|
||||||
LDA #$25 : STA $012F
|
LDA #$25 : STA $012F
|
||||||
LDA #$01 : STA $37
|
|
||||||
|
STZ.w $37
|
||||||
|
LDA #$10 : STA SprTimerA, X
|
||||||
%GotoAction(1)
|
%GotoAction(1)
|
||||||
|
|
||||||
.NoDamage
|
.NoDamage
|
||||||
@@ -87,11 +92,14 @@ Sprite_LeverSwitch_Main:
|
|||||||
{
|
{
|
||||||
%PlayAnimation(1,1,4)
|
%PlayAnimation(1,1,4)
|
||||||
|
|
||||||
|
LDA SprTimerA, X : BNE .NoDamage
|
||||||
|
|
||||||
JSL Sprite_CheckDamageFromPlayerLong
|
JSL Sprite_CheckDamageFromPlayerLong
|
||||||
BCC .NoDamage
|
BCC .NoDamage
|
||||||
|
|
||||||
LDA #$25 : STA $012F
|
LDA #$25 : STA $012F
|
||||||
STZ.w $37
|
LDA #$01 : STA $37
|
||||||
|
LDA #$10 : STA SprTimerA, X
|
||||||
%GotoAction(0)
|
%GotoAction(0)
|
||||||
|
|
||||||
.NoDamage
|
.NoDamage
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
||||||
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||||
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
||||||
!Hitbox = 00 ; 00 to 31, can be viewed in sprite draw tool
|
!Hitbox = 01 ; 00 to 31, can be viewed in sprite draw tool
|
||||||
!Persist = 01 ; 01 = your sprite continue to live offscreen
|
!Persist = 01 ; 01 = your sprite continue to live offscreen
|
||||||
!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room)
|
!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room)
|
||||||
!CollisionLayer = 00 ; 01 = will check both layer for collision
|
!CollisionLayer = 00 ; 01 = will check both layer for collision
|
||||||
@@ -48,11 +48,13 @@ Sprite_RotatingTrack_Long:
|
|||||||
; 1 = TopRight -> BottomRight
|
; 1 = TopRight -> BottomRight
|
||||||
; 2 = BottomRight -> BottomLeft
|
; 2 = BottomRight -> BottomLeft
|
||||||
; 3 = BottomLeft -> TopLeft
|
; 3 = BottomLeft -> TopLeft
|
||||||
|
; 4 = TopRight -> TopLeft
|
||||||
|
|
||||||
Sprite_RotatingTrack_Prep:
|
Sprite_RotatingTrack_Prep:
|
||||||
{
|
{
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
|
||||||
|
LDA.b #$80 : STA $0CAA, X
|
||||||
LDA SprSubtype,X : STA SprAction,X
|
LDA SprSubtype,X : STA SprAction,X
|
||||||
|
|
||||||
PLB
|
PLB
|
||||||
@@ -66,9 +68,10 @@ Sprite_RotatingTrack_Main:
|
|||||||
LDA.w SprAction, X
|
LDA.w SprAction, X
|
||||||
JSL UseImplicitRegIndexedLocalJumpTable
|
JSL UseImplicitRegIndexedLocalJumpTable
|
||||||
dw TopLeftToTopRight
|
dw TopLeftToTopRight
|
||||||
; dw TopRightToBottomRight
|
dw TopRightToBottomRight
|
||||||
; dw BottomRightToBottomLeft
|
dw BottomRightToBottomLeft
|
||||||
; dw BottomLeftToTopLeft
|
dw BottomLeftToTopLeft
|
||||||
|
dw TopRightToTopLeft
|
||||||
|
|
||||||
TopLeftToTopRight:
|
TopLeftToTopRight:
|
||||||
{
|
{
|
||||||
@@ -83,6 +86,65 @@ Sprite_RotatingTrack_Main:
|
|||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TopRightToBottomRight:
|
||||||
|
{
|
||||||
|
LDA SwitchRam : BNE part2_a
|
||||||
|
|
||||||
|
%PlayAnimation(1,1,4)
|
||||||
|
part2_a:
|
||||||
|
|
||||||
|
%PlayAnimation(2,2,4)
|
||||||
|
|
||||||
|
JSL CheckIfHitBoxesOverlap
|
||||||
|
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
BottomRightToBottomLeft:
|
||||||
|
{
|
||||||
|
LDA SwitchRam : BNE part2_b
|
||||||
|
|
||||||
|
%PlayAnimation(2,2,4)
|
||||||
|
part2_b:
|
||||||
|
|
||||||
|
%PlayAnimation(3,3,4)
|
||||||
|
|
||||||
|
JSL CheckIfHitBoxesOverlap
|
||||||
|
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
BottomLeftToTopLeft:
|
||||||
|
{
|
||||||
|
LDA SwitchRam : BNE part2_c
|
||||||
|
|
||||||
|
%PlayAnimation(3,3,4)
|
||||||
|
|
||||||
|
part2_c:
|
||||||
|
|
||||||
|
%PlayAnimation(0,0,4)
|
||||||
|
|
||||||
|
JSL CheckIfHitBoxesOverlap
|
||||||
|
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
TopRightToTopLeft:
|
||||||
|
{
|
||||||
|
LDA SwitchRam : BNE part2_d
|
||||||
|
|
||||||
|
%StartOnFrame(1)
|
||||||
|
%PlayAnimation(1,1,4)
|
||||||
|
|
||||||
|
part2_d:
|
||||||
|
%StartOnFrame(0)
|
||||||
|
%PlayAnimation(0,0,4)
|
||||||
|
|
||||||
|
JSL CheckIfHitBoxesOverlap
|
||||||
|
|
||||||
|
RTS
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Sprite_RotatingTrack_Draw:
|
Sprite_RotatingTrack_Draw:
|
||||||
|
|||||||
Reference in New Issue
Block a user