diff --git a/polymer/build/src/baselayer.c b/polymer/build/src/baselayer.c index 4c7095f7f..182cdde06 100644 --- a/polymer/build/src/baselayer.c +++ b/polymer/build/src/baselayer.c @@ -49,6 +49,7 @@ struct glinfo glinfo = static void onvideomodechange(int newmode) { UNREFERENCED_PARAMETER(newmode); } void (*baselayer_onvideomodechange)(int) = onvideomodechange; +#if defined(POLYMOST) static int osdfunc_setrendermode(const osdfuncparm_t *parm) { int m; @@ -70,8 +71,7 @@ static int osdfunc_setrendermode(const osdfuncparm_t *parm) return OSDCMD_OK; } - -#if defined(POLYMOST) && defined(USE_OPENGL) +#if defined(USE_OPENGL) #ifdef DEBUGGINGAIDS static int osdcmd_hicsetpalettetint(const osdfuncparm_t *parm) { @@ -173,6 +173,7 @@ int osdcmd_glinfo(const osdfuncparm_t *parm) return OSDCMD_OK; } #endif +#endif static int osdcmd_vars(const osdfuncparm_t *parm) { diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index e3b762748..53954eb1f 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -6286,7 +6286,7 @@ killsprite: while (maskwallcnt) { maskwallcnt--; - +#if defined(USE_OPENGL) && defined(POLYMER) if (rendmode == 4) { dot.x = wall[maskwall[maskwallcnt]].x; @@ -6295,6 +6295,7 @@ killsprite: dot2.y = wall[wall[maskwall[maskwallcnt]].point2].y; } else +#endif { dot.x = wall[thewall[maskwall[maskwallcnt]]].x; dot.y = wall[thewall[maskwall[maskwallcnt]]].y; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 8492db565..ddeeb5816 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -2663,21 +2663,6 @@ static int OnSelectTile(int iTile) setpolymost2dview(); clearview(0); - // - // Display the description strings for each available tile group - // - - for (i = 0; (unsigned)i < tile_groups; i++) - { - if (s_TileGroups[i].szText != NULL) - { - if ((i+2)*16 > ydimgame) break; - Bsprintf(tempbuf,"(%c) %s",s_TileGroups[i].key1,s_TileGroups[i].szText); - printext256(10L, (i+1)*16, whitecol, -1, tempbuf, 0); - } - } - showframe(1); - // // Await appropriate selection keypress. // @@ -2692,6 +2677,21 @@ static int OnSelectTile(int iTile) } idle(); + // + // Display the description strings for each available tile group + // + for (i = 0; (unsigned)i < tile_groups; i++) + { + if (s_TileGroups[i].szText != NULL) + { + if ((i+2)*16 > ydimgame) break; + Bsprintf(tempbuf,"(%c) %s",s_TileGroups[i].key1,s_TileGroups[i].szText); + printext256(10L, (i+1)*16, whitecol, -1, tempbuf, 0); + } + } + showframe(1); + + ch = bgetchar(); for (i = 0; (unsigned)i < tile_groups; i++) @@ -3016,9 +3016,9 @@ static void Keys3d(void) height2=sector[nextsect].floorz-sector[nextsect].ceilingz; height3=sector[nextsect].ceilingz-sector[searchsector].ceilingz; } - Bsprintf(lines[num++],"Panning: %3d, %3d",wall[searchwall].xpanning,wall[searchwall].ypanning); - Bsprintf(lines[num++],"Repeat: %3d, %3d",wall[searchwall].xrepeat,wall[searchwall].yrepeat); - Bsprintf(lines[num++],"Overpic: %3d",wall[searchwall].overpicnum); + Bsprintf(lines[num++],"Panning: %d, %d",wall[searchwall].xpanning,wall[searchwall].ypanning); + Bsprintf(lines[num++],"Repeat: %d, %d",wall[searchwall].xrepeat,wall[searchwall].yrepeat); + Bsprintf(lines[num++],"Overpic: %d",wall[searchwall].overpicnum); lines[num++][0]=0; if (getmessageleng) break; @@ -3033,7 +3033,7 @@ static void Keys3d(void) sector[searchsector].ceilingpal,sector[searchsector].ceilingstat, sector[searchsector].lotag,sector[searchsector].hitag,sector[searchsector].extra); - Bsprintf(lines[num++],"Panning: %d,%d",sector[searchsector].ceilingxpanning,sector[searchsector].ceilingypanning); + Bsprintf(lines[num++],"Panning: %d, %d",sector[searchsector].ceilingxpanning,sector[searchsector].ceilingypanning); Bsprintf(lines[num++],"CeilingZ: %d",sector[searchsector].ceilingz); Bsprintf(lines[num++],"Slope: %d",sector[searchsector].ceilingheinum); lines[num++][0]=0; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 0af425cd5..01c0aa10e 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -552,7 +552,7 @@ typedef struct { int workslike, extra, cstat, extra_rand, hitradius, range; short spawns, sound, isound, vel, decal, trail, tnum, drop, clipdist, offset, bounces, bsound, toffset; signed char sxrepeat, syrepeat, txrepeat, tyrepeat, shade, xrepeat, yrepeat, pal, velmult; -} proj_struct; +} projectile_t; // extern char gotz; @@ -573,7 +573,7 @@ typedef struct { short tempang,actorstayput,dispicnum; short timetosleep; char cgg; - proj_struct projectile; + projectile_t projectile; } actordata_t; extern actordata_t hittype[MAXSPRITES]; @@ -963,7 +963,7 @@ enum projectileflags { PROJECTILE_FLAG_FORCEIMPACT = 262144 }; -extern proj_struct projectile[MAXTILES], defaultprojectile[MAXTILES]; +extern projectile_t projectile[MAXTILES], defaultprojectile[MAXTILES]; // logo control @@ -984,10 +984,10 @@ extern int g_NumPalettes; extern int g_ScriptDebug; #define MAXCHEATLEN 20 -#define NUMCHEATCODES (signed int)(sizeof(cheatquotes)/sizeof(cheatquotes[MAXCHEATLEN])) +#define NUMCHEATCODES (signed int)(sizeof(cheatstrings)/sizeof(cheatstrings[0])) extern char cheatkey[2]; -extern char cheatquotes[][MAXCHEATLEN]; +extern char cheatstrings[][MAXCHEATLEN]; extern short weapon_sprites[MAX_WEAPONS]; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 642444611..125056505 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -4068,7 +4068,11 @@ void displayrooms(int snum,int smoothratio) #ifdef SE40 se40code(ud.camerax,ud.cameray,ud.cameraz,ud.cameraang,ud.camerahoriz,smoothratio); #endif - if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0) && (rendmode != 4)) + if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0) +#if defined(POLYMOST) && defined(USE_OPENGL) + && (rendmode != 4) +#endif + ) { dst = 0x7fffffff; i = 0; @@ -7086,7 +7090,7 @@ PALONLY: static char terminx[64] = { "Undead TC still sucks." }; -char cheatquotes[][MAXCHEATLEN] = +char cheatstrings[][MAXCHEATLEN] = { "cornholio", // 0 "stuff", // 1 @@ -7236,8 +7240,8 @@ static void cheats(void) if (VOLUMEONE && !z) { - Bstrcpy(cheatquotes[2],"scotty##"); - Bstrcpy(cheatquotes[6],""); + Bstrcpy(cheatstrings[2],"scotty##"); + Bstrcpy(cheatstrings[6],""); z=1; } @@ -7271,9 +7275,9 @@ static void cheats(void) { for (j = 0;j= '0' && ch <= '9')) + if (cheatbuf[j] == cheatstrings[k][j] || (cheatstrings[k][j] == '#' && ch >= '0' && ch <= '9')) { - if (cheatquotes[k][j+1] == 0) goto FOUNDCHEAT; + if (cheatstrings[k][j+1] == 0) goto FOUNDCHEAT; if (j == cheatbuflen-1) return; } else break; @@ -7464,7 +7468,7 @@ FOUNDCHEAT: case CHEAT_SKILL: if (k == CHEAT_SCOTTY) { - i = Bstrlen(cheatquotes[k])-3+VOLUMEONE; + i = Bstrlen(cheatstrings[k])-3+VOLUMEONE; if (!consolecheat) { // JBF 20030914 @@ -7503,7 +7507,7 @@ FOUNDCHEAT: } else { - i = Bstrlen(cheatquotes[k])-1; + i = Bstrlen(cheatstrings[k])-1; ud.m_player_skill = ud.player_skill = cheatbuf[i] - '1'; } if (numplayers > 1 && myconnectindex == connecthead) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 6bbd72782..2fd98fc76 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -4596,17 +4596,17 @@ repeatcase: textptr++; while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0 && *textptr != ' ') { - cheatquotes[k][i] = *textptr; + cheatstrings[k][i] = *textptr; textptr++,i++; - if (i >= (signed)sizeof(cheatquotes[k])-1) + if (i >= (signed)sizeof(cheatstrings[k])-1) { - initprintf("%s:%d: error: cheat exceeds limit of %d characters.\n",compilefile,line_number,MAXCHEATLEN,sizeof(cheatquotes[k])-1); + initprintf("%s:%d: error: cheat exceeds limit of %d characters.\n",compilefile,line_number,MAXCHEATLEN,sizeof(cheatstrings[k])-1); error++; while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0 && *textptr != ' ') textptr++; break; } } - cheatquotes[k][i] = '\0'; + cheatstrings[k][i] = '\0'; return 0; case CON_DEFINESOUND: diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index d07a52f3e..eb0fcc8b6 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -52,7 +52,7 @@ extern int g_kb; extern int g_looking_angSR1; extern int display_bonus_screen; extern int lastvisinc; -extern char cheatquotes[][MAXCHEATLEN]; +extern char cheatstrings[][MAXCHEATLEN]; extern char compilefile[BMAX_PATH]; extern int total_lines,line_number; extern int error,warning; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index f1a0389f9..836c351f9 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -5748,8 +5748,11 @@ static int parse(void) #ifdef SE40 se40code(x,y,z,a,horiz,smoothratio); #endif - - if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0) && (rendmode != 4)) + if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0) +#if defined(POLYMOST) && defined(USE_OPENGL) + && (rendmode != 4) +#endif + ) { int j, i = 0, k, dst = 0x7fffffff; diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index a8d8917a6..a4412be9e 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -173,7 +173,7 @@ int nextvoxid = 0; int spriteflags[MAXTILES]; -proj_struct projectile[MAXTILES], thisprojectile[MAXSPRITES], defaultprojectile[MAXTILES]; +projectile_t projectile[MAXTILES], thisprojectile[MAXSPRITES], defaultprojectile[MAXTILES]; char cheatkey[2] = { sc_D, sc_N }; char setupfilename[BMAX_PATH]= "duke3d.cfg"; diff --git a/polymer/eduke32/source/jmact/control.c b/polymer/eduke32/source/jmact/control.c index 7420cc6c2..c43895e18 100644 --- a/polymer/eduke32/source/jmact/control.c +++ b/polymer/eduke32/source/jmact/control.c @@ -15,6 +15,7 @@ #include "util_lib.h" #include "baselayer.h" +#include "osd.h" #include "pragmas.h" diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 071c94025..3db556c62 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -399,7 +399,7 @@ static void dofrontscreens(char *statustext) void cacheit(void) { - int i,j,k, pc=0; + int i,j,pc=0; int tc; unsigned int starttime, endtime; @@ -466,6 +466,8 @@ void cacheit(void) #if defined(POLYMOST) && defined(USE_OPENGL) if (ud.config.useprecache) { + int k; + if (precachehightile[0][i>>3] & pow2char[i&7]) for (k=0; k