-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpoly_ds.asm
86 lines (72 loc) · 1.84 KB
/
poly_ds.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
;poly_ds.asm
;//////////////////////////////////
;----------------------------
randomSeed .ds 2
;---------------------
setBatWork .ds 2
;---------------------
tiaFunction .ds 1
tiaSrc .ds 2
tiaDst .ds 2
tiaCnt .ds 2
tiaRts .ds 1
;---------------------
tiiFunction .ds 1
tiiSrc .ds 2
tiiDst .ds 2
tiiCnt .ds 2
tiiRts .ds 1
;---------------------
transform2DWork0 .ds 256
vertexDataTemp .equ transform2DWork0
vertexDataTemp0 .equ transform2DWork0
transform2DWork1 .ds 256
vertexDataTemp1 .equ transform2DWork1
;---------------------
clip2D0 .ds (8+1)*4
clip2D1 .ds (8+1)*4
;---------------------
backCheckWork .ds 3*4
;---------------------
polyLineColorWork_H_P0 .ds 1
polyLineColorWork_H_P1 .ds 1
polyLineColorWork_H_P2 .ds 1
polyLineColorWork_H_P3 .ds 1
polyLineColorWork_L_P0 .ds 1
polyLineColorWork_L_P1 .ds 1
polyLineColorWork_L_P2 .ds 1
polyLineColorWork_L_P3 .ds 1
;---------------------
polygonColorP0 .ds 128
polygonColorP1 .ds 128
polygonColorP2 .ds 128
polygonColorP3 .ds 128
;---------------------
edgeLeft .ds 192
edgeRight .ds 192
;---------------------
.rsset 0
SAT_Y .rs 2
SAT_X .rs 2
SAT_PATTERN .rs 2
SAT_ATTRIBUTE .rs 2
SAT_SIZE .rs 0
satBuffer .ds SAT_SIZE*64
;---------------------
;polygon data(MAX 24Byte) is ordered counterclockwise
;NEXT ADDR 2Byte
;SAMPLE Z 2Byte
;COLOR 1Byte COLOR:0 to 127
;VERTEX COUNT 1Byte COUNT:3 to 9, CIRCLE:$80, LINESKIP:+$40 or DATA END:$00
;X0 1Byte, Y0 1Byte or CIRCLE CENTER X 2Byte
;X1 1Byte, Y1 1Byte or CIRCLE CENTER Y 2Byte
;X2 1Byte, Y2 1Byte or CIRCLE RADIUS 2Byte:1 to 8191
;X3 1Byte, Y3 1Byte
;X4 1Byte, Y4 1Byte
;X5 1Byte, Y5 1Byte
;X6 1Byte, Y6 1Byte
;X7 1Byte, Y7 1Byte
;X8 1Byte, Y8 1Byte
polyBufferStart .ds 6
polyBufferEnd .ds 6
polyBuffer .ds 0 ;end address $3FFF