From b1a5b6be67a611401b5fdaea60bd6943afd116dd Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 31 Jul 2008 10:35:23 +0000 Subject: [PATCH] useless shit changes that aren't even worth looking at git-svn-id: https://svn.eduke32.com/eduke32@926 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/polymost.c | 5 +++-- polymer/eduke32/source/config.c | 6 +++--- polymer/eduke32/source/duke3d.h | 2 +- polymer/eduke32/source/game.c | 21 ++++++++++----------- polymer/eduke32/source/gamedef.c | 2 +- polymer/eduke32/source/gamedef.h | 2 +- polymer/eduke32/source/gameexec.c | 6 +++--- polymer/eduke32/source/menus.c | 14 +++++++++----- polymer/eduke32/source/osdcmds.c | 2 +- polymer/eduke32/source/player.c | 4 ++-- 10 files changed, 34 insertions(+), 30 deletions(-) diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index bd9e9fb2d..e6e82aef5 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -177,7 +177,7 @@ int r_parallaxskypanning = 0; // line of sight checks before mddraw() int r_modelocclusionchecking = 0; #define CULL_OFFSET 384 -#define CULL_DELAY 3 +#define CULL_DELAY 2 // fullbright cvar int r_fullbrights = 1; @@ -4527,12 +4527,13 @@ void polymost_drawsprite(int snum) { if (usemodels && tile2model[Ptile2tile(tspr->picnum,tspr->pal)].modelid >= 0 && tile2model[Ptile2tile(tspr->picnum,tspr->pal)].framenum >= 0) { +// md2model *modelptr = (md2model *)models[tile2model[Ptile2tile(tspr->picnum,tspr->pal)].modelid]; if (tspr->owner < 0 || tspr->owner >= MAXSPRITES || tspr->statnum == TSPR_MIRROR) { if (mddraw(tspr)) return; break; // else, render as flat sprite } - if (r_modelocclusionchecking) + if (r_modelocclusionchecking /*&& modelptr->usesalpha && !(tspr->cstat & 1024)*/) { if (totalclock >= lastcullcheck + CULL_DELAY) { diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index b6a2ee729..fdd33fc41 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -227,7 +227,7 @@ void CONFIG_SetDefaults(void) ud.color = 0; ud.crosshair = 1; ud.crosshairscale = 50; - ud.deathmsgs = 1; + ud.obituaries = 1; ud.democams = 1; ud.detail = 1; ud.drawweapon = 1; @@ -732,7 +732,7 @@ int32 CONFIG_ReadSetup(void) SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowOpponentWeapons",&ud.config.ShowOpponentWeapons); ud.showweapons = ud.config.ShowOpponentWeapons; SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowViewWeapon",&ud.drawweapon); - SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "DeathMessages",&ud.deathmsgs); + SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "DeathMessages",&ud.obituaries); SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "DemoCams",&ud.democams); SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowFPS",&ud.tickrate); SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Color",&ud.color); @@ -880,7 +880,7 @@ void CONFIG_WriteSetup(void) SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Color",ud.color,false,false); SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Crosshairs",ud.crosshair,false,false); SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "CrosshairScale",ud.crosshairscale,false,false); - SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DeathMessages",ud.deathmsgs,false,false); + SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DeathMessages",ud.obituaries,false,false); SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DemoCams",ud.democams,false,false); ud.executions++; SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Executions",ud.executions,false,false); diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index cb039398d..7d3df0d83 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -415,7 +415,7 @@ typedef struct { int entered_name,screen_tilting,shadows,fta_on,executions,auto_run; int coords,tickrate,levelstats,m_coop,coop,screen_size,lockout,crosshair; - int playerai,angleinterpolation,deathmsgs; + int playerai,angleinterpolation,obituaries; int respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness; int m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index dd5552cfc..03db4c480 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2355,28 +2355,28 @@ static void coolgaugetext(int snum) } } -#define AVERAGEFRAMES 128 - static void tics(void) { - int i = totalclock,j; + #define AVERAGEFRAMES 128 + #define COLOR_RED 248 + #define COLOR_WHITE 31 + + int i = totalclock; static int frameval[AVERAGEFRAMES], framecnt = 0; - char b[4]; if (i != frameval[framecnt]) { - j=(timer*AVERAGEFRAMES)/(i-frameval[framecnt]); + framerate=(timer*AVERAGEFRAMES)/(i-frameval[framecnt]); if (ud.tickrate /*&& !(g_player[myconnectindex].ps->gm&MODE_MENU)*/) { int p = 32; - Bsprintf(b,"%4d",max(j,0)); -// minitext(scale(windowx1,320,xdim)+1,scale(windowy1,200,ydim)+1,b,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26); + Bsprintf(tempbuf,"%4d",max(framerate,0)); if (xdim <= 640) p >>= 1; - printext256(windowx2-p+1,windowy1+2,0,-1,b,!(xdim > 640)); - printext256(windowx2-p,windowy1+1,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?248:31,-1,b,!(xdim > 640)); + printext256(windowx2-p+1,windowy1+2,0,-1,tempbuf,!(xdim > 640)); + printext256(windowx2-p,windowy1+1,framerate<40?COLOR_RED:COLOR_WHITE,-1,tempbuf,!(xdim > 640)); if (numplayers > 1) if ((totalclock - lastpackettime) > 1) @@ -2386,7 +2386,6 @@ static void tics(void) } } - framerate = j; frameval[framecnt] = i; } framecnt = ((framecnt+1)&(AVERAGEFRAMES-1)); @@ -3549,7 +3548,7 @@ void displayrest(int smoothratio) gametext_z(9,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-7-7-7,tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536); if (ud.player_skill > 3 || (ud.multimode > 1 && !GTFLAGS(GAMETYPE_FLAG_PLAYERSFRIENDLY))) - Bsprintf(tempbuf,"K:^15%d",(ud.multimode>1 &&!GTFLAGS(GAMETYPE_FLAG_PLAYERSFRIENDLY))?g_player[i].ps->frag-g_player[i].ps->fraggedself:g_player[myconnectindex].ps->actors_killed); + Bsprintf(tempbuf,"K:^15%d",(ud.multimode>1 &&!GTFLAGS(GAMETYPE_FLAG_PLAYERSFRIENDLY))?g_player[myconnectindex].ps->frag-g_player[myconnectindex].ps->fraggedself:g_player[myconnectindex].ps->actors_killed); else { if (g_player[myconnectindex].ps->actors_killed >= g_player[myconnectindex].ps->max_actors_killed) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 13f7fcdd5..b2fdd5abd 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -876,7 +876,7 @@ const memberlabel_t userdefslabels[]= { "viewbob", USERDEFS_VIEWBOB, 0, 0 }, { "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 }, { "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 }, - { "deathmsgs", USERDEFS_DEATHMSGS, 0, 0 }, + { "obituaries", USERDEFS_OBITUARIES, 0, 0 }, { "levelstats", USERDEFS_LEVELSTATS, 0, 0 }, { "crosshairscale", USERDEFS_CROSSHAIRSCALE, 0, 0 }, { "", -1, 0, 0 } // END OF LIST diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 27f458916..1703aeff7 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -340,7 +340,7 @@ enum userdefslabels USERDEFS_VIEWBOB, USERDEFS_WEAPONSWAY, USERDEFS_ANGLEINTERPOLATION, - USERDEFS_DEATHMSGS, + USERDEFS_OBITUARIES, USERDEFS_LEVELSTATS, USERDEFS_CROSSHAIRSCALE }; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 51a9f6308..c53852759 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -847,13 +847,13 @@ static void DoUserDef(int iSet, int lLabelID, int lVar2) SetGameVarID(lVar2, ud.angleinterpolation, g_i, g_p); return; - case USERDEFS_DEATHMSGS: + case USERDEFS_OBITUARIES: if (iSet) { - ud.deathmsgs = lValue; + ud.obituaries = lValue; return; } - SetGameVarID(lVar2, ud.deathmsgs, g_i, g_p); + SetGameVarID(lVar2, ud.obituaries, g_i, g_p); return; case USERDEFS_LEVELSTATS: diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index aabedba5d..1b6378222 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2890,6 +2890,7 @@ cheat_for_port_credits: "DM: Use private messages", "DM: Show player names", "DM: Show player weapons", + "DM: Show player obituaries", "-", "Console text style", "-", @@ -2899,8 +2900,6 @@ cheat_for_port_credits: "-", "-", #endif - "-", - "-", "-", "-", "-", @@ -2997,6 +2996,11 @@ cheat_for_port_credits: mgametextpal(d,yy, ud.config.ShowOpponentWeapons ? "Yes" : "No", MENUHIGHLIGHT(io), 0); break; case 8: + if (x==io) ud.obituaries = 1-ud.obituaries; + modval(0,1,(int *)&ud.obituaries,1,probey==io); + mgametextpal(d,yy, ud.obituaries ? "Yes" : "No", MENUHIGHLIGHT(io), 0); + break; + case 9: { int osdmode = OSD_GetTextMode(); if (x==io) osdmode = !osdmode; @@ -3007,7 +3011,7 @@ cheat_for_port_credits: break; } #ifdef _WIN32 - case 9: + case 10: i = ud.config.CheckForUpdates; if (x==io) ud.config.CheckForUpdates = 1-ud.config.CheckForUpdates; modval(0,1,(int *)&ud.config.CheckForUpdates,1,probey==io); @@ -3015,9 +3019,9 @@ cheat_for_port_credits: ud.config.LastUpdateCheck = 0; mgametextpal(d,yy, ud.config.CheckForUpdates ? "Yes" : "No", MENUHIGHLIGHT(io), 0); break; - case 10: + case 11: #else - case 9: + case 10: #endif if (x==io) cmenu(200); break; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 5e22aa5a0..280c232d2 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -661,7 +661,7 @@ cvarmappings cvar[] = { "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT|CVAR_MULTI, 0, 0, 2 }, - { "cl_deathmessages", "cl_deathmessages: enable/disable multiplayer death messages", (void*)&ud.deathmsgs, CVAR_BOOL, 0, 0, 1 }, + { "cl_obituaries", "cl_obituaries: enable/disable multiplayer death messages", (void*)&ud.obituaries, CVAR_BOOL, 0, 0, 1 }, { "cl_democams", "cl_democams: enable/disable demo playback cameras", (void*)&ud.democams, CVAR_BOOL, 0, 0, 1 }, { "cl_idplayers", "cl_idplayers: enable/disable name display when aiming at opponents", (void*)&ud.idplayers, CVAR_BOOL, 0, 0, 1 }, diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 79cd3ee25..27d059a00 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -3550,7 +3550,7 @@ void processinput(int snum) FTA(116,g_player[p->frag_ps].ps); } - if (ud.deathmsgs) + if (ud.obituaries) { char name1[32],name2[32]; @@ -3620,7 +3620,7 @@ void processinput(int snum) } else Bsprintf(tempbuf,fta_quotes[PSDEATHSTRINGS+3],&g_player[snum].user_name[0],p->team+1); - if (ud.deathmsgs) + if (ud.obituaries) { if (ud.config.ScreenWidth >= 800) adduserquote(tempbuf);