Rev 18 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | #include "grafdata.h" |
2 | #include <stdlib.h> |
||
3 | |||
4 | #include "errors.h" |
||
5 | #include "globvars.h" |
||
6 | #include "pd/sys.h" |
||
7 | |||
8 | tGraf_data gGraf_data[2] = { |
||
9 | { 320, |
||
10 | 200, |
||
11 | 21, |
||
12 | 18, |
||
13 | 8, |
||
14 | 54, |
||
15 | 167, |
||
16 | 199, |
||
17 | 17, |
||
18 | 24, |
||
19 | { 1, |
||
20 | 3, |
||
21 | 5, |
||
22 | 6, |
||
23 | 7, |
||
24 | 8, |
||
25 | 9, |
||
26 | 10, |
||
27 | 11, |
||
28 | 12, |
||
29 | 13, |
||
30 | 14, |
||
31 | 15, |
||
32 | 16, |
||
33 | 17, |
||
34 | 19, |
||
35 | 21, |
||
36 | 0, |
||
37 | 0, |
||
38 | 0, |
||
39 | 0, |
||
40 | 0, |
||
41 | 0, |
||
42 | 0, |
||
43 | 0, |
||
44 | 0, |
||
45 | 0, |
||
46 | 0, |
||
47 | 0, |
||
48 | 0, |
||
49 | 0, |
||
50 | 0, |
||
51 | 0, |
||
52 | 0, |
||
53 | 0, |
||
54 | 0, |
||
55 | 0, |
||
56 | 0, |
||
57 | 0, |
||
58 | 0, |
||
59 | |||
60 | 134, |
||
61 | { 57, 182 }, |
||
62 | { 85, 210 }, |
||
63 | 118, |
||
64 | 67, |
||
65 | 58, |
||
66 | 147, |
||
67 | 124, |
||
68 | 190, |
||
69 | 58, |
||
70 | 270, |
||
71 | 124, |
||
72 | 15, |
||
73 | 10, |
||
74 | 350, |
||
75 | 220, |
||
76 | { 38, 166 }, |
||
77 | { 29, 96 }, |
||
78 | 66, |
||
79 | 58, |
||
80 | 62, |
||
81 | 30, |
||
82 | 174, |
||
83 | 174, |
||
84 | 30, |
||
85 | 174, |
||
86 | 82, |
||
87 | 95, |
||
88 | 260, |
||
89 | 61, |
||
90 | 282, |
||
91 | 28, |
||
92 | 149, |
||
93 | 20, |
||
94 | 75, |
||
95 | 65, |
||
96 | 72, |
||
97 | 132, |
||
98 | 125, |
||
99 | 137, |
||
100 | 207, |
||
101 | 71, |
||
102 | 39, |
||
103 | 15, |
||
104 | 62, |
||
105 | 78, |
||
106 | 56, |
||
107 | 41, |
||
108 | 280, |
||
109 | 141, |
||
110 | 60, |
||
111 | 165, |
||
112 | 235, |
||
113 | 3, |
||
114 | 6, |
||
115 | 57, |
||
116 | 39, |
||
117 | 112, |
||
118 | 110, |
||
119 | 174, |
||
120 | 106, |
||
121 | 0, |
||
122 | 12, |
||
123 | 6, |
||
124 | 60, |
||
125 | 42, |
||
126 | 116, |
||
127 | 89, |
||
128 | 67, |
||
129 | 111, |
||
130 | 67, |
||
131 | 137, |
||
132 | 67, |
||
133 | 123, |
||
134 | 122, |
||
135 | 41, |
||
136 | 132, |
||
137 | 60, |
||
138 | 25, |
||
139 | 188, |
||
140 | 192, |
||
141 | 233, |
||
142 | 52, |
||
143 | 59, |
||
144 | 76, |
||
145 | 83, |
||
146 | 101, |
||
147 | 108, |
||
148 | 20, |
||
149 | 124, |
||
150 | 135, |
||
151 | 172, |
||
152 | 183, |
||
153 | 121, |
||
154 | 163, |
||
155 | 168, |
||
156 | 211, |
||
157 | 120, |
||
158 | 169, |
||
159 | 126, |
||
160 | 83, |
||
161 | 238, |
||
162 | 178, |
||
163 | 191, |
||
164 | 181, |
||
165 | 11, |
||
166 | 20, |
||
167 | 298, |
||
168 | 149, |
||
169 | 4, |
||
170 | 22, |
||
171 | 40, |
||
172 | 18, |
||
173 | 4, |
||
174 | 137, |
||
175 | 65, |
||
176 | 133, |
||
177 | 277, |
||
178 | 65, |
||
179 | 31, |
||
180 | 277, |
||
181 | 127, |
||
182 | 31, |
||
183 | 131, |
||
184 | 318, |
||
185 | 2, |
||
186 | 1, |
||
187 | 1, |
||
188 | 5, |
||
189 | 5, |
||
190 | 70, |
||
191 | 182, |
||
192 | 182, |
||
193 | 70, |
||
194 | 100, |
||
195 | 126, |
||
196 | 152, |
||
197 | 174, |
||
198 | 200, |
||
199 | 226, |
||
200 | 252, |
||
201 | 278, |
||
202 | 170, |
||
203 | 42, |
||
204 | 90, |
||
205 | 185, |
||
206 | 224, |
||
207 | 290, |
||
208 | 66, |
||
209 | 13, |
||
210 | 40, |
||
211 | 292, |
||
212 | -3, |
||
213 | 8, |
||
214 | 126, |
||
215 | 163, |
||
216 | 62, |
||
217 | 60, |
||
218 | 270, |
||
219 | 118, |
||
220 | 67, |
||
221 | 92, |
||
222 | 200, |
||
223 | 305, |
||
224 | 35, |
||
225 | 23, |
||
226 | 58, |
||
227 | 152, |
||
228 | 48, |
||
229 | 113, |
||
230 | 170, |
||
231 | 235, |
||
232 | 12, |
||
233 | 37, |
||
234 | 153, |
||
235 | 48, |
||
236 | 152, |
||
237 | 3, |
||
238 | 3, |
||
239 | 2, |
||
240 | 53, |
||
241 | 51, |
||
242 | 0, |
||
243 | 14, |
||
244 | 9, |
||
245 | 1, |
||
246 | 2, |
||
247 | 0, |
||
248 | 7, |
||
249 | 2, |
||
250 | 8, |
||
251 | 5, |
||
252 | 49, |
||
253 | 8, |
||
254 | { 27, 67 }, |
||
255 | { 36, 76 }, |
||
256 | { 45, 85 }, |
||
257 | 288, |
||
258 | 318, |
||
259 | 7, |
||
260 | 312, |
||
261 | 1, |
||
262 | 2, |
||
263 | 2, |
||
264 | 1, |
||
265 | 309, |
||
266 | 4, |
||
267 | 132, |
||
268 | 50, |
||
269 | 53, |
||
270 | 211, |
||
271 | 150, |
||
272 | 171, |
||
273 | 55, |
||
274 | 85, |
||
275 | 162, |
||
276 | 195, |
||
277 | 235, |
||
278 | 51, |
||
279 | 13, |
||
280 | 141, |
||
281 | 81, |
||
282 | 141, |
||
283 | 44, |
||
284 | 8, |
||
285 | 100, |
||
286 | 194, |
||
287 | 22 }, |
||
288 | { 640, |
||
289 | 480, |
||
290 | 21, |
||
291 | 18, |
||
292 | 8, |
||
293 | 54, |
||
294 | 167, |
||
295 | 199, |
||
296 | 17, |
||
297 | 24, |
||
298 | { 1, |
||
299 | 3, |
||
300 | 5, |
||
301 | 6, |
||
302 | 7, |
||
303 | 8, |
||
304 | 9, |
||
305 | 10, |
||
306 | 11, |
||
307 | 12, |
||
308 | 13, |
||
309 | 14, |
||
310 | 15, |
||
311 | 16, |
||
312 | 17, |
||
313 | 19, |
||
314 | 21, |
||
315 | 0, |
||
316 | 0, |
||
317 | 0, |
||
318 | 0, |
||
319 | 0, |
||
320 | 0, |
||
321 | 0, |
||
322 | 0, |
||
323 | 0, |
||
324 | 0, |
||
325 | 0, |
||
326 | 0, |
||
327 | 0, |
||
328 | 0, |
||
329 | 0, |
||
330 | 0, |
||
331 | 0, |
||
332 | 0, |
||
333 | 0, |
||
334 | 0, |
||
335 | 0, |
||
336 | 0, |
||
337 | 0, |
||
338 | |||
339 | 134, |
||
340 | { 57, 182 }, |
||
341 | { 85, 210 }, |
||
342 | 118, |
||
343 | 67, |
||
344 | 58, |
||
345 | 147, |
||
346 | 124, |
||
347 | 190, |
||
348 | 58, |
||
349 | 270, |
||
350 | 124, |
||
351 | 32, |
||
352 | 24, |
||
353 | 704, |
||
354 | 528, |
||
355 | { 38, 166 }, |
||
356 | { 29, 96 }, |
||
357 | 66, |
||
358 | 58, |
||
359 | 62, |
||
360 | 30, |
||
361 | 174, |
||
362 | 174, |
||
363 | 30, |
||
364 | 174, |
||
365 | 82, |
||
366 | 95, |
||
367 | 260, |
||
368 | 61, |
||
369 | 282, |
||
370 | 28, |
||
371 | 149, |
||
372 | 20, |
||
373 | 75, |
||
374 | 65, |
||
375 | 72, |
||
376 | 132, |
||
377 | 125, |
||
378 | 137, |
||
379 | 207, |
||
380 | 71, |
||
381 | 39, |
||
382 | 15, |
||
383 | 62, |
||
384 | 78, |
||
385 | 56, |
||
386 | 56, |
||
387 | 268, |
||
388 | 141, |
||
389 | 60, |
||
390 | 165, |
||
391 | 235, |
||
392 | 3, |
||
393 | 6, |
||
394 | 57, |
||
395 | 39, |
||
396 | 112, |
||
397 | 110, |
||
398 | 174, |
||
399 | 106, |
||
400 | 0, |
||
401 | 12, |
||
402 | 6, |
||
403 | 60, |
||
404 | 42, |
||
405 | 116, |
||
406 | 89, |
||
407 | 67, |
||
408 | 111, |
||
409 | 67, |
||
410 | 137, |
||
411 | 67, |
||
412 | 123, |
||
413 | 122, |
||
414 | 41, |
||
415 | 132, |
||
416 | 60, |
||
417 | 25, |
||
418 | 188, |
||
419 | 192, |
||
420 | 233, |
||
421 | 52, |
||
422 | 59, |
||
423 | 76, |
||
424 | 83, |
||
425 | 101, |
||
426 | 108, |
||
427 | 20, |
||
428 | 124, |
||
429 | 135, |
||
430 | 172, |
||
431 | 183, |
||
432 | 121, |
||
433 | 163, |
||
434 | 168, |
||
435 | 211, |
||
436 | 120, |
||
437 | 169, |
||
438 | 126, |
||
439 | 83, |
||
440 | 238, |
||
441 | 178, |
||
442 | 191, |
||
443 | 181, |
||
444 | 11, |
||
445 | 20, |
||
446 | 298, |
||
447 | 149, |
||
448 | 8, |
||
449 | 44, |
||
450 | 96, |
||
451 | 43, |
||
452 | 10, |
||
453 | 137, |
||
454 | 65, |
||
455 | 133, |
||
456 | 277, |
||
457 | 65, |
||
458 | 31, |
||
459 | 277, |
||
460 | 127, |
||
461 | 31, |
||
462 | 131, |
||
463 | 636, |
||
464 | 5, |
||
465 | 2, |
||
466 | 2, |
||
467 | 10, |
||
468 | 12, |
||
469 | 140, |
||
470 | 437, |
||
471 | 437, |
||
472 | 140, |
||
473 | 200, |
||
474 | 252, |
||
475 | 304, |
||
476 | 348, |
||
477 | 400, |
||
478 | 452, |
||
479 | 504, |
||
480 | 556, |
||
481 | 408, |
||
482 | 42, |
||
483 | 90, |
||
484 | 185, |
||
485 | 224, |
||
486 | 290, |
||
487 | 66, |
||
488 | 13, |
||
489 | 40, |
||
490 | 292, |
||
491 | -3, |
||
492 | 8, |
||
493 | 126, |
||
494 | 163, |
||
495 | 62, |
||
496 | 60, |
||
497 | 270, |
||
498 | 118, |
||
499 | 67, |
||
500 | 92, |
||
501 | 200, |
||
502 | 305, |
||
503 | 35, |
||
504 | 23, |
||
505 | 58, |
||
506 | 152, |
||
507 | 48, |
||
508 | 113, |
||
509 | 170, |
||
510 | 235, |
||
511 | 12, |
||
512 | 37, |
||
513 | 150, |
||
514 | 48, |
||
515 | 152, |
||
516 | 6, |
||
517 | 7, |
||
518 | 4, |
||
519 | 106, |
||
520 | 102, |
||
521 | 0, |
||
522 | 31, |
||
523 | 18, |
||
524 | 2, |
||
525 | 4, |
||
526 | 0, |
||
527 | 17, |
||
528 | 4, |
||
529 | 18, |
||
530 | 12, |
||
531 | 98, |
||
532 | 19, |
||
533 | { 65, 161 }, |
||
534 | { 86, 182 }, |
||
535 | { 107, 203 }, |
||
536 | 576, |
||
537 | 636, |
||
538 | 18, |
||
539 | 624, |
||
540 | 3, |
||
541 | 2, |
||
542 | 4, |
||
543 | 3, |
||
544 | 618, |
||
545 | 11, |
||
546 | 132, |
||
547 | 50, |
||
548 | 53, |
||
549 | 211, |
||
550 | 150, |
||
551 | 171, |
||
552 | 55, |
||
553 | 85, |
||
554 | 162, |
||
555 | 195, |
||
556 | 235, |
||
557 | 51, |
||
558 | 13, |
||
559 | 141, |
||
560 | 81, |
||
561 | 141, |
||
562 | 44, |
||
563 | 16, |
||
564 | 200, |
||
565 | 388, |
||
566 | 55 } |
||
567 | }; |
||
568 | |||
569 | tGraf_data* gCurrent_graf_data; |
||
570 | int gGraf_data_index; |
||
571 | |||
572 | // IDA: void __cdecl CalcGrafDataIndex() |
||
573 | void CalcGrafDataIndex(void) { |
||
574 | int i; |
||
575 | |||
20 | pmbaty | 576 | for (i = 0; i < sizeof (gGraf_specs) / sizeof (gGraf_specs[0]); i++) { // Pierre-Marie Baty -- parse the whole array |
1 | pmbaty | 577 | if (gGraf_specs[gGraf_spec_index].total_width == gGraf_data[i].width && gGraf_specs[gGraf_spec_index].total_height == gGraf_data[i].height) { |
578 | gReal_graf_data_index = i; |
||
579 | gGraf_data_index = i; |
||
580 | gCurrent_graf_data = &gGraf_data[i]; |
||
581 | return; |
||
582 | } |
||
583 | } |
||
584 | FatalError(kFatalError_ScreenGrafDataWidthHeightMismatch); |
||
585 | } |