mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Nothing important
git-svn-id: https://svn.eduke32.com/eduke32@1329 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6dba1ba1ed
commit
b1704e8407
15 changed files with 59 additions and 332 deletions
|
@ -32,7 +32,7 @@ $(OBJ)/sdlayer.$o: $(SRC)/sdlayer.c $(INC)/compat.h $(INC)/sdlayer.h $(INC)/base
|
|||
$(OBJ)/winlayer.$o: $(SRC)/winlayer.c $(INC)/compat.h $(INC)/winlayer.h $(INC)/baselayer.h $(INC)/pragmas.h $(INC)/build.h $(INC)/a.h $(INC)/osd.h $(INC)/dxdidf.h $(INC)/glbuild.h
|
||||
$(OBJ)/gtkbits.$o: $(SRC)/gtkbits.c $(INC)/baselayer.h $(INC)/build.h $(INC)/dynamicgtk.h
|
||||
$(OBJ)/dynamicgtk.$o: $(SRC)/dynamicgtk.c $(INC)/dynamicgtk.h
|
||||
$(OBJ)/polymer.$o: $(SRC)/polymer.c $(INC)/polymer.h $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(INC)/osd.h $(INC)/pragmas.h $(INC)/mdsprite.h
|
||||
$(OBJ)/polymer.$o: $(SRC)/polymer.c $(INC)/polymer.h $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(INC)/osd.h $(INC)/pragmas.h $(INC)/mdsprite.h $(INC)/polymost.h
|
||||
|
||||
$(OBJ)/buildres.$(res): $(SRC)/misc/buildres.rc $(INC)/startwin.editor.h
|
||||
$(OBJ)/startwin.editor.$o: $(SRC)/startwin.editor.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(INC)/startwin.editor.h
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
ENGINELIB=libengine.a
|
||||
EDITORLIB=libbuild.a
|
||||
|
||||
# SDLCONFIG = /usr/local/bin/sdl-config
|
||||
SDLCONFIG = sdl-config
|
||||
SDLCONFIG = /usr/local/bin/sdl-config
|
||||
# SDLCONFIG = sdl-config
|
||||
|
||||
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
|
||||
SDLROOT = /usr/local
|
||||
|
|
|
@ -43,14 +43,6 @@ extern "C" {
|
|||
#define RESERVEDPALS 2 // don't forget to increment this when adding reserved pals
|
||||
#define DETAILPAL (MAXPALOOKUPS - 1)
|
||||
#define GLOWPAL (MAXPALOOKUPS - 2)
|
||||
/*
|
||||
#define REDPAL (MAXPALOOKUPS - 3)
|
||||
#define BLUEPAL (MAXPALOOKUPS - 4)
|
||||
#define BROWNPAL (MAXPALOOKUPS - 5)
|
||||
#define GREYPAL (MAXPALOOKUPS - 6)
|
||||
#define GREENPAL (MAXPALOOKUPS - 7)
|
||||
#define SPECPAL (MAXPALOOKUPS - 8)
|
||||
*/
|
||||
|
||||
#define TSPR_TEMP 99
|
||||
#define TSPR_MIRROR 100
|
||||
|
@ -664,13 +656,6 @@ int32_t md_definehud (int32_t modelid, int32_t tilex, double xadd, double yadd,
|
|||
int32_t md_undefinetile(int32_t tile);
|
||||
int32_t md_undefinemodel(int32_t modelid);
|
||||
|
||||
#define MAXPALCONV 200
|
||||
void clearconv();
|
||||
void setpalconv(int32_t pal,int32_t pal1,int32_t pal2);
|
||||
void getpalmap(int32_t *stage,int32_t *pal1,int32_t *pal2);
|
||||
int32_t checkpalmaps(int32_t pal);
|
||||
void applypalmap(char *pic, char *palmap, int32_t size, int32_t pal);
|
||||
|
||||
int32_t loaddefinitionsfile(char *fn);
|
||||
|
||||
extern int32_t mapversion; // if loadboard() fails with -2 return, try loadoldboard(). if it fails with -2, board is dodgy
|
||||
|
|
|
@ -33,7 +33,6 @@ typedef struct _mdskinmap_t
|
|||
GLuint texid[HICEFFECTMASK+1]; // OpenGL texture numbers for effect variations
|
||||
struct _mdskinmap_t *next;
|
||||
float param, specpower, specfactor;
|
||||
char *palmap;int32_t size;
|
||||
} mdskinmap_t;
|
||||
|
||||
|
||||
|
|
|
@ -105,8 +105,6 @@ typedef struct pthtyp_t
|
|||
uint16_t sizx, sizy;
|
||||
float scalex, scaley;
|
||||
struct pthtyp_t *ofb; // only fullbright
|
||||
|
||||
char *palmap;int32_t size;
|
||||
} pthtyp;
|
||||
|
||||
pthtyp * gltexcache (int32_t dapicnum, int32_t dapalnum, int32_t dameth);
|
||||
|
@ -123,7 +121,19 @@ extern int32_t drawingskybox;
|
|||
|
||||
extern float fogresult, fogcol[4], fogtable[4*MAXPALOOKUPS];
|
||||
|
||||
void fogcalc(const int32_t shade, const int32_t vis, const int32_t pal);
|
||||
static inline void fogcalc(const int32_t shade, const int32_t vis, const int32_t pal)
|
||||
{
|
||||
float f = ((shade*shade)*0.125f);
|
||||
|
||||
if (shade < 0) f = -f;
|
||||
if (vis > 239) f = gvisibility*((vis-240+f)/(klabs(vis-256)));
|
||||
else f = gvisibility*(vis+16+f);
|
||||
|
||||
fogresult = clamp(f, 0.01f, 10.f);
|
||||
|
||||
Bmemcpy(fogcol,&fogtable[pal<<2],sizeof(fogcol));
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ enum
|
|||
T_DEFINETEXTURE,
|
||||
T_DEFINESKYBOX,
|
||||
T_DEFINETINT,
|
||||
/*T_DEFINECONV,*/
|
||||
T_DEFINEMODEL,
|
||||
T_DEFINEMODELFRAME,
|
||||
T_DEFINEMODELANIM,
|
||||
|
@ -74,7 +73,6 @@ enum
|
|||
T_CACHESIZE,
|
||||
T_IMPORTTILE,
|
||||
T_MUSIC,T_ID,T_SOUND,
|
||||
/* T_REDPAL,T_BLUEPAL,T_BROWNPAL,T_GREYPAL,T_GREENPAL,T_SPECPAL,*/
|
||||
T_TILEFROMTEXTURE, T_XOFFSET, T_YOFFSET
|
||||
};
|
||||
|
||||
|
@ -90,7 +88,6 @@ static tokenlist basetokens[] =
|
|||
{ "definetexture", T_DEFINETEXTURE },
|
||||
{ "defineskybox", T_DEFINESKYBOX },
|
||||
{ "definetint", T_DEFINETINT },
|
||||
/* { "defineconv", T_DEFINECONV },*/
|
||||
{ "definemodel", T_DEFINEMODEL },
|
||||
{ "definemodelframe",T_DEFINEMODELFRAME },
|
||||
{ "definemodelanim", T_DEFINEMODELANIM },
|
||||
|
@ -142,14 +139,6 @@ static tokenlist modeltokens[] =
|
|||
{ "skin", T_SKIN },
|
||||
{ "glow", T_GLOW },
|
||||
{ "detail", T_DETAIL },
|
||||
/*
|
||||
{ "redmap", T_REDPAL },
|
||||
{ "bluepal", T_BLUEPAL },
|
||||
{ "brownpal",T_BROWNPAL},
|
||||
{ "greypal", T_GREYPAL },
|
||||
{ "greenpal",T_GREENPAL},
|
||||
{ "specpal", T_SPECPAL },
|
||||
*/
|
||||
{ "hud", T_HUD },
|
||||
{ "flags", T_FLAGS },
|
||||
};
|
||||
|
@ -235,14 +224,6 @@ static tokenlist texturetokens[] =
|
|||
{ "pal", T_PAL },
|
||||
{ "detail", T_DETAIL },
|
||||
{ "glow", T_GLOW },
|
||||
/*
|
||||
{ "redmap", T_REDPAL },
|
||||
{ "bluepal", T_BLUEPAL },
|
||||
{ "brownpal",T_BROWNPAL},
|
||||
{ "greypal", T_GREYPAL },
|
||||
{ "greenpal",T_GREENPAL},
|
||||
{ "specpal", T_SPECPAL },
|
||||
*/
|
||||
};
|
||||
|
||||
static tokenlist texturetokens_pal[] =
|
||||
|
@ -440,20 +421,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
hicsetpalettetint(pal,r,g,b,f);
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case T_DEFINECONV:
|
||||
{
|
||||
int32_t pal, pal1, pal2;
|
||||
|
||||
if (scriptfile_getsymbol(script,&pal)) break;
|
||||
if (scriptfile_getnumber(script,&pal1)) break;
|
||||
if (scriptfile_getnumber(script,&pal2)) break;
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
setpalconv(pal,pal1,pal2);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case T_ALPHAHACK:
|
||||
{
|
||||
int32_t tile;
|
||||
|
@ -1212,9 +1179,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
break;
|
||||
case T_SKIN: case T_DETAIL: case T_GLOW:
|
||||
/*
|
||||
case T_REDPAL: case T_BLUEPAL: case T_BROWNPAL: case T_GREYPAL: case T_GREENPAL: case T_SPECPAL:
|
||||
*/
|
||||
{
|
||||
char *skintokptr = script->ltextptr;
|
||||
char *skinend, *skinfn = 0;
|
||||
|
@ -1252,15 +1216,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
switch (token)
|
||||
{
|
||||
/*
|
||||
case T_REDPAL: palnum = REDPAL; break;
|
||||
case T_BLUEPAL: palnum = BLUEPAL; break;
|
||||
case T_BROWNPAL:palnum = BROWNPAL; break;
|
||||
case T_GREYPAL: palnum = GREYPAL; break;
|
||||
case T_GREENPAL:palnum = GREENPAL; break;
|
||||
case T_SPECPAL: palnum = SPECPAL; break;
|
||||
*/
|
||||
|
||||
case T_DETAIL:
|
||||
palnum = DETAILPAL;
|
||||
param = 1.0f / param;
|
||||
|
@ -1534,7 +1489,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
int32_t tile=-1, token;
|
||||
|
||||
char *fnB=0; double alphacutB=0, xscaleB=0, yscaleB=0; char flagsB=0;
|
||||
int32_t palmapbits=0; int32_t palbits=0;
|
||||
int32_t palbits=0;
|
||||
|
||||
if (scriptfile_getsymbol(script,&tile)) break;
|
||||
if (scriptfile_getbraces(script,&textureend)) break;
|
||||
|
@ -1618,7 +1573,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
break;
|
||||
case T_DETAIL: case T_GLOW:
|
||||
/* case T_REDPAL: case T_BLUEPAL: case T_BROWNPAL: case T_GREYPAL: case T_GREENPAL: case T_SPECPAL:*/
|
||||
{
|
||||
char *detailtokptr = script->ltextptr, *detailend;
|
||||
int32_t pal = 0, i;
|
||||
|
@ -1674,15 +1628,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
switch (token)
|
||||
{
|
||||
/*
|
||||
case T_REDPAL: pal = REDPAL; palmapbits|=32; break;
|
||||
case T_BLUEPAL: pal = BLUEPAL; palmapbits|=16; break;
|
||||
case T_BROWNPAL:pal = BROWNPAL; palmapbits|= 8; break;
|
||||
case T_GREYPAL: pal = GREYPAL; palmapbits|= 4; break;
|
||||
case T_GREENPAL:pal = GREENPAL; palmapbits|= 2; break;
|
||||
case T_SPECPAL: pal = SPECPAL; palmapbits|= 1; break;
|
||||
*/
|
||||
|
||||
case T_DETAIL:
|
||||
pal = DETAILPAL;
|
||||
xscale = 1.0f / xscale;
|
||||
|
@ -1699,17 +1644,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (palmapbits&&fnB)
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<=25; i++)
|
||||
if (!(palbits&(1<<i))&&(palmapbits&checkpalmaps(i)))
|
||||
hicsetsubsttex(tile,i,fnB,alphacutB,xscaleB,yscaleB,1.0,1.0,flagsB);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((unsigned)tile >= (unsigned)MAXTILES)
|
||||
{
|
||||
initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
|
|
|
@ -62,11 +62,6 @@ void hicinit(void)
|
|||
int32_t i,j;
|
||||
hicreplctyp *hr, *next;
|
||||
|
||||
/*
|
||||
#if defined(USE_OPENGL)
|
||||
clearconv();
|
||||
#endif
|
||||
*/
|
||||
for (i=0; i<MAXPALOOKUPS; i++) // all tints should be 100%
|
||||
{
|
||||
hictinting[i].r = hictinting[i].g = hictinting[i].b = 0xff;
|
||||
|
|
|
@ -357,7 +357,6 @@ int32_t md_defineskin(int32_t modelid, const char *skinfn, int32_t palnum, int32
|
|||
sk->fn = (char *)malloc(strlen(skinfn)+1);
|
||||
if (!sk->fn) return(-4);
|
||||
strcpy(sk->fn, skinfn);
|
||||
/* sk->palmap=0;*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -410,105 +409,6 @@ int32_t md_undefinemodel(int32_t modelid)
|
|||
md2model_t *modelhead;
|
||||
mdskinmap_t *skhead;
|
||||
|
||||
/*
|
||||
typedef struct
|
||||
{
|
||||
int32_t pal,pal1,pal2;
|
||||
} palmaptr;
|
||||
palmaptr palconv[MAXPALCONV];
|
||||
|
||||
void clearconv()
|
||||
{
|
||||
Bmemset(palconv,0,sizeof(palconv));
|
||||
}
|
||||
void setpalconv(int32_t pal,int32_t pal1,int32_t pal2)
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<MAXPALCONV; i++)
|
||||
if (!palconv[i].pal)
|
||||
{
|
||||
palconv[i].pal =pal;
|
||||
palconv[i].pal1=pal1;
|
||||
palconv[i].pal2=pal2; return;
|
||||
}
|
||||
else if (palconv[i].pal==pal&&palconv[i].pal1==pal1)
|
||||
{
|
||||
palconv[i].pal2=pal2; return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void getpalmap(int32_t *i,int32_t *pal1,int32_t *pal2)
|
||||
{
|
||||
for (; *i<MAXPALCONV&&palconv[*i].pal1; (*i)++)
|
||||
if (palconv[*i].pal==*pal2)
|
||||
{
|
||||
*pal1=palconv[*i].pal1;
|
||||
*pal2=palconv[*i].pal2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int32_t checkpalmaps(int32_t pal)
|
||||
{
|
||||
int32_t stage,val=0;
|
||||
|
||||
for (stage=0; stage<MAXPALCONV; stage++)
|
||||
{
|
||||
int32_t pal1=0,pal2=pal;
|
||||
getpalmap(&stage,&pal1,&pal2);
|
||||
if (!pal)break;
|
||||
if (pal1)val|=1<<(pal1-SPECPAL);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
void applypalmap(char *pic, char *palmap, int32_t size, int32_t pal)
|
||||
{
|
||||
int32_t r=0,g=1,b=2;
|
||||
pal+=200;
|
||||
|
||||
//_initprintf(" %d #%d\n",pal,palmap);
|
||||
while (size--)
|
||||
{
|
||||
char a=palmap[b+1];
|
||||
if (glinfo.bgra)swapchar(&pic[r], &pic[b]);
|
||||
pic[r]=((pic[r]*(255-a)+hictinting[pal].r*a)*palmap[r])/255/255;
|
||||
pic[g]=((pic[g]*(255-a)+hictinting[pal].g*a)*palmap[g])/255/255;
|
||||
pic[b]=((pic[b]*(255-a)+hictinting[pal].b*a)*palmap[b])/255/255;
|
||||
|
||||
/ *
|
||||
pic[r]=((255*(255-a)+hictinting[pal].r*a)*palmap[r])/255/255;
|
||||
pic[g]=((255*(255-a)+hictinting[pal].g*a)*palmap[g])/255/255;
|
||||
pic[b]=((255*(255-a)+hictinting[pal].b*a)*palmap[b])/255/255;
|
||||
* /
|
||||
if (glinfo.bgra)swapchar(&pic[r], &pic[b]);
|
||||
r+=4; g+=4; b+=4;
|
||||
}
|
||||
}
|
||||
|
||||
static void applypalmapSkin(char *pic, int32_t sizx, int32_t sizy, md2model_t *m, int32_t number, int32_t pal, int32_t surf)
|
||||
{
|
||||
int32_t stage;
|
||||
|
||||
//_initprintf("%d(%dx%d)\n",pal,sizx,sizy);
|
||||
for (stage=0; stage<MAXPALCONV; stage++)
|
||||
{
|
||||
int32_t pal1=0,pal2=pal;
|
||||
mdskinmap_t *sk=modelhead->skinmap;
|
||||
getpalmap(&stage,&pal1,&pal2);
|
||||
if (!pal1)return;
|
||||
|
||||
mdloadskin((md2model_t *)m,number,pal1,surf);
|
||||
for (; sk; sk = sk->next)
|
||||
if ((int32_t)sk->palette == pal1&&sk->palmap)break;
|
||||
if (!sk||sk->size!=sizx*sizy)continue;
|
||||
|
||||
applypalmap(pic,sk->palmap,sk->size,pal2);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
static int32_t daskinloader(int32_t filh, intptr_t *fptr, int32_t *bpl, int32_t *sizx, int32_t *sizy, int32_t *osizx, int32_t *osizy, char *hasalpha, int32_t pal, char effect)
|
||||
{
|
||||
int32_t picfillen, j,y,x;
|
||||
|
@ -546,7 +446,6 @@ static int32_t daskinloader(int32_t filh, intptr_t *fptr, int32_t *bpl, int32_t
|
|||
{ free(picfil); free(pic); return -1; }
|
||||
free(picfil);
|
||||
|
||||
/*applypalmapSkin((char *)pic,tsizx,tsizy,m,number,pal,surf);*/
|
||||
cptr = &britable[gammabrightness ? 0 : curbrightness][0];
|
||||
r=(glinfo.bgra)?hictinting[pal].b:hictinting[pal].r;
|
||||
g=hictinting[pal].g;
|
||||
|
@ -860,22 +759,7 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf)
|
|||
return(0);
|
||||
}
|
||||
else kclose(filh);
|
||||
if (pal < (MAXPALOOKUPS - RESERVEDPALS))m->usesalpha = hasalpha;
|
||||
/*
|
||||
if (pal>=SPECPAL&&pal<=REDPAL)
|
||||
{
|
||||
//_initprintf("%cLoaded palmap %d(%dx%d)",sk->palmap?'+':'-',pal,xsiz,ysiz);
|
||||
if (!sk->palmap)
|
||||
{
|
||||
sk->size=xsiz*ysiz;
|
||||
sk->palmap=malloc(sk->size*4);
|
||||
memcpy(sk->palmap,(char *)fptr,sk->size*4);
|
||||
}
|
||||
cachefil=0;
|
||||
//_initprintf("#%d\n",sk->palmap);
|
||||
}
|
||||
*/
|
||||
|
||||
if (pal < (MAXPALOOKUPS - RESERVEDPALS)) m->usesalpha = hasalpha;
|
||||
if ((doalloc&3)==1) bglGenTextures(1,(GLuint*)texidx);
|
||||
bglBindTexture(GL_TEXTURE_2D,*texidx);
|
||||
|
||||
|
@ -1304,13 +1188,6 @@ static md2model_t *md2load(int32_t fil, const char *filnam)
|
|||
if (m->numskins > 0)
|
||||
{
|
||||
sk->fn = (char *)malloc(strlen(m->basepath)+strlen(m->skinfn)+1);
|
||||
/*
|
||||
if (sk->palmap)
|
||||
{
|
||||
//_initprintf("Delete %s",m->skinfn);
|
||||
sk->palmap=0; sk->size=0;
|
||||
}
|
||||
*/
|
||||
strcpy(sk->fn, m->basepath);
|
||||
strcat(sk->fn, m->skinfn);
|
||||
}
|
||||
|
@ -2204,13 +2081,6 @@ static void md3free(md3model_t *m)
|
|||
{
|
||||
nsk = sk->next;
|
||||
free(sk->fn);
|
||||
/*
|
||||
if (sk->palmap)
|
||||
{
|
||||
//_initprintf("Kill %d\n",sk->palette);
|
||||
free(sk->palmap); sk->palmap=0;
|
||||
}
|
||||
*/
|
||||
free(sk);
|
||||
}
|
||||
|
||||
|
|
|
@ -195,24 +195,8 @@ int32_t r_fullbrights = 1;
|
|||
// is medium quality a good default?
|
||||
int32_t r_downsize = 1;
|
||||
|
||||
// used for fogcalc
|
||||
float fogresult, fogcol[4], fogtable[4*MAXPALOOKUPS];
|
||||
|
||||
void fogcalc(const int32_t shade, const int32_t vis, const int32_t pal)
|
||||
{
|
||||
float f;
|
||||
|
||||
if (shade < 0)
|
||||
f = ((-shade*shade)*0.125f);
|
||||
else f = ((shade*shade)*0.125f);
|
||||
|
||||
if (vis > 239)
|
||||
f = gvisibility*((vis-240+f)/(klabs(vis-256)));
|
||||
else f = gvisibility*(vis+16+f);
|
||||
|
||||
fogresult = clamp(f, 0.01f, 10.f);
|
||||
|
||||
Bmemcpy(fogcol,&fogtable[pal<<2],sizeof(fogcol));
|
||||
}
|
||||
#endif
|
||||
|
||||
static char ptempbuf[MAXWALLSB<<1];
|
||||
|
@ -680,13 +664,6 @@ void polymost_glreset()
|
|||
free(pth->ofb);
|
||||
}
|
||||
bglDeleteTextures(1,&pth->glpic);
|
||||
/*
|
||||
if (pth->palmap)
|
||||
{
|
||||
//_initprintf("Kill #%d\n",pth->palmap);
|
||||
free(pth->palmap); pth->palmap=0;
|
||||
}
|
||||
*/
|
||||
free(pth);
|
||||
pth = next;
|
||||
}
|
||||
|
@ -1741,32 +1718,6 @@ failure:
|
|||
return -1;
|
||||
}
|
||||
// --------------------------------------------------- JONOF'S COMPRESSED TEXTURE CACHE STUFF
|
||||
/*
|
||||
static void applypalmapsT(char *pic, int32_t sizx, int32_t sizy, int32_t dapic,int32_t dapalnum, int32_t dameth)
|
||||
{
|
||||
//_initprintf("%d\n",pal);
|
||||
int32_t stage;
|
||||
pthtyp *pichead1=pichead;
|
||||
|
||||
for (stage=0; stage<MAXPALCONV; stage++)
|
||||
{
|
||||
int32_t pal1=0,pal2=dapalnum;
|
||||
pthtyp *pth;
|
||||
getpalmap(&stage,&pal1,&pal2);
|
||||
if (!pal1)return;
|
||||
|
||||
//_initprintf("Pal: %d\n",pal1);
|
||||
if (hicfindsubst(dapic, pal1, 0))
|
||||
gltexcache(dapic, pal1, dameth);
|
||||
for (pth=pichead1; pth; pth=pth->next)
|
||||
if (pth->palnum ==pal1&&pth->palmap)break;
|
||||
if (!pth||pth->size!=sizx*sizy)continue;
|
||||
|
||||
applypalmap(pic,pth->palmap,pth->size,pal2);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicreplctyp *hicr, int32_t dameth, pthtyp *pth, int32_t doalloc, char effect)
|
||||
{
|
||||
coltype *pic = NULL, *rpptr;
|
||||
|
@ -1844,7 +1795,6 @@ int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicreplctyp
|
|||
pic = (coltype *)calloc(xsiz,ysiz*sizeof(coltype)); if (!pic) { free(picfil); return 1; }
|
||||
|
||||
if (kprender(picfil,picfillen,(intptr_t)pic,xsiz*sizeof(coltype),xsiz,ysiz,0,0)) { free(picfil); free(pic); return -2; }
|
||||
/* applypalmapsT((char *)pic,tsizx,tsizy,dapic,dapalnum,dameth);*/
|
||||
|
||||
r=(glinfo.bgra)?hictinting[dapalnum].r:hictinting[dapalnum].b;
|
||||
g=hictinting[dapalnum].g;
|
||||
|
@ -1917,19 +1867,6 @@ int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicreplctyp
|
|||
if ((doalloc&3)==1) bglGenTextures(1,(GLuint*)&pth->glpic); //# of textures (make OpenGL allocate structure)
|
||||
bglBindTexture(GL_TEXTURE_2D,pth->glpic);
|
||||
|
||||
/*
|
||||
if (dapalnum>=SPECPAL&&dapalnum<=REDPAL)
|
||||
{
|
||||
//_initprintf("%cLoaded palamp %d(%dx%d)",pth->palmap?'+':'-',dapalnum,xsiz,ysiz);
|
||||
if (!pth->palmap)
|
||||
{
|
||||
pth->size=xsiz*ysiz;
|
||||
pth->palmap=malloc(pth->size*4);
|
||||
memcpy(pth->palmap,pic,pth->size*4);
|
||||
}
|
||||
cachefil=0;
|
||||
}
|
||||
*/
|
||||
fixtransparency(pic,tsizx,tsizy,xsiz,ysiz,dameth);
|
||||
uploadtexture(doalloc,xsiz,ysiz,intexfmt,texfmt,pic,-1,tsizy,dameth|8192|(hicr->flags & 16?4096:0));
|
||||
}
|
||||
|
|
|
@ -605,18 +605,18 @@ static void G_MoveZombieActors(void)
|
|||
|
||||
case FIRE__STATIC:
|
||||
case FIRE2__STATIC:
|
||||
/*
|
||||
/*
|
||||
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
|
||||
if (s->z > ActorExtra[i].floorz+2048) break;
|
||||
*/
|
||||
*/
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
|
||||
break;
|
||||
case BURNING__STATIC:
|
||||
case BURNING2__STATIC:
|
||||
/*
|
||||
/*
|
||||
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
|
||||
if (s->z > ActorExtra[i].floorz + 2048) break;
|
||||
*/
|
||||
*/
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
|
||||
break;
|
||||
|
||||
|
@ -3392,10 +3392,10 @@ static void G_MoveActors(void)
|
|||
|
||||
case FIRE__STATIC:
|
||||
case FIRE2__STATIC:
|
||||
/*
|
||||
/*
|
||||
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
|
||||
if (s->z > ActorExtra[i].floorz+2048) break;
|
||||
*/
|
||||
*/
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
|
||||
break;
|
||||
|
||||
|
@ -5145,10 +5145,10 @@ static void G_MoveMisc(void) // STATNUM 5
|
|||
{
|
||||
case BURNING__STATIC:
|
||||
case BURNING2__STATIC:
|
||||
/*
|
||||
/*
|
||||
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
|
||||
if (s->z > ActorExtra[i].floorz + 2048) break;
|
||||
*/
|
||||
*/
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),0);
|
||||
break;
|
||||
|
||||
|
|
|
@ -7358,7 +7358,6 @@ PALONLY:
|
|||
case DIPSWITCH2__STATIC:
|
||||
case DIPSWITCH3__STATIC:
|
||||
case PULLSWITCH__STATIC:
|
||||
case HANDSWITCH__STATIC:
|
||||
case SLOTDOOR__STATIC:
|
||||
case LIGHTSWITCH__STATIC:
|
||||
case SPACELIGHTSWITCH__STATIC:
|
||||
|
@ -7399,7 +7398,6 @@ PALONLY:
|
|||
case DIPSWITCH2__STATIC:
|
||||
case DIPSWITCH3__STATIC:
|
||||
case PULLSWITCH__STATIC:
|
||||
case HANDSWITCH__STATIC:
|
||||
case SLOTDOOR__STATIC:
|
||||
case LIGHTSWITCH__STATIC:
|
||||
case SPACELIGHTSWITCH__STATIC:
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
const char *s_buildDate = "20090414";
|
||||
const char *s_buildDate = "20090416";
|
||||
char *MusicPtr = NULL;
|
||||
int32_t g_musicSize;
|
||||
|
||||
|
|
|
@ -372,7 +372,6 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
|
|||
if (statustext) gametext(160,180,statustext,0,2+8+16);
|
||||
{
|
||||
int32_t ii = scale(scale(xdim-1,288,320),percent,100);
|
||||
|
||||
rotatesprite(31<<16,145<<16,65536,0,929,15,0,2+8+16,0,0,ii,ydim-1);
|
||||
rotatesprite(159<<16,145<<16,65536,0,929,15,0,2+8+16,0,0,ii,ydim-1);
|
||||
rotatesprite(30<<16,144<<16,65536,0,929,0,0,2+8+16,0,0,ii,ydim-1);
|
||||
|
|
|
@ -163,13 +163,13 @@ static void PopulateForm(int32_t pgs)
|
|||
|
||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCALWAYSSHOW), (settings.forcesetup ? BST_CHECKED : BST_UNCHECKED));
|
||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCAUTOLOAD), (!(settings.flags & 4) ? BST_CHECKED : BST_UNCHECKED));
|
||||
/*
|
||||
/*
|
||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), (settings.usemouse ? BST_CHECKED : BST_UNCHECKED));
|
||||
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), (settings.usejoy ? BST_CHECKED : BST_UNCHECKED));
|
||||
*/
|
||||
*/
|
||||
|
||||
{
|
||||
char *s[] = { "Keyboard only", "Keyboard and mouse", "Keyboard and joystick", "All devices" };
|
||||
char *s[] = { "Keyboard only", "Keyboard and mouse", "Keyboard and joystick", "All supported devices" };
|
||||
|
||||
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCINPUT);
|
||||
|
||||
|
@ -177,7 +177,7 @@ static void PopulateForm(int32_t pgs)
|
|||
j = ComboBox_AddString(hwnd, s[INPUT_KB]);
|
||||
(void)ComboBox_SetItemData(hwnd, j, INPUT_KB);
|
||||
(void)ComboBox_SetCurSel(hwnd, j);
|
||||
for (i=1;i<4;i++)
|
||||
for (i=1; i<4; i++)
|
||||
{
|
||||
j = ComboBox_AddString(hwnd, s[i]);
|
||||
(void)ComboBox_SetItemData(hwnd, j, i);
|
||||
|
@ -273,14 +273,14 @@ static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
|
|||
settings.flags &= ~4;
|
||||
else settings.flags |= 4;
|
||||
return TRUE;
|
||||
/*
|
||||
/*
|
||||
case IDCINPUTMOUSE:
|
||||
settings.usemouse = IsDlgButtonChecked(hwndDlg, IDCINPUTMOUSE) == BST_CHECKED;
|
||||
return TRUE;
|
||||
case IDCINPUTJOY:
|
||||
settings.usejoy = IsDlgButtonChecked(hwndDlg, IDCINPUTJOY) == BST_CHECKED;
|
||||
return TRUE;
|
||||
*/
|
||||
*/
|
||||
case IDCINPUT:
|
||||
if (HIWORD(wParam) == CBN_SELCHANGE)
|
||||
{
|
||||
|
@ -379,10 +379,10 @@ static void EnableConfig(int32_t n)
|
|||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), n);
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCPOLYMER), n);
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCVMODE), n);
|
||||
/*
|
||||
/*
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), n);
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), n);
|
||||
*/
|
||||
*/
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUT), n);
|
||||
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCDATA), n);
|
||||
|
|
Loading…
Reference in a new issue