minor filename fixes
[drnoksnes] / render8 orr.S
1         .global asmDrawTile8_noflip
2         .global asmDrawTile8_hflip
3         .global asmDrawTile8_hvflip
4         .global asmDrawTile8_vflip
5         .global asmDrawTile8T_noflip
6         .global asmDrawTile8T_hflip
7         .global asmDrawTile8T_hvflip
8         .global asmDrawTile8T_vflip
9         
10         ;@ ###############################
11         .macro DRAWTILE_NOFLIP
12         ;@ ###############################
13         ldr r3,[r0],#4
14         
15         ands r12,r3,#0x0000000F
16         orrne r12,r1,r12
17         strneb r12,[r2,#0]
18         
19         ands r12,r3,#0x000000F0
20         orrne r12,r1,r12,lsr#4
21         strneb r12,[r2,#1]
22         
23         ands r12,r3,#0x00000F00
24         orrne r12,r1,r12,lsr#8
25         strneb r12,[r2,#2]
26         
27         ands r12,r3,#0x0000F000
28         orrne r12,r1,r12,lsr#12
29         strneb r12,[r2,#3]
30         
31         ands r12,r3,#0x000F0000
32         orrne r12,r1,r12,lsr#16
33         strneb r12,[r2,#4]
34         
35         ands r12,r3,#0x00F00000
36         orrne r12,r1,r12,lsr#20
37         strneb r12,[r2,#5]
38         
39         ands r12,r3,#0x0F000000
40         orrne r12,r1,r12,lsr#24
41         strneb r12,[r2,#6]
42         
43         ands r12,r3,#0xF0000000
44         orrne r12,r1,r12,lsr#28
45         strneb r12,[r2,#7]
46
47         add r2,r2,#320
48         .endm
49         
50         ;@ ###############################
51         .macro DRAWTILE_HFLIP
52         ;@ ###############################
53         ldr r3,[r0],#4
54         
55         ands r12,r3,#0x0000000F
56         orrne r12,r1,r12
57         strneb r12,[r2,#7]
58         
59         ands r12,r3,#0x000000F0
60         orrne r12,r1,r12,lsr#4
61         strneb r12,[r2,#6]
62         
63         ands r12,r3,#0x00000F00
64         orrne r12,r1,r12,lsr#8
65         strneb r12,[r2,#5]
66         
67         ands r12,r3,#0x0000F000
68         orrne r12,r1,r12,lsr#12
69         strneb r12,[r2,#4]
70         
71         ands r12,r3,#0x000F0000
72         orrne r12,r1,r12,lsr#16
73         strneb r12,[r2,#3]
74         
75         ands r12,r3,#0x00F00000
76         orrne r12,r1,r12,lsr#20
77         strneb r12,[r2,#2]
78         
79         ands r12,r3,#0x0F000000
80         orrne r12,r1,r12,lsr#24
81         strneb r12,[r2,#1]
82         
83         ands r12,r3,#0xF0000000
84         orrne r12,r1,r12,lsr#28
85         strneb r12,[r2,#0]
86
87         add r2,r2,#320
88         .endm
89         
90         ;@ ###############################
91         .macro DRAWTILE_HVFLIP
92         ;@ ###############################
93         ldr r3,[r0],#4
94         
95         ands r12,r3,#0x0000000F
96         orrne r12,r1,r12
97         strneb r12,[r2,#7]
98         
99         ands r12,r3,#0x000000F0
100         orrne r12,r1,r12,lsr#4
101         strneb r12,[r2,#6]
102         
103         ands r12,r3,#0x00000F00
104         orrne r12,r1,r12,lsr#8
105         strneb r12,[r2,#5]
106         
107         ands r12,r3,#0x0000F000
108         orrne r12,r1,r12,lsr#12
109         strneb r12,[r2,#4]
110         
111         ands r12,r3,#0x000F0000
112         orrne r12,r1,r12,lsr#16
113         strneb r12,[r2,#3]
114         
115         ands r12,r3,#0x00F00000
116         orrne r12,r1,r12,lsr#20
117         strneb r12,[r2,#2]
118         
119         ands r12,r3,#0x0F000000
120         orrne r12,r1,r12,lsr#24
121         strneb r12,[r2,#1]
122         
123         ands r12,r3,#0xF0000000
124         orrne r12,r1,r12,lsr#28
125         strneb r12,[r2,#0]
126
127         sub r2,r2,#320
128         .endm
129         
130         ;@ ###############################
131         .macro DRAWTILE_VFLIP
132         ;@ ###############################
133         ldr r3,[r0],#4
134         
135         ands r12,r3,#0x0000000F
136         orrne r12,r1,r12
137         strneb r12,[r2,#0]
138         
139         ands r12,r3,#0x000000F0
140         orrne r12,r1,r12,lsr#4
141         strneb r12,[r2,#1]
142         
143         ands r12,r3,#0x00000F00
144         orrne r12,r1,r12,lsr#8
145         strneb r12,[r2,#2]
146         
147         ands r12,r3,#0x0000F000
148         orrne r12,r1,r12,lsr#12
149         strneb r12,[r2,#3]
150         
151         ands r12,r3,#0x000F0000
152         orrne r12,r1,r12,lsr#16
153         strneb r12,[r2,#4]
154         
155         ands r12,r3,#0x00F00000
156         orrne r12,r1,r12,lsr#20
157         strneb r12,[r2,#5]
158         
159         ands r12,r3,#0x0F000000
160         orrne r12,r1,r12,lsr#24
161         strneb r12,[r2,#6]
162         
163         ands r12,r3,#0xF0000000
164         orrne r12,r1,r12,lsr#28
165         strneb r12,[r2,#7]
166
167         sub r2,r2,#320
168         .endm
169
170
171 asmDrawTile8_noflip:
172         DRAWTILE_NOFLIP
173         DRAWTILE_NOFLIP
174         DRAWTILE_NOFLIP
175         DRAWTILE_NOFLIP
176         DRAWTILE_NOFLIP
177         DRAWTILE_NOFLIP
178         DRAWTILE_NOFLIP
179         DRAWTILE_NOFLIP
180         mov pc,lr
181         
182 asmDrawTile8_hflip:
183         DRAWTILE_HFLIP
184         DRAWTILE_HFLIP
185         DRAWTILE_HFLIP
186         DRAWTILE_HFLIP
187         DRAWTILE_HFLIP
188         DRAWTILE_HFLIP
189         DRAWTILE_HFLIP
190         DRAWTILE_HFLIP
191         mov pc,lr
192         
193 asmDrawTile8_hvflip:
194         DRAWTILE_HVFLIP
195         DRAWTILE_HVFLIP
196         DRAWTILE_HVFLIP
197         DRAWTILE_HVFLIP
198         DRAWTILE_HVFLIP
199         DRAWTILE_HVFLIP
200         DRAWTILE_HVFLIP
201         DRAWTILE_HVFLIP
202     mov pc,lr
203         
204 asmDrawTile8_vflip:
205         DRAWTILE_VFLIP
206         DRAWTILE_VFLIP
207         DRAWTILE_VFLIP
208         DRAWTILE_VFLIP
209         DRAWTILE_VFLIP
210         DRAWTILE_VFLIP
211         DRAWTILE_VFLIP
212         DRAWTILE_VFLIP
213         mov pc,lr
214         
215         
216         
217
218