From b1704e84078beaa44ac26399616513c45242a9ba Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 16 Apr 2009 06:41:24 +0000 Subject: [PATCH] Nothing important git-svn-id: https://svn.eduke32.com/eduke32@1329 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/Makefile.deps | 2 +- polymer/eduke32/build/Makefile.shared | 4 +- polymer/eduke32/build/include/build.h | 15 --- polymer/eduke32/build/include/mdsprite.h | 1 - polymer/eduke32/build/include/polymost.h | 16 ++- polymer/eduke32/build/src/defs.c | 68 +----------- polymer/eduke32/build/src/hightile.c | 5 - polymer/eduke32/build/src/mdsprite.c | 132 +---------------------- polymer/eduke32/build/src/polymost.c | 65 +---------- polymer/eduke32/source/actors.c | 32 +++--- polymer/eduke32/source/game.c | 2 - polymer/eduke32/source/global.c | 2 +- polymer/eduke32/source/player.c | 6 +- polymer/eduke32/source/premap.c | 1 - polymer/eduke32/source/startwin.game.c | 40 +++---- 15 files changed, 59 insertions(+), 332 deletions(-) diff --git a/polymer/eduke32/build/Makefile.deps b/polymer/eduke32/build/Makefile.deps index 3e7712c71..e68c0adf1 100644 --- a/polymer/eduke32/build/Makefile.deps +++ b/polymer/eduke32/build/Makefile.deps @@ -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 diff --git a/polymer/eduke32/build/Makefile.shared b/polymer/eduke32/build/Makefile.shared index 21e71b827..67871462a 100644 --- a/polymer/eduke32/build/Makefile.shared +++ b/polymer/eduke32/build/Makefile.shared @@ -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 diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index b4756684f..64bd7c300 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -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 diff --git a/polymer/eduke32/build/include/mdsprite.h b/polymer/eduke32/build/include/mdsprite.h index 720798246..1c9950d1b 100644 --- a/polymer/eduke32/build/include/mdsprite.h +++ b/polymer/eduke32/build/include/mdsprite.h @@ -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; diff --git a/polymer/eduke32/build/include/polymost.h b/polymer/eduke32/build/include/polymost.h index f982ec496..f2eb52f6c 100644 --- a/polymer/eduke32/build/include/polymost.h +++ b/polymer/eduke32/build/include/polymost.h @@ -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 diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index 4429be960..5af6758a9 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -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<= (unsigned)MAXTILES) { initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n", diff --git a/polymer/eduke32/build/src/hightile.c b/polymer/eduke32/build/src/hightile.c index fdb1cd717..e8561fe54 100644 --- a/polymer/eduke32/build/src/hightile.c +++ b/polymer/eduke32/build/src/hightile.c @@ -62,11 +62,6 @@ void hicinit(void) int32_t i,j; hicreplctyp *hr, *next; -/* -#if defined(USE_OPENGL) - clearconv(); -#endif -*/ for (i=0; ifn = (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; iskinmap; - 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); } diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 4dc3ea4a5..fd0c9584f 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -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; stagenext) - 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)); } diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 1bfc9d5fe..6021b9167 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -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; -*/ + /* + 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; -*/ + /* + 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; -*/ + /* + 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; -*/ + /* + 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; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 81e956a5d..30881d1c5 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -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: diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index d56880d14..cd6fb3b89 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -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; diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 51e0471d8..131088a63 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -354,7 +354,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith) case RPG__STATIC: case MORTER__STATIC: G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7), - s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, 255+(80<<8),1); + s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, 255+(80<<8),1); gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4); @@ -387,7 +387,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith) if (ProjectileData[atwith].flashcolor) { G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7), - s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, ProjectileData[atwith].flashcolor,1); + s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, ProjectileData[atwith].flashcolor,1); gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4); gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>4); @@ -2177,7 +2177,7 @@ void P_FireWeapon(DukePlayer_t *p) p->visibility = 0; G_AddGameLight(0, s->sectnum, s->x+((sintable[(p->ang+512)&2047])>>7), s->y+((sintable[(p->ang)&2047])>>7), - s->z-PHEIGHT, 4096, aplWeaponFlashColor[p->curr_weapon][snum],1); + s->z-PHEIGHT, 4096, aplWeaponFlashColor[p->curr_weapon][snum],1); gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(p->ang+512)&2047])>>4); diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 878fdbaa2..19b55277e 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -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); diff --git a/polymer/eduke32/source/startwin.game.c b/polymer/eduke32/source/startwin.game.c index f50c0faa7..53317522b 100644 --- a/polymer/eduke32/source/startwin.game.c +++ b/polymer/eduke32/source/startwin.game.c @@ -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)); -*/ + /* + 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,13 +177,13 @@ 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); if ((settings.usemouse && !settings.usejoy && i == INPUT_MOUSE) || - (!settings.usemouse && settings.usejoy && i == INPUT_JOYSTICK) || - (settings.usemouse && settings.usejoy && i == INPUT_ALL)) + (!settings.usemouse && settings.usejoy && i == INPUT_JOYSTICK) || + (settings.usemouse && settings.usejoy && i == INPUT_ALL)) (void)ComboBox_SetCurSel(hwnd, j); } } @@ -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 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], IDCINPUTMOUSE), n); + EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), n); + */ EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUT), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCDATA), n);