/[projet1]/users/twilighte/Stormlord/Test_DisplayCollisionMap.s
Defence Force logotype

Contents of /users/twilighte/Stormlord/Test_DisplayCollisionMap.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 412 - (show annotations)
Thu Oct 7 20:50:23 2010 UTC (8 years, 5 months ago) by dbug
File size: 2759 byte(s)
Added Stormlord
1 ;Test_DisplayCollisionMap.s
2
3 TestTemp1 .byt 0
4 TestTemp2 .byt 0
5
6 Test_DisplayCollisionMap
7 lda #<CollisionMap
8 sta cmap
9 lda #>CollisionMap
10 sta cmap+1
11
12 lda #<$A000+30*40
13 sta screen
14 lda #>$A000+30*40
15 sta screen+1
16
17 lda #18
18 sta TestTemp2
19
20 .(
21 loop3 ldy #39
22
23 loop2 lda (cmap),y
24 beq skip1
25
26 ;Display Collision byte as 6x6cell
27 sty TestTemp1
28 and #31
29 tax
30 lda CellGraphicAddressLo,x
31 sta vector1+1
32 lda CellGraphicAddressHi,x
33 sta vector1+2
34 clc
35 ldx #5
36 vector1 lda $dead,x
37 sta (screen),y
38 tya
39 adc #40
40 tay
41 dex
42 bpl vector1
43 ldy TestTemp1
44
45 skip1 dey
46 bpl loop2
47
48 ;Next row
49 lda cmap
50 adc #40
51 sta cmap
52 lda cmap+1
53 adc #00
54 sta cmap+1
55
56 lda screen
57 adc #<40*6
58 sta screen
59 lda screen+1
60 adc #>40*6
61 sta screen+1
62
63 dec TestTemp2
64 bne loop3
65 .)
66 rts
67
68
69 CellGraphicAddressLo
70 .byt 0 ;00 Background
71 .byt <cg_1 ;01 Wall/Surface/Solid
72 .byt <cg_2 ;02 Death
73 .byt <cg_3 ;03 Exit (Left/Right)
74 .byt <cg_4 ;04 Object 1 Key
75 .byt <cg_5 ;05 Object 2 Honey
76 .byt <cg_6 ;06 Object 3 Umbrella
77 .byt <cg_7 ;07 Object 4 Boots
78 .dsb 8,<cg_u ;08-15
79 .byt <cg_16 ;16 Fairy
80 .byt <cg_17 ;17 Door
81 .byt <cg_18 ;18 Trampolene
82 CellGraphicAddressHi
83 .byt 0 ;00 Background
84 .byt >cg_1 ;01 Wall/Surface/Solid
85 .byt >cg_2 ;02 Death
86 .byt >cg_3 ;03 Exit (Left/Right)
87 .byt >cg_4 ;04 Object 1 Key
88 .byt >cg_5 ;05 Object 2 Honey
89 .byt >cg_6 ;06 Object 3 Umbrella
90 .byt >cg_7 ;07 Object 4 Boots
91 .dsb 8,>cg_u ;08-15
92 .byt >cg_16 ;16 Fairy
93 .byt >cg_17 ;17 Door
94 .byt >cg_18 ;18 Trampolene
95
96 cg_1
97 .byt %01111111
98 .byt %01110111
99 .byt %01110111
100 .byt %01110111
101 .byt %01110111
102 .byt %01111111
103 cg_2
104 .byt %01111111
105 .byt %01100111
106 .byt %01111011
107 .byt %01110111
108 .byt %01100011
109 .byt %01111111
110 cg_3
111 .byt %01111111
112 .byt %01111111
113 .byt %01111111
114 .byt %01111111
115 .byt %01111111
116 .byt %01111111
117 cg_4
118 .byt %01111111
119 .byt %01111111
120 .byt %01111111
121 .byt %01111111
122 .byt %01111111
123 .byt %01111111
124 cg_5
125 .byt %01111111
126 .byt %01100011
127 .byt %01101111
128 .byt %01100011
129 .byt %01100111
130 .byt %01111111
131 cg_6
132 .byt %01111111
133 .byt %01110001
134 .byt %01100011
135 .byt %01101101
136 .byt %01110011
137 .byt %01111111
138 cg_7
139 .byt %01111111
140 .byt %01100011
141 .byt %01111011
142 .byt %01110111
143 .byt %01110111
144 .byt %01111111
145 cg_16
146 .byt %01111111
147 .byt %01011001
148 .byt %01010011
149 .byt %01010101
150 .byt %01011011
151 .byt %01111111
152 cg_17
153 .byt %01111111
154 .byt %01010001
155 .byt %01011101
156 .byt %01011101
157 .byt %01011101
158 .byt %01111111
159 cg_18
160 .byt %01111111
161 .byt %01011011
162 .byt %01010101
163 .byt %01011011
164 .byt %01010101
165 .byt %01011011
166 cg_u
167 .byt %01111111
168 .byt %01101101
169 .byt %01101101
170 .byt %01101101
171 .byt %01110011
172 .byt %01111111

  ViewVC Help
Powered by ViewVC 1.1.26