-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathballs.asm
More file actions
59 lines (49 loc) · 1.89 KB
/
balls.asm
File metadata and controls
59 lines (49 loc) · 1.89 KB
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
; Extra balls, apart from the current.
; For example, after getting the cyan brick, there are
; 3 balls = 2 EXTRA_BALLS.
EXTRA_BALLS: equ 0xe325
; Simply an index to iterate through the 3 balls
BALL_LOOP_INDEX: equ 0xe2ac
SPEEDUP_ALL_BALLS_COUNTER: equ 0xe529
; Ball table
BALL_TABLE_LEN: equ 20
BALL_TABLE1: equ 0xe24e + 0*BALL_TABLE_LEN
BALL_TABLE2: equ 0xe24e + 1*BALL_TABLE_LEN
BALL_TABLE3: equ 0xe24e + 2*BALL_TABLE_LEN
;
BALL_TABLE_IDX_ACTIVE: equ 0
;
; 0: ball is glued and moved to Vaus
; 1: ball is glued
; 2: ball moves normally
BALL_TABLE_IDX_GLUE: equ 1
; Vertical and horizontal speed
BALL_TABLE_IDX_Y_SPEED: equ 2
BALL_TABLE_IDX_X_SPEED: equ 3
; The ball moves then the counter BALL_TABLE_IDX_MOVE_COUNTER reaches its
; target BALL_TABLE_IDX_MOVE_TARGET.
BALL_TABLE_IDX_MOVE_COUNTER: equ 5
BALL_TABLE_IDX_SKEWNESS: equ 6
BALL_TABLE_IDX_SPEED_POS: equ 7
; The speed is added to the position BALL_TABLE_IDX_SPEED_MULTIPLIER+1 times
BALL_TABLE_IDX_SPEED_MULTIPLIER: equ 8
BALL_TABLE_IDX_MOVE_TARGET: equ 9
BALL_TABLE_IDX_SPEED_COUNTER: equ 13
BALL_TABLE_IDX_GLUE_COUNTER: equ 14
BALL_TABLE_IDX_VAUS_HIT_X: equ 16 ; X-position in Vaus on which it received the ball
; This is a discrete sub-step counter used by the refined collision
; helpers. It represents how many steps along an auxiliary slope are needed
; before crossing a candidate brick boundary..
TICKS_TO_HIT: equ 0xe541
; After each brick hit, this contains the new ball's X speed
BALL_X_SLOPE: equ 0xe542
; After each brick hit, this contains the new ball's Y speed
BALL_Y_SLOPE: equ 0xe543
; When this counter reaches 40, the skewness of the balls change
BALL_BOUNCES_COUNTER: equ 0xe51c
; Counter to change the ball skewness
ACTION_SKEWNESS_COUNTER: equ 0xe5ac
; Previous ball position in sprite/pixel coordinates, not brick-grid indices.
; It's the position before the velocity is added to the position.
PREV_Y_PX: equ 0xe586
PREV_X_PX: equ 0xe587