From f3fbf8d9a37437934cb9e14dfac34031e515f8cf Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 30 Apr 2009 21:09:44 +0000 Subject: [PATCH] Add support for cvars of type 'double', fix vid_gamma/brightness/contrast cvars, save cvars to eduke32_binds.cfg at shutdown, better method for drawing the floor textures in Mapster32 2D mode, slightly more yellow/orange lights on fire/rockets/lasers/etc git-svn-id: https://svn.eduke32.com/eduke32@1358 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/osd.h | 13 +- polymer/eduke32/build/src/build.c | 317 +--------------------------- polymer/eduke32/build/src/osd.c | 79 +++---- polymer/eduke32/source/actors.c | 24 +-- polymer/eduke32/source/config.c | 8 +- polymer/eduke32/source/game.c | 4 +- polymer/eduke32/source/gamevars.c | 12 +- polymer/eduke32/source/osdcmds.c | 6 +- polymer/eduke32/source/player.c | 3 +- 9 files changed, 80 insertions(+), 386 deletions(-) diff --git a/polymer/eduke32/build/include/osd.h b/polymer/eduke32/build/include/osd.h index 596f7cba7..6fe5a63ef 100644 --- a/polymer/eduke32/build/include/osd.h +++ b/polymer/eduke32/build/include/osd.h @@ -28,11 +28,12 @@ const char *stripcolorcodes(char *out, const char *in); enum cvartypes { - CVAR_FLOAT, - CVAR_INT, - CVAR_UNSIGNEDINT, - CVAR_BOOL, - CVAR_STRING, + CVAR_FLOAT = 1, + CVAR_INT = 2, + CVAR_UINT = 4, + CVAR_BOOL = 8, + CVAR_STRING = 16, + CVAR_DOUBLE = 32, CVAR_NOMULTI = 128, CVAR_MULTI = 256, CVAR_NOSAVE = 512, @@ -137,7 +138,7 @@ int32_t OSD_RegisterFunction(const char *name, const char *help, int32_t (*func) int32_t osdcmd_cvar_set(const osdfuncparm_t *parm); int32_t OSD_RegisterCvar(const cvar_t *cvar); -void OSD_WriteCvars(const char *setupfilename); +void OSD_WriteCvars(FILE *fp); // these correspond to the Duke palettes, so they shouldn't really be here // ...but I don't care diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 1be280dce..9a574b04d 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -1129,318 +1129,6 @@ char changechar(char dachar, int32_t dadir, char smooshyalign, char boundcheck) } return(dachar); } -#if 0 -/* -int32_t gettile(int32_t tilenum) -{ - char snotbuf[80], ch; - int32_t i, j, k, otilenum, topleft, gap, temp, tempint; - int32_t xtiles, ytiles, tottiles; - - if (tilenum < 0) tilenum = 0; - - xtiles = (xdim>>6); ytiles = (ydim>>6); tottiles = xtiles*ytiles; - otilenum = tilenum; - - keystatus[0x2f] = 0; - for (i=0;i>1); - do - { - for (i=0;i= 0)) - { - tempint = localartfreq[temp]; - localartfreq[temp] = localartfreq[temp+gap]; - localartfreq[temp+gap] = tempint; - tempint = localartlookup[temp]; - localartlookup[temp] = localartlookup[temp+gap]; - localartlookup[temp+gap] = tempint; - - if (tilenum == temp) - tilenum = temp+gap; - else if (tilenum == temp+gap) - tilenum = temp; - - temp -= gap; - } - } - gap >>= 1; - } - while (gap > 0); - localartlookupnum = 0; - while (localartfreq[localartlookupnum] > 0) - localartlookupnum++; - - if (localartfreq[0] == 0) - { - tilenum = otilenum; - localartlookupnum = MAXTILES; - for (i=0;i MAXTILES-(tottiles<<(gettilezoom<<1))) topleft = MAXTILES-(tottiles<<(gettilezoom<<1)); - while ((keystatus[0x1c]|keystatus[1]) == 0) - { - drawtilescreen(topleft,tilenum); - - if (handleevents()) - { - if (quitevent) quitevent = 0; - } - idle(); - - synctics = totalclock-lockclock; - lockclock += synctics; - - if ((keystatus[0x37] > 0) && (gettilezoom < 2)) - { - gettilezoom++; - topleft = ((tilenum/(xtiles< MAXTILES-(tottiles<<(gettilezoom<<1))) topleft = MAXTILES-(tottiles<<(gettilezoom<<1)); - keystatus[0x37] = 0; - } - if ((keystatus[0xb5] > 0) && (gettilezoom > 0)) - { - gettilezoom--; - topleft = ((tilenum/(xtiles< MAXTILES-(tottiles<<(gettilezoom<<1))) topleft = MAXTILES-(tottiles<<(gettilezoom<<1)); - keystatus[0xb5] = 0; - } - if ((keystatus[0xcb] > 0) && (tilenum > 0)) - tilenum--, keystatus[0xcb] = 0; - if ((keystatus[0xcd] > 0) && (tilenum < MAXTILES-1)) - tilenum++, keystatus[0xcd] = 0; - if ((keystatus[0xc8] > 0) && (tilenum >= (xtiles< 0) && (tilenum < MAXTILES-(xtiles< 0) && (tilenum >= (xtiles< 0) && (tilenum < MAXTILES-(xtiles<= MAXTILES) tilenum = MAXTILES-1; - keystatus[0xd1] = 0; - } - if (keystatus[0x2f] > 0) //V - { - keystatus[0x2f] = 0; - if (tilenum < localartlookupnum) - tilenum = localartlookup[tilenum]; - else - tilenum = 0; - localartlookupnum = MAXTILES; - for (i=0;i 0) //G (goto) - { - if (tilenum < localartlookupnum) //Automatically press 'V' - tilenum = localartlookup[tilenum]; - else - tilenum = 0; - localartlookupnum = MAXTILES; - for (i=0;i= '0' && ch <= '9') - { - i = (j*10)+(ch-'0'); - if (i < MAXTILES) j = i; - } - else if (ch == 8) - { - j /= 10; - } - else if (ch == 13) - { - tilenum = j; - break; - } - } - clearkeys(); - } - while (tilenum < topleft) topleft -= (xtiles<= topleft+(tottiles<<(gettilezoom<<1))) topleft += (xtiles< MAXTILES-(tottiles<<(gettilezoom<<1))) topleft = MAXTILES-(tottiles<<(gettilezoom<<1)); - } - - if (keystatus[0x1c] == 0) - { - tilenum = otilenum; - } - else - { - if (tilenum < localartlookupnum) - { - tilenum = localartlookup[tilenum]; - if ((tilesizx[tilenum] == 0) || (tilesizy[tilenum] == 0)) - tilenum = otilenum; - } - else - tilenum = otilenum; - } - keystatus[0x1] = 0; - keystatus[0x1c] = 0; - return(tilenum); -} - -int32_t drawtilescreen(int32_t pictopleft, int32_t picbox) -{ - int32_t i, j, vidpos, vidpos2, dat, wallnum, xdime, ydime, cnt, pinc; - int32_t dax, day, scaledown, xtiles, ytiles, tottiles; - char *picptr, snotbuf[80]; - - xtiles = (xdim>>6); ytiles = (ydim>>6); tottiles = xtiles*ytiles; - - begindrawing(); //{{{ - - setpolymost2dview(); // JBF 20040205: set to 2d rendering - - pinc = ylookup[1]; - clearview(0L); - for (cnt=0;cnt<(tottiles<<(gettilezoom<<1));cnt++) //draw the 5*3 grid of tiles - { - wallnum = cnt+pictopleft; - if (wallnum < localartlookupnum) - { - wallnum = localartlookup[wallnum]; - if ((tilesizx[wallnum] != 0) && (tilesizy[wallnum] != 0)) - { - if (waloff[wallnum] == 0) loadtile(wallnum); - picptr = (char *)(waloff[wallnum]); - xdime = tilesizx[wallnum]; - ydime = tilesizy[wallnum]; - - dax = ((cnt%(xtiles<>gettilezoom, 0)) - { - vidpos = ylookup[day]+dax+frameplace; - if ((xdime <= (64>>gettilezoom)) && (ydime <= (64>>gettilezoom))) - { - for (i=0;i 64 - { - if (xdime > ydime) - scaledown = ((xdime+(63>>gettilezoom))>>(6-gettilezoom)); - else - scaledown = ((ydime+(63>>gettilezoom))>>(6-gettilezoom)); - - for (i=0;i>gettilezoom);i++) - { - plotpixel(dax+i,day,whitecol); - plotpixel(dax+i,day+(63>>gettilezoom),whitecol); - plotpixel(dax,day+i,whitecol); - plotpixel(dax+(63>>gettilezoom),day+i,whitecol); - } - - i = localartlookup[picbox]; - Bsprintf(snotbuf,"%d",i); - printext256(0L,ydim-8,whitecol,-1,snotbuf,0); - printext256(xdim-(Bstrlen(names[i])<<3),ydim-8,whitecol,-1,names[i],0); - - Bsprintf(snotbuf,"%dx%d",tilesizx[i],tilesizy[i]); - printext256(xdim>>2,ydim-8,whitecol,-1,snotbuf,0); - - enddrawing(); //}}} - showframe(1); - - return(0); -} -*/ -#endif void overheadeditor(void) { @@ -1636,15 +1324,12 @@ void overheadeditor(void) Bmemset(show2dsector, 255, sizeof(show2dsector)); setview(0, 0, xdim-1, ydim16-1); yxaspect = xyaspect = 65536; - j = ydim; - ydim -= scale((MAXYDIM/6), ydim, MAXYDIM); if (graphicsmode == 2) totalclocklock = totalclock; - drawmapview(pos.x, pos.y, zoom, 1536); + drawmapview(pos.x, pos.y + scale((1048576/zoom), ydim, 768), zoom, 1536); yxaspect = i; - ydim = j; xyaspect = ii; } diff --git a/polymer/eduke32/build/src/osd.c b/polymer/eduke32/build/src/osd.c index 7b0e13ae3..20ff54183 100644 --- a/polymer/eduke32/build/src/osd.c +++ b/polymer/eduke32/build/src/osd.c @@ -620,9 +620,9 @@ void OSD_Init(void) { "osdeditshade","osdeditshade: sets the shade of the OSD input text",(void *)&osdeditshade, CVAR_INT, 0, 0, 7 }, { "osdtextshade","osdtextshade: sets the shade of the OSD text",(void *)&osdtextshade, CVAR_INT, 0, 0, 7 }, { "osdpromptshade","osdpromptshade: sets the shade of the OSD prompt",(void *)&osdpromptshade, CVAR_INT, 0, -128, 127 }, - { "logcutoff","logcutoff: sets the maximal line count of the log file",(void *)&logcutoff, CVAR_INT, 0, 0, 262144 }, { "osdrows","osdrows: sets the number of visible lines of the OSD",(void *)&osdrows, CVAR_INT|CVAR_FUNCPTR, 0, 0, MAXPALOOKUPS-1 }, { "osdtextmode","osdtextmode: set OSD text mode (0:graphical, 1:fast)",(void *)&osdtextmode, CVAR_BOOL|CVAR_FUNCPTR, 0, 0, 1 }, + { "logcutoff","logcutoff: sets the maximal line count of the log file",(void *)&logcutoff, CVAR_INT, 0, 0, 262144 }, }; Bmemset(osdtext, 32, TEXTSIZE); @@ -1872,10 +1872,10 @@ int32_t osdcmd_cvar_set(const osdfuncparm_t *parm) OSD_Printf("Cvar \"%s\" locked in multiplayer.\n",cvars[i].name); return OSDCMD_OK; } - else - switch (cvars[i].type&0x7f) - { - case CVAR_FLOAT: + + switch (cvars[i].type&(CVAR_FLOAT|CVAR_DOUBLE|CVAR_INT|CVAR_UINT|CVAR_BOOL|CVAR_STRING)) + { + case CVAR_FLOAT: { float val; if (showval) @@ -1896,9 +1896,30 @@ int32_t osdcmd_cvar_set(const osdfuncparm_t *parm) OSD_Printf("%s %f",cvars[i].name,val); } break; - case CVAR_INT: - case CVAR_UNSIGNEDINT: - case CVAR_BOOL: + case CVAR_DOUBLE: + { + double val; + if (showval) + { + OSD_Printf("\"%s\" is \"%f\"\n%s\n",cvars[i].name,*(double*)cvars[i].var,(char*)cvars[i].helpstr); + return OSDCMD_OK; + } + + sscanf(parm->parms[0], "%lf", &val); + + if (val < cvars[i].min || val > cvars[i].max) + { + OSD_Printf("%s value out of range\n",cvars[i].name); + return OSDCMD_OK; + } + *(double*)cvars[i].var = val; + if (!OSD_ParsingScript()) + OSD_Printf("%s %f",cvars[i].name,val); + } + break; + case CVAR_INT: + case CVAR_UINT: + case CVAR_BOOL: { int32_t val; if (showval) @@ -1908,7 +1929,7 @@ int32_t osdcmd_cvar_set(const osdfuncparm_t *parm) } val = atoi(parm->parms[0]); - if (cvars[i].type == CVAR_BOOL) val = val != 0; + if (cvars[i].type & CVAR_BOOL) val = val != 0; if (val < cvars[i].min || val > cvars[i].max) { @@ -1920,7 +1941,7 @@ int32_t osdcmd_cvar_set(const osdfuncparm_t *parm) OSD_Printf("%s %d",cvars[i].name,val); } break; - case CVAR_STRING: + case CVAR_STRING: { if (showval) { @@ -1934,41 +1955,36 @@ int32_t osdcmd_cvar_set(const osdfuncparm_t *parm) OSD_Printf("%s %s",cvars[i].name,(char*)cvars[i].var); } break; - default: - break; - } - // if (cvars[i].type&CVAR_MULTI) - // G_UpdatePlayerFromMenu(); + default: + break; + } } + if (!OSD_ParsingScript()) OSD_Printf("\n"); + return OSDCMD_OK; } -void OSD_WriteCvars(const char *setupfilename) +void OSD_WriteCvars(FILE *fp) { uint32_t i; - FILE *fp; - char *ptr = Bstrdup(setupfilename); - char tempbuf[128]; - - Bsprintf(tempbuf, "%s_cvars.cfg", strtok(ptr, ".")); - fp = fopen(tempbuf, "wt"); if (fp) { - fprintf(fp,"// this file automatically generated by EDuke32\n// do not modify if you lack common sense\n"); - for (i=0; isectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME); break; case ATOMICHEALTH__STATIC: G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),PR_LIGHT_PRIO_HIGH_GAME); @@ -610,7 +610,7 @@ static void G_MoveZombieActors(void) 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),PR_LIGHT_PRIO_MAX_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME); break; case BURNING__STATIC: case BURNING2__STATIC: @@ -618,11 +618,11 @@ static void G_MoveZombieActors(void) 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),PR_LIGHT_PRIO_MAX_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME); break; case EXPLOSION2__STATIC: - G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),PR_LIGHT_PRIO_HIGH_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(95<<8),PR_LIGHT_PRIO_HIGH_GAME); break; case FORCERIPPLE__STATIC: // case TRANSPORTERSTAR__STATIC: @@ -2181,7 +2181,7 @@ CLEAR_THE_BOLT: case FLOORFLAME__STATIC: case FIREBARREL__STATIC: case FIREVASE__STATIC: - G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME); case EXPLODINGBARREL__STATIC: case WOODENHORSE__STATIC: case HORSEONSIDE__STATIC: @@ -2742,10 +2742,10 @@ static void G_MoveWeapons(void) G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),PR_LIGHT_PRIO_HIGH_GAME); break; case FIRELASER__STATIC: - G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),PR_LIGHT_PRIO_LOW_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(95<<8),PR_LIGHT_PRIO_LOW_GAME); break; case RPG__STATIC: - G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),PR_LIGHT_PRIO_LOW_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(95<<8),PR_LIGHT_PRIO_LOW_GAME); if (DynamicTileMap[s->picnum] == RPG__STATIC && ActorExtra[i].picnum != BOSS2 && s->xrepeat >= 10 && sector[s->sectnum].lotag != 2) @@ -3400,7 +3400,7 @@ static void G_MoveActors(void) 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),PR_LIGHT_PRIO_MAX_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME); break; case DUCK__STATIC: @@ -4900,8 +4900,8 @@ static void G_MoveMisc(void) // STATNUM 5 } case FIRELASER__STATIC: - if (s->extra != 999) - s->extra = 999; + if (s->extra != 5) + s->extra = 5; else KILLIT(i); break; case TONGUE__STATIC: @@ -5155,12 +5155,12 @@ static void G_MoveMisc(void) // STATNUM 5 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),PR_LIGHT_PRIO_MAX_GAME); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME); break; case EXPLOSION2__STATIC: G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), - (512 * s->yrepeat) / (ActorExtra[i].temp_data[2]+1), 255+(80<<8),PR_LIGHT_PRIO_HIGH_GAME); + (512 * s->yrepeat) / (ActorExtra[i].temp_data[2]+1), 255+(95<<8),PR_LIGHT_PRIO_HIGH_GAME); break; case FORCERIPPLE__STATIC: // case TRANSPORTERSTAR__STATIC: diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 048616368..23f307a35 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -982,7 +982,11 @@ void CONFIG_WriteBinds(void) // save binds and aliases to _binds.cfg if (fp) { symbol_t *symb; - fprintf(fp,"// this file automatically generated by EDuke32\n// do not modify if you lack common sense\n"); + + fprintf(fp,"// this file automatically generated by EDuke32\n"); + fprintf(fp,"// these settings take precedence over your main cfg file\n"); + fprintf(fp,"// do not modify if you lack common sense\n"); + for (i=0; i_binds.cfg if (!(cvar[i].type&CVAR_NOSAVE)) fprintf(fp,"%s \"%d\"\n",cvar[i].name,*(int32_t*)cvar[i].var); */ + OSD_WriteCvars(fp); fclose(fp); Bsprintf(tempbuf,"Wrote %s_binds.cfg\n",ptr); OSD_Printf(tempbuf); @@ -1263,7 +1268,6 @@ void CONFIG_WriteSetup(void) SCRIPT_Free(ud.config.scripthandle); OSD_Printf("Wrote %s\n",setupfilename); CONFIG_WriteBinds(); - OSD_WriteCvars(setupfilename); } diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 9ca0254bb..9f12f731b 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -5535,7 +5535,7 @@ int32_t A_Spawn(int32_t j, int32_t pn) break; case EXPLOSION2__STATIC: - G_AddGameLight(0, sp->sectnum, sp->x, sp->y, sp->z-((sp->yrepeat*tilesizy[sp->picnum])<<1), 8192, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME); + G_AddGameLight(0, sp->sectnum, sp->x, sp->y, sp->z-((sp->yrepeat*tilesizy[sp->picnum])<<1), 8192, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME); case EXPLOSION2BOT__STATIC: case BURNING__STATIC: case BURNING2__STATIC: @@ -11525,8 +11525,6 @@ CLEAN_DIRECTORY: char *ptr = Bstrdup(setupfilename), *p = strtok(ptr,"."); Bsprintf(tempbuf,"%s_binds.cfg",p); OSD_Exec(tempbuf); - Bsprintf(tempbuf,"%s_cvars.cfg",p); - OSD_Exec(tempbuf); Bfree(ptr); } diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 9985936e5..c2af81f4d 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -1096,7 +1096,7 @@ static void Gv_AddSystemVars(void) Bsprintf(aszBuf,"WEAPON%d_SELECTSOUND",PISTOL_WEAPON); Gv_NewVar(aszBuf, INSERT_CLIP, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_FLASHCOLOR",PISTOL_WEAPON); - Gv_NewVar(aszBuf, 255+(80<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); + Gv_NewVar(aszBuf, 255+(95<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); ///////////////////////////// Bsprintf(aszBuf,"WEAPON%d_WORKSLIKE",SHOTGUN_WEAPON); @@ -1136,7 +1136,7 @@ static void Gv_AddSystemVars(void) Bsprintf(aszBuf,"WEAPON%d_SELECTSOUND",SHOTGUN_WEAPON); Gv_NewVar(aszBuf, SHOTGUN_COCK, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_FLASHCOLOR",SHOTGUN_WEAPON); - Gv_NewVar(aszBuf, 255+(80<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); + Gv_NewVar(aszBuf, 255+(95<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); ///////////////////////////// Bsprintf(aszBuf,"WEAPON%d_WORKSLIKE",CHAINGUN_WEAPON); @@ -1176,7 +1176,7 @@ static void Gv_AddSystemVars(void) Bsprintf(aszBuf,"WEAPON%d_SELECTSOUND",CHAINGUN_WEAPON); Gv_NewVar(aszBuf, SELECT_WEAPON, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_FLASHCOLOR",CHAINGUN_WEAPON); - Gv_NewVar(aszBuf, 255+(80<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); + Gv_NewVar(aszBuf, 255+(95<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); ///////////////////////////// Bsprintf(aszBuf,"WEAPON%d_WORKSLIKE",RPG_WEAPON); @@ -1216,7 +1216,7 @@ static void Gv_AddSystemVars(void) Bsprintf(aszBuf,"WEAPON%d_SELECTSOUND",RPG_WEAPON); Gv_NewVar(aszBuf, SELECT_WEAPON, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_FLASHCOLOR",RPG_WEAPON); - Gv_NewVar(aszBuf, 255+(80<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); + Gv_NewVar(aszBuf, 255+(95<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); ///////////////////////////// Bsprintf(aszBuf,"WEAPON%d_WORKSLIKE",HANDBOMB_WEAPON); @@ -1336,7 +1336,7 @@ static void Gv_AddSystemVars(void) Bsprintf(aszBuf,"WEAPON%d_SELECTSOUND",DEVISTATOR_WEAPON); Gv_NewVar(aszBuf, SELECT_WEAPON, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_FLASHCOLOR",DEVISTATOR_WEAPON); - Gv_NewVar(aszBuf, 255+(80<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); + Gv_NewVar(aszBuf, 255+(95<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); ///////////////////////////// Bsprintf(aszBuf,"WEAPON%d_WORKSLIKE",TRIPBOMB_WEAPON); @@ -1496,7 +1496,7 @@ static void Gv_AddSystemVars(void) Bsprintf(aszBuf,"WEAPON%d_SELECTSOUND",GROW_WEAPON); Gv_NewVar(aszBuf, SELECT_WEAPON, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_FLASHCOLOR",GROW_WEAPON); - Gv_NewVar(aszBuf, 255+(80<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); + Gv_NewVar(aszBuf, 255+(95<<8), GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); Gv_NewVar("GRENADE_LIFETIME", NAM_GRENADE_LIFETIME, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); Gv_NewVar("GRENADE_LIFETIME_VAR", NAM_GRENADE_LIFETIME_VAR, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 574439c5d..89a717472 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -1310,9 +1310,9 @@ int32_t registerosdcommands(void) { "snd_numchannels", "snd_numchannels: the number of sound channels", (void*)&ud.config.NumChannels, CVAR_INT, 0, 0, 2 }, { "snd_numvoices", "snd_numvoices: the number of concurrent sounds", (void*)&ud.config.NumVoices, CVAR_INT, 0, 0, 32 }, { "snd_reversestereo", "snd_reversestereo: reverses the stereo channels", (void*)&ud.config.ReverseStereo, CVAR_BOOL, 0, 0, 16 }, - { "vid_gamma","vid_gamma : adjusts gamma ramp",(void*)&vid_gamma, CVAR_FLOAT|CVAR_FUNCPTR, 0, 0, 10 }, - { "vid_contrast","vid_contrast : adjusts gamma ramp",(void*)&vid_contrast, CVAR_FLOAT|CVAR_FUNCPTR, 0, 0, 10 }, - { "vid_brightness","vid_brightness : adjusts gamma ramp",(void*)&vid_brightness, CVAR_FLOAT|CVAR_FUNCPTR, 0, 0, 10 }, + { "vid_gamma","vid_gamma : adjusts gamma ramp",(void*)&vid_gamma, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 0, 10 }, + { "vid_contrast","vid_contrast : adjusts gamma ramp",(void*)&vid_contrast, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 0, 10 }, + { "vid_brightness","vid_brightness : adjusts gamma ramp",(void*)&vid_brightness, CVAR_DOUBLE|CVAR_FUNCPTR, 0, 0, 10 }, }; diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 5492b0f57..fe6a26894 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -70,7 +70,6 @@ static void P_IncurDamage(DukePlayer_t *p) X_OnEvent(EVENT_INCURDAMAGE, p->i, sprite[p->i].yvel, -1); if (aGameVars[g_iReturnVarID].val.lValue == 0) - { sprite[p->i].extra -= p->extra_extra8>>8; @@ -355,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, 8192, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME); + s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 8192, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME); gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);