Nothing important

git-svn-id: https://svn.eduke32.com/eduke32@1329 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2009-04-16 06:41:24 +00:00
parent 6dba1ba1ed
commit b1704e8407
15 changed files with 59 additions and 332 deletions

View file

@ -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)/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)/gtkbits.$o: $(SRC)/gtkbits.c $(INC)/baselayer.h $(INC)/build.h $(INC)/dynamicgtk.h
$(OBJ)/dynamicgtk.$o: $(SRC)/dynamicgtk.c $(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)/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 $(OBJ)/startwin.editor.$o: $(SRC)/startwin.editor.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(INC)/startwin.editor.h

View file

@ -3,8 +3,8 @@
ENGINELIB=libengine.a ENGINELIB=libengine.a
EDITORLIB=libbuild.a EDITORLIB=libbuild.a
# SDLCONFIG = /usr/local/bin/sdl-config SDLCONFIG = /usr/local/bin/sdl-config
SDLCONFIG = sdl-config # SDLCONFIG = sdl-config
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG)) ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
SDLROOT = /usr/local SDLROOT = /usr/local

View file

@ -43,14 +43,6 @@ extern "C" {
#define RESERVEDPALS 2 // don't forget to increment this when adding reserved pals #define RESERVEDPALS 2 // don't forget to increment this when adding reserved pals
#define DETAILPAL (MAXPALOOKUPS - 1) #define DETAILPAL (MAXPALOOKUPS - 1)
#define GLOWPAL (MAXPALOOKUPS - 2) #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_TEMP 99
#define TSPR_MIRROR 100 #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_undefinetile(int32_t tile);
int32_t md_undefinemodel(int32_t modelid); 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); 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 extern int32_t mapversion; // if loadboard() fails with -2 return, try loadoldboard(). if it fails with -2, board is dodgy

View file

@ -33,7 +33,6 @@ typedef struct _mdskinmap_t
GLuint texid[HICEFFECTMASK+1]; // OpenGL texture numbers for effect variations GLuint texid[HICEFFECTMASK+1]; // OpenGL texture numbers for effect variations
struct _mdskinmap_t *next; struct _mdskinmap_t *next;
float param, specpower, specfactor; float param, specpower, specfactor;
char *palmap;int32_t size;
} mdskinmap_t; } mdskinmap_t;

View file

@ -105,8 +105,6 @@ typedef struct pthtyp_t
uint16_t sizx, sizy; uint16_t sizx, sizy;
float scalex, scaley; float scalex, scaley;
struct pthtyp_t *ofb; // only fullbright struct pthtyp_t *ofb; // only fullbright
char *palmap;int32_t size;
} pthtyp; } pthtyp;
pthtyp * gltexcache (int32_t dapicnum, int32_t dapalnum, int32_t dameth); 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]; 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 #endif

View file

@ -21,7 +21,6 @@ enum
T_DEFINETEXTURE, T_DEFINETEXTURE,
T_DEFINESKYBOX, T_DEFINESKYBOX,
T_DEFINETINT, T_DEFINETINT,
/*T_DEFINECONV,*/
T_DEFINEMODEL, T_DEFINEMODEL,
T_DEFINEMODELFRAME, T_DEFINEMODELFRAME,
T_DEFINEMODELANIM, T_DEFINEMODELANIM,
@ -74,7 +73,6 @@ enum
T_CACHESIZE, T_CACHESIZE,
T_IMPORTTILE, T_IMPORTTILE,
T_MUSIC,T_ID,T_SOUND, T_MUSIC,T_ID,T_SOUND,
/* T_REDPAL,T_BLUEPAL,T_BROWNPAL,T_GREYPAL,T_GREENPAL,T_SPECPAL,*/
T_TILEFROMTEXTURE, T_XOFFSET, T_YOFFSET T_TILEFROMTEXTURE, T_XOFFSET, T_YOFFSET
}; };
@ -90,7 +88,6 @@ static tokenlist basetokens[] =
{ "definetexture", T_DEFINETEXTURE }, { "definetexture", T_DEFINETEXTURE },
{ "defineskybox", T_DEFINESKYBOX }, { "defineskybox", T_DEFINESKYBOX },
{ "definetint", T_DEFINETINT }, { "definetint", T_DEFINETINT },
/* { "defineconv", T_DEFINECONV },*/
{ "definemodel", T_DEFINEMODEL }, { "definemodel", T_DEFINEMODEL },
{ "definemodelframe",T_DEFINEMODELFRAME }, { "definemodelframe",T_DEFINEMODELFRAME },
{ "definemodelanim", T_DEFINEMODELANIM }, { "definemodelanim", T_DEFINEMODELANIM },
@ -142,14 +139,6 @@ static tokenlist modeltokens[] =
{ "skin", T_SKIN }, { "skin", T_SKIN },
{ "glow", T_GLOW }, { "glow", T_GLOW },
{ "detail", T_DETAIL }, { "detail", T_DETAIL },
/*
{ "redmap", T_REDPAL },
{ "bluepal", T_BLUEPAL },
{ "brownpal",T_BROWNPAL},
{ "greypal", T_GREYPAL },
{ "greenpal",T_GREENPAL},
{ "specpal", T_SPECPAL },
*/
{ "hud", T_HUD }, { "hud", T_HUD },
{ "flags", T_FLAGS }, { "flags", T_FLAGS },
}; };
@ -235,14 +224,6 @@ static tokenlist texturetokens[] =
{ "pal", T_PAL }, { "pal", T_PAL },
{ "detail", T_DETAIL }, { "detail", T_DETAIL },
{ "glow", T_GLOW }, { "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[] = static tokenlist texturetokens_pal[] =
@ -440,20 +421,6 @@ static int32_t defsparser(scriptfile *script)
hicsetpalettetint(pal,r,g,b,f); hicsetpalettetint(pal,r,g,b,f);
} }
break; 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: case T_ALPHAHACK:
{ {
int32_t tile; int32_t tile;
@ -1212,9 +1179,6 @@ static int32_t defsparser(scriptfile *script)
} }
break; break;
case T_SKIN: case T_DETAIL: case T_GLOW: 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 *skintokptr = script->ltextptr;
char *skinend, *skinfn = 0; char *skinend, *skinfn = 0;
@ -1252,15 +1216,6 @@ static int32_t defsparser(scriptfile *script)
switch (token) 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: case T_DETAIL:
palnum = DETAILPAL; palnum = DETAILPAL;
param = 1.0f / param; param = 1.0f / param;
@ -1534,7 +1489,7 @@ static int32_t defsparser(scriptfile *script)
int32_t tile=-1, token; int32_t tile=-1, token;
char *fnB=0; double alphacutB=0, xscaleB=0, yscaleB=0; char flagsB=0; 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_getsymbol(script,&tile)) break;
if (scriptfile_getbraces(script,&textureend)) break; if (scriptfile_getbraces(script,&textureend)) break;
@ -1618,7 +1573,6 @@ static int32_t defsparser(scriptfile *script)
} }
break; break;
case T_DETAIL: case T_GLOW: 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; char *detailtokptr = script->ltextptr, *detailend;
int32_t pal = 0, i; int32_t pal = 0, i;
@ -1674,15 +1628,6 @@ static int32_t defsparser(scriptfile *script)
switch (token) 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: case T_DETAIL:
pal = DETAILPAL; pal = DETAILPAL;
xscale = 1.0f / xscale; xscale = 1.0f / xscale;
@ -1699,17 +1644,6 @@ static int32_t defsparser(scriptfile *script)
break; 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) if ((unsigned)tile >= (unsigned)MAXTILES)
{ {
initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n", initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",

View file

@ -62,11 +62,6 @@ void hicinit(void)
int32_t i,j; int32_t i,j;
hicreplctyp *hr, *next; hicreplctyp *hr, *next;
/*
#if defined(USE_OPENGL)
clearconv();
#endif
*/
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;

View file

@ -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); sk->fn = (char *)malloc(strlen(skinfn)+1);
if (!sk->fn) return(-4); if (!sk->fn) return(-4);
strcpy(sk->fn, skinfn); strcpy(sk->fn, skinfn);
/* sk->palmap=0;*/
return 0; return 0;
} }
@ -410,105 +409,6 @@ int32_t md_undefinemodel(int32_t modelid)
md2model_t *modelhead; md2model_t *modelhead;
mdskinmap_t *skhead; 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) 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; 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); free(pic); return -1; }
free(picfil); free(picfil);
/*applypalmapSkin((char *)pic,tsizx,tsizy,m,number,pal,surf);*/
cptr = &britable[gammabrightness ? 0 : curbrightness][0]; cptr = &britable[gammabrightness ? 0 : curbrightness][0];
r=(glinfo.bgra)?hictinting[pal].b:hictinting[pal].r; r=(glinfo.bgra)?hictinting[pal].b:hictinting[pal].r;
g=hictinting[pal].g; g=hictinting[pal].g;
@ -861,21 +760,6 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf)
} }
else kclose(filh); else kclose(filh);
if (pal < (MAXPALOOKUPS - RESERVEDPALS)) m->usesalpha = hasalpha; 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 ((doalloc&3)==1) bglGenTextures(1,(GLuint*)texidx); if ((doalloc&3)==1) bglGenTextures(1,(GLuint*)texidx);
bglBindTexture(GL_TEXTURE_2D,*texidx); bglBindTexture(GL_TEXTURE_2D,*texidx);
@ -1304,13 +1188,6 @@ static md2model_t *md2load(int32_t fil, const char *filnam)
if (m->numskins > 0) if (m->numskins > 0)
{ {
sk->fn = (char *)malloc(strlen(m->basepath)+strlen(m->skinfn)+1); 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); strcpy(sk->fn, m->basepath);
strcat(sk->fn, m->skinfn); strcat(sk->fn, m->skinfn);
} }
@ -2204,13 +2081,6 @@ static void md3free(md3model_t *m)
{ {
nsk = sk->next; nsk = sk->next;
free(sk->fn); free(sk->fn);
/*
if (sk->palmap)
{
//_initprintf("Kill %d\n",sk->palette);
free(sk->palmap); sk->palmap=0;
}
*/
free(sk); free(sk);
} }

View file

@ -195,24 +195,8 @@ int32_t r_fullbrights = 1;
// is medium quality a good default? // is medium quality a good default?
int32_t r_downsize = 1; int32_t r_downsize = 1;
// used for fogcalc
float fogresult, fogcol[4], fogtable[4*MAXPALOOKUPS]; 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 #endif
static char ptempbuf[MAXWALLSB<<1]; static char ptempbuf[MAXWALLSB<<1];
@ -680,13 +664,6 @@ void polymost_glreset()
free(pth->ofb); free(pth->ofb);
} }
bglDeleteTextures(1,&pth->glpic); bglDeleteTextures(1,&pth->glpic);
/*
if (pth->palmap)
{
//_initprintf("Kill #%d\n",pth->palmap);
free(pth->palmap); pth->palmap=0;
}
*/
free(pth); free(pth);
pth = next; pth = next;
} }
@ -1741,32 +1718,6 @@ failure:
return -1; return -1;
} }
// --------------------------------------------------- JONOF'S COMPRESSED TEXTURE CACHE STUFF // --------------------------------------------------- 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) 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; 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; } 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; } 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; r=(glinfo.bgra)?hictinting[dapalnum].r:hictinting[dapalnum].b;
g=hictinting[dapalnum].g; 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) if ((doalloc&3)==1) bglGenTextures(1,(GLuint*)&pth->glpic); //# of textures (make OpenGL allocate structure)
bglBindTexture(GL_TEXTURE_2D,pth->glpic); 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); fixtransparency(pic,tsizx,tsizy,xsiz,ysiz,dameth);
uploadtexture(doalloc,xsiz,ysiz,intexfmt,texfmt,pic,-1,tsizy,dameth|8192|(hicr->flags & 16?4096:0)); uploadtexture(doalloc,xsiz,ysiz,intexfmt,texfmt,pic,-1,tsizy,dameth|8192|(hicr->flags & 16?4096:0));
} }

View file

@ -7358,7 +7358,6 @@ PALONLY:
case DIPSWITCH2__STATIC: case DIPSWITCH2__STATIC:
case DIPSWITCH3__STATIC: case DIPSWITCH3__STATIC:
case PULLSWITCH__STATIC: case PULLSWITCH__STATIC:
case HANDSWITCH__STATIC:
case SLOTDOOR__STATIC: case SLOTDOOR__STATIC:
case LIGHTSWITCH__STATIC: case LIGHTSWITCH__STATIC:
case SPACELIGHTSWITCH__STATIC: case SPACELIGHTSWITCH__STATIC:
@ -7399,7 +7398,6 @@ PALONLY:
case DIPSWITCH2__STATIC: case DIPSWITCH2__STATIC:
case DIPSWITCH3__STATIC: case DIPSWITCH3__STATIC:
case PULLSWITCH__STATIC: case PULLSWITCH__STATIC:
case HANDSWITCH__STATIC:
case SLOTDOOR__STATIC: case SLOTDOOR__STATIC:
case LIGHTSWITCH__STATIC: case LIGHTSWITCH__STATIC:
case SPACELIGHTSWITCH__STATIC: case SPACELIGHTSWITCH__STATIC:

View file

@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#include "duke3d.h" #include "duke3d.h"
const char *s_buildDate = "20090414"; const char *s_buildDate = "20090416";
char *MusicPtr = NULL; char *MusicPtr = NULL;
int32_t g_musicSize; int32_t g_musicSize;

View file

@ -372,7 +372,6 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
if (statustext) gametext(160,180,statustext,0,2+8+16); if (statustext) gametext(160,180,statustext,0,2+8+16);
{ {
int32_t ii = scale(scale(xdim-1,288,320),percent,100); 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(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(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); rotatesprite(30<<16,144<<16,65536,0,929,0,0,2+8+16,0,0,ii,ydim-1);

View file

@ -169,7 +169,7 @@ static void PopulateForm(int32_t pgs)
*/ */
{ {
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); hwnd = GetDlgItem(pages[TAB_CONFIG], IDCINPUT);