git-svn-id: https://svn.eduke32.com/eduke32@443 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2007-01-04 07:15:17 +00:00
parent cba58265b9
commit 7c89d81fda
4 changed files with 47 additions and 21 deletions

View file

@ -130,15 +130,14 @@ static int osdcmd_vars(const osdfuncparm_t *parm)
int showval = (parm->numparms < 1); int showval = (parm->numparms < 1);
if (!Bstrcasecmp(parm->name, "screencaptureformat")) { if (!Bstrcasecmp(parm->name, "screencaptureformat")) {
const char *fmts[2][2] = { {"TGA", "PCX"}, {"0", "1"} }; const char *fmts[] = {"TGA", "PCX"};
if (showval) { OSD_Printf("captureformat is %s\n", fmts[captureformat]); } if (showval) { OSD_Printf("captureformat is %s\n", fmts[captureformat]); }
else { else {
int i,j; int j;
for (j=0; j<2; j++) for (j=0; j<2; j++)
for (i=0; i<2; i++) if (!Bstrcasecmp(parm->parms[0], fmts[j])) break;
if (!Bstrcasecmp(parm->parms[0], fmts[j][i])) break;
if (j == 2) return OSDCMD_SHOWHELP; if (j == 2) return OSDCMD_SHOWHELP;
captureformat = i; captureformat = j;
} }
return OSDCMD_OK; return OSDCMD_OK;
} }
@ -165,7 +164,7 @@ int baselayer_init(void)
" 2 - Polygonal textured software\n" " 2 - Polygonal textured software\n"
#ifdef USE_OPENGL #ifdef USE_OPENGL
" 3 - Polygonal OpenGL\n" " 3 - Polygonal OpenGL\n"
" 4 - great justice renderer\n" // " 4 - great justice renderer\n"
#endif #endif
, ,
osdfunc_setrendermode); osdfunc_setrendermode);

View file

@ -236,7 +236,12 @@ static int _internal_osdfunc_help(const osdfuncparm_t *parm)
return OSDCMD_OK; return OSDCMD_OK;
} }
static int _internal_osdfunc_clear(const osdfuncparm_t *parm)
{
Bmemset(osdtext,0,sizeof(osdtext));
osdlines = 1;
return OSDCMD_OK;
}
//////////////////////////// ////////////////////////////
@ -273,6 +278,7 @@ void OSD_Init(void)
OSD_RegisterFunction("listsymbols","listsymbols: lists all the recognized symbols",_internal_osdfunc_listsymbols); OSD_RegisterFunction("listsymbols","listsymbols: lists all the recognized symbols",_internal_osdfunc_listsymbols);
OSD_RegisterFunction("help","help: displays help on the named symbol",_internal_osdfunc_help); OSD_RegisterFunction("help","help: displays help on the named symbol",_internal_osdfunc_help);
OSD_RegisterFunction("osdrows","osdrows: sets the number of visible lines of the OSD",_internal_osdfunc_vars); OSD_RegisterFunction("osdrows","osdrows: sets the number of visible lines of the OSD",_internal_osdfunc_vars);
OSD_RegisterFunction("clear","clear: clears the console text buffer",_internal_osdfunc_clear);
atexit(OSD_Cleanup); atexit(OSD_Cleanup);
} }
@ -454,6 +460,8 @@ int OSD_HandleKey(int sc, int press)
} }
} else if (ch == 11) { // control k, delete all to end of line } else if (ch == 11) { // control k, delete all to end of line
} else if (ch == 12) { // control l, clear screen } else if (ch == 12) { // control l, clear screen
Bmemset(osdtext,0,sizeof(osdtext));
osdlines = 1;
} else if (ch == 13) { // control m, enter } else if (ch == 13) { // control m, enter
if (osdeditlen>0) { if (osdeditlen>0) {
osdeditbuf[osdeditlen] = 0; osdeditbuf[osdeditlen] = 0;

View file

@ -2567,6 +2567,7 @@ cheat_for_port_credits:
char *opts[] = { char *opts[] = {
"Parental lock", "Parental lock",
"-", "-",
"Game messages",
"HUD weapon", "HUD weapon",
"FPS counter", "FPS counter",
"-", "-",
@ -2589,8 +2590,6 @@ cheat_for_port_credits:
"-", "-",
"-", "-",
"-", "-",
"-",
"-",
"Previous page", "Previous page",
NULL NULL
}; };
@ -2635,6 +2634,12 @@ cheat_for_port_credits:
else enabled = 0; else enabled = 0;
break; break;
case 1: case 1:
if (x==io)
ud.fta_on = 1-ud.fta_on;
modval(0,1,(int *)&ud.fta_on,1,probey==io);
gametextpal(d,yy, ud.fta_on ? "On" : "Off", MENUHIGHLIGHT(io), 0);
break;
case 2:
if (x==io) if (x==io)
{ {
ud.drawweapon = (ud.drawweapon == 2) ? 0 : ud.drawweapon+1; ud.drawweapon = (ud.drawweapon == 2) ? 0 : ud.drawweapon+1;
@ -2645,12 +2650,12 @@ cheat_for_port_credits:
gametextpal(d,yy, s[ud.drawweapon], MENUHIGHLIGHT(io), 0); gametextpal(d,yy, s[ud.drawweapon], MENUHIGHLIGHT(io), 0);
break; break;
} }
case 2: case 3:
if (x==io) ud.tickrate = 1-ud.tickrate; if (x==io) ud.tickrate = 1-ud.tickrate;
modval(0,1,(int *)&ud.tickrate,1,probey==io); modval(0,1,(int *)&ud.tickrate,1,probey==io);
gametextpal(d,yy, ud.tickrate ? "On" : "Off", MENUHIGHLIGHT(io), 0); gametextpal(d,yy, ud.tickrate ? "On" : "Off", MENUHIGHLIGHT(io), 0);
break; break;
case 3: case 4:
if (x==io) if (x==io)
{ {
ud.autovote = (ud.autovote == 2) ? 0 : ud.autovote+1; ud.autovote = (ud.autovote == 2) ? 0 : ud.autovote+1;
@ -2661,23 +2666,23 @@ cheat_for_port_credits:
gametextpal(d,yy, s[ud.autovote], MENUHIGHLIGHT(io), 0); gametextpal(d,yy, s[ud.autovote], MENUHIGHLIGHT(io), 0);
break; break;
} }
case 4: case 5:
if (x==io) ud.automsg = 1-ud.automsg; if (x==io) ud.automsg = 1-ud.automsg;
modval(0,1,(int *)&ud.automsg,1,probey==io); modval(0,1,(int *)&ud.automsg,1,probey==io);
gametextpal(d,yy, ud.automsg ? "On" : "Off", MENUHIGHLIGHT(io), 0); gametextpal(d,yy, ud.automsg ? "On" : "Off", MENUHIGHLIGHT(io), 0);
break; break;
case 5: case 6:
if (x==io) ud.idplayers = 1-ud.idplayers; if (x==io) ud.idplayers = 1-ud.idplayers;
modval(0,1,(int *)&ud.idplayers,1,probey==io); modval(0,1,(int *)&ud.idplayers,1,probey==io);
gametextpal(d,yy, ud.idplayers ? "On" : "Off", MENUHIGHLIGHT(io), 0); gametextpal(d,yy, ud.idplayers ? "On" : "Off", MENUHIGHLIGHT(io), 0);
break; break;
case 6: case 7:
if (x==io) ForceSetup = 1-ForceSetup; if (x==io) ForceSetup = 1-ForceSetup;
modval(0,1,(int *)&ForceSetup,1,probey==io); modval(0,1,(int *)&ForceSetup,1,probey==io);
gametextpal(d,yy, ForceSetup ? "On" : "Off", MENUHIGHLIGHT(io), 0); gametextpal(d,yy, ForceSetup ? "On" : "Off", MENUHIGHLIGHT(io), 0);
break; break;
#ifdef _WIN32 #ifdef _WIN32
case 7: case 8:
i = checkforupdates; i = checkforupdates;
if (x==io) checkforupdates = 1-checkforupdates; if (x==io) checkforupdates = 1-checkforupdates;
modval(0,1,(int *)&checkforupdates,1,probey==io); modval(0,1,(int *)&checkforupdates,1,probey==io);
@ -2685,9 +2690,9 @@ cheat_for_port_credits:
lastupdatecheck = 0; lastupdatecheck = 0;
gametextpal(d,yy, checkforupdates ? "On" : "Off", MENUHIGHLIGHT(io), 0); gametextpal(d,yy, checkforupdates ? "On" : "Off", MENUHIGHLIGHT(io), 0);
break; break;
case 8: case 9:
#else #else
case 7: case 8:
#endif #endif
if (x==io) cmenu(200); if (x==io) cmenu(200);
break; break;
@ -3021,7 +3026,7 @@ cheat_for_port_credits:
#if defined(POLYMOST) && defined(USE_OPENGL) #if defined(POLYMOST) && defined(USE_OPENGL)
case 5: case 5:
if (bpp==8) break; if (bpp==8) break;
switch (gltexfiltermode) /* switch (gltexfiltermode)
{ {
case 0: case 0:
gltexfiltermode = 3; gltexfiltermode = 3;
@ -3035,7 +3040,10 @@ cheat_for_port_credits:
default: default:
gltexfiltermode = 3; gltexfiltermode = 3;
break; break;
} }*/
gltexfiltermode++;
if (gltexfiltermode > 5)
gltexfiltermode = 0;
gltexapplyprops(); gltexapplyprops();
break; break;
@ -3085,9 +3093,18 @@ cheat_for_port_credits:
case 0: case 0:
strcpy(tempbuf,"NEAREST"); strcpy(tempbuf,"NEAREST");
break; break;
case 1:
strcpy(tempbuf,"LINEAR");
break;
case 2:
strcpy(tempbuf,"NEAREST_MM_N");
break;
case 3: case 3:
strcpy(tempbuf,"BILINEAR"); strcpy(tempbuf,"BILINEAR");
break; break;
case 4:
strcpy(tempbuf,"NEAREST_MM_L");
break;
case 5: case 5:
strcpy(tempbuf,"TRILINEAR"); strcpy(tempbuf,"TRILINEAR");
break; break;
@ -3095,7 +3112,9 @@ cheat_for_port_credits:
strcpy(tempbuf,"OTHER"); strcpy(tempbuf,"OTHER");
break; break;
} }
menutext(c+154,50+62+16+16,MENUHIGHLIGHT(5),bpp==8,tempbuf); // menutext(c+154,50+62+16+16,MENUHIGHLIGHT(5),bpp==8,tempbuf);
gametext(c+154,50+62+16+16-8,tempbuf,MENUHIGHLIGHT(1),2+8+16);
menutext(c,50+62+16+16+16,MENUHIGHLIGHT(6),bpp==8,"ANISOTROPY"); menutext(c,50+62+16+16+16,MENUHIGHLIGHT(6),bpp==8,"ANISOTROPY");
if (glanisotropy == 1) strcpy(tempbuf,"NONE"); if (glanisotropy == 1) strcpy(tempbuf,"NONE");

View file

@ -220,7 +220,7 @@ void playmusic(const char *fn)
// FIXME: I need this to get the music volume initialized (not sure why) -- Jim Bentler // FIXME: I need this to get the music volume initialized (not sure why) -- Jim Bentler
MUSIC_SetVolume( MusicVolume ); MUSIC_SetVolume( MusicVolume );
PlayMusic(fn); PlayMusic((char *)fn);
#endif #endif
} }