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