diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 1fccd1603..d806a3cd7 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -617,6 +617,7 @@ extern int32_t r_modelocclusionchecking; extern int32_t r_fullbrights; extern int32_t r_downsize; extern int32_t mdtims, omdtims; +extern int32_t glrendmode; #endif void hicinit(void); diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 90e536d5b..1f143ab86 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -7724,7 +7724,7 @@ int32_t setgamemode(char davidoption, int32_t daxdim, int32_t daydim, int32_t da if (nogl) dabpp = 8; #endif if ((qsetmode == 200) && (videomodereset == 0) && - (davidoption == fullscreen) && (xdim == daxdim) && (ydim == daydim) && (bpp == dabpp)) + (davidoption == fullscreen) && (xdim == daxdim) && (ydim == daydim) && (bpp == dabpp) && glrendmode != 4) return(0); strcpy(kensmessage,"!!!! BUILD engine&tools programmed by Ken Silverman of E.G. RI. (c) Copyright 1995 Ken Silverman. Summary: BUILD = Ken. !!!!"); @@ -7739,7 +7739,7 @@ int32_t setgamemode(char davidoption, int32_t daxdim, int32_t daydim, int32_t da if (setvideomode(daxdim,daydim,dabpp,davidoption) < 0) return(-1); #ifdef POLYMOST - if (dabpp > 8) rendmode = 3; // GL renderer + if (dabpp > 8) rendmode = glrendmode; // GL renderer else if (dabpp == 8 && j > 8) rendmode = 0; // going from GL to software activates softpolymost #endif @@ -7778,14 +7778,17 @@ int32_t setgamemode(char davidoption, int32_t daxdim, int32_t daydim, int32_t da if (searchx < 0) { searchx = halfxdimen; searchy = (ydimen>>1); } #if defined(POLYMOST) && defined(USE_OPENGL) - if (rendmode == 3) + if (rendmode >= 3) { polymost_glreset(); polymost_glinit(); } # ifdef POLYMER if (rendmode == 4) - polymer_glinit(); + { + polymer_init(); +// polymer_glinit(); + } #endif #endif qsetmode = 200; @@ -11989,6 +11992,8 @@ int32_t setrendermode(int32_t renderer) # endif rendmode = renderer; + if (rendmode >= 3) + glrendmode = rendmode; #endif return 0; diff --git a/polymer/eduke32/build/src/mmulti_unstable.c b/polymer/eduke32/build/src/mmulti_unstable.c index 545af100b..887d3c943 100644 --- a/polymer/eduke32/build/src/mmulti_unstable.c +++ b/polymer/eduke32/build/src/mmulti_unstable.c @@ -971,7 +971,7 @@ static int32_t open_udp_socket(int32_t ip, int32_t port) { /* !!! FIXME: Might be Linux (not Unix, not BSD, not WinSock) specific. */ int32_t flags = 1; - setsockopt(udpsocket, SOL_IP, IP_RECVERR, &flags, sizeof(flags)); + setsockopt(udpsocket, IPPROTO_IP, IP_RECVERR, &flags, sizeof(flags)); } #endif diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 968272b23..13d32f1f9 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -146,6 +146,7 @@ int32_t glwidescreen = 0; int32_t glprojectionhacks = 1; static GLuint polymosttext = 0; extern char nofog; +int32_t glrendmode = 3; // Those THREE globals control the drawing of fullbright tiles static int32_t fullbrightloadingpass = 0; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 90fdd8262..7151ec72e 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -9320,7 +9320,7 @@ int32_t ExtInit(void) if (glusetexcache == -1 || glusetexcachecompression == -1) { int32_t i; -#if 1 +#if 0 i=wm_ynbox("Texture Cache", "Would you like to enable the on-disk texture cache?\n\n" "You generally want to say 'yes' here, especially if using the HRP."); diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 71b57c07d..856679090 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -784,6 +784,9 @@ int32 CONFIG_ReadSetup(void) SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyPanning", &r_parallaxskypanning); /*SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLPeelsCount", &r_peelscount);*/ SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLProjectionFix", &glprojectionhacks); + SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLRenderMode", &glrendmode); + if (glrendmode > 4) glrendmode = 4; + if (glrendmode < 3) glrendmode = 3; SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode); SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLTextureQuality", &r_downsize); SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLUseCompressedTextureCache", &glusetexcache); @@ -1086,6 +1089,7 @@ void CONFIG_WriteSetup(void) SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyPanning",r_parallaxskypanning,false,false); /*SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLPeelsCount",r_peelscount,false,false);*/ SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLProjectionFix",glprojectionhacks,false,false); + SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLRenderMode",glrendmode,false,false); SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,false,false); SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLTextureQuality", r_downsize,false,false); SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLUseCompressedTextureCache", glusetexcache,false,false); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 8dea0e54d..75ea540e0 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7372,6 +7372,7 @@ PALONLY: case FLOORFLAME__STATIC: #ifdef POLYMER + light.radius = 0; light.sector = t->sectnum; light.x = t->x; @@ -8139,26 +8140,30 @@ FOUNDCHEAT: } } +#define SCORESHEETOFFSET -20 + static void G_ShowScores(void) { int32_t t, i, y,xfragtotal,yfragtotal; if (playerswhenstarted > 1 && (GametypeFlags[ud.coop]&GAMETYPE_SCORESHEET)) { +/* rotatesprite(160<<16,34<<16,65536L,0,INGAMEDUKETHREEDEE,0,0,10,0,0,xdim-1,ydim-1); if (PLUTOPAK) // JBF 20030804 rotatesprite((260)<<16,36<<16,65536L,0,PLUTOPAKSPRITE+2,0,0,2+8,0,0,xdim-1,ydim-1); - gametext(160,58+2,"MULTIPLAYER TOTALS",0,2+8+16); - gametext(160,58+10,MapInfo[(ud.volume_number*MAXLEVELS)+ud.last_level-1].name,0,2+8+16); +*/ + gametext(160,SCORESHEETOFFSET+58+2,"MULTIPLAYER TOTALS",0,2+8+16); + gametext(160,SCORESHEETOFFSET+58+10,MapInfo[(ud.volume_number*MAXLEVELS)+ud.last_level-1].name,0,2+8+16); // gametext(160,165,"PRESS ANY KEY TO CONTINUE",0,2+8+16); t = 0; - minitext(23,80," NAME KILLS",8,2+8+16+128); + minitext(23,SCORESHEETOFFSET+80," NAME KILLS",8,2+8+16+128); for (i=playerswhenstarted-1; i>=0; i--) { Bsprintf(tempbuf,"%-4d",i+1); - minitext(92+(i*23),80,tempbuf,3,2+8+16+128); + minitext(92+(i*23),SCORESHEETOFFSET+80,tempbuf,3,2+8+16+128); } for (i=playerswhenstarted-1; i>=0; i--) @@ -8166,21 +8171,21 @@ static void G_ShowScores(void) xfragtotal = 0; Bsprintf(tempbuf,"%d",i+1); - minitext(30,90+t,tempbuf,0,2+8+16+128); - minitext(38,90+t,g_player[i].user_name,g_player[i].ps->palookup,2+8+16+128); + minitext(30,SCORESHEETOFFSET+90+t,tempbuf,0,2+8+16+128); + minitext(38,SCORESHEETOFFSET+90+t,g_player[i].user_name,g_player[i].ps->palookup,2+8+16+128); for (y=playerswhenstarted-1; y>=0; y--) { if (i == y) { Bsprintf(tempbuf,"%-4d",g_player[y].ps->fraggedself); - minitext(92+(y*23),90+t,tempbuf,2,2+8+16+128); + minitext(92+(y*23),SCORESHEETOFFSET+90+t,tempbuf,2,2+8+16+128); xfragtotal -= g_player[y].ps->fraggedself; } else { Bsprintf(tempbuf,"%-4d",g_player[i].frags[y]); - minitext(92+(y*23),90+t,tempbuf,0,2+8+16+128); + minitext(92+(y*23),SCORESHEETOFFSET+90+t,tempbuf,0,2+8+16+128); xfragtotal += g_player[i].frags[y]; } @@ -8192,7 +8197,7 @@ static void G_ShowScores(void) } Bsprintf(tempbuf,"%-4d",xfragtotal); - minitext(101+(8*23),90+t,tempbuf,2,2+8+16+128); + minitext(101+(8*23),SCORESHEETOFFSET+90+t,tempbuf,2,2+8+16+128); t += 7; } @@ -8207,13 +8212,15 @@ static void G_ShowScores(void) yfragtotal += g_player[i].frags[y]; } Bsprintf(tempbuf,"%-4d",yfragtotal); - minitext(92+(y*23),96+(8*7),tempbuf,2,2+8+16+128); + minitext(92+(y*23),SCORESHEETOFFSET+96+(8*7),tempbuf,2,2+8+16+128); } - minitext(45,96+(8*7),"DEATHS",8,2+8+16+128); + minitext(45,SCORESHEETOFFSET+96+(8*7),"DEATHS",8,2+8+16+128); } } +#undef SCORESHEETOFFSET + static void G_HandleLocalKeys(void) { int32_t i,ch; @@ -10993,9 +11000,13 @@ void app_main(int32_t argc,const char **argv) #if defined(POLYMOST) && defined(USE_OPENGL) if (glusetexcache == -1 || glusetexcachecompression == -1) { +#if 0 i=wm_ynbox("Texture Cache", "Would you like to enable the on-disk texture cache?\n\n" "You generally want to say 'yes' here, especially if using the HRP."); +#else + i = 1; +#endif if (i) ud.config.useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1; else glusetexcache = glusetexcachecompression = 0; }