-
Notifications
You must be signed in to change notification settings - Fork 7
/
README.SDL
34 lines (27 loc) · 1.11 KB
/
README.SDL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
This is a quick hack of Quake ported to the Simple DirectMedia Layer library.
http://www.devolution.com/~slouken/SDL/
To build under Linux, simply run ./configure; make
This game requires the original Quake datafiles. You can get the shareware
data files from http://www.idsoftware.com/.
Of interest in the original X sources is the following:
// Duff's Device
count = width;
n = (count + 7) / 8;
dest = ((PIXEL16 *)src) + x+width - 1;
src += x+width - 1;
switch (count % 8) {
case 0: do { *dest-- = st2d_8to16table[*src--];
case 7: *dest-- = st2d_8to16table[*src--];
case 6: *dest-- = st2d_8to16table[*src--];
case 5: *dest-- = st2d_8to16table[*src--];
case 4: *dest-- = st2d_8to16table[*src--];
case 3: *dest-- = st2d_8to16table[*src--];
case 2: *dest-- = st2d_8to16table[*src--];
case 1: *dest-- = st2d_8to16table[*src--];
} while (--n > 0);
}
This idea may make it into the SDL blitters if it turns out to be faster
than my current code. :)
Thanks to Zoid, Dave Taylor, John Carmack, and everyone else involved in the
open source release of id games. :)
- Sam Lantinga ([email protected]) 12/25/1999