diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index 751b5bc51..ac13cb6a8 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -1650,7 +1650,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method) bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0); // texture scale by parkar request - if (pth && pth->hicr && ((pth->hicr->xscale != 1.0f) || (pth->hicr->yscale != 1.0f))) + if (pth && pth->hicr && ((pth->hicr->xscale != 1.0f) || (pth->hicr->yscale != 1.0f)) && !drawingskybox) { bglMatrixMode(GL_TEXTURE); bglLoadIdentity(); diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 4578fc89b..d41e00f79 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -62,9 +62,6 @@ char *Help2d[]= { " 'L = Adjust sprite/wall coords", " 'S = Sprite size", " '3 = Caption mode", -#ifdef VULGARITY - " '4 = MIN FRAMERATE", -#endif " '7 = Swap tags", " 'F = Special functions", " X = Horiz. flip selected sects", @@ -110,19 +107,6 @@ char *SPRDSPMODE[MAXNOSPRITES]= { "Sprite display: NO EFFECTORS OR ACTORS" }; -#ifdef VULGARITY -char *Slow[8]= { - "SALES = 0,000,000 ***********************", - "100% OF NOTHING IS !! ********************", - "RENDER IN PROGRESS ***********************", - "YOUR MOTHER IS A WHORE *******************", - "YOU SUCK DONKEY **************************", - "FUCKIN PISS ANT **************************", - "PISS ANT *********************************", - "SLOW *************************************" - }; -#endif - #define MAXHELP3D (signed int)(sizeof(Help3d)/sizeof(Help3d[0])) char *Help3d[]= { "Mapster32 3D mode help", @@ -2978,23 +2962,18 @@ static void Keys3d(void) rate=(120<<4)/(i-clockval[clockcnt])-1; if (framerateon) { + int p = 8; + Bsprintf(tempbuf,"%ld",rate); -#ifdef VULGARITY - if (rate 640)); - enddrawing(); - } + if (rate > 9) p += 8; + if (rate > 99) p += 8; + if (rate > 999) p += 8; + if (xdimgame <= 640) p >>= 1; + + begindrawing(); + printext256(xdimgame-p-1,2,0,-1,tempbuf,!(xdimgame > 640)); + printext256(xdimgame-p-2,1,rate < 40?248:whitecol,-1,tempbuf,!(xdimgame > 640)); + enddrawing(); } } clockval[clockcnt] = i; @@ -3977,25 +3956,6 @@ static void Keys2d(void) } // Ver(); -#ifdef VULGARITY - if (keystatus[KEYSC_QUOTE]==1 && keystatus[0x05]==1) // ' 4 - { - keystatus[0x05]=0; - MinRate=getnumber16("Enter Min Frame Rate : ", MinRate, 128L,0); - printmessage16(""); - /* - if(MinRate==40) - {MinRate=24; MinD=3; - } - else - {MinRate=40; MinD=5; - } - */ - MinRate &= ~7; - MinD = MinRate/8; - } -#endif - /* if(keystatus[KEYSC_QUOTE]==1 && keystatus[0x06]==1) // ' 5 { @@ -4476,7 +4436,7 @@ int loadgroupfiles(char *fn) initprintf("Warning: Failed including %s on line %s:%d\n", fn, script->filename,scriptfile_getlinum(script,cmdtokptr)); } else { - loadgroupfiles((const char *)included); + loadgroupfiles((char *)included); scriptfile_close(included); } } diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 9b50743cb..8f2324aa3 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -288,6 +288,8 @@ void CONFIG_SetDefaults(void) ud.statusbarmode = 0; ud.statusbarscale = 100; ud.team = 0; + ud.viewbob = 1; + ud.weaponsway = 1; ud.weaponswitch = 3; // new+empty UseJoystick = 0; UseMouse = 1; @@ -309,6 +311,8 @@ void CONFIG_SetDefaults(void) // JBF 20031211 + CONFIG_SetDefaultKeys(0); + memset(MouseFunctions, -1, sizeof(MouseFunctions)); for (i=0; i 1) { @@ -2336,10 +2336,15 @@ static void tics(void) Bsprintf(b,"%ld",max(j,0)); // minitext(scale(windowx1,320,xdim)+1,scale(windowy1,200,ydim)+1,b,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26); - ii = scale(k,ydim,200)+windowy1; - printext256(windowx1+2,ii+2,0,-1,b,!(xdim > 640)); - printext256(windowx1+1,ii+1,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?248:31,-1,b,!(xdim > 640)); + + if (j > 9) p += 8; + if (j > 99) p += 8; + if (j > 999) p += 8; + if (xdim <= 640) p >>= 1; + + printext256(windowx2-p+1,ii+2,0,-1,b,!(xdim > 640)); + printext256(windowx2-p,ii+1,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?248:31,-1,b,!(xdim > 640)); if (numplayers > 1) if ((totalclock - lastpackettime) > 1) @@ -4001,7 +4006,10 @@ void displayrooms(int snum,long smoothratio) } else if (p->over_shoulder_on == 0) - ud.cameraz += p->opyoff+mulscale16((long)(p->pyoff-p->opyoff),smoothratio); + { + if (ud.viewbob) + ud.cameraz += p->opyoff+mulscale16((long)(p->pyoff-p->opyoff),smoothratio); + } else view(p,&ud.camerax,&ud.cameray,&ud.cameraz,&ud.camerasect,ud.cameraang,ud.camerahoriz); cz = hittype[p->i].ceilingz; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index c44016878..b32b0bdac 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -639,7 +639,10 @@ cvar[] = { "cl_showcoords", "cl_showcoords: show your position in the game world", (void*)&ud.coords, CVAR_BOOL, 0, 0, 1 }, { "cl_showfps", "cl_showfps: show the frame rate counter", (void*)&ud.tickrate, CVAR_BOOL, 0, 0, 1 }, { "cl_smoothinput", "cl_smoothinput: enable/disable input smoothing\n", (void*)&SmoothInput, CVAR_BOOL, 0, 0, 1 }, + + { "cl_viewbob", "cl_viewbob: enable/disable player head bobbing\n", (void*)&ud.viewbob, CVAR_BOOL, 0, 0, 1 }, + { "cl_weaponsway", "cl_weaponsway: enable/disable player weapon swaying\n", (void*)&ud.weaponsway, CVAR_BOOL, 0, 0, 1 }, { "cl_weaponswitch", "cl_weaponswitch: enable/disable auto weapon switching", (void*)&ud.weaponswitch, CVAR_INT|256, 0, 0, 3 }, #if defined(POLYMOST) && defined(USE_OPENGL) { "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, CVAR_BOOL, 0, 0, 1 }, diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index a1dbde28e..2ad7bfd1a 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2137,12 +2137,17 @@ void displayweapon(int snum) gun_pos = 80-(p->weapon_pos*p->weapon_pos); weapon_xoffset = (160)-90; - weapon_xoffset -= (sintable[((p->weapon_sway>>1)+512)&2047]/(1024+512)); - weapon_xoffset -= 58 + p->weapon_ang; - if (sprite[p->i].xrepeat < 32) - gun_pos -= klabs(sintable[(p->weapon_sway<<2)&2047]>>9); - else gun_pos -= klabs(sintable[(p->weapon_sway>>1)&2047]>>10); + + if (ud.weaponsway) + { + weapon_xoffset -= (sintable[((p->weapon_sway>>1)+512)&2047]/(1024+512)); + if (sprite[p->i].xrepeat < 32) + gun_pos -= klabs(sintable[(p->weapon_sway<<2)&2047]>>9); + else gun_pos -= klabs(sintable[(p->weapon_sway>>1)&2047]>>10); + } else gun_pos -= 16; + + weapon_xoffset -= 58 + p->weapon_ang; gun_pos -= (p->hard_landing<<3); if (p->last_weapon >= 0)