mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Changes from JonoF & dos2unix on all build src
git-svn-id: https://svn.eduke32.com/eduke32@99 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7c42a7b7bd
commit
e51efc7b73
25 changed files with 13034 additions and 13018 deletions
|
@ -195,7 +195,7 @@ $(OBJ)$(EDITORLIB): $(EDITOROBJS)
|
|||
$(RANLIB) $@
|
||||
|
||||
game$(EXESUFFIX): $(GAMEEXEOBJS)
|
||||
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(GAMELIBS) $(STDCPPLIB)
|
||||
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(GAMELIBS) $(LIBS) $(STDCPPLIB)
|
||||
|
||||
build$(EXESUFFIX): $(EDITOREXEOBJS)
|
||||
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS)
|
||||
|
|
|
@ -157,4 +157,3 @@ ifneq (0,$(SETSPRITEZ))
|
|||
BUILDCFLAGS+= -DSETSPRITEZ
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
@ -1,298 +1,298 @@
|
|||
// A.ASM replacement using C
|
||||
// Mainly by Ken Silverman, with things melded with my port by
|
||||
// Jonathon Fowler (jonof@edgenetwork.org)
|
||||
//
|
||||
// "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
|
||||
// Ken Silverman's official web site: "http://www.advsys.net/ken"
|
||||
// See the included license file "BUILDLIC.TXT" for license info.
|
||||
|
||||
#include "a.h"
|
||||
|
||||
#ifndef ENGINE_USING_A_C
|
||||
# error A.H has indicated that optimized code has been requested. This means a-c.c is being compiled \
|
||||
when USE_A_C has not been defined.
|
||||
#endif
|
||||
|
||||
long krecip(long num); // from engine.c
|
||||
|
||||
#define BITSOFPRECISION 3
|
||||
#define BITSOFPRECISIONPOW 8
|
||||
|
||||
extern long asm1, asm2, asm3, asm4, fpuasm, globalx3, globaly3;
|
||||
extern void *reciptable;
|
||||
|
||||
static long bpl, transmode = 0;
|
||||
static long glogx, glogy, gbxinc, gbyinc, gpinc;
|
||||
static char *gbuf, *gpal, *ghlinepal, *gtrans;
|
||||
|
||||
//Global variable functions
|
||||
void setvlinebpl(long dabpl) { bpl = dabpl; }
|
||||
void fixtransluscence(long datransoff) { gtrans = (char *)datransoff; }
|
||||
void settransnormal(void) { transmode = 0; }
|
||||
void settransreverse(void) { transmode = 1; }
|
||||
|
||||
|
||||
//Ceiling/floor horizontal line functions
|
||||
void sethlinesizes(long logx, long logy, long bufplc)
|
||||
{ glogx = logx; glogy = logy; gbuf = (char *)bufplc; }
|
||||
void setpalookupaddress(char *paladdr) { ghlinepal = paladdr; }
|
||||
void setuphlineasm4(long bxinc, long byinc) { gbxinc = bxinc; gbyinc = byinc; }
|
||||
void hlineasm4(long cnt, long skiploadincs, long paloffs, unsigned long by, unsigned long bx, long p)
|
||||
{
|
||||
char *palptr;
|
||||
|
||||
palptr = (char *)&ghlinepal[paloffs];
|
||||
if (!skiploadincs) { gbxinc = asm1; gbyinc = asm2; }
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
*((char *)p) = palptr[gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))]];
|
||||
bx -= gbxinc;
|
||||
by -= gbyinc;
|
||||
p--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Sloped ceiling/floor vertical line functions
|
||||
void setupslopevlin(long logylogx, long bufplc, long pinc)
|
||||
{
|
||||
glogx = (logylogx&255); glogy = (logylogx>>8);
|
||||
gbuf = (char *)bufplc; gpinc = pinc;
|
||||
}
|
||||
void slopevlin(long p, long i, long slopaloffs, long cnt, long bx, long by)
|
||||
{
|
||||
long *slopalptr, bz, bzinc;
|
||||
unsigned long u, v;
|
||||
|
||||
bz = asm3; bzinc = (asm1>>3);
|
||||
slopalptr = (long *)slopaloffs;
|
||||
for(;cnt>0;cnt--)
|
||||
{
|
||||
i = krecip(bz>>6); bz += bzinc;
|
||||
u = bx+globalx3*i;
|
||||
v = by+globaly3*i;
|
||||
(*(char *)p) = *(char *)(slopalptr[0]+gbuf[((u>>(32-glogx))<<glogy)+(v>>(32-glogy))]);
|
||||
slopalptr--;
|
||||
p += gpinc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Wall,face sprite/wall sprite vertical line functions
|
||||
void setupvlineasm(long neglogy) { glogy = neglogy; }
|
||||
void vlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p)
|
||||
{
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)paloffs;
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
*((char *)p) = gpal[gbuf[vplc>>glogy]];
|
||||
p += bpl;
|
||||
vplc += vinc;
|
||||
}
|
||||
}
|
||||
|
||||
void setupmvlineasm(long neglogy) { glogy = neglogy; }
|
||||
void mvlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)paloffs;
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
ch = gbuf[vplc>>glogy]; if (ch != 255) *((char *)p) = gpal[ch];
|
||||
p += bpl;
|
||||
vplc += vinc;
|
||||
}
|
||||
}
|
||||
|
||||
void setuptvlineasm(long neglogy) { glogy = neglogy; }
|
||||
void tvlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)paloffs;
|
||||
if (transmode)
|
||||
{
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
ch = gbuf[vplc>>glogy];
|
||||
if (ch != 255) *((char *)p) = gtrans[(*((char *)p))+(gpal[ch]<<8)];
|
||||
p += bpl;
|
||||
vplc += vinc;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
ch = gbuf[vplc>>glogy];
|
||||
if (ch != 255) *((char *)p) = gtrans[((*((char *)p))<<8)+gpal[ch]];
|
||||
p += bpl;
|
||||
vplc += vinc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Floor sprite horizontal line functions
|
||||
void msethlineshift(long logx, long logy) { glogx = logx; glogy = logy; }
|
||||
void mhline(long bufplc, unsigned long bx, long cntup16, long junk, unsigned long by, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)asm3;
|
||||
for(cntup16>>=16;cntup16>0;cntup16--)
|
||||
{
|
||||
ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
|
||||
if (ch != 255) *((char *)p) = gpal[ch];
|
||||
bx += asm1;
|
||||
by += asm2;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
void tsethlineshift(long logx, long logy) { glogx = logx; glogy = logy; }
|
||||
void thline(long bufplc, unsigned long bx, long cntup16, long junk, unsigned long by, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)asm3;
|
||||
if (transmode)
|
||||
{
|
||||
for(cntup16>>=16;cntup16>0;cntup16--)
|
||||
{
|
||||
ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
|
||||
if (ch != 255) *((char *)p) = gtrans[(*((char *)p))+(gpal[ch]<<8)];
|
||||
bx += asm1;
|
||||
by += asm2;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(cntup16>>=16;cntup16>0;cntup16--)
|
||||
{
|
||||
ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
|
||||
if (ch != 255) *((char *)p) = gtrans[((*((char *)p))<<8)+gpal[ch]];
|
||||
bx += asm1;
|
||||
by += asm2;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Rotatesprite vertical line functions
|
||||
void setupspritevline(long paloffs, long bxinc, long byinc, long ysiz)
|
||||
{
|
||||
gpal = (char *)paloffs;
|
||||
gbxinc = bxinc;
|
||||
gbyinc = byinc;
|
||||
glogy = ysiz;
|
||||
}
|
||||
void spritevline(long bx, long by, long cnt, long bufplc, long p)
|
||||
{
|
||||
gbuf = (char *)bufplc;
|
||||
for(;cnt>1;cnt--)
|
||||
{
|
||||
(*(char *)p) = gpal[gbuf[(bx>>16)*glogy+(by>>16)]];
|
||||
bx += gbxinc;
|
||||
by += gbyinc;
|
||||
p += bpl;
|
||||
}
|
||||
}
|
||||
|
||||
//Rotatesprite vertical line functions
|
||||
void msetupspritevline(long paloffs, long bxinc, long byinc, long ysiz)
|
||||
{
|
||||
gpal = (char *)paloffs;
|
||||
gbxinc = bxinc;
|
||||
gbyinc = byinc;
|
||||
glogy = ysiz;
|
||||
}
|
||||
void mspritevline(long bx, long by, long cnt, long bufplc, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
for(;cnt>1;cnt--)
|
||||
{
|
||||
ch = gbuf[(bx>>16)*glogy+(by>>16)];
|
||||
if (ch != 255) (*(char *)p) = gpal[ch];
|
||||
bx += gbxinc;
|
||||
by += gbyinc;
|
||||
p += bpl;
|
||||
}
|
||||
}
|
||||
|
||||
void tsetupspritevline(long paloffs, long bxinc, long byinc, long ysiz)
|
||||
{
|
||||
gpal = (char *)paloffs;
|
||||
gbxinc = bxinc;
|
||||
gbyinc = byinc;
|
||||
glogy = ysiz;
|
||||
}
|
||||
void tspritevline(long bx, long by, long cnt, long bufplc, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
if (transmode)
|
||||
{
|
||||
for(;cnt>1;cnt--)
|
||||
{
|
||||
ch = gbuf[(bx>>16)*glogy+(by>>16)];
|
||||
if (ch != 255) *((char *)p) = gtrans[(*((char *)p))+(gpal[ch]<<8)];
|
||||
bx += gbxinc;
|
||||
by += gbyinc;
|
||||
p += bpl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(;cnt>1;cnt--)
|
||||
{
|
||||
ch = gbuf[(bx>>16)*glogy+(by>>16)];
|
||||
if (ch != 255) *((char *)p) = gtrans[((*((char *)p))<<8)+gpal[ch]];
|
||||
bx += gbxinc;
|
||||
by += gbyinc;
|
||||
p += bpl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setupdrawslab (long dabpl, long pal)
|
||||
{ bpl = dabpl; gpal = (char *)pal; }
|
||||
|
||||
void drawslab (long dx, long v, long dy, long vi, long vptr, long p)
|
||||
{
|
||||
long x;
|
||||
|
||||
while (dy > 0)
|
||||
{
|
||||
for(x=0;x<dx;x++) *(char *)(p+x) = gpal[(long)(*(char *)((v>>16)+vptr))];
|
||||
p += bpl; v += vi; dy--;
|
||||
}
|
||||
}
|
||||
|
||||
void stretchhline (long p0, long u, long cnt, long uinc, long rptr, long p)
|
||||
{
|
||||
p0 = p-(cnt<<2);
|
||||
do
|
||||
{
|
||||
p--;
|
||||
*(char *)p = *(char *)((u>>16)+rptr); u -= uinc;
|
||||
} while (p > p0);
|
||||
}
|
||||
|
||||
|
||||
void mmxoverlay() { }
|
||||
|
||||
/*
|
||||
* vim:ts=4:
|
||||
*/
|
||||
|
||||
// A.ASM replacement using C
|
||||
// Mainly by Ken Silverman, with things melded with my port by
|
||||
// Jonathon Fowler (jonof@edgenetwork.org)
|
||||
//
|
||||
// "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
|
||||
// Ken Silverman's official web site: "http://www.advsys.net/ken"
|
||||
// See the included license file "BUILDLIC.TXT" for license info.
|
||||
|
||||
#include "a.h"
|
||||
|
||||
#ifndef ENGINE_USING_A_C
|
||||
# error A.H has indicated that optimized code has been requested. This means a-c.c is being compiled \
|
||||
when USE_A_C has not been defined.
|
||||
#endif
|
||||
|
||||
long krecip(long num); // from engine.c
|
||||
|
||||
#define BITSOFPRECISION 3
|
||||
#define BITSOFPRECISIONPOW 8
|
||||
|
||||
extern long asm1, asm2, asm3, asm4, fpuasm, globalx3, globaly3;
|
||||
extern void *reciptable;
|
||||
|
||||
static long bpl, transmode = 0;
|
||||
static long glogx, glogy, gbxinc, gbyinc, gpinc;
|
||||
static char *gbuf, *gpal, *ghlinepal, *gtrans;
|
||||
|
||||
//Global variable functions
|
||||
void setvlinebpl(long dabpl) { bpl = dabpl; }
|
||||
void fixtransluscence(long datransoff) { gtrans = (char *)datransoff; }
|
||||
void settransnormal(void) { transmode = 0; }
|
||||
void settransreverse(void) { transmode = 1; }
|
||||
|
||||
|
||||
//Ceiling/floor horizontal line functions
|
||||
void sethlinesizes(long logx, long logy, long bufplc)
|
||||
{ glogx = logx; glogy = logy; gbuf = (char *)bufplc; }
|
||||
void setpalookupaddress(char *paladdr) { ghlinepal = paladdr; }
|
||||
void setuphlineasm4(long bxinc, long byinc) { gbxinc = bxinc; gbyinc = byinc; }
|
||||
void hlineasm4(long cnt, long skiploadincs, long paloffs, unsigned long by, unsigned long bx, long p)
|
||||
{
|
||||
char *palptr;
|
||||
|
||||
palptr = (char *)&ghlinepal[paloffs];
|
||||
if (!skiploadincs) { gbxinc = asm1; gbyinc = asm2; }
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
*((char *)p) = palptr[gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))]];
|
||||
bx -= gbxinc;
|
||||
by -= gbyinc;
|
||||
p--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Sloped ceiling/floor vertical line functions
|
||||
void setupslopevlin(long logylogx, long bufplc, long pinc)
|
||||
{
|
||||
glogx = (logylogx&255); glogy = (logylogx>>8);
|
||||
gbuf = (char *)bufplc; gpinc = pinc;
|
||||
}
|
||||
void slopevlin(long p, long i, long slopaloffs, long cnt, long bx, long by)
|
||||
{
|
||||
long *slopalptr, bz, bzinc;
|
||||
unsigned long u, v;
|
||||
|
||||
bz = asm3; bzinc = (asm1>>3);
|
||||
slopalptr = (long *)slopaloffs;
|
||||
for(;cnt>0;cnt--)
|
||||
{
|
||||
i = krecip(bz>>6); bz += bzinc;
|
||||
u = bx+globalx3*i;
|
||||
v = by+globaly3*i;
|
||||
(*(char *)p) = *(char *)(slopalptr[0]+gbuf[((u>>(32-glogx))<<glogy)+(v>>(32-glogy))]);
|
||||
slopalptr--;
|
||||
p += gpinc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Wall,face sprite/wall sprite vertical line functions
|
||||
void setupvlineasm(long neglogy) { glogy = neglogy; }
|
||||
void vlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p)
|
||||
{
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)paloffs;
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
*((char *)p) = gpal[gbuf[vplc>>glogy]];
|
||||
p += bpl;
|
||||
vplc += vinc;
|
||||
}
|
||||
}
|
||||
|
||||
void setupmvlineasm(long neglogy) { glogy = neglogy; }
|
||||
void mvlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)paloffs;
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
ch = gbuf[vplc>>glogy]; if (ch != 255) *((char *)p) = gpal[ch];
|
||||
p += bpl;
|
||||
vplc += vinc;
|
||||
}
|
||||
}
|
||||
|
||||
void setuptvlineasm(long neglogy) { glogy = neglogy; }
|
||||
void tvlineasm1(long vinc, long paloffs, long cnt, unsigned long vplc, long bufplc, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)paloffs;
|
||||
if (transmode)
|
||||
{
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
ch = gbuf[vplc>>glogy];
|
||||
if (ch != 255) *((char *)p) = gtrans[(*((char *)p))+(gpal[ch]<<8)];
|
||||
p += bpl;
|
||||
vplc += vinc;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(;cnt>=0;cnt--)
|
||||
{
|
||||
ch = gbuf[vplc>>glogy];
|
||||
if (ch != 255) *((char *)p) = gtrans[((*((char *)p))<<8)+gpal[ch]];
|
||||
p += bpl;
|
||||
vplc += vinc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Floor sprite horizontal line functions
|
||||
void msethlineshift(long logx, long logy) { glogx = logx; glogy = logy; }
|
||||
void mhline(long bufplc, unsigned long bx, long cntup16, long junk, unsigned long by, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)asm3;
|
||||
for(cntup16>>=16;cntup16>0;cntup16--)
|
||||
{
|
||||
ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
|
||||
if (ch != 255) *((char *)p) = gpal[ch];
|
||||
bx += asm1;
|
||||
by += asm2;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
void tsethlineshift(long logx, long logy) { glogx = logx; glogy = logy; }
|
||||
void thline(long bufplc, unsigned long bx, long cntup16, long junk, unsigned long by, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
gpal = (char *)asm3;
|
||||
if (transmode)
|
||||
{
|
||||
for(cntup16>>=16;cntup16>0;cntup16--)
|
||||
{
|
||||
ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
|
||||
if (ch != 255) *((char *)p) = gtrans[(*((char *)p))+(gpal[ch]<<8)];
|
||||
bx += asm1;
|
||||
by += asm2;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(cntup16>>=16;cntup16>0;cntup16--)
|
||||
{
|
||||
ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
|
||||
if (ch != 255) *((char *)p) = gtrans[((*((char *)p))<<8)+gpal[ch]];
|
||||
bx += asm1;
|
||||
by += asm2;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Rotatesprite vertical line functions
|
||||
void setupspritevline(long paloffs, long bxinc, long byinc, long ysiz)
|
||||
{
|
||||
gpal = (char *)paloffs;
|
||||
gbxinc = bxinc;
|
||||
gbyinc = byinc;
|
||||
glogy = ysiz;
|
||||
}
|
||||
void spritevline(long bx, long by, long cnt, long bufplc, long p)
|
||||
{
|
||||
gbuf = (char *)bufplc;
|
||||
for(;cnt>1;cnt--)
|
||||
{
|
||||
(*(char *)p) = gpal[gbuf[(bx>>16)*glogy+(by>>16)]];
|
||||
bx += gbxinc;
|
||||
by += gbyinc;
|
||||
p += bpl;
|
||||
}
|
||||
}
|
||||
|
||||
//Rotatesprite vertical line functions
|
||||
void msetupspritevline(long paloffs, long bxinc, long byinc, long ysiz)
|
||||
{
|
||||
gpal = (char *)paloffs;
|
||||
gbxinc = bxinc;
|
||||
gbyinc = byinc;
|
||||
glogy = ysiz;
|
||||
}
|
||||
void mspritevline(long bx, long by, long cnt, long bufplc, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
for(;cnt>1;cnt--)
|
||||
{
|
||||
ch = gbuf[(bx>>16)*glogy+(by>>16)];
|
||||
if (ch != 255) (*(char *)p) = gpal[ch];
|
||||
bx += gbxinc;
|
||||
by += gbyinc;
|
||||
p += bpl;
|
||||
}
|
||||
}
|
||||
|
||||
void tsetupspritevline(long paloffs, long bxinc, long byinc, long ysiz)
|
||||
{
|
||||
gpal = (char *)paloffs;
|
||||
gbxinc = bxinc;
|
||||
gbyinc = byinc;
|
||||
glogy = ysiz;
|
||||
}
|
||||
void tspritevline(long bx, long by, long cnt, long bufplc, long p)
|
||||
{
|
||||
char ch;
|
||||
|
||||
gbuf = (char *)bufplc;
|
||||
if (transmode)
|
||||
{
|
||||
for(;cnt>1;cnt--)
|
||||
{
|
||||
ch = gbuf[(bx>>16)*glogy+(by>>16)];
|
||||
if (ch != 255) *((char *)p) = gtrans[(*((char *)p))+(gpal[ch]<<8)];
|
||||
bx += gbxinc;
|
||||
by += gbyinc;
|
||||
p += bpl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(;cnt>1;cnt--)
|
||||
{
|
||||
ch = gbuf[(bx>>16)*glogy+(by>>16)];
|
||||
if (ch != 255) *((char *)p) = gtrans[((*((char *)p))<<8)+gpal[ch]];
|
||||
bx += gbxinc;
|
||||
by += gbyinc;
|
||||
p += bpl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setupdrawslab (long dabpl, long pal)
|
||||
{ bpl = dabpl; gpal = (char *)pal; }
|
||||
|
||||
void drawslab (long dx, long v, long dy, long vi, long vptr, long p)
|
||||
{
|
||||
long x;
|
||||
|
||||
while (dy > 0)
|
||||
{
|
||||
for(x=0;x<dx;x++) *(char *)(p+x) = gpal[(long)(*(char *)((v>>16)+vptr))];
|
||||
p += bpl; v += vi; dy--;
|
||||
}
|
||||
}
|
||||
|
||||
void stretchhline (long p0, long u, long cnt, long uinc, long rptr, long p)
|
||||
{
|
||||
p0 = p-(cnt<<2);
|
||||
do
|
||||
{
|
||||
p--;
|
||||
*(char *)p = *(char *)((u>>16)+rptr); u -= uinc;
|
||||
} while (p > p0);
|
||||
}
|
||||
|
||||
|
||||
void mmxoverlay() { }
|
||||
|
||||
/*
|
||||
* vim:ts=4:
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,206 +1,206 @@
|
|||
#include "compat.h"
|
||||
#include "osd.h"
|
||||
#include "build.h"
|
||||
#include "engineinfo.h"
|
||||
#include "baselayer.h"
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
#include "winlayer.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
struct glinfo glinfo = {
|
||||
"Unknown", // vendor
|
||||
"Unknown", // renderer
|
||||
"0.0.0", // version
|
||||
"", // extensions
|
||||
|
||||
1.0, // max anisotropy
|
||||
0, // brga texture format
|
||||
0, // clamp-to-edge support
|
||||
0, // texture compression
|
||||
0, // non-power-of-two textures
|
||||
0, // multisampling
|
||||
0, // nvidia multisampling hint
|
||||
};
|
||||
#endif
|
||||
|
||||
static int osdfunc_dumpbuildinfo(const osdfuncparm_t *parm)
|
||||
{
|
||||
OSD_Printf(
|
||||
"Build engine compilation:\n"
|
||||
" CFLAGS: %s\n"
|
||||
" LIBS: %s\n"
|
||||
" Host: %s\n"
|
||||
" Compiler: %s\n"
|
||||
" Built: %s\n",
|
||||
_engine_cflags,
|
||||
_engine_libs,
|
||||
_engine_uname,
|
||||
_engine_compiler,
|
||||
_engine_date);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static void onvideomodechange(int newmode) { }
|
||||
void (*baselayer_onvideomodechange)(int) = onvideomodechange;
|
||||
|
||||
static int osdfunc_setrendermode(const osdfuncparm_t *parm)
|
||||
{
|
||||
int m;
|
||||
char *p;
|
||||
|
||||
char *modestrs[] = {
|
||||
"classic software", "polygonal flat-shaded software",
|
||||
"polygonal textured software", "polygonal OpenGL"
|
||||
};
|
||||
|
||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
m = Bstrtol(parm->parms[0], &p, 10);
|
||||
|
||||
if (m < 0 || m > 3) return OSDCMD_SHOWHELP;
|
||||
|
||||
setrendermode(m);
|
||||
OSD_Printf("Rendering method changed to %s\n", modestrs[ getrendermode() ] );
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
#ifdef DEBUGGINGAIDS
|
||||
static int osdcmd_hicsetpalettetint(const osdfuncparm_t *parm)
|
||||
{
|
||||
long pal, cols[3], eff;
|
||||
char *p;
|
||||
|
||||
if (parm->numparms != 5) return OSDCMD_SHOWHELP;
|
||||
|
||||
pal = Batol(parm->parms[0]);
|
||||
cols[0] = Batol(parm->parms[1]);
|
||||
cols[1] = Batol(parm->parms[2]);
|
||||
cols[2] = Batol(parm->parms[3]);
|
||||
eff = Batol(parm->parms[4]);
|
||||
|
||||
hicsetpalettetint(pal,cols[0],cols[1],cols[2],eff);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int osdcmd_glinfo(const osdfuncparm_t *parm)
|
||||
{
|
||||
char *s,*t,*u,i;
|
||||
|
||||
if (bpp == 8) {
|
||||
OSD_Printf("glinfo: Not in OpenGL mode.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
OSD_Printf("OpenGL Information:\n"
|
||||
" Version: %s\n"
|
||||
" Vendor: %s\n"
|
||||
" Renderer: %s\n"
|
||||
" Maximum anisotropy: %.1f%s\n"
|
||||
" BGRA textures: %s\n"
|
||||
" Non-x^2 textures: %s\n"
|
||||
" Texure compression: %s\n"
|
||||
" Clamp-to-edge: %s\n"
|
||||
" Multisampling: %s\n"
|
||||
" Nvidia multisample hint: %s\n"
|
||||
" Extensions:\n",
|
||||
glinfo.version,
|
||||
glinfo.vendor,
|
||||
glinfo.renderer,
|
||||
glinfo.maxanisotropy, glinfo.maxanisotropy>1.0?"":" (no anisotropic filtering)",
|
||||
glinfo.bgra ? "supported": "not supported",
|
||||
glinfo.texnpot ? "supported": "not supported",
|
||||
glinfo.texcompr ? "supported": "not supported",
|
||||
glinfo.clamptoedge ? "supported": "not supported",
|
||||
glinfo.multisample ? "supported": "not supported",
|
||||
glinfo.nvmultisamplehint ? "supported": "not supported"
|
||||
);
|
||||
|
||||
s = Bstrdup(glinfo.extensions);
|
||||
if (!s) OSD_Printf(glinfo.extensions);
|
||||
else {
|
||||
i = 0; t = u = s;
|
||||
while (*t) {
|
||||
if (*t == ' ') {
|
||||
if (i&1) {
|
||||
*t = 0;
|
||||
OSD_Printf(" %s\n",u);
|
||||
u = t+1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
t++;
|
||||
}
|
||||
if (i&1) OSD_Printf(" %s\n",u);
|
||||
Bfree(s);
|
||||
}
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int osdcmd_vars(const osdfuncparm_t *parm)
|
||||
{
|
||||
int showval = (parm->numparms < 1);
|
||||
|
||||
if (!Bstrcasecmp(parm->name, "screencaptureformat")) {
|
||||
const char *fmts[2][2] = { {"TGA", "PCX"}, {"0", "1"} };
|
||||
if (showval) { OSD_Printf("captureformat is %s\n", fmts[captureformat]); }
|
||||
else {
|
||||
int i,j;
|
||||
for (j=0; j<2; j++)
|
||||
for (i=0; i<2; i++)
|
||||
if (!Bstrcasecmp(parm->parms[0], fmts[j][i])) break;
|
||||
if (j == 2) return OSDCMD_SHOWHELP;
|
||||
captureformat = i;
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#ifdef SUPERBUILD
|
||||
else if (!Bstrcasecmp(parm->name, "novoxmips")) {
|
||||
if (showval) { OSD_Printf("novoxmips is %d\n", novoxmips); }
|
||||
else { novoxmips = (atoi(parm->parms[0]) != 0); }
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "usevoxels")) {
|
||||
if (showval) { OSD_Printf("usevoxels is %d\n", usevoxels); }
|
||||
else { usevoxels = (atoi(parm->parms[0]) != 0); }
|
||||
}
|
||||
#endif
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
int baselayer_init(void)
|
||||
{
|
||||
#ifdef POLYMOST
|
||||
OSD_RegisterFunction("setrendermode","setrendermode <number>: sets the engine's rendering mode.\n"
|
||||
"Mode numbers are:\n"
|
||||
" 0 - Classic Build software\n"
|
||||
" 1 - Polygonal flat-shaded software\n"
|
||||
" 2 - Polygonal textured software\n"
|
||||
#ifdef USE_OPENGL
|
||||
" 3 - Polygonal OpenGL\n"
|
||||
#endif
|
||||
,
|
||||
osdfunc_setrendermode);
|
||||
#endif
|
||||
OSD_RegisterFunction("dumpbuildinfo","dumpbuildinfo: outputs engine compilation information",osdfunc_dumpbuildinfo);
|
||||
OSD_RegisterFunction("screencaptureformat","screencaptureformat: sets the output format for screenshots (TGA or PCX)",osdcmd_vars);
|
||||
#ifdef SUPERBUILD
|
||||
OSD_RegisterFunction("novoxmips","novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",osdcmd_vars);
|
||||
OSD_RegisterFunction("usevoxels","usevoxels: enable/disable automatic sprite->voxel rendering",osdcmd_vars);
|
||||
#endif
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
#ifdef DEBUGGINGAIDS
|
||||
OSD_RegisterFunction("hicsetpalettetint","hicsetpalettetint: sets palette tinting values",osdcmd_hicsetpalettetint);
|
||||
#endif
|
||||
OSD_RegisterFunction("glinfo","glinfo: shows OpenGL information about the current OpenGL mode",osdcmd_glinfo);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include "compat.h"
|
||||
#include "osd.h"
|
||||
#include "build.h"
|
||||
#include "engineinfo.h"
|
||||
#include "baselayer.h"
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
#include "winlayer.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
struct glinfo glinfo = {
|
||||
"Unknown", // vendor
|
||||
"Unknown", // renderer
|
||||
"0.0.0", // version
|
||||
"", // extensions
|
||||
|
||||
1.0, // max anisotropy
|
||||
0, // brga texture format
|
||||
0, // clamp-to-edge support
|
||||
0, // texture compression
|
||||
0, // non-power-of-two textures
|
||||
0, // multisampling
|
||||
0, // nvidia multisampling hint
|
||||
};
|
||||
#endif
|
||||
|
||||
static int osdfunc_dumpbuildinfo(const osdfuncparm_t *parm)
|
||||
{
|
||||
OSD_Printf(
|
||||
"Build engine compilation:\n"
|
||||
" CFLAGS: %s\n"
|
||||
" LIBS: %s\n"
|
||||
" Host: %s\n"
|
||||
" Compiler: %s\n"
|
||||
" Built: %s\n",
|
||||
_engine_cflags,
|
||||
_engine_libs,
|
||||
_engine_uname,
|
||||
_engine_compiler,
|
||||
_engine_date);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static void onvideomodechange(int newmode) { }
|
||||
void (*baselayer_onvideomodechange)(int) = onvideomodechange;
|
||||
|
||||
static int osdfunc_setrendermode(const osdfuncparm_t *parm)
|
||||
{
|
||||
int m;
|
||||
char *p;
|
||||
|
||||
char *modestrs[] = {
|
||||
"classic software", "polygonal flat-shaded software",
|
||||
"polygonal textured software", "polygonal OpenGL"
|
||||
};
|
||||
|
||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
m = Bstrtol(parm->parms[0], &p, 10);
|
||||
|
||||
if (m < 0 || m > 3) return OSDCMD_SHOWHELP;
|
||||
|
||||
setrendermode(m);
|
||||
OSD_Printf("Rendering method changed to %s\n", modestrs[ getrendermode() ] );
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
#ifdef DEBUGGINGAIDS
|
||||
static int osdcmd_hicsetpalettetint(const osdfuncparm_t *parm)
|
||||
{
|
||||
long pal, cols[3], eff;
|
||||
char *p;
|
||||
|
||||
if (parm->numparms != 5) return OSDCMD_SHOWHELP;
|
||||
|
||||
pal = Batol(parm->parms[0]);
|
||||
cols[0] = Batol(parm->parms[1]);
|
||||
cols[1] = Batol(parm->parms[2]);
|
||||
cols[2] = Batol(parm->parms[3]);
|
||||
eff = Batol(parm->parms[4]);
|
||||
|
||||
hicsetpalettetint(pal,cols[0],cols[1],cols[2],eff);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int osdcmd_glinfo(const osdfuncparm_t *parm)
|
||||
{
|
||||
char *s,*t,*u,i;
|
||||
|
||||
if (bpp == 8) {
|
||||
OSD_Printf("glinfo: Not in OpenGL mode.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
OSD_Printf("OpenGL Information:\n"
|
||||
" Version: %s\n"
|
||||
" Vendor: %s\n"
|
||||
" Renderer: %s\n"
|
||||
" Maximum anisotropy: %.1f%s\n"
|
||||
" BGRA textures: %s\n"
|
||||
" Non-x^2 textures: %s\n"
|
||||
" Texure compression: %s\n"
|
||||
" Clamp-to-edge: %s\n"
|
||||
" Multisampling: %s\n"
|
||||
" Nvidia multisample hint: %s\n"
|
||||
" Extensions:\n",
|
||||
glinfo.version,
|
||||
glinfo.vendor,
|
||||
glinfo.renderer,
|
||||
glinfo.maxanisotropy, glinfo.maxanisotropy>1.0?"":" (no anisotropic filtering)",
|
||||
glinfo.bgra ? "supported": "not supported",
|
||||
glinfo.texnpot ? "supported": "not supported",
|
||||
glinfo.texcompr ? "supported": "not supported",
|
||||
glinfo.clamptoedge ? "supported": "not supported",
|
||||
glinfo.multisample ? "supported": "not supported",
|
||||
glinfo.nvmultisamplehint ? "supported": "not supported"
|
||||
);
|
||||
|
||||
s = Bstrdup(glinfo.extensions);
|
||||
if (!s) OSD_Printf(glinfo.extensions);
|
||||
else {
|
||||
i = 0; t = u = s;
|
||||
while (*t) {
|
||||
if (*t == ' ') {
|
||||
if (i&1) {
|
||||
*t = 0;
|
||||
OSD_Printf(" %s\n",u);
|
||||
u = t+1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
t++;
|
||||
}
|
||||
if (i&1) OSD_Printf(" %s\n",u);
|
||||
Bfree(s);
|
||||
}
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int osdcmd_vars(const osdfuncparm_t *parm)
|
||||
{
|
||||
int showval = (parm->numparms < 1);
|
||||
|
||||
if (!Bstrcasecmp(parm->name, "screencaptureformat")) {
|
||||
const char *fmts[2][2] = { {"TGA", "PCX"}, {"0", "1"} };
|
||||
if (showval) { OSD_Printf("captureformat is %s\n", fmts[captureformat]); }
|
||||
else {
|
||||
int i,j;
|
||||
for (j=0; j<2; j++)
|
||||
for (i=0; i<2; i++)
|
||||
if (!Bstrcasecmp(parm->parms[0], fmts[j][i])) break;
|
||||
if (j == 2) return OSDCMD_SHOWHELP;
|
||||
captureformat = i;
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#ifdef SUPERBUILD
|
||||
else if (!Bstrcasecmp(parm->name, "novoxmips")) {
|
||||
if (showval) { OSD_Printf("novoxmips is %d\n", novoxmips); }
|
||||
else { novoxmips = (atoi(parm->parms[0]) != 0); }
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "usevoxels")) {
|
||||
if (showval) { OSD_Printf("usevoxels is %d\n", usevoxels); }
|
||||
else { usevoxels = (atoi(parm->parms[0]) != 0); }
|
||||
}
|
||||
#endif
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
int baselayer_init(void)
|
||||
{
|
||||
#ifdef POLYMOST
|
||||
OSD_RegisterFunction("setrendermode","setrendermode <number>: sets the engine's rendering mode.\n"
|
||||
"Mode numbers are:\n"
|
||||
" 0 - Classic Build software\n"
|
||||
" 1 - Polygonal flat-shaded software\n"
|
||||
" 2 - Polygonal textured software\n"
|
||||
#ifdef USE_OPENGL
|
||||
" 3 - Polygonal OpenGL\n"
|
||||
#endif
|
||||
,
|
||||
osdfunc_setrendermode);
|
||||
#endif
|
||||
OSD_RegisterFunction("dumpbuildinfo","dumpbuildinfo: outputs engine compilation information",osdfunc_dumpbuildinfo);
|
||||
OSD_RegisterFunction("screencaptureformat","screencaptureformat: sets the output format for screenshots (TGA or PCX)",osdcmd_vars);
|
||||
#ifdef SUPERBUILD
|
||||
OSD_RegisterFunction("novoxmips","novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",osdcmd_vars);
|
||||
OSD_RegisterFunction("usevoxels","usevoxels: enable/disable automatic sprite->voxel rendering",osdcmd_vars);
|
||||
#endif
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
#ifdef DEBUGGINGAIDS
|
||||
OSD_RegisterFunction("hicsetpalettetint","hicsetpalettetint: sets palette tinting values",osdcmd_hicsetpalettetint);
|
||||
#endif
|
||||
OSD_RegisterFunction("glinfo","glinfo: shows OpenGL information about the current OpenGL mode",osdcmd_glinfo);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,307 +1,307 @@
|
|||
// Evil and Nasty Configuration File Reader for KenBuild
|
||||
// by Jonathon Fowler
|
||||
|
||||
#include "compat.h"
|
||||
#include "build.h"
|
||||
#include "editor.h"
|
||||
#include "osd.h"
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
#include "winlayer.h"
|
||||
#endif
|
||||
#include "baselayer.h"
|
||||
|
||||
static long vesares[13][2] = {{320,200},{360,200},{320,240},{360,240},{320,400},
|
||||
{360,400},{640,350},{640,400},{640,480},{800,600},
|
||||
{1024,768},{1280,1024},{1600,1200}};
|
||||
|
||||
static int readconfig(BFILE *fp, const char *key, char *value, unsigned len)
|
||||
{
|
||||
char buf[1000], *k, *v, *eq;
|
||||
int x=0;
|
||||
|
||||
if (len < 1) return 0;
|
||||
|
||||
Brewind(fp);
|
||||
|
||||
while (1) {
|
||||
if (!Bfgets(buf, 1000, fp)) return 0;
|
||||
|
||||
if (buf[0] == ';') continue;
|
||||
|
||||
eq = Bstrchr(buf, '=');
|
||||
if (!eq) continue;
|
||||
|
||||
k = buf;
|
||||
v = eq+1;
|
||||
|
||||
while (*k == ' ' || *k == '\t') k++;
|
||||
*(eq--) = 0;
|
||||
while ((*eq == ' ' || *eq == '\t') && eq>=k) *(eq--) = 0;
|
||||
|
||||
if (Bstrcasecmp(k, key)) continue;
|
||||
|
||||
while (*v == ' ' || *k == '\t') v++;
|
||||
eq = v + Bstrlen(v)-1;
|
||||
|
||||
while ((*eq == ' ' || *eq == '\t' || *eq == '\r' || *eq == '\n') && eq>=v) *(eq--) = 0;
|
||||
|
||||
value[--len] = 0;
|
||||
do value[x] = v[x]; while (v[x++] != 0 && len-- > 0);
|
||||
|
||||
return x-1;
|
||||
}
|
||||
}
|
||||
|
||||
extern short brightness;
|
||||
extern long fullscreen;
|
||||
extern char option[8];
|
||||
extern char keys[NUMBUILDKEYS];
|
||||
extern double msens;
|
||||
|
||||
/*
|
||||
* SETUP.DAT
|
||||
* 0 = video mode (0:chained 1:vesa 2:screen buffered 3/4/5:tseng/paradise/s3 6:red-blue)
|
||||
* 1 = sound (0:none)
|
||||
* 2 = music (0:none)
|
||||
* 3 = input (0:keyboard 1:+mouse)
|
||||
* 4 = multiplayer (0:single 1-4:com 5-11:ipx)
|
||||
* 5&0xf0 = com speed
|
||||
* 5&0x0f = com irq
|
||||
* 6&0xf0 = chained y-res
|
||||
* 6&0x0f = chained x-res or vesa mode
|
||||
* 7&0xf0 = sound samplerate
|
||||
* 7&0x01 = sound quality
|
||||
* 7&0x02 = 8/16 bit
|
||||
* 7&0x04 = mono/stereo
|
||||
*
|
||||
* bytes 8 to 26 are key settings:
|
||||
* 0 = Forward (0xc8)
|
||||
* 1 = Backward (0xd0)
|
||||
* 2 = Turn left (0xcb)
|
||||
* 3 = Turn right (0xcd)
|
||||
* 4 = Run (0x2a)
|
||||
* 5 = Strafe (0x9d)
|
||||
* 6 = Fire (0x1d)
|
||||
* 7 = Use (0x39)
|
||||
* 8 = Stand high (0x1e)
|
||||
* 9 = Stand low (0x2c)
|
||||
* 10 = Look up (0xd1)
|
||||
* 11 = Look down (0xc9)
|
||||
* 12 = Strafe left (0x33)
|
||||
* 13 = Strafe right (0x34)
|
||||
* 14 = 2D/3D switch (0x9c)
|
||||
* 15 = View cycle (0x1c)
|
||||
* 16 = 2D Zoom in (0xd)
|
||||
* 17 = 2D Zoom out (0xc)
|
||||
* 18 = Chat (0xf)
|
||||
*/
|
||||
|
||||
int loadsetup(const char *fn)
|
||||
{
|
||||
BFILE *fp;
|
||||
#define VL 32
|
||||
char val[VL];
|
||||
int i;
|
||||
|
||||
if ((fp = Bfopen(fn, "rt")) == NULL) return -1;
|
||||
|
||||
if (readconfig(fp, "fullscreen", val, VL) > 0) { if (Batoi(val) != 0) fullscreen = 1; else fullscreen = 0; }
|
||||
if (readconfig(fp, "resolution", val, VL) > 0) {
|
||||
i = Batoi(val) & 0x0f;
|
||||
if ((unsigned)i<13) { xdimgame = xdim2d = vesares[i][0]; ydimgame = ydim2d = vesares[i][1]; }
|
||||
}
|
||||
if (readconfig(fp, "2dresolution", val, VL) > 0) {
|
||||
i = Batoi(val) & 0x0f;
|
||||
if ((unsigned)i<13) { xdim2d = vesares[i][0]; ydim2d = vesares[i][1]; }
|
||||
}
|
||||
if (readconfig(fp, "xdim2d", val, VL) > 0) xdim2d = Batoi(val);
|
||||
if (readconfig(fp, "ydim2d", val, VL) > 0) ydim2d = Batoi(val);
|
||||
if (readconfig(fp, "xdim3d", val, VL) > 0) xdimgame = Batoi(val);
|
||||
if (readconfig(fp, "ydim3d", val, VL) > 0) ydimgame = Batoi(val);
|
||||
if (readconfig(fp, "samplerate", val, VL) > 0) option[7] = (Batoi(val) & 0x0f) << 4;
|
||||
if (readconfig(fp, "music", val, VL) > 0) { if (Batoi(val) != 0) option[2] = 1; else option[2] = 0; }
|
||||
if (readconfig(fp, "mouse", val, VL) > 0) { if (Batoi(val) != 0) option[3] = 1; else option[3] = 0; }
|
||||
if (readconfig(fp, "bpp", val, VL) > 0) bppgame = Batoi(val);
|
||||
if (readconfig(fp, "renderer", val, VL) > 0) { i = Batoi(val); setrendermode(i); }
|
||||
if (readconfig(fp, "brightness", val, VL) > 0) brightness = min(max(Batoi(val),0),15);
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (readconfig(fp, "maxrefreshfreq", val, VL) > 0) maxrefreshfreq = Batoi(val);
|
||||
#endif
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
if (readconfig(fp, "glusetexcache", val, VL) > 0) {
|
||||
if (Batoi(val) != 0) glusetexcache = 1;
|
||||
else glusetexcache = 0;
|
||||
}
|
||||
if (readconfig(fp, "glusetexcachecompression", val, VL) > 0) {
|
||||
if (Batoi(val) != 0) glusetexcachecompression = 1;
|
||||
else glusetexcachecompression = 0;
|
||||
}
|
||||
if(glusetexcache == -1 && glusetexcachecompression == -1)
|
||||
{
|
||||
i=wm_ynbox("Texture caching",
|
||||
"Would you like to enable the on-disk texture cache? "
|
||||
"This feature may use up to 200 megabytes of disk "
|
||||
"space if you have a great deal of high resolution "
|
||||
"textures and skins, but textures will load exponentially "
|
||||
"faster after the first time they are loaded.");
|
||||
if (i) i = 'y';
|
||||
if(i == 'y' || i == 'Y' )
|
||||
glusetexcompr = glusetexcache = glusetexcachecompression = 1;
|
||||
else glusetexcache = glusetexcachecompression = 0;
|
||||
}
|
||||
|
||||
option[0] = 1; // vesa all the way...
|
||||
option[1] = 1; // sound all the way...
|
||||
option[4] = 0; // no multiplayer
|
||||
option[5] = 0;
|
||||
|
||||
if (readconfig(fp, "keyforward", val, VL) > 0) keys[0] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keybackward", val, VL) > 0) keys[1] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyturnleft", val, VL) > 0) keys[2] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyturnright", val, VL) > 0) keys[3] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyrun", val, VL) > 0) keys[4] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystrafe", val, VL) > 0) keys[5] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyfire", val, VL) > 0) keys[6] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyuse", val, VL) > 0) keys[7] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystandhigh", val, VL) > 0) keys[8] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystandlow", val, VL) > 0) keys[9] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keylookup", val, VL) > 0) keys[10] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keylookdown", val, VL) > 0) keys[11] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystrafeleft", val, VL) > 0) keys[12] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystraferight", val, VL) > 0) keys[13] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "key2dmode", val, VL) > 0) keys[14] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyviewcycle", val, VL) > 0) keys[15] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "key2dzoomin", val, VL) > 0) keys[16] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "key2dzoomout", val, VL) > 0) keys[17] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keychat", val, VL) > 0) keys[18] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyconsole", val, VL) > 0) { keys[19] = Bstrtol(val, NULL, 16); OSD_CaptureKey(keys[19]); }
|
||||
|
||||
if (readconfig(fp, "mousesensitivity", val, VL) > 0) msens = Bstrtod(val, NULL);
|
||||
|
||||
Bfclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int writesetup(const char *fn)
|
||||
{
|
||||
BFILE *fp;
|
||||
|
||||
fp = Bfopen(fn,"wt");
|
||||
if (!fp) return -1;
|
||||
|
||||
Bfprintf(fp,
|
||||
"; Video mode selection\n"
|
||||
"; 0 - Windowed\n"
|
||||
"; 1 - Fullscreen\n"
|
||||
"fullscreen = %ld\n"
|
||||
"\n"
|
||||
"; Video resolution\n"
|
||||
"xdim2d = %ld\n"
|
||||
"ydim2d = %ld\n"
|
||||
"xdim3d = %ld\n"
|
||||
"ydim3d = %ld\n"
|
||||
"\n"
|
||||
"; 3D-mode colour depth\n"
|
||||
"bpp = %ld\n"
|
||||
"\n"
|
||||
"; OpenGL mode options\n"
|
||||
"glusetexcache = %ld\n"
|
||||
"glusetexcachecompression = %ld\n"
|
||||
"\n"
|
||||
#ifdef RENDERTYPEWIN
|
||||
"; Maximum OpenGL mode refresh rate (Windows only, in Hertz)\n"
|
||||
"maxrefreshfreq = %d\n"
|
||||
"\n"
|
||||
#endif
|
||||
"; 3D mode brightness setting\n"
|
||||
"; 0 - lowest\n"
|
||||
"; 15 - highest\n"
|
||||
"brightness = %d\n"
|
||||
"\n"
|
||||
"; Sound sample frequency\n"
|
||||
"; 0 - 6 KHz\n"
|
||||
"; 1 - 8 KHz\n"
|
||||
"; 2 - 11.025 KHz\n"
|
||||
"; 3 - 16 KHz\n"
|
||||
"; 4 - 22.05 KHz\n"
|
||||
"; 5 - 32 KHz\n"
|
||||
"; 6 - 44.1 KHz\n"
|
||||
"samplerate = %d\n"
|
||||
"\n"
|
||||
"; Music playback\n"
|
||||
"; 0 - Off\n"
|
||||
"; 1 - On\n"
|
||||
"music = %d\n"
|
||||
"\n"
|
||||
"; Enable mouse\n"
|
||||
"; 0 - No\n"
|
||||
"; 1 - Yes\n"
|
||||
"mouse = %d\n"
|
||||
"\n"
|
||||
"; Mouse sensitivity\n"
|
||||
"mousesensitivity = %g\n"
|
||||
"\n"
|
||||
"; Key Settings\n"
|
||||
"; Here's a map of all the keyboard scan codes: NOTE: values are listed in hex!\n"
|
||||
"; +---------------------------------------------------------------------------------------------+\n"
|
||||
"; | 01 3B 3C 3D 3E 3F 40 41 42 43 44 57 58 46 |\n"
|
||||
"; |ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 SCROLL |\n"
|
||||
"; | |\n"
|
||||
"; |29 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E D2 C7 C9 45 B5 37 4A |\n"
|
||||
"; | ` '1' '2' '3' '4' '5' '6' '7' '8' '9' '0' - = BACK INS HOME PGUP NUMLK KP/ KP* KP- |\n"
|
||||
"; | |\n"
|
||||
"; | 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 2B D3 CF D1 47 48 49 4E |\n"
|
||||
"; |TAB Q W E R T Y U I O P [ ] \\ DEL END PGDN KP7 KP8 KP9 KP+ |\n"
|
||||
"; | |\n"
|
||||
"; | 3A 1E 1F 20 21 22 23 24 25 26 27 28 1C 4B 4C 4D |\n"
|
||||
"; |CAPS A S D F G H J K L ; ' ENTER KP4 KP5 KP6 9C |\n"
|
||||
"; | KPENTER|\n"
|
||||
"; | 2A 2C 2D 2E 2F 30 31 32 33 34 35 36 C8 4F 50 51 |\n"
|
||||
"; |LSHIFT Z X C V B N M , . / RSHIFT UP KP1 KP2 KP3 |\n"
|
||||
"; | |\n"
|
||||
"; | 1D 38 39 B8 9D CB D0 CD 52 53 |\n"
|
||||
"; |LCTRL LALT SPACE RALT RCTRL LEFT DOWN RIGHT KP0 KP. |\n"
|
||||
"; +---------------------------------------------------------------------------------------------+\n"
|
||||
"\n"
|
||||
"keyforward = %X\n"
|
||||
"keybackward = %X\n"
|
||||
"keyturnleft = %X\n"
|
||||
"keyturnright = %X\n"
|
||||
"keyrun = %X\n"
|
||||
"keystrafe = %X\n"
|
||||
"keyfire = %X\n"
|
||||
"keyuse = %X\n"
|
||||
"keystandhigh = %X\n"
|
||||
"keystandlow = %X\n"
|
||||
"keylookup = %X\n"
|
||||
"keylookdown = %X\n"
|
||||
"keystrafeleft = %X\n"
|
||||
"keystraferight = %X\n"
|
||||
"key2dmode = %X\n"
|
||||
"keyviewcycle = %X\n"
|
||||
"key2dzoomin = %X\n"
|
||||
"key2dzoomout = %X\n"
|
||||
"keychat = %X\n"
|
||||
"keyconsole = %X\n"
|
||||
"\n",
|
||||
|
||||
fullscreen, xdim2d, ydim2d, xdimgame, ydimgame, bppgame,
|
||||
glusetexcache, glusetexcachecompression,
|
||||
#ifdef RENDERTYPEWIN
|
||||
maxrefreshfreq,
|
||||
#endif
|
||||
brightness, option[7]>>4, option[2],
|
||||
option[3], msens,
|
||||
keys[0], keys[1], keys[2], keys[3], keys[4], keys[5],
|
||||
keys[6], keys[7], keys[8], keys[9], keys[10], keys[11],
|
||||
keys[12], keys[13], keys[14], keys[15], keys[16], keys[17],
|
||||
keys[18], keys[19]
|
||||
);
|
||||
|
||||
Bfclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
// Evil and Nasty Configuration File Reader for KenBuild
|
||||
// by Jonathon Fowler
|
||||
|
||||
#include "compat.h"
|
||||
#include "build.h"
|
||||
#include "editor.h"
|
||||
#include "osd.h"
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
#include "winlayer.h"
|
||||
#endif
|
||||
#include "baselayer.h"
|
||||
|
||||
static long vesares[13][2] = {{320,200},{360,200},{320,240},{360,240},{320,400},
|
||||
{360,400},{640,350},{640,400},{640,480},{800,600},
|
||||
{1024,768},{1280,1024},{1600,1200}};
|
||||
|
||||
static int readconfig(BFILE *fp, const char *key, char *value, unsigned len)
|
||||
{
|
||||
char buf[1000], *k, *v, *eq;
|
||||
int x=0;
|
||||
|
||||
if (len < 1) return 0;
|
||||
|
||||
Brewind(fp);
|
||||
|
||||
while (1) {
|
||||
if (!Bfgets(buf, 1000, fp)) return 0;
|
||||
|
||||
if (buf[0] == ';') continue;
|
||||
|
||||
eq = Bstrchr(buf, '=');
|
||||
if (!eq) continue;
|
||||
|
||||
k = buf;
|
||||
v = eq+1;
|
||||
|
||||
while (*k == ' ' || *k == '\t') k++;
|
||||
*(eq--) = 0;
|
||||
while ((*eq == ' ' || *eq == '\t') && eq>=k) *(eq--) = 0;
|
||||
|
||||
if (Bstrcasecmp(k, key)) continue;
|
||||
|
||||
while (*v == ' ' || *k == '\t') v++;
|
||||
eq = v + Bstrlen(v)-1;
|
||||
|
||||
while ((*eq == ' ' || *eq == '\t' || *eq == '\r' || *eq == '\n') && eq>=v) *(eq--) = 0;
|
||||
|
||||
value[--len] = 0;
|
||||
do value[x] = v[x]; while (v[x++] != 0 && len-- > 0);
|
||||
|
||||
return x-1;
|
||||
}
|
||||
}
|
||||
|
||||
extern short brightness;
|
||||
extern long fullscreen;
|
||||
extern char option[8];
|
||||
extern char keys[NUMBUILDKEYS];
|
||||
extern double msens;
|
||||
|
||||
/*
|
||||
* SETUP.DAT
|
||||
* 0 = video mode (0:chained 1:vesa 2:screen buffered 3/4/5:tseng/paradise/s3 6:red-blue)
|
||||
* 1 = sound (0:none)
|
||||
* 2 = music (0:none)
|
||||
* 3 = input (0:keyboard 1:+mouse)
|
||||
* 4 = multiplayer (0:single 1-4:com 5-11:ipx)
|
||||
* 5&0xf0 = com speed
|
||||
* 5&0x0f = com irq
|
||||
* 6&0xf0 = chained y-res
|
||||
* 6&0x0f = chained x-res or vesa mode
|
||||
* 7&0xf0 = sound samplerate
|
||||
* 7&0x01 = sound quality
|
||||
* 7&0x02 = 8/16 bit
|
||||
* 7&0x04 = mono/stereo
|
||||
*
|
||||
* bytes 8 to 26 are key settings:
|
||||
* 0 = Forward (0xc8)
|
||||
* 1 = Backward (0xd0)
|
||||
* 2 = Turn left (0xcb)
|
||||
* 3 = Turn right (0xcd)
|
||||
* 4 = Run (0x2a)
|
||||
* 5 = Strafe (0x9d)
|
||||
* 6 = Fire (0x1d)
|
||||
* 7 = Use (0x39)
|
||||
* 8 = Stand high (0x1e)
|
||||
* 9 = Stand low (0x2c)
|
||||
* 10 = Look up (0xd1)
|
||||
* 11 = Look down (0xc9)
|
||||
* 12 = Strafe left (0x33)
|
||||
* 13 = Strafe right (0x34)
|
||||
* 14 = 2D/3D switch (0x9c)
|
||||
* 15 = View cycle (0x1c)
|
||||
* 16 = 2D Zoom in (0xd)
|
||||
* 17 = 2D Zoom out (0xc)
|
||||
* 18 = Chat (0xf)
|
||||
*/
|
||||
|
||||
int loadsetup(const char *fn)
|
||||
{
|
||||
BFILE *fp;
|
||||
#define VL 32
|
||||
char val[VL];
|
||||
int i;
|
||||
|
||||
if ((fp = Bfopen(fn, "rt")) == NULL) return -1;
|
||||
|
||||
if (readconfig(fp, "fullscreen", val, VL) > 0) { if (Batoi(val) != 0) fullscreen = 1; else fullscreen = 0; }
|
||||
if (readconfig(fp, "resolution", val, VL) > 0) {
|
||||
i = Batoi(val) & 0x0f;
|
||||
if ((unsigned)i<13) { xdimgame = xdim2d = vesares[i][0]; ydimgame = ydim2d = vesares[i][1]; }
|
||||
}
|
||||
if (readconfig(fp, "2dresolution", val, VL) > 0) {
|
||||
i = Batoi(val) & 0x0f;
|
||||
if ((unsigned)i<13) { xdim2d = vesares[i][0]; ydim2d = vesares[i][1]; }
|
||||
}
|
||||
if (readconfig(fp, "xdim2d", val, VL) > 0) xdim2d = Batoi(val);
|
||||
if (readconfig(fp, "ydim2d", val, VL) > 0) ydim2d = Batoi(val);
|
||||
if (readconfig(fp, "xdim3d", val, VL) > 0) xdimgame = Batoi(val);
|
||||
if (readconfig(fp, "ydim3d", val, VL) > 0) ydimgame = Batoi(val);
|
||||
if (readconfig(fp, "samplerate", val, VL) > 0) option[7] = (Batoi(val) & 0x0f) << 4;
|
||||
if (readconfig(fp, "music", val, VL) > 0) { if (Batoi(val) != 0) option[2] = 1; else option[2] = 0; }
|
||||
if (readconfig(fp, "mouse", val, VL) > 0) { if (Batoi(val) != 0) option[3] = 1; else option[3] = 0; }
|
||||
if (readconfig(fp, "bpp", val, VL) > 0) bppgame = Batoi(val);
|
||||
if (readconfig(fp, "renderer", val, VL) > 0) { i = Batoi(val); setrendermode(i); }
|
||||
if (readconfig(fp, "brightness", val, VL) > 0) brightness = min(max(Batoi(val),0),15);
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (readconfig(fp, "maxrefreshfreq", val, VL) > 0) maxrefreshfreq = Batoi(val);
|
||||
#endif
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
if (readconfig(fp, "glusetexcache", val, VL) > 0) {
|
||||
if (Batoi(val) != 0) glusetexcache = 1;
|
||||
else glusetexcache = 0;
|
||||
}
|
||||
if (readconfig(fp, "glusetexcachecompression", val, VL) > 0) {
|
||||
if (Batoi(val) != 0) glusetexcachecompression = 1;
|
||||
else glusetexcachecompression = 0;
|
||||
}
|
||||
if(glusetexcache == -1 && glusetexcachecompression == -1)
|
||||
{
|
||||
i=wm_ynbox("Texture caching",
|
||||
"Would you like to enable the on-disk texture cache? "
|
||||
"This feature may use up to 200 megabytes of disk "
|
||||
"space if you have a great deal of high resolution "
|
||||
"textures and skins, but textures will load exponentially "
|
||||
"faster after the first time they are loaded.");
|
||||
if (i) i = 'y';
|
||||
if(i == 'y' || i == 'Y' )
|
||||
glusetexcompr = glusetexcache = glusetexcachecompression = 1;
|
||||
else glusetexcache = glusetexcachecompression = 0;
|
||||
}
|
||||
|
||||
option[0] = 1; // vesa all the way...
|
||||
option[1] = 1; // sound all the way...
|
||||
option[4] = 0; // no multiplayer
|
||||
option[5] = 0;
|
||||
|
||||
if (readconfig(fp, "keyforward", val, VL) > 0) keys[0] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keybackward", val, VL) > 0) keys[1] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyturnleft", val, VL) > 0) keys[2] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyturnright", val, VL) > 0) keys[3] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyrun", val, VL) > 0) keys[4] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystrafe", val, VL) > 0) keys[5] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyfire", val, VL) > 0) keys[6] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyuse", val, VL) > 0) keys[7] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystandhigh", val, VL) > 0) keys[8] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystandlow", val, VL) > 0) keys[9] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keylookup", val, VL) > 0) keys[10] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keylookdown", val, VL) > 0) keys[11] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystrafeleft", val, VL) > 0) keys[12] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keystraferight", val, VL) > 0) keys[13] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "key2dmode", val, VL) > 0) keys[14] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyviewcycle", val, VL) > 0) keys[15] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "key2dzoomin", val, VL) > 0) keys[16] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "key2dzoomout", val, VL) > 0) keys[17] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keychat", val, VL) > 0) keys[18] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyconsole", val, VL) > 0) { keys[19] = Bstrtol(val, NULL, 16); OSD_CaptureKey(keys[19]); }
|
||||
|
||||
if (readconfig(fp, "mousesensitivity", val, VL) > 0) msens = Bstrtod(val, NULL);
|
||||
|
||||
Bfclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int writesetup(const char *fn)
|
||||
{
|
||||
BFILE *fp;
|
||||
|
||||
fp = Bfopen(fn,"wt");
|
||||
if (!fp) return -1;
|
||||
|
||||
Bfprintf(fp,
|
||||
"; Video mode selection\n"
|
||||
"; 0 - Windowed\n"
|
||||
"; 1 - Fullscreen\n"
|
||||
"fullscreen = %ld\n"
|
||||
"\n"
|
||||
"; Video resolution\n"
|
||||
"xdim2d = %ld\n"
|
||||
"ydim2d = %ld\n"
|
||||
"xdim3d = %ld\n"
|
||||
"ydim3d = %ld\n"
|
||||
"\n"
|
||||
"; 3D-mode colour depth\n"
|
||||
"bpp = %ld\n"
|
||||
"\n"
|
||||
"; OpenGL mode options\n"
|
||||
"glusetexcache = %ld\n"
|
||||
"glusetexcachecompression = %ld\n"
|
||||
"\n"
|
||||
#ifdef RENDERTYPEWIN
|
||||
"; Maximum OpenGL mode refresh rate (Windows only, in Hertz)\n"
|
||||
"maxrefreshfreq = %d\n"
|
||||
"\n"
|
||||
#endif
|
||||
"; 3D mode brightness setting\n"
|
||||
"; 0 - lowest\n"
|
||||
"; 15 - highest\n"
|
||||
"brightness = %d\n"
|
||||
"\n"
|
||||
"; Sound sample frequency\n"
|
||||
"; 0 - 6 KHz\n"
|
||||
"; 1 - 8 KHz\n"
|
||||
"; 2 - 11.025 KHz\n"
|
||||
"; 3 - 16 KHz\n"
|
||||
"; 4 - 22.05 KHz\n"
|
||||
"; 5 - 32 KHz\n"
|
||||
"; 6 - 44.1 KHz\n"
|
||||
"samplerate = %d\n"
|
||||
"\n"
|
||||
"; Music playback\n"
|
||||
"; 0 - Off\n"
|
||||
"; 1 - On\n"
|
||||
"music = %d\n"
|
||||
"\n"
|
||||
"; Enable mouse\n"
|
||||
"; 0 - No\n"
|
||||
"; 1 - Yes\n"
|
||||
"mouse = %d\n"
|
||||
"\n"
|
||||
"; Mouse sensitivity\n"
|
||||
"mousesensitivity = %g\n"
|
||||
"\n"
|
||||
"; Key Settings\n"
|
||||
"; Here's a map of all the keyboard scan codes: NOTE: values are listed in hex!\n"
|
||||
"; +---------------------------------------------------------------------------------------------+\n"
|
||||
"; | 01 3B 3C 3D 3E 3F 40 41 42 43 44 57 58 46 |\n"
|
||||
"; |ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 SCROLL |\n"
|
||||
"; | |\n"
|
||||
"; |29 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E D2 C7 C9 45 B5 37 4A |\n"
|
||||
"; | ` '1' '2' '3' '4' '5' '6' '7' '8' '9' '0' - = BACK INS HOME PGUP NUMLK KP/ KP* KP- |\n"
|
||||
"; | |\n"
|
||||
"; | 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 2B D3 CF D1 47 48 49 4E |\n"
|
||||
"; |TAB Q W E R T Y U I O P [ ] \\ DEL END PGDN KP7 KP8 KP9 KP+ |\n"
|
||||
"; | |\n"
|
||||
"; | 3A 1E 1F 20 21 22 23 24 25 26 27 28 1C 4B 4C 4D |\n"
|
||||
"; |CAPS A S D F G H J K L ; ' ENTER KP4 KP5 KP6 9C |\n"
|
||||
"; | KPENTER|\n"
|
||||
"; | 2A 2C 2D 2E 2F 30 31 32 33 34 35 36 C8 4F 50 51 |\n"
|
||||
"; |LSHIFT Z X C V B N M , . / RSHIFT UP KP1 KP2 KP3 |\n"
|
||||
"; | |\n"
|
||||
"; | 1D 38 39 B8 9D CB D0 CD 52 53 |\n"
|
||||
"; |LCTRL LALT SPACE RALT RCTRL LEFT DOWN RIGHT KP0 KP. |\n"
|
||||
"; +---------------------------------------------------------------------------------------------+\n"
|
||||
"\n"
|
||||
"keyforward = %X\n"
|
||||
"keybackward = %X\n"
|
||||
"keyturnleft = %X\n"
|
||||
"keyturnright = %X\n"
|
||||
"keyrun = %X\n"
|
||||
"keystrafe = %X\n"
|
||||
"keyfire = %X\n"
|
||||
"keyuse = %X\n"
|
||||
"keystandhigh = %X\n"
|
||||
"keystandlow = %X\n"
|
||||
"keylookup = %X\n"
|
||||
"keylookdown = %X\n"
|
||||
"keystrafeleft = %X\n"
|
||||
"keystraferight = %X\n"
|
||||
"key2dmode = %X\n"
|
||||
"keyviewcycle = %X\n"
|
||||
"key2dzoomin = %X\n"
|
||||
"key2dzoomout = %X\n"
|
||||
"keychat = %X\n"
|
||||
"keyconsole = %X\n"
|
||||
"\n",
|
||||
|
||||
fullscreen, xdim2d, ydim2d, xdimgame, ydimgame, bppgame,
|
||||
glusetexcache, glusetexcachecompression,
|
||||
#ifdef RENDERTYPEWIN
|
||||
maxrefreshfreq,
|
||||
#endif
|
||||
brightness, option[7]>>4, option[2],
|
||||
option[3], msens,
|
||||
keys[0], keys[1], keys[2], keys[3], keys[4], keys[5],
|
||||
keys[6], keys[7], keys[8], keys[9], keys[10], keys[11],
|
||||
keys[12], keys[13], keys[14], keys[15], keys[16], keys[17],
|
||||
keys[18], keys[19]
|
||||
);
|
||||
|
||||
Bfclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,104 +1,104 @@
|
|||
#include "crc32.h"
|
||||
|
||||
/*
|
||||
// this table of numbers is borrowed from the InfoZip source.
|
||||
static unsigned long crc32table[256] = {
|
||||
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
|
||||
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
|
||||
0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
|
||||
0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
|
||||
0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
|
||||
0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
|
||||
0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
|
||||
0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
|
||||
0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
|
||||
0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
|
||||
0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
|
||||
0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
|
||||
0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
|
||||
0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
|
||||
0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
|
||||
0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
|
||||
0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
|
||||
0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
|
||||
0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
|
||||
0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
|
||||
0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
|
||||
0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
|
||||
0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
|
||||
0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
|
||||
0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
|
||||
0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
|
||||
0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
|
||||
0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
|
||||
0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
|
||||
0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
|
||||
0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
|
||||
0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
|
||||
0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
|
||||
0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
|
||||
0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
|
||||
0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
|
||||
0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
|
||||
0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
|
||||
0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
|
||||
0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
|
||||
0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
|
||||
0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
|
||||
0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
|
||||
0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
|
||||
0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
|
||||
0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
|
||||
0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
|
||||
0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
|
||||
0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
|
||||
0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
|
||||
0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
|
||||
0x2d02ef8dL
|
||||
};
|
||||
*/
|
||||
|
||||
static unsigned long crc32table[256];
|
||||
|
||||
void initcrc32table(void)
|
||||
{
|
||||
unsigned long i,j,k;
|
||||
|
||||
// algorithm and polynomial same as that used by infozip's zip
|
||||
for (i=0; i<256; i++) {
|
||||
j = i;
|
||||
for (k=8; k; k--)
|
||||
j = (j&1) ? (0xedb88320L ^ (j>>1)) : (j>>1);
|
||||
crc32table[i] = j;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsigned long crc32once(unsigned char *blk, unsigned long len)
|
||||
{
|
||||
unsigned long crc;
|
||||
|
||||
crc32init(&crc);
|
||||
crc32block(&crc, blk, len);
|
||||
return crc32finish(&crc);
|
||||
}
|
||||
|
||||
void crc32init(unsigned long *crcvar)
|
||||
{
|
||||
if (!crcvar) return;
|
||||
*crcvar = 0xffffffffl;
|
||||
}
|
||||
|
||||
void crc32block(unsigned long *crcvar, unsigned char *blk, unsigned long len)
|
||||
{
|
||||
unsigned long crc = *crcvar;
|
||||
while (len--) crc = crc32table[(crc ^ *(blk++)) & 0xffl] ^ (crc >> 8);
|
||||
*crcvar = crc;
|
||||
}
|
||||
|
||||
unsigned long crc32finish(unsigned long *crcvar)
|
||||
{
|
||||
*crcvar = *crcvar ^ 0xffffffffl;
|
||||
return *crcvar;
|
||||
}
|
||||
|
||||
#include "crc32.h"
|
||||
|
||||
/*
|
||||
// this table of numbers is borrowed from the InfoZip source.
|
||||
static unsigned long crc32table[256] = {
|
||||
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
|
||||
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
|
||||
0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
|
||||
0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
|
||||
0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
|
||||
0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
|
||||
0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
|
||||
0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
|
||||
0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
|
||||
0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
|
||||
0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
|
||||
0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
|
||||
0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
|
||||
0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
|
||||
0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
|
||||
0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
|
||||
0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
|
||||
0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
|
||||
0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
|
||||
0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
|
||||
0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
|
||||
0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
|
||||
0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
|
||||
0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
|
||||
0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
|
||||
0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
|
||||
0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
|
||||
0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
|
||||
0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
|
||||
0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
|
||||
0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
|
||||
0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
|
||||
0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
|
||||
0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
|
||||
0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
|
||||
0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
|
||||
0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
|
||||
0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
|
||||
0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
|
||||
0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
|
||||
0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
|
||||
0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
|
||||
0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
|
||||
0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
|
||||
0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
|
||||
0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
|
||||
0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
|
||||
0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
|
||||
0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
|
||||
0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
|
||||
0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
|
||||
0x2d02ef8dL
|
||||
};
|
||||
*/
|
||||
|
||||
static unsigned long crc32table[256];
|
||||
|
||||
void initcrc32table(void)
|
||||
{
|
||||
unsigned long i,j,k;
|
||||
|
||||
// algorithm and polynomial same as that used by infozip's zip
|
||||
for (i=0; i<256; i++) {
|
||||
j = i;
|
||||
for (k=8; k; k--)
|
||||
j = (j&1) ? (0xedb88320L ^ (j>>1)) : (j>>1);
|
||||
crc32table[i] = j;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsigned long crc32once(unsigned char *blk, unsigned long len)
|
||||
{
|
||||
unsigned long crc;
|
||||
|
||||
crc32init(&crc);
|
||||
crc32block(&crc, blk, len);
|
||||
return crc32finish(&crc);
|
||||
}
|
||||
|
||||
void crc32init(unsigned long *crcvar)
|
||||
{
|
||||
if (!crcvar) return;
|
||||
*crcvar = 0xffffffffl;
|
||||
}
|
||||
|
||||
void crc32block(unsigned long *crcvar, unsigned char *blk, unsigned long len)
|
||||
{
|
||||
unsigned long crc = *crcvar;
|
||||
while (len--) crc = crc32table[(crc ^ *(blk++)) & 0xffl] ^ (crc >> 8);
|
||||
*crcvar = crc;
|
||||
}
|
||||
|
||||
unsigned long crc32finish(unsigned long *crcvar)
|
||||
{
|
||||
*crcvar = *crcvar ^ 0xffffffffl;
|
||||
return *crcvar;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -698,7 +698,7 @@ int hicclearsubst(long picnum, long palnum) { return 0; }
|
|||
long polymost_drawtilescreen (long tilex, long tiley, long wallnum, long dimen) { return -1; }
|
||||
#endif
|
||||
//============================================================================= //POLYMOST ENDS
|
||||
|
||||
|
||||
#include "polymer.c"
|
||||
|
||||
//
|
||||
|
@ -5662,11 +5662,11 @@ void drawrooms(long daposx, long daposy, long daposz,
|
|||
} while (i != 0);
|
||||
umost[0] = shortptr1[0]-windowy1;
|
||||
dmost[0] = shortptr2[0]-windowy1;
|
||||
|
||||
if (0)
|
||||
{
|
||||
polymer_drawrooms();
|
||||
return;
|
||||
|
||||
if (0)
|
||||
{
|
||||
polymer_drawrooms();
|
||||
return;
|
||||
}
|
||||
//============================================================================= //POLYMOST BEGINS
|
||||
#ifdef POLYMOST
|
||||
|
@ -7356,7 +7356,11 @@ long loadpics(char *filename, long askedsize)
|
|||
|
||||
//try dpmi_DETERMINEMAXREALALLOC!
|
||||
|
||||
cachesize = min((long)((Bgetsysmemsize()/100)*60),max(artsize,askedsize));
|
||||
//cachesize = min((long)((Bgetsysmemsize()/100)*60),max(artsize,askedsize));
|
||||
if (Bgetsysmemsize() <= (unsigned long)askedsize)
|
||||
cachesize = (Bgetsysmemsize()/100)*60;
|
||||
else
|
||||
cachesize = askedsize;
|
||||
while ((pic = kkmalloc(cachesize)) == NULL)
|
||||
{
|
||||
cachesize -= 65536L;
|
||||
|
|
12594
polymer/build/src/game.c
12594
polymer/build/src/game.c
File diff suppressed because it is too large
Load diff
|
@ -1,359 +1,359 @@
|
|||
#include "glbuild.h"
|
||||
#include "baselayer.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined DYNAMIC_OPENGL && defined USE_OPENGL
|
||||
|
||||
#ifdef RENDERTYPESDL
|
||||
#include "SDL.h"
|
||||
#endif
|
||||
|
||||
void (APIENTRY * bglClearColor)( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
|
||||
void (APIENTRY * bglClear)( GLbitfield mask );
|
||||
void (APIENTRY * bglColorMask)( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
|
||||
void (APIENTRY * bglAlphaFunc)( GLenum func, GLclampf ref );
|
||||
void (APIENTRY * bglBlendFunc)( GLenum sfactor, GLenum dfactor );
|
||||
void (APIENTRY * bglCullFace)( GLenum mode );
|
||||
void (APIENTRY * bglFrontFace)( GLenum mode );
|
||||
void (APIENTRY * bglPolygonOffset)( GLfloat factor, GLfloat units );
|
||||
void (APIENTRY * bglPolygonMode)( GLenum face, GLenum mode );
|
||||
void (APIENTRY * bglEnable)( GLenum cap );
|
||||
void (APIENTRY * bglDisable)( GLenum cap );
|
||||
void (APIENTRY * bglGetFloatv)( GLenum pname, GLfloat *params );
|
||||
void (APIENTRY * bglGetIntegerv)( GLenum pname, GLint *params );
|
||||
void (APIENTRY * bglPushAttrib)( GLbitfield mask );
|
||||
void (APIENTRY * bglPopAttrib)( void );
|
||||
GLenum (APIENTRY * bglGetError)( void );
|
||||
const GLubyte* (APIENTRY * bglGetString)( GLenum name );
|
||||
void (APIENTRY * bglHint)( GLenum target, GLenum mode );
|
||||
|
||||
// Depth
|
||||
void (APIENTRY * bglDepthFunc)( GLenum func );
|
||||
void (APIENTRY * bglDepthMask)( GLboolean flag );
|
||||
void (APIENTRY * bglDepthRange)( GLclampd near_val, GLclampd far_val );
|
||||
|
||||
// Matrix
|
||||
void (APIENTRY * bglMatrixMode)( GLenum mode );
|
||||
void (APIENTRY * bglOrtho)( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
|
||||
void (APIENTRY * bglFrustum)( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
|
||||
void (APIENTRY * bglViewport)( GLint x, GLint y, GLsizei width, GLsizei height );
|
||||
void (APIENTRY * bglPushMatrix)( void );
|
||||
void (APIENTRY * bglPopMatrix)( void );
|
||||
void (APIENTRY * bglLoadIdentity)( void );
|
||||
void (APIENTRY * bglLoadMatrixf)( const GLfloat *m );
|
||||
|
||||
// Drawing
|
||||
void (APIENTRY * bglBegin)( GLenum mode );
|
||||
void (APIENTRY * bglEnd)( void );
|
||||
void (APIENTRY * bglVertex2f)( GLfloat x, GLfloat y );
|
||||
void (APIENTRY * bglVertex2i)( GLint x, GLint y );
|
||||
void (APIENTRY * bglVertex3d)( GLdouble x, GLdouble y, GLdouble z );
|
||||
void (APIENTRY * bglVertex3fv)( const GLfloat *v );
|
||||
void (APIENTRY * bglColor4f)( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
|
||||
void (APIENTRY * bglColor4ub)( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
|
||||
void (APIENTRY * bglTexCoord2d)( GLdouble s, GLdouble t );
|
||||
void (APIENTRY * bglTexCoord2f)( GLfloat s, GLfloat t );
|
||||
|
||||
// Lighting
|
||||
void (APIENTRY * bglShadeModel)( GLenum mode );
|
||||
|
||||
// Raster funcs
|
||||
void (APIENTRY * bglReadPixels)( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels );
|
||||
|
||||
// Texture mapping
|
||||
void (APIENTRY * bglTexEnvf)( GLenum target, GLenum pname, GLfloat param );
|
||||
void (APIENTRY * bglGenTextures)( GLsizei n, GLuint *textures ); // 1.1
|
||||
void (APIENTRY * bglDeleteTextures)( GLsizei n, const GLuint *textures); // 1.1
|
||||
void (APIENTRY * bglBindTexture)( GLenum target, GLuint texture ); // 1.1
|
||||
void (APIENTRY * bglTexImage2D)( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
void (APIENTRY * bglTexSubImage2D)( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ); // 1.1
|
||||
void (APIENTRY * bglTexParameterf)( GLenum target, GLenum pname, GLfloat param );
|
||||
void (APIENTRY * bglTexParameteri)( GLenum target, GLenum pname, GLint param );
|
||||
void (APIENTRY * bglGetTexLevelParameteriv)( GLenum target, GLint level, GLenum pname, GLint *params );
|
||||
void (APIENTRY * bglCompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
||||
void (APIENTRY * bglGetCompressedTexImageARB)(GLenum, GLint, GLvoid *);
|
||||
|
||||
// Fog
|
||||
void (APIENTRY * bglFogf)( GLenum pname, GLfloat param );
|
||||
void (APIENTRY * bglFogi)( GLenum pname, GLint param );
|
||||
void (APIENTRY * bglFogfv)( GLenum pname, const GLfloat *params );
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
// Windows
|
||||
HGLRC (WINAPI * bwglCreateContext)(HDC);
|
||||
BOOL (WINAPI * bwglDeleteContext)(HGLRC);
|
||||
PROC (WINAPI * bwglGetProcAddress)(LPCSTR);
|
||||
BOOL (WINAPI * bwglMakeCurrent)(HDC,HGLRC);
|
||||
|
||||
BOOL (WINAPI * bwglSwapBuffers)(HDC);
|
||||
int (WINAPI * bwglChoosePixelFormat)(HDC,CONST PIXELFORMATDESCRIPTOR*);
|
||||
int (WINAPI * bwglDescribePixelFormat)(HDC,int,UINT,LPPIXELFORMATDESCRIPTOR);
|
||||
int (WINAPI * bwglGetPixelFormat)(HDC);
|
||||
BOOL (WINAPI * bwglSetPixelFormat)(HDC,int,const PIXELFORMATDESCRIPTOR*);
|
||||
|
||||
static HANDLE hGLDLL;
|
||||
#endif
|
||||
|
||||
|
||||
char *gldriver = NULL;
|
||||
|
||||
static void * getproc_(const char *s, int *err, int fatal, int extension)
|
||||
{
|
||||
void *t;
|
||||
#if defined RENDERTYPESDL
|
||||
t = (void*)SDL_GL_GetProcAddress(s);
|
||||
#elif defined _WIN32
|
||||
if (extension) t = (void*)bwglGetProcAddress(s);
|
||||
else t = (void*)GetProcAddress(hGLDLL,s);
|
||||
#else
|
||||
#error Need a dynamic loader for this platform...
|
||||
#endif
|
||||
if (!t && fatal) {
|
||||
initprintf("Failed to find %s in %s\n", s, gldriver);
|
||||
*err = 1;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
#define GETPROC(s) getproc_(s,&err,1,0)
|
||||
#define GETPROCSOFT(s) getproc_(s,&err,0,0)
|
||||
#define GETPROCEXT(s) getproc_(s,&err,1,1)
|
||||
#define GETPROCEXTSOFT(s) getproc_(s,&err,0,1)
|
||||
|
||||
int loadgldriver(const char *driver)
|
||||
{
|
||||
void *t;
|
||||
int err=0;
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (hGLDLL) return 0;
|
||||
#endif
|
||||
|
||||
if (!driver) {
|
||||
#ifdef _WIN32
|
||||
driver = "OPENGL32.DLL";
|
||||
#else
|
||||
driver = "libGL.so";
|
||||
#endif
|
||||
}
|
||||
|
||||
initprintf("Loading %s\n",driver);
|
||||
|
||||
#if defined RENDERTYPESDL
|
||||
if (SDL_GL_LoadLibrary(driver)) return -1;
|
||||
#elif defined _WIN32
|
||||
hGLDLL = LoadLibrary(driver);
|
||||
if (!hGLDLL) return -1;
|
||||
#endif
|
||||
gldriver = strdup(driver);
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
bwglCreateContext = GETPROC("wglCreateContext");
|
||||
bwglDeleteContext = GETPROC("wglDeleteContext");
|
||||
bwglGetProcAddress = GETPROC("wglGetProcAddress");
|
||||
bwglMakeCurrent = GETPROC("wglMakeCurrent");
|
||||
|
||||
bwglSwapBuffers = GETPROC("wglSwapBuffers");
|
||||
bwglChoosePixelFormat = GETPROC("wglChoosePixelFormat");
|
||||
bwglDescribePixelFormat = GETPROC("wglDescribePixelFormat");
|
||||
bwglGetPixelFormat = GETPROC("wglGetPixelFormat");
|
||||
bwglSetPixelFormat = GETPROC("wglSetPixelFormat");
|
||||
#endif
|
||||
|
||||
bglClearColor = GETPROC("glClearColor");
|
||||
bglClear = GETPROC("glClear");
|
||||
bglColorMask = GETPROC("glColorMask");
|
||||
bglAlphaFunc = GETPROC("glAlphaFunc");
|
||||
bglBlendFunc = GETPROC("glBlendFunc");
|
||||
bglCullFace = GETPROC("glCullFace");
|
||||
bglFrontFace = GETPROC("glFrontFace");
|
||||
bglPolygonOffset = GETPROC("glPolygonOffset");
|
||||
bglPolygonMode = GETPROC("glPolygonMode");
|
||||
bglEnable = GETPROC("glEnable");
|
||||
bglDisable = GETPROC("glDisable");
|
||||
bglGetFloatv = GETPROC("glGetFloatv");
|
||||
bglGetIntegerv = GETPROC("glGetIntegerv");
|
||||
bglPushAttrib = GETPROC("glPushAttrib");
|
||||
bglPopAttrib = GETPROC("glPopAttrib");
|
||||
bglGetError = GETPROC("glGetError");
|
||||
bglGetString = GETPROC("glGetString");
|
||||
bglHint = GETPROC("glHint");
|
||||
|
||||
// Depth
|
||||
bglDepthFunc = GETPROC("glDepthFunc");
|
||||
bglDepthMask = GETPROC("glDepthMask");
|
||||
bglDepthRange = GETPROC("glDepthRange");
|
||||
|
||||
// Matrix
|
||||
bglMatrixMode = GETPROC("glMatrixMode");
|
||||
bglOrtho = GETPROC("glOrtho");
|
||||
bglFrustum = GETPROC("glFrustum");
|
||||
bglViewport = GETPROC("glViewport");
|
||||
bglPushMatrix = GETPROC("glPushMatrix");
|
||||
bglPopMatrix = GETPROC("glPopMatrix");
|
||||
bglLoadIdentity = GETPROC("glLoadIdentity");
|
||||
bglLoadMatrixf = GETPROC("glLoadMatrixf");
|
||||
|
||||
// Drawing
|
||||
bglBegin = GETPROC("glBegin");
|
||||
bglEnd = GETPROC("glEnd");
|
||||
bglVertex2f = GETPROC("glVertex2f");
|
||||
bglVertex2i = GETPROC("glVertex2i");
|
||||
bglVertex3d = GETPROC("glVertex3d");
|
||||
bglVertex3fv = GETPROC("glVertex3fv");
|
||||
bglColor4f = GETPROC("glColor4f");
|
||||
bglColor4ub = GETPROC("glColor4ub");
|
||||
bglTexCoord2d = GETPROC("glTexCoord2d");
|
||||
bglTexCoord2f = GETPROC("glTexCoord2f");
|
||||
|
||||
// Lighting
|
||||
bglShadeModel = GETPROC("glShadeModel");
|
||||
|
||||
// Raster funcs
|
||||
bglReadPixels = GETPROC("glReadPixels");
|
||||
|
||||
// Texture mapping
|
||||
bglTexEnvf = GETPROC("glTexEnvf");
|
||||
bglGenTextures = GETPROC("glGenTextures");
|
||||
bglDeleteTextures = GETPROC("glDeleteTextures");
|
||||
bglBindTexture = GETPROC("glBindTexture");
|
||||
bglTexImage2D = GETPROC("glTexImage2D");
|
||||
bglTexSubImage2D = GETPROC("glTexSubImage2D");
|
||||
bglTexParameterf = GETPROC("glTexParameterf");
|
||||
bglTexParameteri = GETPROC("glTexParameteri");
|
||||
bglGetTexLevelParameteriv = GETPROC("glGetTexLevelParameteriv");
|
||||
|
||||
// Fog
|
||||
bglFogf = GETPROC("glFogf");
|
||||
bglFogi = GETPROC("glFogi");
|
||||
bglFogfv = GETPROC("glFogfv");
|
||||
|
||||
loadglextensions();
|
||||
|
||||
if (err) unloadgldriver();
|
||||
return err;
|
||||
}
|
||||
|
||||
int loadglextensions(void)
|
||||
{
|
||||
int err = 0;
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (!hGLDLL) return 0;
|
||||
#endif
|
||||
|
||||
bglCompressedTexImage2DARB = GETPROCEXTSOFT("glCompressedTexImage2DARB");
|
||||
bglGetCompressedTexImageARB = GETPROCEXTSOFT("glGetCompressedTexImageARB");
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int unloadgldriver(void)
|
||||
{
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (!hGLDLL) return 0;
|
||||
#endif
|
||||
|
||||
free(gldriver);
|
||||
gldriver = NULL;
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
FreeLibrary(hGLDLL);
|
||||
hGLDLL = NULL;
|
||||
#endif
|
||||
|
||||
bglClearColor = NULL;
|
||||
bglClear = NULL;
|
||||
bglColorMask = NULL;
|
||||
bglAlphaFunc = NULL;
|
||||
bglBlendFunc = NULL;
|
||||
bglCullFace = NULL;
|
||||
bglFrontFace = NULL;
|
||||
bglPolygonOffset = NULL;
|
||||
bglPolygonMode = NULL;
|
||||
bglEnable = NULL;
|
||||
bglDisable = NULL;
|
||||
bglGetFloatv = NULL;
|
||||
bglGetIntegerv = NULL;
|
||||
bglPushAttrib = NULL;
|
||||
bglPopAttrib = NULL;
|
||||
bglGetError = NULL;
|
||||
bglGetString = NULL;
|
||||
bglHint = NULL;
|
||||
|
||||
// Depth
|
||||
bglDepthFunc = NULL;
|
||||
bglDepthMask = NULL;
|
||||
bglDepthRange = NULL;
|
||||
|
||||
// Matrix
|
||||
bglMatrixMode = NULL;
|
||||
bglOrtho = NULL;
|
||||
bglFrustum = NULL;
|
||||
bglViewport = NULL;
|
||||
bglPushMatrix = NULL;
|
||||
bglPopMatrix = NULL;
|
||||
bglLoadIdentity = NULL;
|
||||
bglLoadMatrixf = NULL;
|
||||
|
||||
// Drawing
|
||||
bglBegin = NULL;
|
||||
bglEnd = NULL;
|
||||
bglVertex2f = NULL;
|
||||
bglVertex2i = NULL;
|
||||
bglVertex3d = NULL;
|
||||
bglVertex3fv = NULL;
|
||||
bglColor4f = NULL;
|
||||
bglColor4ub = NULL;
|
||||
bglTexCoord2d = NULL;
|
||||
bglTexCoord2f = NULL;
|
||||
|
||||
// Lighting
|
||||
bglShadeModel = NULL;
|
||||
|
||||
// Raster funcs
|
||||
bglReadPixels = NULL;
|
||||
|
||||
// Texture mapping
|
||||
bglTexEnvf = NULL;
|
||||
bglGenTextures = NULL;
|
||||
bglDeleteTextures = NULL;
|
||||
bglBindTexture = NULL;
|
||||
bglTexImage2D = NULL;
|
||||
bglTexSubImage2D = NULL;
|
||||
bglTexParameterf = NULL;
|
||||
bglTexParameteri = NULL;
|
||||
bglGetTexLevelParameteriv = NULL;
|
||||
bglCompressedTexImage2DARB = NULL;
|
||||
bglGetCompressedTexImageARB = NULL;
|
||||
|
||||
// Fog
|
||||
bglFogf = NULL;
|
||||
bglFogi = NULL;
|
||||
bglFogfv = NULL;
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
bwglCreateContext = NULL;
|
||||
bwglDeleteContext = NULL;
|
||||
bwglGetProcAddress = NULL;
|
||||
bwglMakeCurrent = NULL;
|
||||
|
||||
bwglSwapBuffers = NULL;
|
||||
bwglChoosePixelFormat = NULL;
|
||||
bwglDescribePixelFormat = NULL;
|
||||
bwglGetPixelFormat = NULL;
|
||||
bwglSetPixelFormat = NULL;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
char *gldriver = "<statically linked>";
|
||||
|
||||
int loadgldriver(const char *a) { return 0; }
|
||||
int unloadgldriver(void) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
#include "glbuild.h"
|
||||
#include "baselayer.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined DYNAMIC_OPENGL && defined USE_OPENGL
|
||||
|
||||
#ifdef RENDERTYPESDL
|
||||
#include "SDL.h"
|
||||
#endif
|
||||
|
||||
void (APIENTRY * bglClearColor)( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
|
||||
void (APIENTRY * bglClear)( GLbitfield mask );
|
||||
void (APIENTRY * bglColorMask)( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
|
||||
void (APIENTRY * bglAlphaFunc)( GLenum func, GLclampf ref );
|
||||
void (APIENTRY * bglBlendFunc)( GLenum sfactor, GLenum dfactor );
|
||||
void (APIENTRY * bglCullFace)( GLenum mode );
|
||||
void (APIENTRY * bglFrontFace)( GLenum mode );
|
||||
void (APIENTRY * bglPolygonOffset)( GLfloat factor, GLfloat units );
|
||||
void (APIENTRY * bglPolygonMode)( GLenum face, GLenum mode );
|
||||
void (APIENTRY * bglEnable)( GLenum cap );
|
||||
void (APIENTRY * bglDisable)( GLenum cap );
|
||||
void (APIENTRY * bglGetFloatv)( GLenum pname, GLfloat *params );
|
||||
void (APIENTRY * bglGetIntegerv)( GLenum pname, GLint *params );
|
||||
void (APIENTRY * bglPushAttrib)( GLbitfield mask );
|
||||
void (APIENTRY * bglPopAttrib)( void );
|
||||
GLenum (APIENTRY * bglGetError)( void );
|
||||
const GLubyte* (APIENTRY * bglGetString)( GLenum name );
|
||||
void (APIENTRY * bglHint)( GLenum target, GLenum mode );
|
||||
|
||||
// Depth
|
||||
void (APIENTRY * bglDepthFunc)( GLenum func );
|
||||
void (APIENTRY * bglDepthMask)( GLboolean flag );
|
||||
void (APIENTRY * bglDepthRange)( GLclampd near_val, GLclampd far_val );
|
||||
|
||||
// Matrix
|
||||
void (APIENTRY * bglMatrixMode)( GLenum mode );
|
||||
void (APIENTRY * bglOrtho)( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
|
||||
void (APIENTRY * bglFrustum)( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
|
||||
void (APIENTRY * bglViewport)( GLint x, GLint y, GLsizei width, GLsizei height );
|
||||
void (APIENTRY * bglPushMatrix)( void );
|
||||
void (APIENTRY * bglPopMatrix)( void );
|
||||
void (APIENTRY * bglLoadIdentity)( void );
|
||||
void (APIENTRY * bglLoadMatrixf)( const GLfloat *m );
|
||||
|
||||
// Drawing
|
||||
void (APIENTRY * bglBegin)( GLenum mode );
|
||||
void (APIENTRY * bglEnd)( void );
|
||||
void (APIENTRY * bglVertex2f)( GLfloat x, GLfloat y );
|
||||
void (APIENTRY * bglVertex2i)( GLint x, GLint y );
|
||||
void (APIENTRY * bglVertex3d)( GLdouble x, GLdouble y, GLdouble z );
|
||||
void (APIENTRY * bglVertex3fv)( const GLfloat *v );
|
||||
void (APIENTRY * bglColor4f)( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
|
||||
void (APIENTRY * bglColor4ub)( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
|
||||
void (APIENTRY * bglTexCoord2d)( GLdouble s, GLdouble t );
|
||||
void (APIENTRY * bglTexCoord2f)( GLfloat s, GLfloat t );
|
||||
|
||||
// Lighting
|
||||
void (APIENTRY * bglShadeModel)( GLenum mode );
|
||||
|
||||
// Raster funcs
|
||||
void (APIENTRY * bglReadPixels)( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels );
|
||||
|
||||
// Texture mapping
|
||||
void (APIENTRY * bglTexEnvf)( GLenum target, GLenum pname, GLfloat param );
|
||||
void (APIENTRY * bglGenTextures)( GLsizei n, GLuint *textures ); // 1.1
|
||||
void (APIENTRY * bglDeleteTextures)( GLsizei n, const GLuint *textures); // 1.1
|
||||
void (APIENTRY * bglBindTexture)( GLenum target, GLuint texture ); // 1.1
|
||||
void (APIENTRY * bglTexImage2D)( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
|
||||
void (APIENTRY * bglTexSubImage2D)( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ); // 1.1
|
||||
void (APIENTRY * bglTexParameterf)( GLenum target, GLenum pname, GLfloat param );
|
||||
void (APIENTRY * bglTexParameteri)( GLenum target, GLenum pname, GLint param );
|
||||
void (APIENTRY * bglGetTexLevelParameteriv)( GLenum target, GLint level, GLenum pname, GLint *params );
|
||||
void (APIENTRY * bglCompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
||||
void (APIENTRY * bglGetCompressedTexImageARB)(GLenum, GLint, GLvoid *);
|
||||
|
||||
// Fog
|
||||
void (APIENTRY * bglFogf)( GLenum pname, GLfloat param );
|
||||
void (APIENTRY * bglFogi)( GLenum pname, GLint param );
|
||||
void (APIENTRY * bglFogfv)( GLenum pname, const GLfloat *params );
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
// Windows
|
||||
HGLRC (WINAPI * bwglCreateContext)(HDC);
|
||||
BOOL (WINAPI * bwglDeleteContext)(HGLRC);
|
||||
PROC (WINAPI * bwglGetProcAddress)(LPCSTR);
|
||||
BOOL (WINAPI * bwglMakeCurrent)(HDC,HGLRC);
|
||||
|
||||
BOOL (WINAPI * bwglSwapBuffers)(HDC);
|
||||
int (WINAPI * bwglChoosePixelFormat)(HDC,CONST PIXELFORMATDESCRIPTOR*);
|
||||
int (WINAPI * bwglDescribePixelFormat)(HDC,int,UINT,LPPIXELFORMATDESCRIPTOR);
|
||||
int (WINAPI * bwglGetPixelFormat)(HDC);
|
||||
BOOL (WINAPI * bwglSetPixelFormat)(HDC,int,const PIXELFORMATDESCRIPTOR*);
|
||||
|
||||
static HANDLE hGLDLL;
|
||||
#endif
|
||||
|
||||
|
||||
char *gldriver = NULL;
|
||||
|
||||
static void * getproc_(const char *s, int *err, int fatal, int extension)
|
||||
{
|
||||
void *t;
|
||||
#if defined RENDERTYPESDL
|
||||
t = (void*)SDL_GL_GetProcAddress(s);
|
||||
#elif defined _WIN32
|
||||
if (extension) t = (void*)bwglGetProcAddress(s);
|
||||
else t = (void*)GetProcAddress(hGLDLL,s);
|
||||
#else
|
||||
#error Need a dynamic loader for this platform...
|
||||
#endif
|
||||
if (!t && fatal) {
|
||||
initprintf("Failed to find %s in %s\n", s, gldriver);
|
||||
*err = 1;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
#define GETPROC(s) getproc_(s,&err,1,0)
|
||||
#define GETPROCSOFT(s) getproc_(s,&err,0,0)
|
||||
#define GETPROCEXT(s) getproc_(s,&err,1,1)
|
||||
#define GETPROCEXTSOFT(s) getproc_(s,&err,0,1)
|
||||
|
||||
int loadgldriver(const char *driver)
|
||||
{
|
||||
void *t;
|
||||
int err=0;
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (hGLDLL) return 0;
|
||||
#endif
|
||||
|
||||
if (!driver) {
|
||||
#ifdef _WIN32
|
||||
driver = "OPENGL32.DLL";
|
||||
#else
|
||||
driver = "libGL.so";
|
||||
#endif
|
||||
}
|
||||
|
||||
initprintf("Loading %s\n",driver);
|
||||
|
||||
#if defined RENDERTYPESDL
|
||||
if (SDL_GL_LoadLibrary(driver)) return -1;
|
||||
#elif defined _WIN32
|
||||
hGLDLL = LoadLibrary(driver);
|
||||
if (!hGLDLL) return -1;
|
||||
#endif
|
||||
gldriver = strdup(driver);
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
bwglCreateContext = GETPROC("wglCreateContext");
|
||||
bwglDeleteContext = GETPROC("wglDeleteContext");
|
||||
bwglGetProcAddress = GETPROC("wglGetProcAddress");
|
||||
bwglMakeCurrent = GETPROC("wglMakeCurrent");
|
||||
|
||||
bwglSwapBuffers = GETPROC("wglSwapBuffers");
|
||||
bwglChoosePixelFormat = GETPROC("wglChoosePixelFormat");
|
||||
bwglDescribePixelFormat = GETPROC("wglDescribePixelFormat");
|
||||
bwglGetPixelFormat = GETPROC("wglGetPixelFormat");
|
||||
bwglSetPixelFormat = GETPROC("wglSetPixelFormat");
|
||||
#endif
|
||||
|
||||
bglClearColor = GETPROC("glClearColor");
|
||||
bglClear = GETPROC("glClear");
|
||||
bglColorMask = GETPROC("glColorMask");
|
||||
bglAlphaFunc = GETPROC("glAlphaFunc");
|
||||
bglBlendFunc = GETPROC("glBlendFunc");
|
||||
bglCullFace = GETPROC("glCullFace");
|
||||
bglFrontFace = GETPROC("glFrontFace");
|
||||
bglPolygonOffset = GETPROC("glPolygonOffset");
|
||||
bglPolygonMode = GETPROC("glPolygonMode");
|
||||
bglEnable = GETPROC("glEnable");
|
||||
bglDisable = GETPROC("glDisable");
|
||||
bglGetFloatv = GETPROC("glGetFloatv");
|
||||
bglGetIntegerv = GETPROC("glGetIntegerv");
|
||||
bglPushAttrib = GETPROC("glPushAttrib");
|
||||
bglPopAttrib = GETPROC("glPopAttrib");
|
||||
bglGetError = GETPROC("glGetError");
|
||||
bglGetString = GETPROC("glGetString");
|
||||
bglHint = GETPROC("glHint");
|
||||
|
||||
// Depth
|
||||
bglDepthFunc = GETPROC("glDepthFunc");
|
||||
bglDepthMask = GETPROC("glDepthMask");
|
||||
bglDepthRange = GETPROC("glDepthRange");
|
||||
|
||||
// Matrix
|
||||
bglMatrixMode = GETPROC("glMatrixMode");
|
||||
bglOrtho = GETPROC("glOrtho");
|
||||
bglFrustum = GETPROC("glFrustum");
|
||||
bglViewport = GETPROC("glViewport");
|
||||
bglPushMatrix = GETPROC("glPushMatrix");
|
||||
bglPopMatrix = GETPROC("glPopMatrix");
|
||||
bglLoadIdentity = GETPROC("glLoadIdentity");
|
||||
bglLoadMatrixf = GETPROC("glLoadMatrixf");
|
||||
|
||||
// Drawing
|
||||
bglBegin = GETPROC("glBegin");
|
||||
bglEnd = GETPROC("glEnd");
|
||||
bglVertex2f = GETPROC("glVertex2f");
|
||||
bglVertex2i = GETPROC("glVertex2i");
|
||||
bglVertex3d = GETPROC("glVertex3d");
|
||||
bglVertex3fv = GETPROC("glVertex3fv");
|
||||
bglColor4f = GETPROC("glColor4f");
|
||||
bglColor4ub = GETPROC("glColor4ub");
|
||||
bglTexCoord2d = GETPROC("glTexCoord2d");
|
||||
bglTexCoord2f = GETPROC("glTexCoord2f");
|
||||
|
||||
// Lighting
|
||||
bglShadeModel = GETPROC("glShadeModel");
|
||||
|
||||
// Raster funcs
|
||||
bglReadPixels = GETPROC("glReadPixels");
|
||||
|
||||
// Texture mapping
|
||||
bglTexEnvf = GETPROC("glTexEnvf");
|
||||
bglGenTextures = GETPROC("glGenTextures");
|
||||
bglDeleteTextures = GETPROC("glDeleteTextures");
|
||||
bglBindTexture = GETPROC("glBindTexture");
|
||||
bglTexImage2D = GETPROC("glTexImage2D");
|
||||
bglTexSubImage2D = GETPROC("glTexSubImage2D");
|
||||
bglTexParameterf = GETPROC("glTexParameterf");
|
||||
bglTexParameteri = GETPROC("glTexParameteri");
|
||||
bglGetTexLevelParameteriv = GETPROC("glGetTexLevelParameteriv");
|
||||
|
||||
// Fog
|
||||
bglFogf = GETPROC("glFogf");
|
||||
bglFogi = GETPROC("glFogi");
|
||||
bglFogfv = GETPROC("glFogfv");
|
||||
|
||||
loadglextensions();
|
||||
|
||||
if (err) unloadgldriver();
|
||||
return err;
|
||||
}
|
||||
|
||||
int loadglextensions(void)
|
||||
{
|
||||
int err = 0;
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (!hGLDLL) return 0;
|
||||
#endif
|
||||
|
||||
bglCompressedTexImage2DARB = GETPROCEXTSOFT("glCompressedTexImage2DARB");
|
||||
bglGetCompressedTexImageARB = GETPROCEXTSOFT("glGetCompressedTexImageARB");
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int unloadgldriver(void)
|
||||
{
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (!hGLDLL) return 0;
|
||||
#endif
|
||||
|
||||
free(gldriver);
|
||||
gldriver = NULL;
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
FreeLibrary(hGLDLL);
|
||||
hGLDLL = NULL;
|
||||
#endif
|
||||
|
||||
bglClearColor = NULL;
|
||||
bglClear = NULL;
|
||||
bglColorMask = NULL;
|
||||
bglAlphaFunc = NULL;
|
||||
bglBlendFunc = NULL;
|
||||
bglCullFace = NULL;
|
||||
bglFrontFace = NULL;
|
||||
bglPolygonOffset = NULL;
|
||||
bglPolygonMode = NULL;
|
||||
bglEnable = NULL;
|
||||
bglDisable = NULL;
|
||||
bglGetFloatv = NULL;
|
||||
bglGetIntegerv = NULL;
|
||||
bglPushAttrib = NULL;
|
||||
bglPopAttrib = NULL;
|
||||
bglGetError = NULL;
|
||||
bglGetString = NULL;
|
||||
bglHint = NULL;
|
||||
|
||||
// Depth
|
||||
bglDepthFunc = NULL;
|
||||
bglDepthMask = NULL;
|
||||
bglDepthRange = NULL;
|
||||
|
||||
// Matrix
|
||||
bglMatrixMode = NULL;
|
||||
bglOrtho = NULL;
|
||||
bglFrustum = NULL;
|
||||
bglViewport = NULL;
|
||||
bglPushMatrix = NULL;
|
||||
bglPopMatrix = NULL;
|
||||
bglLoadIdentity = NULL;
|
||||
bglLoadMatrixf = NULL;
|
||||
|
||||
// Drawing
|
||||
bglBegin = NULL;
|
||||
bglEnd = NULL;
|
||||
bglVertex2f = NULL;
|
||||
bglVertex2i = NULL;
|
||||
bglVertex3d = NULL;
|
||||
bglVertex3fv = NULL;
|
||||
bglColor4f = NULL;
|
||||
bglColor4ub = NULL;
|
||||
bglTexCoord2d = NULL;
|
||||
bglTexCoord2f = NULL;
|
||||
|
||||
// Lighting
|
||||
bglShadeModel = NULL;
|
||||
|
||||
// Raster funcs
|
||||
bglReadPixels = NULL;
|
||||
|
||||
// Texture mapping
|
||||
bglTexEnvf = NULL;
|
||||
bglGenTextures = NULL;
|
||||
bglDeleteTextures = NULL;
|
||||
bglBindTexture = NULL;
|
||||
bglTexImage2D = NULL;
|
||||
bglTexSubImage2D = NULL;
|
||||
bglTexParameterf = NULL;
|
||||
bglTexParameteri = NULL;
|
||||
bglGetTexLevelParameteriv = NULL;
|
||||
bglCompressedTexImage2DARB = NULL;
|
||||
bglGetCompressedTexImageARB = NULL;
|
||||
|
||||
// Fog
|
||||
bglFogf = NULL;
|
||||
bglFogi = NULL;
|
||||
bglFogfv = NULL;
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
bwglCreateContext = NULL;
|
||||
bwglDeleteContext = NULL;
|
||||
bwglGetProcAddress = NULL;
|
||||
bwglMakeCurrent = NULL;
|
||||
|
||||
bwglSwapBuffers = NULL;
|
||||
bwglChoosePixelFormat = NULL;
|
||||
bwglDescribePixelFormat = NULL;
|
||||
bwglGetPixelFormat = NULL;
|
||||
bwglSetPixelFormat = NULL;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
char *gldriver = "<statically linked>";
|
||||
|
||||
int loadgldriver(const char *a) { return 0; }
|
||||
int unloadgldriver(void) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,254 +1,254 @@
|
|||
/*
|
||||
* High-colour textures support for Polymost
|
||||
* by Jonathon Fowler
|
||||
* See the included license file "BUILDLIC.TXT" for license info.
|
||||
*/
|
||||
|
||||
#include "kplib.h"
|
||||
|
||||
#define HICEFFECTMASK (1|2)
|
||||
static palette_t hictinting[MAXPALOOKUPS];
|
||||
|
||||
struct hicskybox_t {
|
||||
long ignore;
|
||||
char *face[6];
|
||||
};
|
||||
typedef struct hicreplc_t {
|
||||
struct hicreplc_t *next;
|
||||
char palnum, ignore, flags, filler;
|
||||
char *filename;
|
||||
float alphacut;
|
||||
struct hicskybox_t *skybox;
|
||||
} hicreplctyp;
|
||||
static hicreplctyp *hicreplc[MAXTILES];
|
||||
static char hicfirstinit = 0;
|
||||
|
||||
//
|
||||
// find the index into hicreplc[] which contains the replacement tile particulars
|
||||
//
|
||||
static hicreplctyp * hicfindsubst(long picnum, long palnum, long skybox)
|
||||
{
|
||||
hicreplctyp *hr;
|
||||
|
||||
if (!hicfirstinit) return NULL;
|
||||
if ((unsigned long)picnum >= (unsigned long)MAXTILES) return NULL;
|
||||
|
||||
do {
|
||||
for (hr = hicreplc[picnum]; hr; hr = hr->next) {
|
||||
if (hr->palnum == palnum) {
|
||||
if (skybox) {
|
||||
if (hr->skybox && !hr->skybox->ignore) return hr;
|
||||
} else {
|
||||
if (!hr->ignore) return hr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!palnum) break;
|
||||
palnum = 0;
|
||||
} while (1);
|
||||
|
||||
return NULL; // no replacement found
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicinit()
|
||||
// Initialise the high-colour stuff to default.
|
||||
//
|
||||
void hicinit(void)
|
||||
{
|
||||
long i,j;
|
||||
hicreplctyp *hr, *next;
|
||||
|
||||
for (i=0;i<MAXPALOOKUPS;i++) { // all tints should be 100%
|
||||
hictinting[i].r = hictinting[i].g = hictinting[i].b = 0xff;
|
||||
hictinting[i].f = 0;
|
||||
}
|
||||
|
||||
if (hicfirstinit)
|
||||
for (i=MAXTILES-1;i>=0;i--) {
|
||||
for (hr=hicreplc[i]; hr; ) {
|
||||
next = hr->next;
|
||||
|
||||
if (hr->skybox) {
|
||||
for (j=5;j>=0;j--) {
|
||||
if (hr->skybox->face[j]) {
|
||||
free(hr->skybox->face[j]);
|
||||
}
|
||||
}
|
||||
free(hr->skybox);
|
||||
}
|
||||
if (hr->filename) free(hr->filename);
|
||||
free(hr);
|
||||
|
||||
hr = next;
|
||||
}
|
||||
}
|
||||
memset(hicreplc,0,sizeof(hicreplc));
|
||||
|
||||
hicfirstinit = 1;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicsetpalettetint(pal,r,g,b,effect)
|
||||
// The tinting values represent a mechanism for emulating the effect of global sector
|
||||
// palette shifts on true-colour textures and only true-colour textures.
|
||||
// effect bitset: 1 = greyscale, 2 = invert
|
||||
//
|
||||
void hicsetpalettetint(long palnum, unsigned char r, unsigned char g, unsigned char b, unsigned char effect)
|
||||
{
|
||||
if ((unsigned long)palnum >= (unsigned long)MAXPALOOKUPS) return;
|
||||
if (!hicfirstinit) hicinit();
|
||||
|
||||
hictinting[palnum].r = r;
|
||||
hictinting[palnum].g = g;
|
||||
hictinting[palnum].b = b;
|
||||
hictinting[palnum].f = effect & HICEFFECTMASK;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicsetsubsttex(picnum,pal,filen,alphacut)
|
||||
// Specifies a replacement graphic file for an ART tile.
|
||||
//
|
||||
int hicsetsubsttex(long picnum, long palnum, char *filen, float alphacut, char flags)
|
||||
{
|
||||
hicreplctyp *hr, *hrn;
|
||||
|
||||
if ((unsigned long)picnum >= (unsigned long)MAXTILES) return -1;
|
||||
if ((unsigned long)palnum >= (unsigned long)MAXPALOOKUPS) return -1;
|
||||
if (!hicfirstinit) hicinit();
|
||||
|
||||
for (hr = hicreplc[picnum]; hr; hr = hr->next) {
|
||||
if (hr->palnum == palnum)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hr) {
|
||||
// no replacement yet defined
|
||||
hrn = (hicreplctyp *)calloc(1,sizeof(hicreplctyp));
|
||||
if (!hrn) return -1;
|
||||
hrn->palnum = palnum;
|
||||
} else hrn = hr;
|
||||
|
||||
// store into hicreplc the details for this replacement
|
||||
if (hrn->filename) free(hrn->filename);
|
||||
|
||||
hrn->filename = strdup(filen);
|
||||
if (!hrn->filename) {
|
||||
if (hrn->skybox) return -1; // don't free the base structure if there's a skybox defined
|
||||
if (hr == NULL) free(hrn); // not yet a link in the chain
|
||||
return -1;
|
||||
}
|
||||
hrn->ignore = 0;
|
||||
hrn->alphacut = min(alphacut,1.0);
|
||||
hrn->flags = flags;
|
||||
if (hr == NULL) {
|
||||
hrn->next = hicreplc[picnum];
|
||||
hicreplc[picnum] = hrn;
|
||||
}
|
||||
|
||||
//printf("Replacement [%d,%d]: %s\n", picnum, palnum, hicreplc[i]->filename);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicsetskybox(picnum,pal,faces[6])
|
||||
// Specifies a graphic files making up a skybox.
|
||||
//
|
||||
int hicsetskybox(long picnum, long palnum, char *faces[6])
|
||||
{
|
||||
hicreplctyp *hr, *hrn;
|
||||
long j;
|
||||
|
||||
if ((unsigned long)picnum >= (unsigned long)MAXTILES) return -1;
|
||||
if ((unsigned long)palnum >= (unsigned long)MAXPALOOKUPS) return -1;
|
||||
for (j=5;j>=0;j--) if (!faces[j]) return -1;
|
||||
if (!hicfirstinit) hicinit();
|
||||
|
||||
for (hr = hicreplc[picnum]; hr; hr = hr->next) {
|
||||
if (hr->palnum == palnum)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hr) {
|
||||
// no replacement yet defined
|
||||
hrn = (hicreplctyp *)calloc(1,sizeof(hicreplctyp));
|
||||
if (!hrn) return -1;
|
||||
|
||||
hrn->palnum = palnum;
|
||||
} else hrn = hr;
|
||||
|
||||
if (!hrn->skybox) {
|
||||
hrn->skybox = (struct hicskybox_t *)calloc(1,sizeof(struct hicskybox_t));
|
||||
if (!hrn->skybox) {
|
||||
if (hr == NULL) free(hrn); // not yet a link in the chain
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
for (j=5;j>=0;j--) {
|
||||
if (hrn->skybox->face[j])
|
||||
free(hrn->skybox->face[j]);
|
||||
}
|
||||
}
|
||||
|
||||
// store each face's filename
|
||||
for (j=0;j<6;j++) {
|
||||
hrn->skybox->face[j] = strdup(faces[j]);
|
||||
if (!hrn->skybox->face[j]) {
|
||||
for (--j; j>=0; --j) // free any previous faces
|
||||
free(hrn->skybox->face[j]);
|
||||
free(hrn->skybox);
|
||||
hrn->skybox = NULL;
|
||||
if (hr == NULL) free(hrn);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
hrn->skybox->ignore = 0;
|
||||
if (hr == NULL) {
|
||||
hrn->next = hicreplc[picnum];
|
||||
hicreplc[picnum] = hrn;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicclearsubst(picnum,pal)
|
||||
// Clears a replacement for an ART tile, including skybox faces.
|
||||
//
|
||||
int hicclearsubst(long picnum, long palnum)
|
||||
{
|
||||
hicreplctyp *hr, *hrn = NULL;
|
||||
|
||||
if ((unsigned long)picnum >= (unsigned long)MAXTILES) return -1;
|
||||
if ((unsigned long)palnum >= (unsigned long)MAXPALOOKUPS) return -1;
|
||||
if (!hicfirstinit) return 0;
|
||||
|
||||
for (hr = hicreplc[picnum]; hr; hrn = hr, hr = hr->next) {
|
||||
if (hr->palnum == palnum)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hr) return 0;
|
||||
|
||||
if (hr->filename) free(hr->filename);
|
||||
if (hr->skybox) {
|
||||
int i;
|
||||
for (i=5;i>=0;i--)
|
||||
if (hr->skybox->face[i])
|
||||
free(hr->skybox->face[i]);
|
||||
free(hr->skybox);
|
||||
}
|
||||
|
||||
if (hrn) hrn->next = hr->next;
|
||||
else hicreplc[picnum] = hr->next;
|
||||
free(hr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* High-colour textures support for Polymost
|
||||
* by Jonathon Fowler
|
||||
* See the included license file "BUILDLIC.TXT" for license info.
|
||||
*/
|
||||
|
||||
#include "kplib.h"
|
||||
|
||||
#define HICEFFECTMASK (1|2)
|
||||
static palette_t hictinting[MAXPALOOKUPS];
|
||||
|
||||
struct hicskybox_t {
|
||||
long ignore;
|
||||
char *face[6];
|
||||
};
|
||||
typedef struct hicreplc_t {
|
||||
struct hicreplc_t *next;
|
||||
char palnum, ignore, flags, filler;
|
||||
char *filename;
|
||||
float alphacut;
|
||||
struct hicskybox_t *skybox;
|
||||
} hicreplctyp;
|
||||
static hicreplctyp *hicreplc[MAXTILES];
|
||||
static char hicfirstinit = 0;
|
||||
|
||||
//
|
||||
// find the index into hicreplc[] which contains the replacement tile particulars
|
||||
//
|
||||
static hicreplctyp * hicfindsubst(long picnum, long palnum, long skybox)
|
||||
{
|
||||
hicreplctyp *hr;
|
||||
|
||||
if (!hicfirstinit) return NULL;
|
||||
if ((unsigned long)picnum >= (unsigned long)MAXTILES) return NULL;
|
||||
|
||||
do {
|
||||
for (hr = hicreplc[picnum]; hr; hr = hr->next) {
|
||||
if (hr->palnum == palnum) {
|
||||
if (skybox) {
|
||||
if (hr->skybox && !hr->skybox->ignore) return hr;
|
||||
} else {
|
||||
if (!hr->ignore) return hr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!palnum) break;
|
||||
palnum = 0;
|
||||
} while (1);
|
||||
|
||||
return NULL; // no replacement found
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicinit()
|
||||
// Initialise the high-colour stuff to default.
|
||||
//
|
||||
void hicinit(void)
|
||||
{
|
||||
long i,j;
|
||||
hicreplctyp *hr, *next;
|
||||
|
||||
for (i=0;i<MAXPALOOKUPS;i++) { // all tints should be 100%
|
||||
hictinting[i].r = hictinting[i].g = hictinting[i].b = 0xff;
|
||||
hictinting[i].f = 0;
|
||||
}
|
||||
|
||||
if (hicfirstinit)
|
||||
for (i=MAXTILES-1;i>=0;i--) {
|
||||
for (hr=hicreplc[i]; hr; ) {
|
||||
next = hr->next;
|
||||
|
||||
if (hr->skybox) {
|
||||
for (j=5;j>=0;j--) {
|
||||
if (hr->skybox->face[j]) {
|
||||
free(hr->skybox->face[j]);
|
||||
}
|
||||
}
|
||||
free(hr->skybox);
|
||||
}
|
||||
if (hr->filename) free(hr->filename);
|
||||
free(hr);
|
||||
|
||||
hr = next;
|
||||
}
|
||||
}
|
||||
memset(hicreplc,0,sizeof(hicreplc));
|
||||
|
||||
hicfirstinit = 1;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicsetpalettetint(pal,r,g,b,effect)
|
||||
// The tinting values represent a mechanism for emulating the effect of global sector
|
||||
// palette shifts on true-colour textures and only true-colour textures.
|
||||
// effect bitset: 1 = greyscale, 2 = invert
|
||||
//
|
||||
void hicsetpalettetint(long palnum, unsigned char r, unsigned char g, unsigned char b, unsigned char effect)
|
||||
{
|
||||
if ((unsigned long)palnum >= (unsigned long)MAXPALOOKUPS) return;
|
||||
if (!hicfirstinit) hicinit();
|
||||
|
||||
hictinting[palnum].r = r;
|
||||
hictinting[palnum].g = g;
|
||||
hictinting[palnum].b = b;
|
||||
hictinting[palnum].f = effect & HICEFFECTMASK;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicsetsubsttex(picnum,pal,filen,alphacut)
|
||||
// Specifies a replacement graphic file for an ART tile.
|
||||
//
|
||||
int hicsetsubsttex(long picnum, long palnum, char *filen, float alphacut, char flags)
|
||||
{
|
||||
hicreplctyp *hr, *hrn;
|
||||
|
||||
if ((unsigned long)picnum >= (unsigned long)MAXTILES) return -1;
|
||||
if ((unsigned long)palnum >= (unsigned long)MAXPALOOKUPS) return -1;
|
||||
if (!hicfirstinit) hicinit();
|
||||
|
||||
for (hr = hicreplc[picnum]; hr; hr = hr->next) {
|
||||
if (hr->palnum == palnum)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hr) {
|
||||
// no replacement yet defined
|
||||
hrn = (hicreplctyp *)calloc(1,sizeof(hicreplctyp));
|
||||
if (!hrn) return -1;
|
||||
hrn->palnum = palnum;
|
||||
} else hrn = hr;
|
||||
|
||||
// store into hicreplc the details for this replacement
|
||||
if (hrn->filename) free(hrn->filename);
|
||||
|
||||
hrn->filename = strdup(filen);
|
||||
if (!hrn->filename) {
|
||||
if (hrn->skybox) return -1; // don't free the base structure if there's a skybox defined
|
||||
if (hr == NULL) free(hrn); // not yet a link in the chain
|
||||
return -1;
|
||||
}
|
||||
hrn->ignore = 0;
|
||||
hrn->alphacut = min(alphacut,1.0);
|
||||
hrn->flags = flags;
|
||||
if (hr == NULL) {
|
||||
hrn->next = hicreplc[picnum];
|
||||
hicreplc[picnum] = hrn;
|
||||
}
|
||||
|
||||
//printf("Replacement [%d,%d]: %s\n", picnum, palnum, hicreplc[i]->filename);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicsetskybox(picnum,pal,faces[6])
|
||||
// Specifies a graphic files making up a skybox.
|
||||
//
|
||||
int hicsetskybox(long picnum, long palnum, char *faces[6])
|
||||
{
|
||||
hicreplctyp *hr, *hrn;
|
||||
long j;
|
||||
|
||||
if ((unsigned long)picnum >= (unsigned long)MAXTILES) return -1;
|
||||
if ((unsigned long)palnum >= (unsigned long)MAXPALOOKUPS) return -1;
|
||||
for (j=5;j>=0;j--) if (!faces[j]) return -1;
|
||||
if (!hicfirstinit) hicinit();
|
||||
|
||||
for (hr = hicreplc[picnum]; hr; hr = hr->next) {
|
||||
if (hr->palnum == palnum)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hr) {
|
||||
// no replacement yet defined
|
||||
hrn = (hicreplctyp *)calloc(1,sizeof(hicreplctyp));
|
||||
if (!hrn) return -1;
|
||||
|
||||
hrn->palnum = palnum;
|
||||
} else hrn = hr;
|
||||
|
||||
if (!hrn->skybox) {
|
||||
hrn->skybox = (struct hicskybox_t *)calloc(1,sizeof(struct hicskybox_t));
|
||||
if (!hrn->skybox) {
|
||||
if (hr == NULL) free(hrn); // not yet a link in the chain
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
for (j=5;j>=0;j--) {
|
||||
if (hrn->skybox->face[j])
|
||||
free(hrn->skybox->face[j]);
|
||||
}
|
||||
}
|
||||
|
||||
// store each face's filename
|
||||
for (j=0;j<6;j++) {
|
||||
hrn->skybox->face[j] = strdup(faces[j]);
|
||||
if (!hrn->skybox->face[j]) {
|
||||
for (--j; j>=0; --j) // free any previous faces
|
||||
free(hrn->skybox->face[j]);
|
||||
free(hrn->skybox);
|
||||
hrn->skybox = NULL;
|
||||
if (hr == NULL) free(hrn);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
hrn->skybox->ignore = 0;
|
||||
if (hr == NULL) {
|
||||
hrn->next = hicreplc[picnum];
|
||||
hicreplc[picnum] = hrn;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// hicclearsubst(picnum,pal)
|
||||
// Clears a replacement for an ART tile, including skybox faces.
|
||||
//
|
||||
int hicclearsubst(long picnum, long palnum)
|
||||
{
|
||||
hicreplctyp *hr, *hrn = NULL;
|
||||
|
||||
if ((unsigned long)picnum >= (unsigned long)MAXTILES) return -1;
|
||||
if ((unsigned long)palnum >= (unsigned long)MAXPALOOKUPS) return -1;
|
||||
if (!hicfirstinit) return 0;
|
||||
|
||||
for (hr = hicreplc[picnum]; hr; hrn = hr, hr = hr->next) {
|
||||
if (hr->palnum == palnum)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hr) return 0;
|
||||
|
||||
if (hr->filename) free(hr->filename);
|
||||
if (hr->skybox) {
|
||||
int i;
|
||||
for (i=5;i>=0;i--)
|
||||
if (hr->skybox->face[i])
|
||||
free(hr->skybox->face[i]);
|
||||
free(hr->skybox);
|
||||
}
|
||||
|
||||
if (hrn) hrn->next = hr->next;
|
||||
else hicreplc[picnum] = hr->next;
|
||||
free(hr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,79 +1,79 @@
|
|||
// "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
|
||||
// Ken Silverman's official web site: "http://www.advsys.net/ken"
|
||||
// See the included license file "BUILDLIC.TXT" for license info.
|
||||
//
|
||||
// This file has been modified from Ken Silverman's original release
|
||||
// by Jonathon Fowler (jonof@edgenetwk.com)
|
||||
|
||||
|
||||
#include "mmulti.h"
|
||||
|
||||
|
||||
long myconnectindex, numplayers;
|
||||
long connecthead, connectpoint2[MAXMULTIPLAYERS];
|
||||
char syncstate = 0;
|
||||
|
||||
long isvalidipaddress (char *st)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
long initmultiplayersparms(long argc, char **argv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
long initmultiplayerscycle(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void initmultiplayers(long argc, char **argv, char damultioption, char dacomrateoption, char dapriority)
|
||||
{
|
||||
numplayers = 1; myconnectindex = 0;
|
||||
connecthead = 0; connectpoint2[0] = -1;
|
||||
}
|
||||
|
||||
void setpackettimeout(long datimeoutcount, long daresendagaincount)
|
||||
{
|
||||
}
|
||||
|
||||
void uninitmultiplayers(void)
|
||||
{
|
||||
}
|
||||
|
||||
void sendlogon(void)
|
||||
{
|
||||
}
|
||||
|
||||
void sendlogoff(void)
|
||||
{
|
||||
}
|
||||
|
||||
long getoutputcirclesize(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setsocket(short newsocket)
|
||||
{
|
||||
}
|
||||
|
||||
void sendpacket(long other, char *bufptr, long messleng)
|
||||
{
|
||||
}
|
||||
|
||||
long getpacket (long *other, char *bufptr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void flushpackets(void)
|
||||
{
|
||||
}
|
||||
|
||||
void genericmultifunction(long other, char *bufptr, long messleng, long command)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
|
||||
// Ken Silverman's official web site: "http://www.advsys.net/ken"
|
||||
// See the included license file "BUILDLIC.TXT" for license info.
|
||||
//
|
||||
// This file has been modified from Ken Silverman's original release
|
||||
// by Jonathon Fowler (jonof@edgenetwk.com)
|
||||
|
||||
|
||||
#include "mmulti.h"
|
||||
|
||||
|
||||
long myconnectindex, numplayers;
|
||||
long connecthead, connectpoint2[MAXMULTIPLAYERS];
|
||||
char syncstate = 0;
|
||||
|
||||
long isvalidipaddress (char *st)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
long initmultiplayersparms(long argc, char **argv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
long initmultiplayerscycle(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void initmultiplayers(long argc, char **argv, char damultioption, char dacomrateoption, char dapriority)
|
||||
{
|
||||
numplayers = 1; myconnectindex = 0;
|
||||
connecthead = 0; connectpoint2[0] = -1;
|
||||
}
|
||||
|
||||
void setpackettimeout(long datimeoutcount, long daresendagaincount)
|
||||
{
|
||||
}
|
||||
|
||||
void uninitmultiplayers(void)
|
||||
{
|
||||
}
|
||||
|
||||
void sendlogon(void)
|
||||
{
|
||||
}
|
||||
|
||||
void sendlogoff(void)
|
||||
{
|
||||
}
|
||||
|
||||
long getoutputcirclesize(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setsocket(short newsocket)
|
||||
{
|
||||
}
|
||||
|
||||
void sendpacket(long other, char *bufptr, long messleng)
|
||||
{
|
||||
}
|
||||
|
||||
long getpacket (long *other, char *bufptr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void flushpackets(void)
|
||||
{
|
||||
}
|
||||
|
||||
void genericmultifunction(long other, char *bufptr, long messleng, long command)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
//placeholder placeholder lol
|
||||
|
||||
void polymer_glinit(void)
|
||||
{
|
||||
bglClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
bglClear(GL_COLOR_BUFFER_BIT);
|
||||
bglViewport(0, 0, 1024, 768);
|
||||
bglDisable(GL_TEXTURE_2D);
|
||||
bglEnable(GL_DEPTH_TEST);
|
||||
bglMatrixMode(GL_PROJECTION);
|
||||
bglLoadIdentity();
|
||||
bglFrustum(-1.0f, 1.0f, -0.75f, 0.75, 1.0f, 100.0f);
|
||||
bglMatrixMode(GL_MODELVIEW);
|
||||
bglLoadIdentity();
|
||||
}
|
||||
|
||||
void polymer_drawsector(short sectnum)
|
||||
{
|
||||
sectortype *sec;
|
||||
walltype *wal;
|
||||
|
||||
sec = §or[sectnum];
|
||||
wal = &wall[sec->wallptr];
|
||||
OSD_Printf("%i\n", sec->wallnum);
|
||||
}
|
||||
|
||||
void polymer_drawrooms(void)
|
||||
{
|
||||
OSD_Printf("drawrooms\n");
|
||||
polymer_glinit();
|
||||
polymer_drawsector(globalcursectnum);
|
||||
}
|
||||
//placeholder placeholder lol
|
||||
|
||||
void polymer_glinit(void)
|
||||
{
|
||||
bglClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
bglClear(GL_COLOR_BUFFER_BIT);
|
||||
bglViewport(0, 0, 1024, 768);
|
||||
bglDisable(GL_TEXTURE_2D);
|
||||
bglEnable(GL_DEPTH_TEST);
|
||||
bglMatrixMode(GL_PROJECTION);
|
||||
bglLoadIdentity();
|
||||
bglFrustum(-1.0f, 1.0f, -0.75f, 0.75, 1.0f, 100.0f);
|
||||
bglMatrixMode(GL_MODELVIEW);
|
||||
bglLoadIdentity();
|
||||
}
|
||||
|
||||
void polymer_drawsector(short sectnum)
|
||||
{
|
||||
sectortype *sec;
|
||||
walltype *wal;
|
||||
|
||||
sec = §or[sectnum];
|
||||
wal = &wall[sec->wallptr];
|
||||
OSD_Printf("%i\n", sec->wallnum);
|
||||
}
|
||||
|
||||
void polymer_drawrooms(void)
|
||||
{
|
||||
OSD_Printf("drawrooms\n");
|
||||
polymer_glinit();
|
||||
polymer_drawsector(globalcursectnum);
|
||||
}
|
||||
|
|
|
@ -543,17 +543,17 @@ void polymost_glinit()
|
|||
|
||||
bglBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if (glmultisample > 0 && glinfo.multisample) {
|
||||
if (glinfo.nvmultisamplehint)
|
||||
bglHint(GL_MULTISAMPLE_FILTER_HINT_NV, glnvmultisamplehint ? GL_NICEST:GL_FASTEST);
|
||||
bglEnable(GL_MULTISAMPLE_ARB);
|
||||
}
|
||||
if (glmultisample > 0 && glinfo.multisample) {
|
||||
if (glinfo.nvmultisamplehint)
|
||||
bglHint(GL_MULTISAMPLE_FILTER_HINT_NV, glnvmultisamplehint ? GL_NICEST:GL_FASTEST);
|
||||
bglEnable(GL_MULTISAMPLE_ARB);
|
||||
}
|
||||
}
|
||||
|
||||
void resizeglcheck ()
|
||||
{
|
||||
float m[4][4];
|
||||
float ratioratio = 1.0;
|
||||
float m[4][4];
|
||||
float ratioratio = 1.0;
|
||||
int fovcorrect;
|
||||
|
||||
if (glredbluemode < lastglredbluemode) {
|
||||
|
@ -587,9 +587,9 @@ void resizeglcheck ()
|
|||
{
|
||||
glox1 = windowx1; gloy1 = windowy1;
|
||||
glox2 = windowx2; gloy2 = windowy2;
|
||||
|
||||
ratioratio = 1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
fovcorrect = (ratioratio > 1) ? (((windowx2-windowx1+1) * ratioratio) - (windowx2-windowx1+1)) * ((float)glratiocorrection / 63) : 0;
|
||||
|
||||
ratioratio = 1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
fovcorrect = (ratioratio > 1) ? (((windowx2-windowx1+1) * ratioratio) - (windowx2-windowx1+1)) * ((float)glratiocorrection / 63) : 0;
|
||||
|
||||
bglViewport(windowx1 - (fovcorrect / 2), yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect, windowy2-windowy1+1);
|
||||
|
||||
|
@ -600,7 +600,7 @@ void resizeglcheck ()
|
|||
m[2][2] = 1.0; m[2][3] = (float)ydimen / (1 + (glratiocorrection / (63 / (ratioratio - 1))));
|
||||
m[3][2] =-1.0;
|
||||
bglLoadMatrixf(&m[0][0]);
|
||||
//bglLoadIdentity();
|
||||
//bglLoadIdentity();
|
||||
|
||||
bglMatrixMode(GL_MODELVIEW);
|
||||
bglLoadIdentity();
|
||||
|
@ -1063,7 +1063,7 @@ failure:
|
|||
int gloadtile_hi(long dapic, long facen, hicreplctyp *hicr, long dameth, pthtyp *pth, long doalloc, char effect)
|
||||
{
|
||||
coltype *pic = NULL, *rpptr;
|
||||
long j, x, y, x2, y2, xsiz = -1, ysiz = -1, tsizx, tsizy;
|
||||
long j, x, y, x2, y2, xsiz=0, ysiz=0, tsizx, tsizy;
|
||||
|
||||
char *picfil = NULL, *fn, hasalpha = 255;
|
||||
long picfillen, texfmt = GL_RGBA, intexfmt = GL_RGBA, filh;
|
||||
|
@ -3635,7 +3635,7 @@ void polymost_drawsprite (long snum)
|
|||
double px[6], py[6];
|
||||
float f, r, c, s, fx, fy, sx0, sy0, sx1, sy1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1, ft[4];
|
||||
float x0, y0, x1, y1, sc0, sf0, sc1, sf1, px2[6], py2[6], xv, yv, t0, t1;
|
||||
long i, j, spritenum, xoff = -1, yoff = -1, method, npoints;
|
||||
long i, j, spritenum, xoff=0, yoff=0, method, npoints;
|
||||
spritetype *tspr;
|
||||
|
||||
tspr = tspriteptr[snum];
|
||||
|
@ -3965,8 +3965,8 @@ void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum,
|
|||
double ogchang, ogshang, ogctang, ogstang, oghalfx, oghoriz, fx, fy, x1, y1, z1, x2, y2;
|
||||
double ogrhalfxdown10, ogrhalfxdown10x;
|
||||
double d, cosang, sinang, cosang2, sinang2, px[8], py[8], px2[8], py2[8];
|
||||
float m[4][4];
|
||||
float ratioratio = 1.0;
|
||||
float m[4][4];
|
||||
float ratioratio = 1.0;
|
||||
int fovcorrect;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
@ -4034,17 +4034,17 @@ void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum,
|
|||
tspr.pal = dapalnum;
|
||||
tspr.owner = uniqid+MAXSPRITES;
|
||||
globalorientation = (dastat&1)+((dastat&32)<<4)+((dastat&4)<<1);
|
||||
|
||||
if ((dastat&10) == 2)
|
||||
{
|
||||
ratioratio = 1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
fovcorrect = (ratioratio > 1) ? (((windowx2-windowx1+1) * ratioratio) - windowx2-windowx1+1) * ((float)glratiocorrection / 63) * 2 : 0;
|
||||
bglViewport(windowx1 - (fovcorrect / 2),yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect,windowy2-windowy1+1);
|
||||
|
||||
if ((dastat&10) == 2)
|
||||
{
|
||||
ratioratio = 1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
fovcorrect = (ratioratio > 1) ? (((windowx2-windowx1+1) * ratioratio) - windowx2-windowx1+1) * ((float)glratiocorrection / 63) * 2 : 0;
|
||||
bglViewport(windowx1 - (fovcorrect / 2),yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect,windowy2-windowy1+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
bglViewport(0,0,xdim,ydim);
|
||||
glox1 = -1; //Force fullscreen (glox1=-1 forces it to restore)
|
||||
else
|
||||
{
|
||||
bglViewport(0,0,xdim,ydim);
|
||||
glox1 = -1; //Force fullscreen (glox1=-1 forces it to restore)
|
||||
}
|
||||
|
||||
bglMatrixMode(GL_PROJECTION);
|
||||
|
@ -4750,16 +4750,16 @@ static int osdcmd_polymostvars(const osdfuncparm_t *parm)
|
|||
else glusetexcachecompression = (val != 0);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "glmultisample")) {
|
||||
if (showval) { OSD_Printf("glmultisample is %d\n", glmultisample); }
|
||||
else glmultisample = max(0,val);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "glnvmultisamplehint")) {
|
||||
if (showval) { OSD_Printf("glnvmultisamplehint is %d\n", glnvmultisamplehint); }
|
||||
else glnvmultisamplehint = (val != 0);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "glmultisample")) {
|
||||
if (showval) { OSD_Printf("glmultisample is %d\n", glmultisample); }
|
||||
else glmultisample = max(0,val);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "glnvmultisamplehint")) {
|
||||
if (showval) { OSD_Printf("glnvmultisamplehint is %d\n", glnvmultisamplehint); }
|
||||
else glnvmultisamplehint = (val != 0);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#endif
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
@ -4805,8 +4805,8 @@ void polymost_initosdfuncs(void)
|
|||
OSD_RegisterFunction("glpolygonmode","glpolygonmode: debugging feature",osdcmd_polymostvars); //FUK
|
||||
OSD_RegisterFunction("glusetexcache","glusetexcache: enable/disable OpenGL compressed texture cache",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("glusetexcachecompression","usetexcachecompression: enable/disable compression of files in the OpenGL compressed texture cache",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("glmultisample","glmultisample: sets the number of samples used for antialiasing (0 = off)",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("glnvmultisamplehint","glnvmultisamplehint: enable/disable Nvidia multisampling hinting",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("glmultisample","glmultisample: sets the number of samples used for antialiasing (0 = off)",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("glnvmultisamplehint","glnvmultisamplehint: enable/disable Nvidia multisampling hinting",osdcmd_polymostvars);
|
||||
#endif
|
||||
OSD_RegisterFunction("usemodels","usemodels: enable/disable model rendering in >8-bit mode",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("usehightile","usehightile: enable/disable hightile texture rendering in >8-bit mode",osdcmd_polymostvars);
|
||||
|
@ -4929,7 +4929,7 @@ int dxtfilter(int fil, texcachepicture *pict, char *pic, void *midbuf, char *pac
|
|||
if (Bwrite(fil, &j, sizeof(unsigned long)) != sizeof(unsigned long)) return -1;
|
||||
if (Bwrite(fil, writebuf, cleng) != cleng) return -1;
|
||||
#else
|
||||
long j, k, offs, stride, cleng;
|
||||
unsigned long j, k, offs, stride, cleng;
|
||||
char *cptr;
|
||||
|
||||
if ((pict->format == B_LITTLE32(GL_COMPRESSED_RGB_S3TC_DXT1_EXT)) ||
|
||||
|
|
|
@ -1,394 +1,395 @@
|
|||
/*
|
||||
* File Tokeniser/Parser/Whatever
|
||||
* by Jonathon Fowler
|
||||
* Remixed completely by Ken Silverman
|
||||
* See the included license file "BUILDLIC.TXT" for license info.
|
||||
*/
|
||||
|
||||
#include "scriptfile.h"
|
||||
#include "baselayer.h"
|
||||
#include "compat.h"
|
||||
#include "cache1d.h"
|
||||
|
||||
|
||||
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
||||
static void skipoverws(scriptfile *sf) { if ((sf->textptr < sf->eof) && (!sf->textptr[0])) sf->textptr++; }
|
||||
static void skipovertoken(scriptfile *sf) { while ((sf->textptr < sf->eof) && (sf->textptr[0])) sf->textptr++; }
|
||||
|
||||
char *scriptfile_gettoken(scriptfile *sf)
|
||||
{
|
||||
char *start;
|
||||
|
||||
skipoverws(sf);
|
||||
if (sf->textptr >= sf->eof) return NULL;
|
||||
|
||||
start = sf->ltextptr = sf->textptr;
|
||||
skipovertoken(sf);
|
||||
return start;
|
||||
}
|
||||
|
||||
int scriptfile_getstring(scriptfile *sf, char **retst)
|
||||
{
|
||||
(*retst) = scriptfile_gettoken(sf);
|
||||
if (*retst == NULL)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return(-2);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
int scriptfile_getnumber(scriptfile *sf, int *num)
|
||||
{
|
||||
skipoverws(sf);
|
||||
if (sf->textptr >= sf->eof)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ((sf->textptr[0] == '0') && (sf->textptr[1] >= '0') && (sf->textptr[1] <= '9'))
|
||||
sf->textptr++; //hack to treat octal numbers like decimal
|
||||
|
||||
sf->ltextptr = sf->textptr;
|
||||
(*num) = strtol((const char *)sf->textptr,&sf->textptr,0);
|
||||
if (!ISWS(*sf->textptr) && *sf->textptr) {
|
||||
char *p = sf->textptr;
|
||||
skipovertoken(sf);
|
||||
initprintf("Error on line %s:%d: expecting int, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static double parsedouble(char *ptr, char **end)
|
||||
{
|
||||
int beforedecimal = 1, negative = 0, dig;
|
||||
int exposgn = 0, expo = 0;
|
||||
double num = 0.0, decpl = 0.1;
|
||||
char *p;
|
||||
|
||||
p = ptr;
|
||||
if (*p == '-') negative = 1, p++;
|
||||
else if (*p == '+') p++;
|
||||
for (;; p++) {
|
||||
if (*p >= '0' && *p <= '9') {
|
||||
dig = *p - '0';
|
||||
if (beforedecimal) num = num * 10.0 + dig;
|
||||
else if (exposgn) expo = expo*10 + dig;
|
||||
else {
|
||||
num += (double)dig * decpl;
|
||||
decpl /= 10.0;
|
||||
}
|
||||
} else if (*p == '.') {
|
||||
if (beforedecimal) beforedecimal = 0;
|
||||
else break;
|
||||
} else if ((*p == 'E') || (*p == 'e')) {
|
||||
exposgn = 1;
|
||||
if (p[1] == '-') { exposgn = -1; p++; }
|
||||
else if (p[1] == '+') p++;
|
||||
} else break;
|
||||
}
|
||||
|
||||
if (end) *end = p;
|
||||
if (exposgn) num *= pow(10.0,(double)(expo*exposgn));
|
||||
return negative ? -num : num;
|
||||
}
|
||||
|
||||
int scriptfile_getdouble(scriptfile *sf, double *num)
|
||||
{
|
||||
skipoverws(sf);
|
||||
if (sf->textptr >= sf->eof)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
sf->ltextptr = sf->textptr;
|
||||
|
||||
// On Linux, locale settings interfere with interpreting x.y format numbers
|
||||
//(*num) = strtod((const char *)sf->textptr,&sf->textptr);
|
||||
(*num) = parsedouble(sf->textptr, &sf->textptr);
|
||||
|
||||
if (!ISWS(*sf->textptr) && *sf->textptr) {
|
||||
char *p = sf->textptr;
|
||||
skipovertoken(sf);
|
||||
initprintf("Error on line %s:%d: expecting float, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int scriptfile_getsymbol(scriptfile *sf, int *num)
|
||||
{
|
||||
char *t, *e;
|
||||
int v;
|
||||
|
||||
t = scriptfile_gettoken(sf);
|
||||
if (!t) return -1;
|
||||
|
||||
v = Bstrtol(t, &e, 10);
|
||||
if (*e) {
|
||||
// looks like a string, so find it in the symbol table
|
||||
if (scriptfile_getsymbolvalue(t, num)) return 0;
|
||||
initprintf("Error on line %s:%d: expecting symbol, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),t);
|
||||
return -2; // not found
|
||||
}
|
||||
|
||||
*num = v;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int scriptfile_getbraces(scriptfile *sf, char **braceend)
|
||||
{
|
||||
int bracecnt;
|
||||
char *bracestart;
|
||||
|
||||
skipoverws(sf);
|
||||
if (sf->textptr >= sf->eof)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sf->textptr[0] != '{') {
|
||||
initprintf("Error on line %s:%d: expecting '{'\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
bracestart = ++sf->textptr; bracecnt = 1;
|
||||
while (1)
|
||||
{
|
||||
if (sf->textptr >= sf->eof) return(0);
|
||||
if (sf->textptr[0] == '{') bracecnt++;
|
||||
if (sf->textptr[0] == '}') { bracecnt--; if (!bracecnt) break; }
|
||||
sf->textptr++;
|
||||
}
|
||||
(*braceend) = sf->textptr;
|
||||
sf->textptr = bracestart;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int scriptfile_getlinum (scriptfile *sf, char *ptr)
|
||||
{
|
||||
int i, stp, ind;
|
||||
|
||||
//for(i=0;i<sf->linenum;i++) if (sf->lineoffs[i] >= ind) return(i+1); //brute force algo
|
||||
|
||||
ind = ((long)ptr) - ((long)sf->textbuf);
|
||||
|
||||
for(stp=1;stp+stp<sf->linenum;stp+=stp); //stp = highest power of 2 less than sf->linenum
|
||||
for(i=0;stp;stp>>=1)
|
||||
if ((i+stp < sf->linenum) && (sf->lineoffs[i+stp] < ind)) i += stp;
|
||||
return(i+1); //i = index to highest lineoffs which is less than ind; convert to 1-based line numbers
|
||||
}
|
||||
|
||||
void scriptfile_preparse (scriptfile *sf, char *tx, long flen)
|
||||
{
|
||||
long i, cr, numcr, nflen, ws, cs, inquote;
|
||||
|
||||
//Count number of lines
|
||||
numcr = 1;
|
||||
for(i=0;i<flen;i++)
|
||||
{
|
||||
//detect all 4 types of carriage return (\r, \n, \r\n, \n\r :)
|
||||
cr=0;if (tx[i] == '\r') { i += (tx[i+1] == '\n'); cr = 1; }
|
||||
else if (tx[i] == '\n') { i += (tx[i+1] == '\r'); cr = 1; }
|
||||
if (cr) { numcr++; continue; }
|
||||
}
|
||||
|
||||
sf->linenum = numcr;
|
||||
sf->lineoffs = (long *)malloc(sf->linenum*sizeof(long));
|
||||
|
||||
//Preprocess file for comments (// and /*...*/, and convert all whitespace to single spaces)
|
||||
nflen = 0; ws = 0; cs = 0; numcr = 0; inquote = 0;
|
||||
for(i=0;i<flen;i++)
|
||||
{
|
||||
//detect all 4 types of carriage return (\r, \n, \r\n, \n\r :)
|
||||
cr=0;if (tx[i] == '\r') { i += (tx[i+1] == '\n'); cr = 1; }
|
||||
else if (tx[i] == '\n') { i += (tx[i+1] == '\r'); cr = 1; }
|
||||
if (cr)
|
||||
{
|
||||
//Remember line numbers by storing the byte index at the start of each line
|
||||
//Line numbers can be retrieved by doing a binary search on the byte index :)
|
||||
sf->lineoffs[numcr++] = nflen;
|
||||
if (cs == 1) cs = 0;
|
||||
ws = 1; continue; //strip CR/LF
|
||||
}
|
||||
|
||||
if ((!inquote) && ((tx[i] == ' ') || (tx[i] == '\t'))) { ws = 1; continue; } //strip Space/Tab
|
||||
if ((tx[i] == '/') && (tx[i+1] == '/') && (!cs)) cs = 1;
|
||||
if ((tx[i] == '/') && (tx[i+1] == '*') && (!cs)) { ws = 1; cs = 2; }
|
||||
if ((tx[i] == '*') && (tx[i+1] == '/') && (cs == 2)) { cs = 0; i++; continue; }
|
||||
if (cs) continue;
|
||||
|
||||
if (ws) { tx[nflen++] = 0; ws = 0; }
|
||||
|
||||
//quotes inside strings: \"
|
||||
if ((tx[i] == '\\') && (tx[i+1] == '\"')) { i++; tx[nflen++] = '\"'; continue; }
|
||||
if (tx[i] == '\"') { inquote ^= 1; continue; }
|
||||
tx[nflen++] = tx[i];
|
||||
}
|
||||
tx[nflen++] = 0; sf->lineoffs[numcr] = nflen;
|
||||
tx[nflen++] = 0;
|
||||
|
||||
#if 0
|
||||
//for debugging only:
|
||||
printf("pre-parsed file:flen=%d,nflen=%d\n",flen,nflen);
|
||||
for(i=0;i<nflen;i++) { if (tx[i] < 32) printf("_"); else printf("%c",tx[i]); }
|
||||
printf("[eof]\nnumlines=%d\n",sf->linenum);
|
||||
for(i=0;i<sf->linenum;i++) printf("line %d = byte %d\n",i,sf->lineoffs[i]);
|
||||
#endif
|
||||
flen = nflen;
|
||||
|
||||
sf->textbuf = sf->textptr = tx;
|
||||
sf->textlength = nflen;
|
||||
sf->eof = &sf->textbuf[nflen-1];
|
||||
}
|
||||
|
||||
scriptfile *scriptfile_fromfile(char *fn)
|
||||
{
|
||||
int fp;
|
||||
scriptfile *sf;
|
||||
char *tx;
|
||||
unsigned int flen;
|
||||
|
||||
fp = kopen4load(fn,0);
|
||||
if (fp<0) return NULL;
|
||||
|
||||
flen = kfilelength(fp);
|
||||
tx = (char *) malloc(flen + 2);
|
||||
if (!tx) {
|
||||
kclose(fp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sf = (scriptfile*) malloc(sizeof(scriptfile));
|
||||
if (!sf) {
|
||||
kclose(fp);
|
||||
free(tx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kread(fp, tx, flen);
|
||||
tx[flen] = tx[flen+1] = 0;
|
||||
|
||||
kclose(fp);
|
||||
|
||||
scriptfile_preparse(sf,tx,flen);
|
||||
sf->filename = strdup(fn);
|
||||
|
||||
return sf;
|
||||
}
|
||||
|
||||
scriptfile *scriptfile_fromstring(char *string)
|
||||
{
|
||||
scriptfile *sf;
|
||||
char *tx;
|
||||
unsigned int flen;
|
||||
|
||||
if (!string) return NULL;
|
||||
|
||||
flen = strlen(string);
|
||||
|
||||
tx = (char *) malloc(flen + 2);
|
||||
if (!tx) return NULL;
|
||||
|
||||
sf = (scriptfile*) malloc(sizeof(scriptfile));
|
||||
if (!sf) {
|
||||
free(tx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(tx, string, flen);
|
||||
tx[flen] = tx[flen+1] = 0;
|
||||
|
||||
scriptfile_preparse(sf,tx,flen);
|
||||
sf->filename = NULL;
|
||||
|
||||
return sf;
|
||||
}
|
||||
|
||||
void scriptfile_close(scriptfile *sf)
|
||||
{
|
||||
if (!sf) return;
|
||||
if (sf->lineoffs) free(sf->lineoffs);
|
||||
if (sf->textbuf) free(sf->textbuf);
|
||||
if (sf->filename) free(sf->filename);
|
||||
sf->textbuf = NULL;
|
||||
sf->filename = NULL;
|
||||
free(sf);
|
||||
}
|
||||
|
||||
|
||||
#define SYMBTABSTARTSIZE 256
|
||||
static int symbtablength=0, symbtaballoclength=0;
|
||||
static char *symbtab = NULL;
|
||||
|
||||
static char * getsymbtabspace(int reqd)
|
||||
{
|
||||
char *pos,*np;
|
||||
int i;
|
||||
|
||||
if (symbtablength + reqd > symbtaballoclength)
|
||||
{
|
||||
for(i=max(symbtaballoclength,SYMBTABSTARTSIZE);symbtablength+reqd>i;i<<=1);
|
||||
np = (char *)realloc(symbtab, i); if (!np) return NULL;
|
||||
symbtab = np; symbtaballoclength = i;
|
||||
}
|
||||
|
||||
pos = &symbtab[symbtablength];
|
||||
symbtablength += reqd;
|
||||
return pos;
|
||||
}
|
||||
|
||||
int scriptfile_getsymbolvalue(char *name, int *val)
|
||||
{
|
||||
char *scanner = symbtab;
|
||||
|
||||
if (!symbtab) return 0;
|
||||
while (scanner - symbtab < symbtablength) {
|
||||
if (!Bstrcasecmp(name, scanner)) {
|
||||
*val = *(int*)(scanner + strlen(scanner) + 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
scanner += strlen(scanner) + 1 + sizeof(int);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int scriptfile_addsymbolvalue(char *name, int val)
|
||||
{
|
||||
int x;
|
||||
char *sp;
|
||||
// if (scriptfile_getsymbolvalue(name, &x)) return -1; // already exists
|
||||
|
||||
if (symbtab) {
|
||||
char *scanner = symbtab;
|
||||
while (scanner - symbtab < symbtablength) {
|
||||
if (!Bstrcasecmp(name, scanner)) {
|
||||
*(int*)(scanner + strlen(scanner) + 1) = val;
|
||||
return 1;
|
||||
}
|
||||
|
||||
scanner += strlen(scanner) + 1 + sizeof(int);
|
||||
}
|
||||
}
|
||||
|
||||
sp = getsymbtabspace(strlen(name) + 1 + sizeof(int));
|
||||
if (!sp) return 0;
|
||||
strcpy(sp, name);
|
||||
sp += strlen(name)+1;
|
||||
*(int*)sp = val;
|
||||
return 1; // added
|
||||
}
|
||||
|
||||
void scriptfile_clearsymbols(void)
|
||||
{
|
||||
if (symbtab) free(symbtab);
|
||||
symbtab = NULL;
|
||||
symbtablength = 0;
|
||||
symbtaballoclength = 0;
|
||||
}
|
||||
/*
|
||||
* File Tokeniser/Parser/Whatever
|
||||
* by Jonathon Fowler
|
||||
* Remixed completely by Ken Silverman
|
||||
* See the included license file "BUILDLIC.TXT" for license info.
|
||||
*/
|
||||
|
||||
#include "scriptfile.h"
|
||||
#include "baselayer.h"
|
||||
#include "compat.h"
|
||||
#include "cache1d.h"
|
||||
#include <math.h>
|
||||
|
||||
|
||||
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
||||
static void skipoverws(scriptfile *sf) { if ((sf->textptr < sf->eof) && (!sf->textptr[0])) sf->textptr++; }
|
||||
static void skipovertoken(scriptfile *sf) { while ((sf->textptr < sf->eof) && (sf->textptr[0])) sf->textptr++; }
|
||||
|
||||
char *scriptfile_gettoken(scriptfile *sf)
|
||||
{
|
||||
char *start;
|
||||
|
||||
skipoverws(sf);
|
||||
if (sf->textptr >= sf->eof) return NULL;
|
||||
|
||||
start = sf->ltextptr = sf->textptr;
|
||||
skipovertoken(sf);
|
||||
return start;
|
||||
}
|
||||
|
||||
int scriptfile_getstring(scriptfile *sf, char **retst)
|
||||
{
|
||||
(*retst) = scriptfile_gettoken(sf);
|
||||
if (*retst == NULL)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return(-2);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
int scriptfile_getnumber(scriptfile *sf, int *num)
|
||||
{
|
||||
skipoverws(sf);
|
||||
if (sf->textptr >= sf->eof)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ((sf->textptr[0] == '0') && (sf->textptr[1] >= '0') && (sf->textptr[1] <= '9'))
|
||||
sf->textptr++; //hack to treat octal numbers like decimal
|
||||
|
||||
sf->ltextptr = sf->textptr;
|
||||
(*num) = strtol((const char *)sf->textptr,&sf->textptr,0);
|
||||
if (!ISWS(*sf->textptr) && *sf->textptr) {
|
||||
char *p = sf->textptr;
|
||||
skipovertoken(sf);
|
||||
initprintf("Error on line %s:%d: expecting int, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static double parsedouble(char *ptr, char **end)
|
||||
{
|
||||
int beforedecimal = 1, negative = 0, dig;
|
||||
int exposgn = 0, expo = 0;
|
||||
double num = 0.0, decpl = 0.1;
|
||||
char *p;
|
||||
|
||||
p = ptr;
|
||||
if (*p == '-') negative = 1, p++;
|
||||
else if (*p == '+') p++;
|
||||
for (;; p++) {
|
||||
if (*p >= '0' && *p <= '9') {
|
||||
dig = *p - '0';
|
||||
if (beforedecimal) num = num * 10.0 + dig;
|
||||
else if (exposgn) expo = expo*10 + dig;
|
||||
else {
|
||||
num += (double)dig * decpl;
|
||||
decpl /= 10.0;
|
||||
}
|
||||
} else if (*p == '.') {
|
||||
if (beforedecimal) beforedecimal = 0;
|
||||
else break;
|
||||
} else if ((*p == 'E') || (*p == 'e')) {
|
||||
exposgn = 1;
|
||||
if (p[1] == '-') { exposgn = -1; p++; }
|
||||
else if (p[1] == '+') p++;
|
||||
} else break;
|
||||
}
|
||||
|
||||
if (end) *end = p;
|
||||
if (exposgn) num *= pow(10.0,(double)(expo*exposgn));
|
||||
return negative ? -num : num;
|
||||
}
|
||||
|
||||
int scriptfile_getdouble(scriptfile *sf, double *num)
|
||||
{
|
||||
skipoverws(sf);
|
||||
if (sf->textptr >= sf->eof)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
sf->ltextptr = sf->textptr;
|
||||
|
||||
// On Linux, locale settings interfere with interpreting x.y format numbers
|
||||
//(*num) = strtod((const char *)sf->textptr,&sf->textptr);
|
||||
(*num) = parsedouble(sf->textptr, &sf->textptr);
|
||||
|
||||
if (!ISWS(*sf->textptr) && *sf->textptr) {
|
||||
char *p = sf->textptr;
|
||||
skipovertoken(sf);
|
||||
initprintf("Error on line %s:%d: expecting float, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int scriptfile_getsymbol(scriptfile *sf, int *num)
|
||||
{
|
||||
char *t, *e;
|
||||
int v;
|
||||
|
||||
t = scriptfile_gettoken(sf);
|
||||
if (!t) return -1;
|
||||
|
||||
v = Bstrtol(t, &e, 10);
|
||||
if (*e) {
|
||||
// looks like a string, so find it in the symbol table
|
||||
if (scriptfile_getsymbolvalue(t, num)) return 0;
|
||||
initprintf("Error on line %s:%d: expecting symbol, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),t);
|
||||
return -2; // not found
|
||||
}
|
||||
|
||||
*num = v;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int scriptfile_getbraces(scriptfile *sf, char **braceend)
|
||||
{
|
||||
int bracecnt;
|
||||
char *bracestart;
|
||||
|
||||
skipoverws(sf);
|
||||
if (sf->textptr >= sf->eof)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sf->textptr[0] != '{') {
|
||||
initprintf("Error on line %s:%d: expecting '{'\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
bracestart = ++sf->textptr; bracecnt = 1;
|
||||
while (1)
|
||||
{
|
||||
if (sf->textptr >= sf->eof) return(0);
|
||||
if (sf->textptr[0] == '{') bracecnt++;
|
||||
if (sf->textptr[0] == '}') { bracecnt--; if (!bracecnt) break; }
|
||||
sf->textptr++;
|
||||
}
|
||||
(*braceend) = sf->textptr;
|
||||
sf->textptr = bracestart;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int scriptfile_getlinum (scriptfile *sf, char *ptr)
|
||||
{
|
||||
int i, stp, ind;
|
||||
|
||||
//for(i=0;i<sf->linenum;i++) if (sf->lineoffs[i] >= ind) return(i+1); //brute force algo
|
||||
|
||||
ind = ((long)ptr) - ((long)sf->textbuf);
|
||||
|
||||
for(stp=1;stp+stp<sf->linenum;stp+=stp); //stp = highest power of 2 less than sf->linenum
|
||||
for(i=0;stp;stp>>=1)
|
||||
if ((i+stp < sf->linenum) && (sf->lineoffs[i+stp] < ind)) i += stp;
|
||||
return(i+1); //i = index to highest lineoffs which is less than ind; convert to 1-based line numbers
|
||||
}
|
||||
|
||||
void scriptfile_preparse (scriptfile *sf, char *tx, long flen)
|
||||
{
|
||||
long i, cr, numcr, nflen, ws, cs, inquote;
|
||||
|
||||
//Count number of lines
|
||||
numcr = 1;
|
||||
for(i=0;i<flen;i++)
|
||||
{
|
||||
//detect all 4 types of carriage return (\r, \n, \r\n, \n\r :)
|
||||
cr=0;if (tx[i] == '\r') { i += (tx[i+1] == '\n'); cr = 1; }
|
||||
else if (tx[i] == '\n') { i += (tx[i+1] == '\r'); cr = 1; }
|
||||
if (cr) { numcr++; continue; }
|
||||
}
|
||||
|
||||
sf->linenum = numcr;
|
||||
sf->lineoffs = (long *)malloc(sf->linenum*sizeof(long));
|
||||
|
||||
//Preprocess file for comments (// and /*...*/, and convert all whitespace to single spaces)
|
||||
nflen = 0; ws = 0; cs = 0; numcr = 0; inquote = 0;
|
||||
for(i=0;i<flen;i++)
|
||||
{
|
||||
//detect all 4 types of carriage return (\r, \n, \r\n, \n\r :)
|
||||
cr=0;if (tx[i] == '\r') { i += (tx[i+1] == '\n'); cr = 1; }
|
||||
else if (tx[i] == '\n') { i += (tx[i+1] == '\r'); cr = 1; }
|
||||
if (cr)
|
||||
{
|
||||
//Remember line numbers by storing the byte index at the start of each line
|
||||
//Line numbers can be retrieved by doing a binary search on the byte index :)
|
||||
sf->lineoffs[numcr++] = nflen;
|
||||
if (cs == 1) cs = 0;
|
||||
ws = 1; continue; //strip CR/LF
|
||||
}
|
||||
|
||||
if ((!inquote) && ((tx[i] == ' ') || (tx[i] == '\t'))) { ws = 1; continue; } //strip Space/Tab
|
||||
if ((tx[i] == '/') && (tx[i+1] == '/') && (!cs)) cs = 1;
|
||||
if ((tx[i] == '/') && (tx[i+1] == '*') && (!cs)) { ws = 1; cs = 2; }
|
||||
if ((tx[i] == '*') && (tx[i+1] == '/') && (cs == 2)) { cs = 0; i++; continue; }
|
||||
if (cs) continue;
|
||||
|
||||
if (ws) { tx[nflen++] = 0; ws = 0; }
|
||||
|
||||
//quotes inside strings: \"
|
||||
if ((tx[i] == '\\') && (tx[i+1] == '\"')) { i++; tx[nflen++] = '\"'; continue; }
|
||||
if (tx[i] == '\"') { inquote ^= 1; continue; }
|
||||
tx[nflen++] = tx[i];
|
||||
}
|
||||
tx[nflen++] = 0; sf->lineoffs[numcr] = nflen;
|
||||
tx[nflen++] = 0;
|
||||
|
||||
#if 0
|
||||
//for debugging only:
|
||||
printf("pre-parsed file:flen=%d,nflen=%d\n",flen,nflen);
|
||||
for(i=0;i<nflen;i++) { if (tx[i] < 32) printf("_"); else printf("%c",tx[i]); }
|
||||
printf("[eof]\nnumlines=%d\n",sf->linenum);
|
||||
for(i=0;i<sf->linenum;i++) printf("line %d = byte %d\n",i,sf->lineoffs[i]);
|
||||
#endif
|
||||
flen = nflen;
|
||||
|
||||
sf->textbuf = sf->textptr = tx;
|
||||
sf->textlength = nflen;
|
||||
sf->eof = &sf->textbuf[nflen-1];
|
||||
}
|
||||
|
||||
scriptfile *scriptfile_fromfile(char *fn)
|
||||
{
|
||||
int fp;
|
||||
scriptfile *sf;
|
||||
char *tx;
|
||||
unsigned int flen;
|
||||
|
||||
fp = kopen4load(fn,0);
|
||||
if (fp<0) return NULL;
|
||||
|
||||
flen = kfilelength(fp);
|
||||
tx = (char *) malloc(flen + 2);
|
||||
if (!tx) {
|
||||
kclose(fp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sf = (scriptfile*) malloc(sizeof(scriptfile));
|
||||
if (!sf) {
|
||||
kclose(fp);
|
||||
free(tx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kread(fp, tx, flen);
|
||||
tx[flen] = tx[flen+1] = 0;
|
||||
|
||||
kclose(fp);
|
||||
|
||||
scriptfile_preparse(sf,tx,flen);
|
||||
sf->filename = strdup(fn);
|
||||
|
||||
return sf;
|
||||
}
|
||||
|
||||
scriptfile *scriptfile_fromstring(char *string)
|
||||
{
|
||||
scriptfile *sf;
|
||||
char *tx;
|
||||
unsigned int flen;
|
||||
|
||||
if (!string) return NULL;
|
||||
|
||||
flen = strlen(string);
|
||||
|
||||
tx = (char *) malloc(flen + 2);
|
||||
if (!tx) return NULL;
|
||||
|
||||
sf = (scriptfile*) malloc(sizeof(scriptfile));
|
||||
if (!sf) {
|
||||
free(tx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(tx, string, flen);
|
||||
tx[flen] = tx[flen+1] = 0;
|
||||
|
||||
scriptfile_preparse(sf,tx,flen);
|
||||
sf->filename = NULL;
|
||||
|
||||
return sf;
|
||||
}
|
||||
|
||||
void scriptfile_close(scriptfile *sf)
|
||||
{
|
||||
if (!sf) return;
|
||||
if (sf->lineoffs) free(sf->lineoffs);
|
||||
if (sf->textbuf) free(sf->textbuf);
|
||||
if (sf->filename) free(sf->filename);
|
||||
sf->textbuf = NULL;
|
||||
sf->filename = NULL;
|
||||
free(sf);
|
||||
}
|
||||
|
||||
|
||||
#define SYMBTABSTARTSIZE 256
|
||||
static int symbtablength=0, symbtaballoclength=0;
|
||||
static char *symbtab = NULL;
|
||||
|
||||
static char * getsymbtabspace(int reqd)
|
||||
{
|
||||
char *pos,*np;
|
||||
int i;
|
||||
|
||||
if (symbtablength + reqd > symbtaballoclength)
|
||||
{
|
||||
for(i=max(symbtaballoclength,SYMBTABSTARTSIZE);symbtablength+reqd>i;i<<=1);
|
||||
np = (char *)realloc(symbtab, i); if (!np) return NULL;
|
||||
symbtab = np; symbtaballoclength = i;
|
||||
}
|
||||
|
||||
pos = &symbtab[symbtablength];
|
||||
symbtablength += reqd;
|
||||
return pos;
|
||||
}
|
||||
|
||||
int scriptfile_getsymbolvalue(char *name, int *val)
|
||||
{
|
||||
char *scanner = symbtab;
|
||||
|
||||
if (!symbtab) return 0;
|
||||
while (scanner - symbtab < symbtablength) {
|
||||
if (!Bstrcasecmp(name, scanner)) {
|
||||
*val = *(int*)(scanner + strlen(scanner) + 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
scanner += strlen(scanner) + 1 + sizeof(int);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int scriptfile_addsymbolvalue(char *name, int val)
|
||||
{
|
||||
int x;
|
||||
char *sp;
|
||||
// if (scriptfile_getsymbolvalue(name, &x)) return -1; // already exists
|
||||
|
||||
if (symbtab) {
|
||||
char *scanner = symbtab;
|
||||
while (scanner - symbtab < symbtablength) {
|
||||
if (!Bstrcasecmp(name, scanner)) {
|
||||
*(int*)(scanner + strlen(scanner) + 1) = val;
|
||||
return 1;
|
||||
}
|
||||
|
||||
scanner += strlen(scanner) + 1 + sizeof(int);
|
||||
}
|
||||
}
|
||||
|
||||
sp = getsymbtabspace(strlen(name) + 1 + sizeof(int));
|
||||
if (!sp) return 0;
|
||||
strcpy(sp, name);
|
||||
sp += strlen(name)+1;
|
||||
*(int*)sp = val;
|
||||
return 1; // added
|
||||
}
|
||||
|
||||
void scriptfile_clearsymbols(void)
|
||||
{
|
||||
if (symbtab) free(symbtab);
|
||||
symbtab = NULL;
|
||||
symbtablength = 0;
|
||||
symbtaballoclength = 0;
|
||||
}
|
||||
|
|
|
@ -1105,6 +1105,7 @@ void showframe(int w)
|
|||
bglPushMatrix();
|
||||
bglLoadIdentity();
|
||||
|
||||
bglDisable(GL_ALPHA_TEST);
|
||||
bglDisable(GL_DEPTH_TEST);
|
||||
bglDisable(GL_ALPHA_TEST);
|
||||
bglDisable(GL_TEXTURE_2D);
|
||||
|
|
|
@ -1,179 +1,179 @@
|
|||
// SMALLTEXTFONT.C
|
||||
|
||||
// Font created by Ken Silverman
|
||||
// Generated by BIN2C.EXE by Jonathon Fowler
|
||||
|
||||
char smalltextfont[2048] = {
|
||||
// 2048 bytes
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x24,
|
||||
0x3C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x24, 0x3C, 0x24, 0x18, 0x00, 0x00,
|
||||
0x00, 0x28, 0x3C, 0x3C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x10, 0x38, 0x3C,
|
||||
0x38, 0x10, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x3C, 0x00, 0x00,
|
||||
0x00, 0x18, 0x18, 0x3C, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x28, 0x38, 0x38, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x14, 0x14, 0x30, 0x00, 0x00,
|
||||
0x00, 0x24, 0x18, 0x3C, 0x18, 0x24, 0x00, 0x00, 0x00, 0x20, 0x30, 0x38,
|
||||
0x30, 0x20, 0x00, 0x00, 0x00, 0x08, 0x18, 0x38, 0x18, 0x08, 0x00, 0x00,
|
||||
0x00, 0x10, 0x38, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28,
|
||||
0x00, 0x28, 0x00, 0x00, 0x00, 0x1C, 0x34, 0x34, 0x14, 0x14, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x30, 0x28, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x38, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x38, 0x38, 0x00, 0x00,
|
||||
0x00, 0x10, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10,
|
||||
0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x3C, 0x08, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x10, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x3C, 0x28, 0x3C, 0x28, 0x00, 0x00,
|
||||
0x00, 0x18, 0x30, 0x10, 0x18, 0x30, 0x00, 0x00, 0x00, 0x28, 0x08, 0x10,
|
||||
0x20, 0x28, 0x00, 0x00, 0x00, 0x10, 0x28, 0x10, 0x30, 0x38, 0x00, 0x00,
|
||||
0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x20,
|
||||
0x20, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x28, 0x10, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38,
|
||||
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10, 0x10, 0x20, 0x00, 0x00,
|
||||
0x00, 0x38, 0x28, 0x28, 0x28, 0x38, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x00, 0x00, 0x00, 0x38, 0x08, 0x38, 0x20, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x08, 0x38, 0x08, 0x38, 0x00, 0x00, 0x00, 0x28, 0x28, 0x38,
|
||||
0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x08, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x20, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x38, 0x08, 0x08,
|
||||
0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x28, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x28, 0x38, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x20, 0x00, 0x00,
|
||||
0x00, 0x08, 0x10, 0x20, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x10, 0x20, 0x00, 0x00,
|
||||
0x00, 0x30, 0x08, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38,
|
||||
0x30, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x38, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x30, 0x28, 0x30, 0x28, 0x30, 0x00, 0x00, 0x00, 0x18, 0x20, 0x20,
|
||||
0x20, 0x18, 0x00, 0x00, 0x00, 0x30, 0x28, 0x28, 0x28, 0x30, 0x00, 0x00,
|
||||
0x00, 0x38, 0x20, 0x30, 0x20, 0x38, 0x00, 0x00, 0x00, 0x38, 0x20, 0x30,
|
||||
0x20, 0x20, 0x00, 0x00, 0x00, 0x38, 0x20, 0x28, 0x28, 0x38, 0x00, 0x00,
|
||||
0x00, 0x28, 0x28, 0x38, 0x28, 0x28, 0x00, 0x00, 0x00, 0x38, 0x10, 0x10,
|
||||
0x10, 0x38, 0x00, 0x00, 0x00, 0x38, 0x08, 0x08, 0x28, 0x18, 0x00, 0x00,
|
||||
0x00, 0x28, 0x28, 0x30, 0x28, 0x28, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20,
|
||||
0x20, 0x38, 0x00, 0x00, 0x00, 0x28, 0x38, 0x38, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x28, 0x38, 0x38, 0x38, 0x28, 0x00, 0x00, 0x00, 0x38, 0x28, 0x28,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x20, 0x20, 0x00, 0x00,
|
||||
0x00, 0x38, 0x28, 0x28, 0x38, 0x18, 0x00, 0x00, 0x00, 0x38, 0x28, 0x30,
|
||||
0x28, 0x28, 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x08, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x28, 0x28, 0x38, 0x38, 0x28, 0x00, 0x00, 0x00, 0x28, 0x28, 0x10,
|
||||
0x28, 0x28, 0x00, 0x00, 0x00, 0x28, 0x28, 0x38, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x38, 0x08, 0x10, 0x20, 0x38, 0x00, 0x00, 0x00, 0x30, 0x20, 0x20,
|
||||
0x20, 0x30, 0x00, 0x00, 0x00, 0x20, 0x10, 0x10, 0x08, 0x08, 0x00, 0x00,
|
||||
0x00, 0x18, 0x08, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x10, 0x28, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
|
||||
0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x20, 0x20, 0x38, 0x28, 0x38, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x00, 0x00, 0x00, 0x08, 0x08, 0x38,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00,
|
||||
0x00, 0x08, 0x10, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28,
|
||||
0x18, 0x08, 0x30, 0x00, 0x00, 0x20, 0x20, 0x38, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
|
||||
0x10, 0x10, 0x20, 0x00, 0x00, 0x20, 0x20, 0x28, 0x30, 0x28, 0x00, 0x00,
|
||||
0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x38,
|
||||
0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
|
||||
0x28, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x08, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
|
||||
0x10, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
|
||||
0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x28, 0x10, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
|
||||
0x28, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x18, 0x00, 0x00,
|
||||
0x00, 0x18, 0x10, 0x20, 0x10, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00,
|
||||
0x10, 0x10, 0x00, 0x00, 0x00, 0x30, 0x10, 0x08, 0x10, 0x30, 0x00, 0x00,
|
||||
0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x18, 0x20, 0x20, 0x20, 0x18, 0x30, 0x00,
|
||||
0x00, 0x28, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18,
|
||||
0x38, 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x18, 0x28, 0x18, 0x00, 0x00,
|
||||
0x00, 0x28, 0x00, 0x18, 0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x18,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x28, 0x18, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x10, 0x00, 0x00, 0x38, 0x00, 0x18,
|
||||
0x38, 0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00,
|
||||
0x00, 0x30, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
|
||||
0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x30, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x28, 0x10, 0x28,
|
||||
0x38, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x38, 0x28, 0x00, 0x00,
|
||||
0x00, 0x18, 0x00, 0x38, 0x30, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
|
||||
0x28, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x28, 0x3C, 0x28, 0x2C, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x00, 0x38,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x28,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x28, 0x18, 0x30, 0x00,
|
||||
0x00, 0x28, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x20, 0x38, 0x10, 0x00, 0x00,
|
||||
0x00, 0x18, 0x14, 0x30, 0x10, 0x3C, 0x00, 0x00, 0x00, 0x28, 0x10, 0x38,
|
||||
0x38, 0x10, 0x00, 0x00, 0x00, 0x30, 0x28, 0x3C, 0x28, 0x2C, 0x00, 0x00,
|
||||
0x00, 0x18, 0x10, 0x38, 0x10, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x18, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x28,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x28, 0x38, 0x28, 0x00, 0x00, 0x00, 0x18, 0x28, 0x18,
|
||||
0x00, 0x38, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x38, 0x00, 0x00,
|
||||
0x00, 0x10, 0x00, 0x10, 0x20, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
|
||||
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x00, 0x00, 0x00,
|
||||
0x00, 0x20, 0x28, 0x10, 0x38, 0x18, 0x00, 0x00, 0x00, 0x20, 0x28, 0x18,
|
||||
0x38, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x14, 0x28, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x14,
|
||||
0x28, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x08, 0x20, 0x08, 0x20, 0x00,
|
||||
0x00, 0x14, 0x28, 0x14, 0x28, 0x14, 0x28, 0x00, 0x00, 0x34, 0x1C, 0x34,
|
||||
0x1C, 0x34, 0x1C, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x10, 0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x30,
|
||||
0x30, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x30,
|
||||
0x30, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x38, 0x38, 0x18, 0x18, 0x00,
|
||||
0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x38,
|
||||
0x38, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x38, 0x38, 0x00, 0x00, 0x00,
|
||||
0x00, 0x18, 0x18, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x30,
|
||||
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x10, 0x10, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x10, 0x10, 0x1C, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x3C, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x10, 0x10, 0x1C, 0x1C, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x1C,
|
||||
0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x1C, 0x1C, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1C, 0x1C, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x3C,
|
||||
0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x18, 0x18, 0x00,
|
||||
0x00, 0x18, 0x18, 0x1C, 0x1C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x3C,
|
||||
0x3C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00,
|
||||
0x00, 0x10, 0x10, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x10, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x1C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1C, 0x1C, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1C, 0x1C, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
|
||||
0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x3C, 0x18, 0x18, 0x18, 0x00,
|
||||
0x00, 0x10, 0x10, 0x3C, 0x3C, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x30,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00,
|
||||
0x00, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x00, 0x00, 0x3C, 0x3C, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x28, 0x34, 0x00, 0x00,
|
||||
0x00, 0x30, 0x28, 0x30, 0x28, 0x30, 0x20, 0x00, 0x00, 0x38, 0x28, 0x20,
|
||||
0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x00, 0x00,
|
||||
0x00, 0x38, 0x20, 0x10, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
|
||||
0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x30, 0x20, 0x00, 0x00,
|
||||
0x00, 0x00, 0x14, 0x28, 0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x10, 0x28,
|
||||
0x10, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x38, 0x28, 0x10, 0x00, 0x00,
|
||||
0x00, 0x18, 0x24, 0x24, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x18, 0x10, 0x18,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x18, 0x3C, 0x18, 0x20, 0x00, 0x00, 0x00, 0x18, 0x20, 0x30,
|
||||
0x20, 0x18, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10,
|
||||
0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x08, 0x10, 0x00, 0x38, 0x00, 0x00,
|
||||
0x00, 0x10, 0x20, 0x10, 0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x20,
|
||||
0x20, 0x20, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x28, 0x10, 0x00, 0x00,
|
||||
0x00, 0x10, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38,
|
||||
0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x30, 0x10, 0x00, 0x00,
|
||||
0x00, 0x30, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x38,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
// SMALLTEXTFONT.C
|
||||
|
||||
// Font created by Ken Silverman
|
||||
// Generated by BIN2C.EXE by Jonathon Fowler
|
||||
|
||||
char smalltextfont[2048] = {
|
||||
// 2048 bytes
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x24,
|
||||
0x3C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x24, 0x3C, 0x24, 0x18, 0x00, 0x00,
|
||||
0x00, 0x28, 0x3C, 0x3C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x10, 0x38, 0x3C,
|
||||
0x38, 0x10, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x3C, 0x00, 0x00,
|
||||
0x00, 0x18, 0x18, 0x3C, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x28, 0x38, 0x38, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x14, 0x14, 0x30, 0x00, 0x00,
|
||||
0x00, 0x24, 0x18, 0x3C, 0x18, 0x24, 0x00, 0x00, 0x00, 0x20, 0x30, 0x38,
|
||||
0x30, 0x20, 0x00, 0x00, 0x00, 0x08, 0x18, 0x38, 0x18, 0x08, 0x00, 0x00,
|
||||
0x00, 0x10, 0x38, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28,
|
||||
0x00, 0x28, 0x00, 0x00, 0x00, 0x1C, 0x34, 0x34, 0x14, 0x14, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x30, 0x28, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x38, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x38, 0x38, 0x00, 0x00,
|
||||
0x00, 0x10, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10,
|
||||
0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x3C, 0x08, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x10, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x3C, 0x28, 0x3C, 0x28, 0x00, 0x00,
|
||||
0x00, 0x18, 0x30, 0x10, 0x18, 0x30, 0x00, 0x00, 0x00, 0x28, 0x08, 0x10,
|
||||
0x20, 0x28, 0x00, 0x00, 0x00, 0x10, 0x28, 0x10, 0x30, 0x38, 0x00, 0x00,
|
||||
0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x20,
|
||||
0x20, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x28, 0x10, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38,
|
||||
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10, 0x10, 0x20, 0x00, 0x00,
|
||||
0x00, 0x38, 0x28, 0x28, 0x28, 0x38, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x00, 0x00, 0x00, 0x38, 0x08, 0x38, 0x20, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x08, 0x38, 0x08, 0x38, 0x00, 0x00, 0x00, 0x28, 0x28, 0x38,
|
||||
0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x08, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x20, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x38, 0x08, 0x08,
|
||||
0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x28, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x28, 0x38, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x20, 0x00, 0x00,
|
||||
0x00, 0x08, 0x10, 0x20, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x10, 0x20, 0x00, 0x00,
|
||||
0x00, 0x30, 0x08, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38,
|
||||
0x30, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x38, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x30, 0x28, 0x30, 0x28, 0x30, 0x00, 0x00, 0x00, 0x18, 0x20, 0x20,
|
||||
0x20, 0x18, 0x00, 0x00, 0x00, 0x30, 0x28, 0x28, 0x28, 0x30, 0x00, 0x00,
|
||||
0x00, 0x38, 0x20, 0x30, 0x20, 0x38, 0x00, 0x00, 0x00, 0x38, 0x20, 0x30,
|
||||
0x20, 0x20, 0x00, 0x00, 0x00, 0x38, 0x20, 0x28, 0x28, 0x38, 0x00, 0x00,
|
||||
0x00, 0x28, 0x28, 0x38, 0x28, 0x28, 0x00, 0x00, 0x00, 0x38, 0x10, 0x10,
|
||||
0x10, 0x38, 0x00, 0x00, 0x00, 0x38, 0x08, 0x08, 0x28, 0x18, 0x00, 0x00,
|
||||
0x00, 0x28, 0x28, 0x30, 0x28, 0x28, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20,
|
||||
0x20, 0x38, 0x00, 0x00, 0x00, 0x28, 0x38, 0x38, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x28, 0x38, 0x38, 0x38, 0x28, 0x00, 0x00, 0x00, 0x38, 0x28, 0x28,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x20, 0x20, 0x00, 0x00,
|
||||
0x00, 0x38, 0x28, 0x28, 0x38, 0x18, 0x00, 0x00, 0x00, 0x38, 0x28, 0x30,
|
||||
0x28, 0x28, 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x08, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x28, 0x28, 0x38, 0x38, 0x28, 0x00, 0x00, 0x00, 0x28, 0x28, 0x10,
|
||||
0x28, 0x28, 0x00, 0x00, 0x00, 0x28, 0x28, 0x38, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x38, 0x08, 0x10, 0x20, 0x38, 0x00, 0x00, 0x00, 0x30, 0x20, 0x20,
|
||||
0x20, 0x30, 0x00, 0x00, 0x00, 0x20, 0x10, 0x10, 0x08, 0x08, 0x00, 0x00,
|
||||
0x00, 0x18, 0x08, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x10, 0x28, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
|
||||
0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x20, 0x20, 0x38, 0x28, 0x38, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x00, 0x00, 0x00, 0x08, 0x08, 0x38,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00,
|
||||
0x00, 0x08, 0x10, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28,
|
||||
0x18, 0x08, 0x30, 0x00, 0x00, 0x20, 0x20, 0x38, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
|
||||
0x10, 0x10, 0x20, 0x00, 0x00, 0x20, 0x20, 0x28, 0x30, 0x28, 0x00, 0x00,
|
||||
0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x38,
|
||||
0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
|
||||
0x28, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x08, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
|
||||
0x10, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
|
||||
0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x28, 0x10, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
|
||||
0x28, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x18, 0x00, 0x00,
|
||||
0x00, 0x18, 0x10, 0x20, 0x10, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00,
|
||||
0x10, 0x10, 0x00, 0x00, 0x00, 0x30, 0x10, 0x08, 0x10, 0x30, 0x00, 0x00,
|
||||
0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x18, 0x20, 0x20, 0x20, 0x18, 0x30, 0x00,
|
||||
0x00, 0x28, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18,
|
||||
0x38, 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x18, 0x28, 0x18, 0x00, 0x00,
|
||||
0x00, 0x28, 0x00, 0x18, 0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x18,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x28, 0x18, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x10, 0x00, 0x00, 0x38, 0x00, 0x18,
|
||||
0x38, 0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00,
|
||||
0x00, 0x30, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
|
||||
0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x30, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x28, 0x10, 0x28,
|
||||
0x38, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x38, 0x28, 0x00, 0x00,
|
||||
0x00, 0x18, 0x00, 0x38, 0x30, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
|
||||
0x28, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x28, 0x3C, 0x28, 0x2C, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x00, 0x38,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x28,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x28, 0x18, 0x30, 0x00,
|
||||
0x00, 0x28, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x20, 0x38, 0x10, 0x00, 0x00,
|
||||
0x00, 0x18, 0x14, 0x30, 0x10, 0x3C, 0x00, 0x00, 0x00, 0x28, 0x10, 0x38,
|
||||
0x38, 0x10, 0x00, 0x00, 0x00, 0x30, 0x28, 0x3C, 0x28, 0x2C, 0x00, 0x00,
|
||||
0x00, 0x18, 0x10, 0x38, 0x10, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x18, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x28,
|
||||
0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x28, 0x38, 0x28, 0x00, 0x00, 0x00, 0x18, 0x28, 0x18,
|
||||
0x00, 0x38, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x38, 0x00, 0x00,
|
||||
0x00, 0x10, 0x00, 0x10, 0x20, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
|
||||
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x00, 0x00, 0x00,
|
||||
0x00, 0x20, 0x28, 0x10, 0x38, 0x18, 0x00, 0x00, 0x00, 0x20, 0x28, 0x18,
|
||||
0x38, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00,
|
||||
0x00, 0x00, 0x14, 0x28, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x14,
|
||||
0x28, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x08, 0x20, 0x08, 0x20, 0x00,
|
||||
0x00, 0x14, 0x28, 0x14, 0x28, 0x14, 0x28, 0x00, 0x00, 0x34, 0x1C, 0x34,
|
||||
0x1C, 0x34, 0x1C, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x10, 0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x30,
|
||||
0x30, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x00,
|
||||
0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x30,
|
||||
0x30, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x38, 0x38, 0x18, 0x18, 0x00,
|
||||
0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x38,
|
||||
0x38, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x38, 0x38, 0x00, 0x00, 0x00,
|
||||
0x00, 0x18, 0x18, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x30,
|
||||
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x10, 0x10, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x10, 0x10, 0x1C, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x3C, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x10, 0x10, 0x1C, 0x1C, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x1C,
|
||||
0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x1C, 0x1C, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1C, 0x1C, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x3C,
|
||||
0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x18, 0x18, 0x00,
|
||||
0x00, 0x18, 0x18, 0x1C, 0x1C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x3C,
|
||||
0x3C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00,
|
||||
0x00, 0x10, 0x10, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x10, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x1C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1C, 0x1C, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1C, 0x1C, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
|
||||
0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x3C, 0x18, 0x18, 0x18, 0x00,
|
||||
0x00, 0x10, 0x10, 0x3C, 0x3C, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x30,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x10, 0x10, 0x10, 0x00,
|
||||
0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00,
|
||||
0x00, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x00, 0x00, 0x3C, 0x3C, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x28, 0x34, 0x00, 0x00,
|
||||
0x00, 0x30, 0x28, 0x30, 0x28, 0x30, 0x20, 0x00, 0x00, 0x38, 0x28, 0x20,
|
||||
0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x00, 0x00,
|
||||
0x00, 0x38, 0x20, 0x10, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
|
||||
0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x30, 0x20, 0x00, 0x00,
|
||||
0x00, 0x00, 0x14, 0x28, 0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x10, 0x28,
|
||||
0x10, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x38, 0x28, 0x10, 0x00, 0x00,
|
||||
0x00, 0x18, 0x24, 0x24, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x18, 0x10, 0x18,
|
||||
0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x18, 0x3C, 0x18, 0x20, 0x00, 0x00, 0x00, 0x18, 0x20, 0x30,
|
||||
0x20, 0x18, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10,
|
||||
0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x08, 0x10, 0x00, 0x38, 0x00, 0x00,
|
||||
0x00, 0x10, 0x20, 0x10, 0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x20,
|
||||
0x20, 0x20, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x28, 0x10, 0x00, 0x00,
|
||||
0x00, 0x10, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38,
|
||||
0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x30, 0x10, 0x00, 0x00,
|
||||
0x00, 0x30, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x38,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
|
|
@ -1,179 +1,179 @@
|
|||
// TEXTFONT.C
|
||||
|
||||
// Extracted from a Matrox Millenium
|
||||
// Generated by BIN2C.EXE by Jonathon Fowler
|
||||
|
||||
char textfont[2048] = {
|
||||
// 2048 bytes
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81,
|
||||
0xBD, 0x99, 0x81, 0x7E, 0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E,
|
||||
0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00, 0x10, 0x38, 0x7C, 0xFE,
|
||||
0x7C, 0x38, 0x10, 0x00, 0x38, 0x7C, 0x38, 0xFE, 0xFE, 0x7C, 0x38, 0x7C,
|
||||
0x10, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x7C, 0x00, 0x00, 0x18, 0x3C,
|
||||
0x3C, 0x18, 0x00, 0x00, 0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF,
|
||||
0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00, 0xFF, 0xC3, 0x99, 0xBD,
|
||||
0xBD, 0x99, 0xC3, 0xFF, 0x0F, 0x07, 0x0F, 0x7D, 0xCC, 0xCC, 0xCC, 0x78,
|
||||
0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x3F, 0x33, 0x3F, 0x30,
|
||||
0x30, 0x70, 0xF0, 0xE0, 0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0,
|
||||
0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99, 0x80, 0xE0, 0xF8, 0xFE,
|
||||
0xF8, 0xE0, 0x80, 0x00, 0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x66, 0x66, 0x66, 0x66,
|
||||
0x66, 0x00, 0x66, 0x00, 0x7F, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00,
|
||||
0x3E, 0x63, 0x38, 0x6C, 0x6C, 0x38, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7E, 0x7E, 0x7E, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF,
|
||||
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18,
|
||||
0x7E, 0x3C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00,
|
||||
0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
|
||||
0xC0, 0xFE, 0x00, 0x00, 0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7E,
|
||||
0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x30, 0x78, 0x78, 0x30, 0x30, 0x00, 0x30, 0x00, 0x6C, 0x6C, 0x6C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00,
|
||||
0x30, 0x7C, 0xC0, 0x78, 0x0C, 0xF8, 0x30, 0x00, 0x00, 0xC6, 0xCC, 0x18,
|
||||
0x30, 0x66, 0xC6, 0x00, 0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00,
|
||||
0x60, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x60,
|
||||
0x60, 0x30, 0x18, 0x00, 0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00,
|
||||
0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00, 0x00, 0x30, 0x30, 0xFC,
|
||||
0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x60,
|
||||
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x30, 0x30, 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00,
|
||||
0x7C, 0xC6, 0xCE, 0xDE, 0xF6, 0xE6, 0x7C, 0x00, 0x30, 0x70, 0x30, 0x30,
|
||||
0x30, 0x30, 0xFC, 0x00, 0x78, 0xCC, 0x0C, 0x38, 0x60, 0xCC, 0xFC, 0x00,
|
||||
0x78, 0xCC, 0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00, 0x1C, 0x3C, 0x6C, 0xCC,
|
||||
0xFE, 0x0C, 0x1E, 0x00, 0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00,
|
||||
0x38, 0x60, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00, 0xFC, 0xCC, 0x0C, 0x18,
|
||||
0x30, 0x30, 0x30, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0xCC, 0xCC, 0x78, 0x00,
|
||||
0x78, 0xCC, 0xCC, 0x7C, 0x0C, 0x18, 0x70, 0x00, 0x00, 0x30, 0x30, 0x00,
|
||||
0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x60,
|
||||
0x18, 0x30, 0x60, 0xC0, 0x60, 0x30, 0x18, 0x00, 0x00, 0x00, 0xFC, 0x00,
|
||||
0x00, 0xFC, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00,
|
||||
0x78, 0xCC, 0x0C, 0x18, 0x30, 0x00, 0x30, 0x00, 0x7C, 0xC6, 0xDE, 0xDE,
|
||||
0xDE, 0xC0, 0x78, 0x00, 0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0x00,
|
||||
0xFC, 0x66, 0x66, 0x7C, 0x66, 0x66, 0xFC, 0x00, 0x3C, 0x66, 0xC0, 0xC0,
|
||||
0xC0, 0x66, 0x3C, 0x00, 0xF8, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00,
|
||||
0xFE, 0x62, 0x68, 0x78, 0x68, 0x62, 0xFE, 0x00, 0xFE, 0x62, 0x68, 0x78,
|
||||
0x68, 0x60, 0xF0, 0x00, 0x3C, 0x66, 0xC0, 0xC0, 0xCE, 0x66, 0x3E, 0x00,
|
||||
0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00, 0x78, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x78, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, 0x00,
|
||||
0xE6, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0xE6, 0x00, 0xF0, 0x60, 0x60, 0x60,
|
||||
0x62, 0x66, 0xFE, 0x00, 0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00,
|
||||
0xC6, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0xC6, 0x00, 0x38, 0x6C, 0xC6, 0xC6,
|
||||
0xC6, 0x6C, 0x38, 0x00, 0xFC, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00,
|
||||
0x78, 0xCC, 0xCC, 0xCC, 0xDC, 0x78, 0x1C, 0x00, 0xFC, 0x66, 0x66, 0x7C,
|
||||
0x6C, 0x66, 0xE6, 0x00, 0x78, 0xCC, 0xE0, 0x70, 0x1C, 0xCC, 0x78, 0x00,
|
||||
0xFC, 0xB4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0xCC, 0xCC, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0xFC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00,
|
||||
0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0xEE, 0xC6, 0x00, 0xC6, 0xC6, 0x6C, 0x38,
|
||||
0x38, 0x6C, 0xC6, 0x00, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x78, 0x00,
|
||||
0xFE, 0xC6, 0x8C, 0x18, 0x32, 0x66, 0xFE, 0x00, 0x78, 0x60, 0x60, 0x60,
|
||||
0x60, 0x60, 0x78, 0x00, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, 0x00,
|
||||
0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, 0x10, 0x38, 0x6C, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C,
|
||||
0x7C, 0xCC, 0x76, 0x00, 0xE0, 0x60, 0x60, 0x7C, 0x66, 0x66, 0xDC, 0x00,
|
||||
0x00, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x00, 0x1C, 0x0C, 0x0C, 0x7C,
|
||||
0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00,
|
||||
0x38, 0x6C, 0x60, 0xF0, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x76, 0xCC,
|
||||
0xCC, 0x7C, 0x0C, 0xF8, 0xE0, 0x60, 0x6C, 0x76, 0x66, 0x66, 0xE6, 0x00,
|
||||
0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x0C, 0x00, 0x0C, 0x0C,
|
||||
0x0C, 0xCC, 0xCC, 0x78, 0xE0, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0xE6, 0x00,
|
||||
0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0xCC, 0xFE,
|
||||
0xFE, 0xD6, 0xC6, 0x00, 0x00, 0x00, 0xF8, 0xCC, 0xCC, 0xCC, 0xCC, 0x00,
|
||||
0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0xDC, 0x66,
|
||||
0x66, 0x7C, 0x60, 0xF0, 0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0x1E,
|
||||
0x00, 0x00, 0xDC, 0x76, 0x66, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x7C, 0xC0,
|
||||
0x78, 0x0C, 0xF8, 0x00, 0x10, 0x30, 0x7C, 0x30, 0x30, 0x34, 0x18, 0x00,
|
||||
0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0xCC, 0xCC,
|
||||
0xCC, 0x78, 0x30, 0x00, 0x00, 0x00, 0xC6, 0xD6, 0xFE, 0xFE, 0x6C, 0x00,
|
||||
0x00, 0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0xCC, 0xCC,
|
||||
0xCC, 0x7C, 0x0C, 0xF8, 0x00, 0x00, 0xFC, 0x98, 0x30, 0x64, 0xFC, 0x00,
|
||||
0x1C, 0x30, 0x30, 0xE0, 0x30, 0x30, 0x1C, 0x00, 0x18, 0x18, 0x18, 0x00,
|
||||
0x18, 0x18, 0x18, 0x00, 0xE0, 0x30, 0x30, 0x1C, 0x30, 0x30, 0xE0, 0x00,
|
||||
0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C,
|
||||
0xC6, 0xC6, 0xFE, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x18, 0x0C, 0x78,
|
||||
0x00, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0x7E, 0x00, 0x1C, 0x00, 0x78, 0xCC,
|
||||
0xFC, 0xC0, 0x78, 0x00, 0x7E, 0xC3, 0x3C, 0x06, 0x3E, 0x66, 0x3F, 0x00,
|
||||
0xCC, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x7E, 0x00, 0xE0, 0x00, 0x78, 0x0C,
|
||||
0x7C, 0xCC, 0x7E, 0x00, 0x30, 0x30, 0x78, 0x0C, 0x7C, 0xCC, 0x7E, 0x00,
|
||||
0x00, 0x00, 0x78, 0xC0, 0xC0, 0x78, 0x0C, 0x38, 0x7E, 0xC3, 0x3C, 0x66,
|
||||
0x7E, 0x60, 0x3C, 0x00, 0xCC, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00,
|
||||
0xE0, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, 0xCC, 0x00, 0x70, 0x30,
|
||||
0x30, 0x30, 0x78, 0x00, 0x7C, 0xC6, 0x38, 0x18, 0x18, 0x18, 0x3C, 0x00,
|
||||
0xE0, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0xC6, 0x38, 0x6C, 0xC6,
|
||||
0xFE, 0xC6, 0xC6, 0x00, 0x30, 0x30, 0x00, 0x78, 0xCC, 0xFC, 0xCC, 0x00,
|
||||
0x1C, 0x00, 0xFC, 0x60, 0x78, 0x60, 0xFC, 0x00, 0x00, 0x00, 0x7F, 0x0C,
|
||||
0x7F, 0xCC, 0x7F, 0x00, 0x3E, 0x6C, 0xCC, 0xFE, 0xCC, 0xCC, 0xCE, 0x00,
|
||||
0x78, 0xCC, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0xCC, 0x00, 0x78,
|
||||
0xCC, 0xCC, 0x78, 0x00, 0x00, 0xE0, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00,
|
||||
0x78, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0x7E, 0x00, 0x00, 0xE0, 0x00, 0xCC,
|
||||
0xCC, 0xCC, 0x7E, 0x00, 0x00, 0xCC, 0x00, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8,
|
||||
0xC3, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x18, 0x00, 0xCC, 0x00, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0x78, 0x00, 0x18, 0x18, 0x7E, 0xC0, 0xC0, 0x7E, 0x18, 0x18,
|
||||
0x38, 0x6C, 0x64, 0xF0, 0x60, 0xE6, 0xFC, 0x00, 0xCC, 0xCC, 0x78, 0xFC,
|
||||
0x30, 0xFC, 0x30, 0x30, 0xF8, 0xCC, 0xCC, 0xFA, 0xC6, 0xCF, 0xC6, 0xC7,
|
||||
0x0E, 0x1B, 0x18, 0x3C, 0x18, 0x18, 0xD8, 0x70, 0x1C, 0x00, 0x78, 0x0C,
|
||||
0x7C, 0xCC, 0x7E, 0x00, 0x38, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00,
|
||||
0x00, 0x1C, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x1C, 0x00, 0xCC,
|
||||
0xCC, 0xCC, 0x7E, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0xCC, 0xCC, 0xCC, 0x00,
|
||||
0xFC, 0x00, 0xCC, 0xEC, 0xFC, 0xDC, 0xCC, 0x00, 0x3C, 0x6C, 0x6C, 0x3E,
|
||||
0x00, 0x7E, 0x00, 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x7C, 0x00, 0x00,
|
||||
0x30, 0x00, 0x30, 0x60, 0xC0, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00, 0xFC,
|
||||
0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0C, 0x0C, 0x00, 0x00,
|
||||
0xC3, 0xC6, 0xCC, 0xDE, 0x33, 0x66, 0xCC, 0x0F, 0xC3, 0xC6, 0xCC, 0xDB,
|
||||
0x37, 0x6F, 0xCF, 0x03, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00,
|
||||
0x00, 0x33, 0x66, 0xCC, 0x66, 0x33, 0x00, 0x00, 0x00, 0xCC, 0x66, 0x33,
|
||||
0x66, 0xCC, 0x00, 0x00, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88,
|
||||
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0xDB, 0x77, 0xDB, 0xEE,
|
||||
0xDB, 0x77, 0xDB, 0xEE, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18,
|
||||
0xF8, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, 0x00, 0x00, 0xF8, 0x18,
|
||||
0xF8, 0x18, 0x18, 0x18, 0x36, 0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0xFE, 0x06,
|
||||
0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00,
|
||||
0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x18, 0x18, 0xF8, 0x18,
|
||||
0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36,
|
||||
0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7, 0x00,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x00, 0x00, 0xFF, 0x00,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x36, 0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36,
|
||||
0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x3F, 0x00, 0x00, 0x00, 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36,
|
||||
0x18, 0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0xC8, 0xDC, 0x76, 0x00,
|
||||
0x00, 0x78, 0xCC, 0xF8, 0xCC, 0xF8, 0xC0, 0xC0, 0x00, 0xFC, 0xCC, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0x00, 0x00, 0xFE, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00,
|
||||
0xFC, 0xCC, 0x60, 0x30, 0x60, 0xCC, 0xFC, 0x00, 0x00, 0x00, 0x7E, 0xD8,
|
||||
0xD8, 0xD8, 0x70, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0xC0,
|
||||
0x00, 0x76, 0xDC, 0x18, 0x18, 0x18, 0x18, 0x00, 0xFC, 0x30, 0x78, 0xCC,
|
||||
0xCC, 0x78, 0x30, 0xFC, 0x38, 0x6C, 0xC6, 0xFE, 0xC6, 0x6C, 0x38, 0x00,
|
||||
0x38, 0x6C, 0xC6, 0xC6, 0x6C, 0x6C, 0xEE, 0x00, 0x1C, 0x30, 0x18, 0x7C,
|
||||
0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0x7E, 0x00, 0x00,
|
||||
0x06, 0x0C, 0x7E, 0xDB, 0xDB, 0x7E, 0x60, 0xC0, 0x38, 0x60, 0xC0, 0xF8,
|
||||
0xC0, 0x60, 0x38, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x00,
|
||||
0x00, 0xFC, 0x00, 0xFC, 0x00, 0xFC, 0x00, 0x00, 0x30, 0x30, 0xFC, 0x30,
|
||||
0x30, 0x00, 0xFC, 0x00, 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0xFC, 0x00,
|
||||
0x18, 0x30, 0x60, 0x30, 0x18, 0x00, 0xFC, 0x00, 0x0E, 0x1B, 0x1B, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0x70,
|
||||
0x30, 0x30, 0x00, 0xFC, 0x00, 0x30, 0x30, 0x00, 0x00, 0x76, 0xDC, 0x00,
|
||||
0x76, 0xDC, 0x00, 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x0F, 0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x3C, 0x1C,
|
||||
0x78, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x70, 0x18, 0x30, 0x60,
|
||||
0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
// TEXTFONT.C
|
||||
|
||||
// Extracted from a Matrox Millenium
|
||||
// Generated by BIN2C.EXE by Jonathon Fowler
|
||||
|
||||
char textfont[2048] = {
|
||||
// 2048 bytes
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81,
|
||||
0xBD, 0x99, 0x81, 0x7E, 0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E,
|
||||
0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00, 0x10, 0x38, 0x7C, 0xFE,
|
||||
0x7C, 0x38, 0x10, 0x00, 0x38, 0x7C, 0x38, 0xFE, 0xFE, 0x7C, 0x38, 0x7C,
|
||||
0x10, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x7C, 0x00, 0x00, 0x18, 0x3C,
|
||||
0x3C, 0x18, 0x00, 0x00, 0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF,
|
||||
0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00, 0xFF, 0xC3, 0x99, 0xBD,
|
||||
0xBD, 0x99, 0xC3, 0xFF, 0x0F, 0x07, 0x0F, 0x7D, 0xCC, 0xCC, 0xCC, 0x78,
|
||||
0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x3F, 0x33, 0x3F, 0x30,
|
||||
0x30, 0x70, 0xF0, 0xE0, 0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0,
|
||||
0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99, 0x80, 0xE0, 0xF8, 0xFE,
|
||||
0xF8, 0xE0, 0x80, 0x00, 0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x66, 0x66, 0x66, 0x66,
|
||||
0x66, 0x00, 0x66, 0x00, 0x7F, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00,
|
||||
0x3E, 0x63, 0x38, 0x6C, 0x6C, 0x38, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7E, 0x7E, 0x7E, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF,
|
||||
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18,
|
||||
0x7E, 0x3C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00,
|
||||
0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
|
||||
0xC0, 0xFE, 0x00, 0x00, 0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7E,
|
||||
0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x30, 0x78, 0x78, 0x30, 0x30, 0x00, 0x30, 0x00, 0x6C, 0x6C, 0x6C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00,
|
||||
0x30, 0x7C, 0xC0, 0x78, 0x0C, 0xF8, 0x30, 0x00, 0x00, 0xC6, 0xCC, 0x18,
|
||||
0x30, 0x66, 0xC6, 0x00, 0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00,
|
||||
0x60, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x60,
|
||||
0x60, 0x30, 0x18, 0x00, 0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00,
|
||||
0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00, 0x00, 0x30, 0x30, 0xFC,
|
||||
0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x60,
|
||||
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x30, 0x30, 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00,
|
||||
0x7C, 0xC6, 0xCE, 0xDE, 0xF6, 0xE6, 0x7C, 0x00, 0x30, 0x70, 0x30, 0x30,
|
||||
0x30, 0x30, 0xFC, 0x00, 0x78, 0xCC, 0x0C, 0x38, 0x60, 0xCC, 0xFC, 0x00,
|
||||
0x78, 0xCC, 0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00, 0x1C, 0x3C, 0x6C, 0xCC,
|
||||
0xFE, 0x0C, 0x1E, 0x00, 0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00,
|
||||
0x38, 0x60, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00, 0xFC, 0xCC, 0x0C, 0x18,
|
||||
0x30, 0x30, 0x30, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0xCC, 0xCC, 0x78, 0x00,
|
||||
0x78, 0xCC, 0xCC, 0x7C, 0x0C, 0x18, 0x70, 0x00, 0x00, 0x30, 0x30, 0x00,
|
||||
0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x60,
|
||||
0x18, 0x30, 0x60, 0xC0, 0x60, 0x30, 0x18, 0x00, 0x00, 0x00, 0xFC, 0x00,
|
||||
0x00, 0xFC, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00,
|
||||
0x78, 0xCC, 0x0C, 0x18, 0x30, 0x00, 0x30, 0x00, 0x7C, 0xC6, 0xDE, 0xDE,
|
||||
0xDE, 0xC0, 0x78, 0x00, 0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0x00,
|
||||
0xFC, 0x66, 0x66, 0x7C, 0x66, 0x66, 0xFC, 0x00, 0x3C, 0x66, 0xC0, 0xC0,
|
||||
0xC0, 0x66, 0x3C, 0x00, 0xF8, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00,
|
||||
0xFE, 0x62, 0x68, 0x78, 0x68, 0x62, 0xFE, 0x00, 0xFE, 0x62, 0x68, 0x78,
|
||||
0x68, 0x60, 0xF0, 0x00, 0x3C, 0x66, 0xC0, 0xC0, 0xCE, 0x66, 0x3E, 0x00,
|
||||
0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00, 0x78, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x78, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, 0x00,
|
||||
0xE6, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0xE6, 0x00, 0xF0, 0x60, 0x60, 0x60,
|
||||
0x62, 0x66, 0xFE, 0x00, 0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00,
|
||||
0xC6, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0xC6, 0x00, 0x38, 0x6C, 0xC6, 0xC6,
|
||||
0xC6, 0x6C, 0x38, 0x00, 0xFC, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00,
|
||||
0x78, 0xCC, 0xCC, 0xCC, 0xDC, 0x78, 0x1C, 0x00, 0xFC, 0x66, 0x66, 0x7C,
|
||||
0x6C, 0x66, 0xE6, 0x00, 0x78, 0xCC, 0xE0, 0x70, 0x1C, 0xCC, 0x78, 0x00,
|
||||
0xFC, 0xB4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0xCC, 0xCC, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0xFC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00,
|
||||
0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0xEE, 0xC6, 0x00, 0xC6, 0xC6, 0x6C, 0x38,
|
||||
0x38, 0x6C, 0xC6, 0x00, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x78, 0x00,
|
||||
0xFE, 0xC6, 0x8C, 0x18, 0x32, 0x66, 0xFE, 0x00, 0x78, 0x60, 0x60, 0x60,
|
||||
0x60, 0x60, 0x78, 0x00, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, 0x00,
|
||||
0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, 0x10, 0x38, 0x6C, 0xC6,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C,
|
||||
0x7C, 0xCC, 0x76, 0x00, 0xE0, 0x60, 0x60, 0x7C, 0x66, 0x66, 0xDC, 0x00,
|
||||
0x00, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x00, 0x1C, 0x0C, 0x0C, 0x7C,
|
||||
0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00,
|
||||
0x38, 0x6C, 0x60, 0xF0, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x76, 0xCC,
|
||||
0xCC, 0x7C, 0x0C, 0xF8, 0xE0, 0x60, 0x6C, 0x76, 0x66, 0x66, 0xE6, 0x00,
|
||||
0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x0C, 0x00, 0x0C, 0x0C,
|
||||
0x0C, 0xCC, 0xCC, 0x78, 0xE0, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0xE6, 0x00,
|
||||
0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0xCC, 0xFE,
|
||||
0xFE, 0xD6, 0xC6, 0x00, 0x00, 0x00, 0xF8, 0xCC, 0xCC, 0xCC, 0xCC, 0x00,
|
||||
0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0xDC, 0x66,
|
||||
0x66, 0x7C, 0x60, 0xF0, 0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0x1E,
|
||||
0x00, 0x00, 0xDC, 0x76, 0x66, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x7C, 0xC0,
|
||||
0x78, 0x0C, 0xF8, 0x00, 0x10, 0x30, 0x7C, 0x30, 0x30, 0x34, 0x18, 0x00,
|
||||
0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0xCC, 0xCC,
|
||||
0xCC, 0x78, 0x30, 0x00, 0x00, 0x00, 0xC6, 0xD6, 0xFE, 0xFE, 0x6C, 0x00,
|
||||
0x00, 0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0xCC, 0xCC,
|
||||
0xCC, 0x7C, 0x0C, 0xF8, 0x00, 0x00, 0xFC, 0x98, 0x30, 0x64, 0xFC, 0x00,
|
||||
0x1C, 0x30, 0x30, 0xE0, 0x30, 0x30, 0x1C, 0x00, 0x18, 0x18, 0x18, 0x00,
|
||||
0x18, 0x18, 0x18, 0x00, 0xE0, 0x30, 0x30, 0x1C, 0x30, 0x30, 0xE0, 0x00,
|
||||
0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C,
|
||||
0xC6, 0xC6, 0xFE, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x18, 0x0C, 0x78,
|
||||
0x00, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0x7E, 0x00, 0x1C, 0x00, 0x78, 0xCC,
|
||||
0xFC, 0xC0, 0x78, 0x00, 0x7E, 0xC3, 0x3C, 0x06, 0x3E, 0x66, 0x3F, 0x00,
|
||||
0xCC, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x7E, 0x00, 0xE0, 0x00, 0x78, 0x0C,
|
||||
0x7C, 0xCC, 0x7E, 0x00, 0x30, 0x30, 0x78, 0x0C, 0x7C, 0xCC, 0x7E, 0x00,
|
||||
0x00, 0x00, 0x78, 0xC0, 0xC0, 0x78, 0x0C, 0x38, 0x7E, 0xC3, 0x3C, 0x66,
|
||||
0x7E, 0x60, 0x3C, 0x00, 0xCC, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00,
|
||||
0xE0, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, 0xCC, 0x00, 0x70, 0x30,
|
||||
0x30, 0x30, 0x78, 0x00, 0x7C, 0xC6, 0x38, 0x18, 0x18, 0x18, 0x3C, 0x00,
|
||||
0xE0, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0xC6, 0x38, 0x6C, 0xC6,
|
||||
0xFE, 0xC6, 0xC6, 0x00, 0x30, 0x30, 0x00, 0x78, 0xCC, 0xFC, 0xCC, 0x00,
|
||||
0x1C, 0x00, 0xFC, 0x60, 0x78, 0x60, 0xFC, 0x00, 0x00, 0x00, 0x7F, 0x0C,
|
||||
0x7F, 0xCC, 0x7F, 0x00, 0x3E, 0x6C, 0xCC, 0xFE, 0xCC, 0xCC, 0xCE, 0x00,
|
||||
0x78, 0xCC, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0xCC, 0x00, 0x78,
|
||||
0xCC, 0xCC, 0x78, 0x00, 0x00, 0xE0, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00,
|
||||
0x78, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0x7E, 0x00, 0x00, 0xE0, 0x00, 0xCC,
|
||||
0xCC, 0xCC, 0x7E, 0x00, 0x00, 0xCC, 0x00, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8,
|
||||
0xC3, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x18, 0x00, 0xCC, 0x00, 0xCC, 0xCC,
|
||||
0xCC, 0xCC, 0x78, 0x00, 0x18, 0x18, 0x7E, 0xC0, 0xC0, 0x7E, 0x18, 0x18,
|
||||
0x38, 0x6C, 0x64, 0xF0, 0x60, 0xE6, 0xFC, 0x00, 0xCC, 0xCC, 0x78, 0xFC,
|
||||
0x30, 0xFC, 0x30, 0x30, 0xF8, 0xCC, 0xCC, 0xFA, 0xC6, 0xCF, 0xC6, 0xC7,
|
||||
0x0E, 0x1B, 0x18, 0x3C, 0x18, 0x18, 0xD8, 0x70, 0x1C, 0x00, 0x78, 0x0C,
|
||||
0x7C, 0xCC, 0x7E, 0x00, 0x38, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00,
|
||||
0x00, 0x1C, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x1C, 0x00, 0xCC,
|
||||
0xCC, 0xCC, 0x7E, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0xCC, 0xCC, 0xCC, 0x00,
|
||||
0xFC, 0x00, 0xCC, 0xEC, 0xFC, 0xDC, 0xCC, 0x00, 0x3C, 0x6C, 0x6C, 0x3E,
|
||||
0x00, 0x7E, 0x00, 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x7C, 0x00, 0x00,
|
||||
0x30, 0x00, 0x30, 0x60, 0xC0, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00, 0xFC,
|
||||
0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0C, 0x0C, 0x00, 0x00,
|
||||
0xC3, 0xC6, 0xCC, 0xDE, 0x33, 0x66, 0xCC, 0x0F, 0xC3, 0xC6, 0xCC, 0xDB,
|
||||
0x37, 0x6F, 0xCF, 0x03, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00,
|
||||
0x00, 0x33, 0x66, 0xCC, 0x66, 0x33, 0x00, 0x00, 0x00, 0xCC, 0x66, 0x33,
|
||||
0x66, 0xCC, 0x00, 0x00, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88,
|
||||
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0xDB, 0x77, 0xDB, 0xEE,
|
||||
0xDB, 0x77, 0xDB, 0xEE, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18,
|
||||
0xF8, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, 0x00, 0x00, 0xF8, 0x18,
|
||||
0xF8, 0x18, 0x18, 0x18, 0x36, 0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0xFE, 0x06,
|
||||
0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00,
|
||||
0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x18, 0x18, 0xF8, 0x18,
|
||||
0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36,
|
||||
0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7, 0x00,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36,
|
||||
0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x00, 0x00, 0xFF, 0x00,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x36, 0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36,
|
||||
0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
|
||||
0x3F, 0x00, 0x00, 0x00, 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36,
|
||||
0x18, 0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0xC8, 0xDC, 0x76, 0x00,
|
||||
0x00, 0x78, 0xCC, 0xF8, 0xCC, 0xF8, 0xC0, 0xC0, 0x00, 0xFC, 0xCC, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0x00, 0x00, 0xFE, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00,
|
||||
0xFC, 0xCC, 0x60, 0x30, 0x60, 0xCC, 0xFC, 0x00, 0x00, 0x00, 0x7E, 0xD8,
|
||||
0xD8, 0xD8, 0x70, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0xC0,
|
||||
0x00, 0x76, 0xDC, 0x18, 0x18, 0x18, 0x18, 0x00, 0xFC, 0x30, 0x78, 0xCC,
|
||||
0xCC, 0x78, 0x30, 0xFC, 0x38, 0x6C, 0xC6, 0xFE, 0xC6, 0x6C, 0x38, 0x00,
|
||||
0x38, 0x6C, 0xC6, 0xC6, 0x6C, 0x6C, 0xEE, 0x00, 0x1C, 0x30, 0x18, 0x7C,
|
||||
0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0x7E, 0x00, 0x00,
|
||||
0x06, 0x0C, 0x7E, 0xDB, 0xDB, 0x7E, 0x60, 0xC0, 0x38, 0x60, 0xC0, 0xF8,
|
||||
0xC0, 0x60, 0x38, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x00,
|
||||
0x00, 0xFC, 0x00, 0xFC, 0x00, 0xFC, 0x00, 0x00, 0x30, 0x30, 0xFC, 0x30,
|
||||
0x30, 0x00, 0xFC, 0x00, 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0xFC, 0x00,
|
||||
0x18, 0x30, 0x60, 0x30, 0x18, 0x00, 0xFC, 0x00, 0x0E, 0x1B, 0x1B, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0x70,
|
||||
0x30, 0x30, 0x00, 0xFC, 0x00, 0x30, 0x30, 0x00, 0x00, 0x76, 0xDC, 0x00,
|
||||
0x76, 0xDC, 0x00, 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x0F, 0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x3C, 0x1C,
|
||||
0x78, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x70, 0x18, 0x30, 0x60,
|
||||
0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
|
|
@ -89,6 +89,8 @@ extern int shareware;
|
|||
#define TICRATE (120)
|
||||
#define TICSPERFRAME (TICRATE/26)
|
||||
|
||||
#define MAXCACHE1DSIZE (16*1048576)
|
||||
|
||||
// #define GC (TICSPERFRAME*44)
|
||||
|
||||
#define NUM_SOUNDS 1500
|
||||
|
|
|
@ -8141,7 +8141,7 @@ void Startup(void)
|
|||
|
||||
//initprintf("* Hold Esc to Abort. *\n");
|
||||
initprintf("Loading art header.\n");
|
||||
if (loadpics("tiles000.art",32*1048576) < 0)
|
||||
if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
|
||||
gameexit("Failed loading art.");
|
||||
|
||||
initprintf("Loading palette/lookups...\n");
|
||||
|
|
|
@ -197,7 +197,18 @@ void SoundStartup(void)
|
|||
return;
|
||||
}
|
||||
|
||||
jfaud->SetCacheSize(1048576,1048576/2);
|
||||
{
|
||||
// the engine will take 60% of the system memory size for cache1d if there
|
||||
// is less than the 16MB asked for in loadpics(), so we'll
|
||||
// take 30% of what's left for the sound cache if that happened, or
|
||||
// 50% of the system memory sans the 16MB maximum otherwise
|
||||
unsigned k;
|
||||
if (Bgetsysmemsize() <= MAXCACHE1DSIZE)
|
||||
k = Bgetsysmemsize()/100*30;
|
||||
else
|
||||
k = Bgetsysmemsize()/100*50 - MAXCACHE1DSIZE;
|
||||
jfaud->SetCacheSize(k,k/2);
|
||||
}
|
||||
|
||||
chans = new SoundChannel[NumVoices];
|
||||
if (!chans) {
|
||||
|
@ -334,9 +345,6 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
return 0;
|
||||
}
|
||||
|
||||
swaplong(&y,&z);
|
||||
y = -y>>4;
|
||||
|
||||
if (soundm[num] & SOUNDM_DUKE) {
|
||||
// Duke speech, one at a time only
|
||||
int j;
|
||||
|
@ -415,7 +423,7 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
} else {
|
||||
chan->SetRolloff(global ? 0.0 : 0.2);
|
||||
chan->SetFollowListener(false);
|
||||
chan->SetPosition((float)x/UNITSPERMETRE, (float)y/UNITSPERMETRE, (float)z/UNITSPERMETRE);
|
||||
chan->SetPosition((float)x/UNITSPERMETRE, (float)(-z>>4)/UNITSPERMETRE, (float)y/UNITSPERMETRE);
|
||||
}
|
||||
|
||||
r = keephandle(chan, num, i);
|
||||
|
|
Loading…
Reference in a new issue