]>
Commit | Line | Data |
---|---|---|
4592bc09 JB |
1 | Status: applied |
2 | ||
3 | Index: b/glide3x/h3/glide3/src/gaa.c | |
4 | =================================================================== | |
5 | --- a/glide3x/h3/glide3/src/gaa.c | |
6 | +++ b/glide3x/h3/glide3/src/gaa.c | |
7 | @@ -616,7 +616,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count, | |
8 | e = pointers; | |
9 | if (mode) | |
10 | e = *(float **)e; | |
11 | - (float *)pointers += stride; | |
12 | + pointers = (float *)pointers + stride; | |
13 | ||
14 | ptX = FARRAY(e, gc->state.vData.vertexInfo.offset); | |
15 | ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4); | |
16 | @@ -717,7 +717,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count, | |
17 | if (mode) | |
18 | e = *(float **)e; | |
19 | oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset); | |
20 | - (float *)pointers += stride; | |
21 | + pointers = (float *)pointers + stride; | |
22 | ||
23 | ptX = FARRAY(e, gc->state.vData.vertexInfo.offset) | |
24 | *oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox; | |
25 | @@ -842,9 +842,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty | |
26 | v1 = *(float **)v1; | |
27 | v2 = *(float **)v2; | |
28 | } | |
29 | - (float *)pointers += stride; | |
30 | + pointers = (float *)pointers + stride; | |
31 | if (ltype == GR_LINES) | |
32 | - (float *)pointers += stride; | |
33 | + pointers = (float *)pointers + stride; | |
34 | ||
35 | /* draw from low Y to high Y */ | |
36 | if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) { | |
37 | @@ -1023,9 +1023,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty | |
38 | v1 = *(float **)v1; | |
39 | v2 = *(float **)v2; | |
40 | } | |
41 | - (float *)pointers += stride; | |
42 | + pointers = (float *)pointers + stride; | |
43 | if (ltype == GR_LINES) | |
44 | - (float *)pointers += stride; | |
45 | + pointers = (float *)pointers + stride; | |
46 | owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset); | |
47 | owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset); | |
48 | } | |
49 | @@ -1037,7 +1037,7 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty | |
50 | v1 = *(float **)v1; | |
51 | v2 = *(float **)v2; | |
52 | } | |
53 | - (float *)pointers += stride; | |
54 | + pointers = (float *)pointers + stride; | |
55 | owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset); | |
56 | } | |
57 | ||
58 | @@ -1373,7 +1373,7 @@ _grAADrawTriangles(FxI32 mode, FxI32 tty | |
59 | b = *(float **)b; | |
60 | c = *(float **)c; | |
61 | } | |
62 | - (float *)pointers += stride*3; | |
63 | + pointers = (float *)pointers + stride*3; | |
64 | ||
65 | /* move culling test to here */ | |
66 | { | |
67 | @@ -1549,7 +1549,7 @@ _grAAVpDrawTriangles(FxI32 mode, FxI32 t | |
68 | b = *(float **)b; | |
69 | c = *(float **)c; | |
70 | } | |
71 | - (float *)pointers += stride*3; | |
72 | + pointers = (float *)pointers + stride*3; | |
73 | oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset); | |
74 | oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset); | |
75 | oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset); | |
76 | @@ -1716,7 +1716,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mo | |
77 | if (type == kSetupFan) { | |
78 | v[0] = (mode == 0) ? pointers : *(float **)pointers; | |
79 | while (sCount--) { | |
80 | - (float *)pointers += stride; | |
81 | + pointers = (float *)pointers + stride; | |
82 | if (mode) { | |
83 | v[1] = *(float **)pointers; | |
84 | v[2] = *((float **)pointers+1); | |
85 | @@ -1758,7 +1758,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mo | |
86 | _grAADrawTriangles(1, type, 3, v); | |
87 | else | |
88 | _grAAVpDrawTriangles(1, type, 3, v); | |
89 | - (float *)pointers += stride; | |
90 | + pointers = (float *)pointers + stride; | |
91 | flip = ~flip; | |
92 | } | |
93 | flip = ~flip; | |
94 | Index: b/glide3x/h3/glide3/src/gdraw.c | |
95 | =================================================================== | |
96 | --- a/glide3x/h3/glide3/src/gdraw.c | |
97 | +++ b/glide3x/h3/glide3/src/gdraw.c | |
98 | @@ -402,7 +402,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v | |
99 | vPtr = pointers; | |
100 | if (mode) vPtr = *(float **)vPtr; | |
101 | ||
102 | - (float *)pointers += stride; | |
103 | + pointers = (float *)pointers + stride; | |
104 | ||
105 | GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n", | |
106 | FARRAY(vPtr,gc->state.vData.vertexInfo.offset), | |
107 | @@ -491,7 +491,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v | |
108 | if (mode) | |
109 | vPtr = *(float **)vPtr; | |
110 | oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset); | |
111 | - (float *)pointers += stride; | |
112 | + pointers = (float *)pointers + stride; | |
113 | ||
114 | { | |
115 | FxU32 x, y; | |
116 | @@ -616,9 +616,9 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype | |
117 | a = *(float **)a; | |
118 | b = *(float **)b; | |
119 | } | |
120 | - (float *)pointers += stride; | |
121 | + pointers = (float *)pointers + stride; | |
122 | if (ltype == GR_LINES) | |
123 | - (float *)pointers += stride; | |
124 | + pointers = (float *)pointers + stride; | |
125 | ||
126 | /* | |
127 | ** compute absolute deltas and draw from low Y to high Y | |
128 | @@ -778,10 +778,10 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype | |
129 | a = *(float **)a; | |
130 | b = *(float **)b; | |
131 | } | |
132 | - (float *)pointers += stride; | |
133 | + pointers = (float *)pointers + stride; | |
134 | owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset); | |
135 | owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset); | |
136 | - (float *)pointers += stride; | |
137 | + pointers = (float *)pointers + stride; | |
138 | } | |
139 | else { | |
140 | owa = oowa = oowb; | |
141 | @@ -791,7 +791,7 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype | |
142 | a = *(float **)a; | |
143 | b = *(float **)b; | |
144 | } | |
145 | - (float *)pointers += stride; | |
146 | + pointers = (float *)pointers + stride; | |
147 | owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset); | |
148 | } | |
149 | fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4) | |
150 | @@ -944,7 +944,7 @@ _grDrawTriangles_Default(FxI32 mode, FxI | |
151 | vPtr = pointers; | |
152 | if (mode) | |
153 | vPtr = *(float **)vPtr; | |
154 | - (float *)pointers += stride; | |
155 | + pointers = (float *)pointers + stride; | |
156 | ||
157 | i = gc->tsuDataList[dataElem]; | |
158 | ||
159 | @@ -984,7 +984,7 @@ _grDrawTriangles_Default(FxI32 mode, FxI | |
160 | *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox); | |
161 | TRI_SETF(FARRAY(vPtr, 4) | |
162 | *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy); | |
163 | - (float *)pointers += stride; | |
164 | + pointers = (float *)pointers + stride; | |
165 | ||
166 | TRI_VP_SETFS(vPtr,oow); | |
167 | } | |
168 | Index: b/glide3x/h3/glide3/src/gstrip.c | |
169 | =================================================================== | |
170 | --- a/glide3x/h3/glide3/src/gstrip.c | |
171 | +++ b/glide3x/h3/glide3/src/gstrip.c | |
172 | @@ -190,7 +190,7 @@ _grDrawVertexList(FxU32 pktype, FxU32 ty | |
173 | vPtr = pointers; | |
174 | if (mode) | |
175 | vPtr = *(float **)vPtr; | |
176 | - (float *)pointers += stride; | |
177 | + pointers = (float *)pointers + stride; | |
178 | ||
179 | TRI_SETF(FARRAY(vPtr, 0)); | |
180 | dataElem = 0; | |
181 | @@ -230,7 +230,7 @@ _grDrawVertexList(FxU32 pktype, FxU32 ty | |
182 | *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox); | |
183 | TRI_SETF(FARRAY(vPtr, 4) | |
184 | *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy); | |
185 | - (float *)pointers += stride; | |
186 | + pointers = (float *)pointers + stride; | |
187 | ||
188 | TRI_VP_SETFS(vPtr, oow); | |
189 | } | |
190 | Index: b/glide3x/h3/glide3/src/distrip.c | |
191 | =================================================================== | |
192 | --- a/glide3x/h3/glide3/src/distrip.c | |
193 | +++ b/glide3x/h3/glide3/src/distrip.c | |
194 | @@ -450,7 +450,7 @@ GR_DIENTRY(grDrawVertexArray, void , (Fx | |
195 | else { | |
196 | while ((int)Count >= 3) { | |
197 | grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2)); | |
198 | - (float *)pointers += 3; | |
199 | + pointers = (float *)pointers + 3; | |
200 | Count -= 3; | |
201 | } | |
202 | } | |
203 | Index: b/glide3x/h5/glide3/src/gaa.c | |
204 | =================================================================== | |
205 | --- a/glide3x/h5/glide3/src/gaa.c | |
206 | +++ b/glide3x/h5/glide3/src/gaa.c | |
207 | @@ -628,7 +628,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count, | |
208 | e = pointers; | |
209 | if (mode) | |
210 | e = *(float **)e; | |
211 | - (float *)pointers += stride; | |
212 | + pointers = (float *)pointers + stride; | |
213 | ||
214 | ptX = FARRAY(e, gc->state.vData.vertexInfo.offset); | |
215 | ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4); | |
216 | @@ -729,7 +729,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count, | |
217 | if (mode) | |
218 | e = *(float **)e; | |
219 | oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset); | |
220 | - (float *)pointers += stride; | |
221 | + pointers = (float *)pointers + stride; | |
222 | ||
223 | ptX = FARRAY(e, gc->state.vData.vertexInfo.offset) | |
224 | *oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox; | |
225 | @@ -856,9 +856,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty | |
226 | v1 = *(float **)v1; | |
227 | v2 = *(float **)v2; | |
228 | } | |
229 | - (float *)pointers += stride; | |
230 | + pointers = (float *)pointers + stride; | |
231 | if (ltype == GR_LINES) | |
232 | - (float *)pointers += stride; | |
233 | + pointers = (float *)pointers + stride; | |
234 | ||
235 | /* draw from low Y to high Y */ | |
236 | if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) { | |
237 | @@ -1037,9 +1037,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty | |
238 | v1 = *(float **)v1; | |
239 | v2 = *(float **)v2; | |
240 | } | |
241 | - (float *)pointers += stride; | |
242 | + pointers = (float *)pointers + stride; | |
243 | if (ltype == GR_LINES) | |
244 | - (float *)pointers += stride; | |
245 | + pointers = (float *)pointers + stride; | |
246 | owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset); | |
247 | owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset); | |
248 | } | |
249 | @@ -1051,7 +1051,7 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty | |
250 | v1 = *(float **)v1; | |
251 | v2 = *(float **)v2; | |
252 | } | |
253 | - (float *)pointers += stride; | |
254 | + pointers = (float *)pointers + stride; | |
255 | owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset); | |
256 | } | |
257 | ||
258 | @@ -1391,7 +1391,7 @@ _grAADrawTriangles(FxI32 mode, FxI32 tty | |
259 | b = *(float **)b; | |
260 | c = *(float **)c; | |
261 | } | |
262 | - (float *)pointers += stride*3; | |
263 | + pointers = (float *)pointers + stride*3; | |
264 | ||
265 | /* move culling test to here */ | |
266 | { | |
267 | @@ -1567,7 +1567,7 @@ _grAAVpDrawTriangles(FxI32 mode, FxI32 t | |
268 | b = *(float **)b; | |
269 | c = *(float **)c; | |
270 | } | |
271 | - (float *)pointers += stride*3; | |
272 | + pointers = (float *)pointers + stride*3; | |
273 | oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset); | |
274 | oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset); | |
275 | oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset); | |
276 | @@ -1734,7 +1734,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mo | |
277 | if (type == kSetupFan) { | |
278 | v[0] = (mode == 0) ? pointers : *(float **)pointers; | |
279 | while (sCount--) { | |
280 | - (float *)pointers += stride; | |
281 | + pointers = (float *)pointers + stride; | |
282 | if (mode) { | |
283 | v[1] = *(float **)pointers; | |
284 | v[2] = *((float **)pointers+1); | |
285 | @@ -1776,7 +1776,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mo | |
286 | _grAADrawTriangles(1, type, 3, v); | |
287 | else | |
288 | _grAAVpDrawTriangles(1, type, 3, v); | |
289 | - (float *)pointers += stride; | |
290 | + pointers = (float *)pointers + stride; | |
291 | flip = ~flip; | |
292 | } | |
293 | flip = ~flip; | |
294 | Index: b/glide3x/h5/glide3/src/gdraw.c | |
295 | =================================================================== | |
296 | --- a/glide3x/h5/glide3/src/gdraw.c | |
297 | +++ b/glide3x/h5/glide3/src/gdraw.c | |
298 | @@ -472,7 +472,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v | |
299 | vPtr = pointers; | |
300 | if (mode) vPtr = *(float **)vPtr; | |
301 | ||
302 | - (float *)pointers += stride; | |
303 | + pointers = (float *)pointers + stride; | |
304 | ||
305 | GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n", | |
306 | FARRAY(vPtr,gc->state.vData.vertexInfo.offset), | |
307 | @@ -554,7 +554,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v | |
308 | vPtr = pointers; | |
309 | if (mode) vPtr = *(float **)vPtr; | |
310 | ||
311 | - (float *)pointers += stride; | |
312 | + pointers = (float *)pointers + stride; | |
313 | ||
314 | GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n", | |
315 | FARRAY(vPtr,gc->state.vData.vertexInfo.offset), | |
316 | @@ -665,7 +665,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v | |
317 | if (mode) | |
318 | vPtr = *(float **)vPtr; | |
319 | oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset); | |
320 | - (float *)pointers += stride; | |
321 | + pointers = (float *)pointers + stride; | |
322 | ||
323 | { | |
324 | float fx, fy; | |
325 | @@ -802,9 +802,9 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype | |
326 | a = *(float **)a; | |
327 | b = *(float **)b; | |
328 | } | |
329 | - (float *)pointers += stride; | |
330 | + pointers = (float *)pointers + stride; | |
331 | if (ltype == GR_LINES) | |
332 | - (float *)pointers += stride; | |
333 | + pointers = (float *)pointers + stride; | |
334 | ||
335 | /* | |
336 | ** compute absolute deltas and draw from low Y to high Y | |
337 | @@ -964,10 +964,10 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype | |
338 | a = *(float **)a; | |
339 | b = *(float **)b; | |
340 | } | |
341 | - (float *)pointers += stride; | |
342 | + pointers = (float *)pointers + stride; | |
343 | owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset); | |
344 | owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset); | |
345 | - (float *)pointers += stride; | |
346 | + pointers = (float *)pointers + stride; | |
347 | } | |
348 | else { | |
349 | owa = oowa = oowb; | |
350 | @@ -977,7 +977,7 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype | |
351 | a = *(float **)a; | |
352 | b = *(float **)b; | |
353 | } | |
354 | - (float *)pointers += stride; | |
355 | + pointers = (float *)pointers + stride; | |
356 | owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset); | |
357 | } | |
358 | fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4) | |
359 | @@ -1125,7 +1125,7 @@ _grDrawTriangles_Default(FxI32 mode, FxI | |
360 | vPtr = pointers; | |
361 | if (mode) | |
362 | vPtr = *(float **)vPtr; | |
363 | - (float *)pointers += stride; | |
364 | + pointers = (float *)pointers + stride; | |
365 | ||
366 | i = gc->tsuDataList[dataElem]; | |
367 | ||
368 | @@ -1165,7 +1165,7 @@ _grDrawTriangles_Default(FxI32 mode, FxI | |
369 | *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox); | |
370 | TRI_SETF(FARRAY(vPtr, 4) | |
371 | *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy); | |
372 | - (float *)pointers += stride; | |
373 | + pointers = (float *)pointers + stride; | |
374 | ||
375 | TRI_VP_SETFS(vPtr,oow); | |
376 | } | |
377 | Index: b/glide3x/h5/glide3/src/gstrip.c | |
378 | =================================================================== | |
379 | --- a/glide3x/h5/glide3/src/gstrip.c | |
380 | +++ b/glide3x/h5/glide3/src/gstrip.c | |
381 | @@ -214,7 +214,7 @@ _grDrawVertexList(FxU32 pktype, FxU32 ty | |
382 | vPtr = pointers; | |
383 | if (mode) | |
384 | vPtr = *(float **)vPtr; | |
385 | - (float *)pointers += stride; | |
386 | + pointers = (float *)pointers + stride; | |
387 | ||
388 | TRI_SETF(FARRAY(vPtr, 0)); | |
389 | dataElem = 0; | |
390 | @@ -254,7 +254,7 @@ _grDrawVertexList(FxU32 pktype, FxU32 ty | |
391 | *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox); | |
392 | TRI_SETF(FARRAY(vPtr, 4) | |
393 | *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy); | |
394 | - (float *)pointers += stride; | |
395 | + pointers = (float *)pointers + stride; | |
396 | ||
397 | TRI_VP_SETFS(vPtr, oow); | |
398 | } | |
399 | Index: b/glide3x/h5/glide3/src/distrip.c | |
400 | =================================================================== | |
401 | --- a/glide3x/h5/glide3/src/distrip.c | |
402 | +++ b/glide3x/h5/glide3/src/distrip.c | |
403 | @@ -458,7 +458,7 @@ GR_DIENTRY(grDrawVertexArray, void , (Fx | |
404 | else { | |
405 | while ((int)Count >= 3) { | |
406 | grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2)); | |
407 | - (float *)pointers += 3; | |
408 | + pointers = (float *)pointers + 3; | |
409 | Count -= 3; | |
410 | } | |
411 | } | |
a9544e7b JB |
412 | --- x/glide3x-20010309/h5/glide3/src/glfb.c.orig 2022-09-26 21:32:58.823335084 +0200 |
413 | +++ x/glide3x-20010309/h5/glide3/src/glfb.c 2022-09-26 21:37:53.375072694 +0200 | |
4592bc09 JB |
414 | @@ -1333,8 +1333,10 @@ GR_ENTRY(grLfbReadRegion, FxBool, (GrBuf |
415 | while(src_height--) | |
416 | { | |
417 | /* adjust starting alignment */ | |
418 | - if (((FxU32)src)&3) | |
419 | - *((FxU16 *)dst)++=*((FxU16 *)src)++; | |
420 | + if (((FxU32)src)&3) { | |
421 | + *((FxU16 *)dst)=*((FxU16 *)src); | |
422 | + dst = ((FxU16 *)dst)+1; src = ((FxU16 *)src); | |
423 | + } | |
424 | ||
425 | /* read in dwords of pixels */ | |
426 | if(length) | |
427 | @@ -1353,8 +1355,8 @@ GR_ENTRY(grLfbReadRegion, FxBool, (GrBuf | |
a9544e7b | 428 | *((FxU16 *)(((FxU32)dst) + byte_index))=*((FxU16 *)(((FxU32)src) + byte_index)); |
4592bc09 JB |
429 | } |
430 | /* adjust for next line */ | |
431 | - ((FxU8 *)src)+=src_adjust; | |
432 | - ((FxU8 *)dst)+=dst_adjust; | |
433 | + src=((FxU8 *)src)+src_adjust; | |
434 | + dst=((FxU8 *)dst)+dst_adjust; | |
435 | } | |
436 | rv=FXTRUE; | |
437 | /* unlock buffer */ |