-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathancilla_ice_shot.asm
60 lines (37 loc) · 1.65 KB
/
ancilla_ice_shot.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
; ==============================================================================
; *$424DD-$42535 JUMP LOCATION
shared Ancilla_IceShot:
{
LDA $11 : BEQ .normal_submode
BRA .generate_sparkle
.normal_submode
DEC $03B1, X : BPL .delay
LDA $0C5E, X : INC A : STA $0C5E, X : AND.b #$FE : BEQ .delay_2
; Once this flag goes high, it stays high, and it indicates that
; movement and collision checking need to begin being handled.
; This seems to produce that semi-halted look that the ice beam shot
; has when firing the rod (for a short time).
LDA.b #$01 : STA $0C54, X
LDA $0C5E, X : AND.b #$07 : ORA.b #$04 : STA $0C5E, X
.delay_2
LDA.b #$03 : STA $03B1, X
.delay
LDA $0C54, X : BEQ .ignore_movement_and_collision
JSR Ancilla_BoundsCheck
JSR Ancilla_MoveVert
JSR Ancilla_MoveHoriz
JSR Ancilla_CheckSpriteCollision : BCS .collided
JSR Ancilla_CheckTileCollision : BCC .no_collision
.collided
; Transmute this object into a different object, which is that of
; the ice shot dissipating (due to hitting something).
; That object is called Ancilla_IceShotSpread.
LDA.b #$11 : STA $0C4A, X : TAY
LDA $806F, Y : STA $0C90, X
STZ $0C5E, X
LDA.b #$04 : STA $03B1, X
.no_collision
.ignore_movement_and_collision
BRL IceShotSparkle_Spawn
}
; ==============================================================================