summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/quake/adivtab.h
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2018-02-11 15:34:30 -0500
committerFranklin Wei <git@fwei.tk>2019-07-19 22:37:40 -0400
commit5d05b9d3e920a6aa5fcb553758e98ed0da8c91e4 (patch)
tree84406e21639529a185556a33e5de7f43cffc277b /apps/plugins/sdl/progs/quake/adivtab.h
parentb70fecf21ddc21877ec1ae7888d9c18a979e37ad (diff)
downloadrockbox-5d05b9d3e920a6aa5fcb553758e98ed0da8c91e4.tar.gz
rockbox-5d05b9d3e920a6aa5fcb553758e98ed0da8c91e4.zip
Quake!
This ports id Software's Quake to run on the SDL plugin runtime. The source code originated from id under the GPLv2 license. I used https://github.com/ahefner/sdlquake as the base of my port. Performance is, unsurprisingly, not on par with what you're probably used to on PC. I average about 10FPS on ipod6g, but it's still playable. Sound works well enough, but in-game music is not supported. I've written ARM assembly routines for the inner sound loop. Make sure you turn the "brightness" all the way down, or colors will look funky. To run, extract Quake's data files to /.rockbox/quake. Have fun! Change-Id: I4285036e967d7f0722802d43cf2096c808ca5799
Diffstat (limited to 'apps/plugins/sdl/progs/quake/adivtab.h')
-rw-r--r--apps/plugins/sdl/progs/quake/adivtab.h1077
1 files changed, 1077 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/quake/adivtab.h b/apps/plugins/sdl/progs/quake/adivtab.h
new file mode 100644
index 0000000000..238df5c052
--- /dev/null
+++ b/apps/plugins/sdl/progs/quake/adivtab.h
@@ -0,0 +1,1077 @@
1/*
2Copyright (C) 1996-1997 Id Software, Inc.
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20// table of quotients and remainders for [-15...16] / [-15...16]
21
22// numerator = -15
23{1, 0},
24{1, -1},
25{1, -2},
26{1, -3},
27{1, -4},
28{1, -5},
29{1, -6},
30{1, -7},
31{2, -1},
32{2, -3},
33{3, 0},
34{3, -3},
35{5, 0},
36{7, -1},
37{15, 0},
38{0, 0},
39{-15, 0},
40{-8, 1},
41{-5, 0},
42{-4, 1},
43{-3, 0},
44{-3, 3},
45{-3, 6},
46{-2, 1},
47{-2, 3},
48{-2, 5},
49{-2, 7},
50{-2, 9},
51{-2, 11},
52{-2, 13},
53{-1, 0},
54{-1, 1},
55// numerator = -14
56{0, -14},
57{1, 0},
58{1, -1},
59{1, -2},
60{1, -3},
61{1, -4},
62{1, -5},
63{1, -6},
64{2, 0},
65{2, -2},
66{2, -4},
67{3, -2},
68{4, -2},
69{7, 0},
70{14, 0},
71{0, 0},
72{-14, 0},
73{-7, 0},
74{-5, 1},
75{-4, 2},
76{-3, 1},
77{-3, 4},
78{-2, 0},
79{-2, 2},
80{-2, 4},
81{-2, 6},
82{-2, 8},
83{-2, 10},
84{-2, 12},
85{-1, 0},
86{-1, 1},
87{-1, 2},
88// numerator = -13
89{0, -13},
90{0, -13},
91{1, 0},
92{1, -1},
93{1, -2},
94{1, -3},
95{1, -4},
96{1, -5},
97{1, -6},
98{2, -1},
99{2, -3},
100{3, -1},
101{4, -1},
102{6, -1},
103{13, 0},
104{0, 0},
105{-13, 0},
106{-7, 1},
107{-5, 2},
108{-4, 3},
109{-3, 2},
110{-3, 5},
111{-2, 1},
112{-2, 3},
113{-2, 5},
114{-2, 7},
115{-2, 9},
116{-2, 11},
117{-1, 0},
118{-1, 1},
119{-1, 2},
120{-1, 3},
121// numerator = -12
122{0, -12},
123{0, -12},
124{0, -12},
125{1, 0},
126{1, -1},
127{1, -2},
128{1, -3},
129{1, -4},
130{1, -5},
131{2, 0},
132{2, -2},
133{3, 0},
134{4, 0},
135{6, 0},
136{12, 0},
137{0, 0},
138{-12, 0},
139{-6, 0},
140{-4, 0},
141{-3, 0},
142{-3, 3},
143{-2, 0},
144{-2, 2},
145{-2, 4},
146{-2, 6},
147{-2, 8},
148{-2, 10},
149{-1, 0},
150{-1, 1},
151{-1, 2},
152{-1, 3},
153{-1, 4},
154// numerator = -11
155{0, -11},
156{0, -11},
157{0, -11},
158{0, -11},
159{1, 0},
160{1, -1},
161{1, -2},
162{1, -3},
163{1, -4},
164{1, -5},
165{2, -1},
166{2, -3},
167{3, -2},
168{5, -1},
169{11, 0},
170{0, 0},
171{-11, 0},
172{-6, 1},
173{-4, 1},
174{-3, 1},
175{-3, 4},
176{-2, 1},
177{-2, 3},
178{-2, 5},
179{-2, 7},
180{-2, 9},
181{-1, 0},
182{-1, 1},
183{-1, 2},
184{-1, 3},
185{-1, 4},
186{-1, 5},
187// numerator = -10
188{0, -10},
189{0, -10},
190{0, -10},
191{0, -10},
192{0, -10},
193{1, 0},
194{1, -1},
195{1, -2},
196{1, -3},
197{1, -4},
198{2, 0},
199{2, -2},
200{3, -1},
201{5, 0},
202{10, 0},
203{0, 0},
204{-10, 0},
205{-5, 0},
206{-4, 2},
207{-3, 2},
208{-2, 0},
209{-2, 2},
210{-2, 4},
211{-2, 6},
212{-2, 8},
213{-1, 0},
214{-1, 1},
215{-1, 2},
216{-1, 3},
217{-1, 4},
218{-1, 5},
219{-1, 6},
220// numerator = -9
221{0, -9},
222{0, -9},
223{0, -9},
224{0, -9},
225{0, -9},
226{0, -9},
227{1, 0},
228{1, -1},
229{1, -2},
230{1, -3},
231{1, -4},
232{2, -1},
233{3, 0},
234{4, -1},
235{9, 0},
236{0, 0},
237{-9, 0},
238{-5, 1},
239{-3, 0},
240{-3, 3},
241{-2, 1},
242{-2, 3},
243{-2, 5},
244{-2, 7},
245{-1, 0},
246{-1, 1},
247{-1, 2},
248{-1, 3},
249{-1, 4},
250{-1, 5},
251{-1, 6},
252{-1, 7},
253// numerator = -8
254{0, -8},
255{0, -8},
256{0, -8},
257{0, -8},
258{0, -8},
259{0, -8},
260{0, -8},
261{1, 0},
262{1, -1},
263{1, -2},
264{1, -3},
265{2, 0},
266{2, -2},
267{4, 0},
268{8, 0},
269{0, 0},
270{-8, 0},
271{-4, 0},
272{-3, 1},
273{-2, 0},
274{-2, 2},
275{-2, 4},
276{-2, 6},
277{-1, 0},
278{-1, 1},
279{-1, 2},
280{-1, 3},
281{-1, 4},
282{-1, 5},
283{-1, 6},
284{-1, 7},
285{-1, 8},
286// numerator = -7
287{0, -7},
288{0, -7},
289{0, -7},
290{0, -7},
291{0, -7},
292{0, -7},
293{0, -7},
294{0, -7},
295{1, 0},
296{1, -1},
297{1, -2},
298{1, -3},
299{2, -1},
300{3, -1},
301{7, 0},
302{0, 0},
303{-7, 0},
304{-4, 1},
305{-3, 2},
306{-2, 1},
307{-2, 3},
308{-2, 5},
309{-1, 0},
310{-1, 1},
311{-1, 2},
312{-1, 3},
313{-1, 4},
314{-1, 5},
315{-1, 6},
316{-1, 7},
317{-1, 8},
318{-1, 9},
319// numerator = -6
320{0, -6},
321{0, -6},
322{0, -6},
323{0, -6},
324{0, -6},
325{0, -6},
326{0, -6},
327{0, -6},
328{0, -6},
329{1, 0},
330{1, -1},
331{1, -2},
332{2, 0},
333{3, 0},
334{6, 0},
335{0, 0},
336{-6, 0},
337{-3, 0},
338{-2, 0},
339{-2, 2},
340{-2, 4},
341{-1, 0},
342{-1, 1},
343{-1, 2},
344{-1, 3},
345{-1, 4},
346{-1, 5},
347{-1, 6},
348{-1, 7},
349{-1, 8},
350{-1, 9},
351{-1, 10},
352// numerator = -5
353{0, -5},
354{0, -5},
355{0, -5},
356{0, -5},
357{0, -5},
358{0, -5},
359{0, -5},
360{0, -5},
361{0, -5},
362{0, -5},
363{1, 0},
364{1, -1},
365{1, -2},
366{2, -1},
367{5, 0},
368{0, 0},
369{-5, 0},
370{-3, 1},
371{-2, 1},
372{-2, 3},
373{-1, 0},
374{-1, 1},
375{-1, 2},
376{-1, 3},
377{-1, 4},
378{-1, 5},
379{-1, 6},
380{-1, 7},
381{-1, 8},
382{-1, 9},
383{-1, 10},
384{-1, 11},
385// numerator = -4
386{0, -4},
387{0, -4},
388{0, -4},
389{0, -4},
390{0, -4},
391{0, -4},
392{0, -4},
393{0, -4},
394{0, -4},
395{0, -4},
396{0, -4},
397{1, 0},
398{1, -1},
399{2, 0},
400{4, 0},
401{0, 0},
402{-4, 0},
403{-2, 0},
404{-2, 2},
405{-1, 0},
406{-1, 1},
407{-1, 2},
408{-1, 3},
409{-1, 4},
410{-1, 5},
411{-1, 6},
412{-1, 7},
413{-1, 8},
414{-1, 9},
415{-1, 10},
416{-1, 11},
417{-1, 12},
418// numerator = -3
419{0, -3},
420{0, -3},
421{0, -3},
422{0, -3},
423{0, -3},
424{0, -3},
425{0, -3},
426{0, -3},
427{0, -3},
428{0, -3},
429{0, -3},
430{0, -3},
431{1, 0},
432{1, -1},
433{3, 0},
434{0, 0},
435{-3, 0},
436{-2, 1},
437{-1, 0},
438{-1, 1},
439{-1, 2},
440{-1, 3},
441{-1, 4},
442{-1, 5},
443{-1, 6},
444{-1, 7},
445{-1, 8},
446{-1, 9},
447{-1, 10},
448{-1, 11},
449{-1, 12},
450{-1, 13},
451// numerator = -2
452{0, -2},
453{0, -2},
454{0, -2},
455{0, -2},
456{0, -2},
457{0, -2},
458{0, -2},
459{0, -2},
460{0, -2},
461{0, -2},
462{0, -2},
463{0, -2},
464{0, -2},
465{1, 0},
466{2, 0},
467{0, 0},
468{-2, 0},
469{-1, 0},
470{-1, 1},
471{-1, 2},
472{-1, 3},
473{-1, 4},
474{-1, 5},
475{-1, 6},
476{-1, 7},
477{-1, 8},
478{-1, 9},
479{-1, 10},
480{-1, 11},
481{-1, 12},
482{-1, 13},
483{-1, 14},
484// numerator = -1
485{0, -1},
486{0, -1},
487{0, -1},
488{0, -1},
489{0, -1},
490{0, -1},
491{0, -1},
492{0, -1},
493{0, -1},
494{0, -1},
495{0, -1},
496{0, -1},
497{0, -1},
498{0, -1},
499{1, 0},
500{0, 0},
501{-1, 0},
502{-1, 1},
503{-1, 2},
504{-1, 3},
505{-1, 4},
506{-1, 5},
507{-1, 6},
508{-1, 7},
509{-1, 8},
510{-1, 9},
511{-1, 10},
512{-1, 11},
513{-1, 12},
514{-1, 13},
515{-1, 14},
516{-1, 15},
517// numerator = 0
518{0, 0},
519{0, 0},
520{0, 0},
521{0, 0},
522{0, 0},
523{0, 0},
524{0, 0},
525{0, 0},
526{0, 0},
527{0, 0},
528{0, 0},
529{0, 0},
530{0, 0},
531{0, 0},
532{0, 0},
533{0, 0},
534{0, 0},
535{0, 0},
536{0, 0},
537{0, 0},
538{0, 0},
539{0, 0},
540{0, 0},
541{0, 0},
542{0, 0},
543{0, 0},
544{0, 0},
545{0, 0},
546{0, 0},
547{0, 0},
548{0, 0},
549{0, 0},
550// numerator = 1
551{-1, -14},
552{-1, -13},
553{-1, -12},
554{-1, -11},
555{-1, -10},
556{-1, -9},
557{-1, -8},
558{-1, -7},
559{-1, -6},
560{-1, -5},
561{-1, -4},
562{-1, -3},
563{-1, -2},
564{-1, -1},
565{-1, 0},
566{0, 0},
567{1, 0},
568{0, 1},
569{0, 1},
570{0, 1},
571{0, 1},
572{0, 1},
573{0, 1},
574{0, 1},
575{0, 1},
576{0, 1},
577{0, 1},
578{0, 1},
579{0, 1},
580{0, 1},
581{0, 1},
582{0, 1},
583// numerator = 2
584{-1, -13},
585{-1, -12},
586{-1, -11},
587{-1, -10},
588{-1, -9},
589{-1, -8},
590{-1, -7},
591{-1, -6},
592{-1, -5},
593{-1, -4},
594{-1, -3},
595{-1, -2},
596{-1, -1},
597{-1, 0},
598{-2, 0},
599{0, 0},
600{2, 0},
601{1, 0},
602{0, 2},
603{0, 2},
604{0, 2},
605{0, 2},
606{0, 2},
607{0, 2},
608{0, 2},
609{0, 2},
610{0, 2},
611{0, 2},
612{0, 2},
613{0, 2},
614{0, 2},
615{0, 2},
616// numerator = 3
617{-1, -12},
618{-1, -11},
619{-1, -10},
620{-1, -9},
621{-1, -8},
622{-1, -7},
623{-1, -6},
624{-1, -5},
625{-1, -4},
626{-1, -3},
627{-1, -2},
628{-1, -1},
629{-1, 0},
630{-2, -1},
631{-3, 0},
632{0, 0},
633{3, 0},
634{1, 1},
635{1, 0},
636{0, 3},
637{0, 3},
638{0, 3},
639{0, 3},
640{0, 3},
641{0, 3},
642{0, 3},
643{0, 3},
644{0, 3},
645{0, 3},
646{0, 3},
647{0, 3},
648{0, 3},
649// numerator = 4
650{-1, -11},
651{-1, -10},
652{-1, -9},
653{-1, -8},
654{-1, -7},
655{-1, -6},
656{-1, -5},
657{-1, -4},
658{-1, -3},
659{-1, -2},
660{-1, -1},
661{-1, 0},
662{-2, -2},
663{-2, 0},
664{-4, 0},
665{0, 0},
666{4, 0},
667{2, 0},
668{1, 1},
669{1, 0},
670{0, 4},
671{0, 4},
672{0, 4},
673{0, 4},
674{0, 4},
675{0, 4},
676{0, 4},
677{0, 4},
678{0, 4},
679{0, 4},
680{0, 4},
681{0, 4},
682// numerator = 5
683{-1, -10},
684{-1, -9},
685{-1, -8},
686{-1, -7},
687{-1, -6},
688{-1, -5},
689{-1, -4},
690{-1, -3},
691{-1, -2},
692{-1, -1},
693{-1, 0},
694{-2, -3},
695{-2, -1},
696{-3, -1},
697{-5, 0},
698{0, 0},
699{5, 0},
700{2, 1},
701{1, 2},
702{1, 1},
703{1, 0},
704{0, 5},
705{0, 5},
706{0, 5},
707{0, 5},
708{0, 5},
709{0, 5},
710{0, 5},
711{0, 5},
712{0, 5},
713{0, 5},
714{0, 5},
715// numerator = 6
716{-1, -9},
717{-1, -8},
718{-1, -7},
719{-1, -6},
720{-1, -5},
721{-1, -4},
722{-1, -3},
723{-1, -2},
724{-1, -1},
725{-1, 0},
726{-2, -4},
727{-2, -2},
728{-2, 0},
729{-3, 0},
730{-6, 0},
731{0, 0},
732{6, 0},
733{3, 0},
734{2, 0},
735{1, 2},
736{1, 1},
737{1, 0},
738{0, 6},
739{0, 6},
740{0, 6},
741{0, 6},
742{0, 6},
743{0, 6},
744{0, 6},
745{0, 6},
746{0, 6},
747{0, 6},
748// numerator = 7
749{-1, -8},
750{-1, -7},
751{-1, -6},
752{-1, -5},
753{-1, -4},
754{-1, -3},
755{-1, -2},
756{-1, -1},
757{-1, 0},
758{-2, -5},
759{-2, -3},
760{-2, -1},
761{-3, -2},
762{-4, -1},
763{-7, 0},
764{0, 0},
765{7, 0},
766{3, 1},
767{2, 1},
768{1, 3},
769{1, 2},
770{1, 1},
771{1, 0},
772{0, 7},
773{0, 7},
774{0, 7},
775{0, 7},
776{0, 7},
777{0, 7},
778{0, 7},
779{0, 7},
780{0, 7},
781// numerator = 8
782{-1, -7},
783{-1, -6},
784{-1, -5},
785{-1, -4},
786{-1, -3},
787{-1, -2},
788{-1, -1},
789{-1, 0},
790{-2, -6},
791{-2, -4},
792{-2, -2},
793{-2, 0},
794{-3, -1},
795{-4, 0},
796{-8, 0},
797{0, 0},
798{8, 0},
799{4, 0},
800{2, 2},
801{2, 0},
802{1, 3},
803{1, 2},
804{1, 1},
805{1, 0},
806{0, 8},
807{0, 8},
808{0, 8},
809{0, 8},
810{0, 8},
811{0, 8},
812{0, 8},
813{0, 8},
814// numerator = 9
815{-1, -6},
816{-1, -5},
817{-1, -4},
818{-1, -3},
819{-1, -2},
820{-1, -1},
821{-1, 0},
822{-2, -7},
823{-2, -5},
824{-2, -3},
825{-2, -1},
826{-3, -3},
827{-3, 0},
828{-5, -1},
829{-9, 0},
830{0, 0},
831{9, 0},
832{4, 1},
833{3, 0},
834{2, 1},
835{1, 4},
836{1, 3},
837{1, 2},
838{1, 1},
839{1, 0},
840{0, 9},
841{0, 9},
842{0, 9},
843{0, 9},
844{0, 9},
845{0, 9},
846{0, 9},
847// numerator = 10
848{-1, -5},
849{-1, -4},
850{-1, -3},
851{-1, -2},
852{-1, -1},
853{-1, 0},
854{-2, -8},
855{-2, -6},
856{-2, -4},
857{-2, -2},
858{-2, 0},
859{-3, -2},
860{-4, -2},
861{-5, 0},
862{-10, 0},
863{0, 0},
864{10, 0},
865{5, 0},
866{3, 1},
867{2, 2},
868{2, 0},
869{1, 4},
870{1, 3},
871{1, 2},
872{1, 1},
873{1, 0},
874{0, 10},
875{0, 10},
876{0, 10},
877{0, 10},
878{0, 10},
879{0, 10},
880// numerator = 11
881{-1, -4},
882{-1, -3},
883{-1, -2},
884{-1, -1},
885{-1, 0},
886{-2, -9},
887{-2, -7},
888{-2, -5},
889{-2, -3},
890{-2, -1},
891{-3, -4},
892{-3, -1},
893{-4, -1},
894{-6, -1},
895{-11, 0},
896{0, 0},
897{11, 0},
898{5, 1},
899{3, 2},
900{2, 3},
901{2, 1},
902{1, 5},
903{1, 4},
904{1, 3},
905{1, 2},
906{1, 1},
907{1, 0},
908{0, 11},
909{0, 11},
910{0, 11},
911{0, 11},
912{0, 11},
913// numerator = 12
914{-1, -3},
915{-1, -2},
916{-1, -1},
917{-1, 0},
918{-2, -10},
919{-2, -8},
920{-2, -6},
921{-2, -4},
922{-2, -2},
923{-2, 0},
924{-3, -3},
925{-3, 0},
926{-4, 0},
927{-6, 0},
928{-12, 0},
929{0, 0},
930{12, 0},
931{6, 0},
932{4, 0},
933{3, 0},
934{2, 2},
935{2, 0},
936{1, 5},
937{1, 4},
938{1, 3},
939{1, 2},
940{1, 1},
941{1, 0},
942{0, 12},
943{0, 12},
944{0, 12},
945{0, 12},
946// numerator = 13
947{-1, -2},
948{-1, -1},
949{-1, 0},
950{-2, -11},
951{-2, -9},
952{-2, -7},
953{-2, -5},
954{-2, -3},
955{-2, -1},
956{-3, -5},
957{-3, -2},
958{-4, -3},
959{-5, -2},
960{-7, -1},
961{-13, 0},
962{0, 0},
963{13, 0},
964{6, 1},
965{4, 1},
966{3, 1},
967{2, 3},
968{2, 1},
969{1, 6},
970{1, 5},
971{1, 4},
972{1, 3},
973{1, 2},
974{1, 1},
975{1, 0},
976{0, 13},
977{0, 13},
978{0, 13},
979// numerator = 14
980{-1, -1},
981{-1, 0},
982{-2, -12},
983{-2, -10},
984{-2, -8},
985{-2, -6},
986{-2, -4},
987{-2, -2},
988{-2, 0},
989{-3, -4},
990{-3, -1},
991{-4, -2},
992{-5, -1},
993{-7, 0},
994{-14, 0},
995{0, 0},
996{14, 0},
997{7, 0},
998{4, 2},
999{3, 2},
1000{2, 4},
1001{2, 2},
1002{2, 0},
1003{1, 6},
1004{1, 5},
1005{1, 4},
1006{1, 3},
1007{1, 2},
1008{1, 1},
1009{1, 0},
1010{0, 14},
1011{0, 14},
1012// numerator = 15
1013{-1, 0},
1014{-2, -13},
1015{-2, -11},
1016{-2, -9},
1017{-2, -7},
1018{-2, -5},
1019{-2, -3},
1020{-2, -1},
1021{-3, -6},
1022{-3, -3},
1023{-3, 0},
1024{-4, -1},
1025{-5, 0},
1026{-8, -1},
1027{-15, 0},
1028{0, 0},
1029{15, 0},
1030{7, 1},
1031{5, 0},
1032{3, 3},
1033{3, 0},
1034{2, 3},
1035{2, 1},
1036{1, 7},
1037{1, 6},
1038{1, 5},
1039{1, 4},
1040{1, 3},
1041{1, 2},
1042{1, 1},
1043{1, 0},
1044{0, 15},
1045// numerator = 16
1046{-2, -14},
1047{-2, -12},
1048{-2, -10},
1049{-2, -8},
1050{-2, -6},
1051{-2, -4},
1052{-2, -2},
1053{-2, 0},
1054{-3, -5},
1055{-3, -2},
1056{-4, -4},
1057{-4, 0},
1058{-6, -2},
1059{-8, 0},
1060{-16, 0},
1061{0, 0},
1062{16, 0},
1063{8, 0},
1064{5, 1},
1065{4, 0},
1066{3, 1},
1067{2, 4},
1068{2, 2},
1069{2, 0},
1070{1, 7},
1071{1, 6},
1072{1, 5},
1073{1, 4},
1074{1, 3},
1075{1, 2},
1076{1, 1},
1077{1, 0},