diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index bb9de18ac..a596cb179 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -490,6 +490,13 @@ void getpackets(void) vscrn(); } + if (KB_KeyPressed(sc_F12)) + { + KB_ClearKeyDown(sc_F12); + screencapture("duke0000.tga",0); + FTA(103,&ps[myconnectindex]); + } + // only dispatch commands here when not in a game if (!(ps[myconnectindex].gm&MODE_GAME)) { @@ -7610,13 +7617,6 @@ static void nonsharedkeys(void) } } - if (KB_KeyPressed(sc_F12)) - { - KB_ClearKeyDown(sc_F12); - screencapture("duke0000.tga",0); - FTA(103,&ps[myconnectindex]); - } - if (!ALT_IS_PRESSED && ud.overhead_on == 0 && (ps[myconnectindex].gm & MODE_TYPE) == 0) { if (BUTTON(gamefunc_Enlarge_Screen)) @@ -11817,12 +11817,6 @@ FRAGBONUS: getpackets(); } - if (KB_KeyPressed(sc_F12)) - { - KB_ClearKeyDown(sc_F12); - screencapture("duke0000.tga",0); - } - if (bonusonly || ud.multimode > 1) return; fadepal(0,0,0, 0,64,7); @@ -12100,12 +12094,6 @@ FRAGBONUS: if (((MOUSE_GetButtons()&7) || KB_KeyWaiting()) && totalclock > (60*2)) // JBF 20030809 { MOUSE_ClearButton(7); - if (KB_KeyPressed(sc_F12)) - { - KB_ClearKeyDown(sc_F12); - screencapture("duke0000.tga",0); - } - if (totalclock < (60*13)) { KB_FlushKeyboardQueue(); diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 94475c03d..da7248a8c 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -719,11 +719,12 @@ void menus(void) "Mouse aim", "-", "-", - "Switch weap on pickup", - "Switch weap when empty", + "Switch weapon on pickup", + "Switch weapon when empty", "-", "-", - "Taunt macro setup", + "-", + "Taunt macro setup...", NULL }; @@ -732,7 +733,7 @@ void menus(void) if (probey == 2) x = getteampal(ud.team); - rotatesprite((260)<<16,(26+(tilesizy[APLAYER]>>1))<<16,49152L,0,1441-((((4-(totalclock>>4)))&3)*5),0,x,10,0,0,xdim-1,ydim-1); + rotatesprite((260)<<16,(24+(tilesizy[APLAYER]>>1))<<16,49152L,0,1441-((((4-(totalclock>>4)))&3)*5),0,x,10,0,0,xdim-1,ydim-1); for (ii=io=0; opts[ii]; ii++) { @@ -864,7 +865,7 @@ void menus(void) } else { - x = strget(d,37,buf,30,0); + x = strget(d-50,37,buf,30,0); while (Bstrlen(stripcolorcodes(buf)) > 10) { @@ -920,7 +921,7 @@ void menus(void) case 2: { - char *s[] = { "Red", "Blue", "Green", "Gray" }; + char *s[] = { "Blue", "Red", "Green", "Gray" }; gametext(d-50,yy,s[ud.team],MENUHIGHLIGHT(io),2+8+16); } break; @@ -937,17 +938,17 @@ void menus(void) break; case 5: - gametext(d+60,yy,ud.weaponswitch&1?"On":"Off",MENUHIGHLIGHT(io),2+8+16); + gametext(d+70,yy,ud.weaponswitch&1?"On":"Off",MENUHIGHLIGHT(io),2+8+16); break; case 6: - gametext(d+60,yy,ud.weaponswitch&2?"On":"Off",MENUHIGHLIGHT(io),2+8+16); + gametext(d+70,yy,ud.weaponswitch&2?"On":"Off",MENUHIGHLIGHT(io),2+8+16); break; default: break; } - gametextpal(c,yy, opts[ii], enabled?MENUHIGHLIGHT(io):15, 2); + gametextpal(c,yy, opts[ii], enabled?MENUHIGHLIGHT(io):15, 10); io++; yy += 8; } @@ -2492,7 +2493,7 @@ cheat_for_port_credits: default: break; } - gametextpal(c,yy, opts[ii], enabled?MENUHIGHLIGHT(io):15, 2); + gametextpal(c,yy, opts[ii], enabled?MENUHIGHLIGHT(io):15, 10); io++; yy += 8; } @@ -2658,7 +2659,7 @@ cheat_for_port_credits: default: break; } - gametextpal(c,yy, opts[ii], enabled?MENUHIGHLIGHT(io):15, 2); + gametextpal(c,yy, opts[ii], enabled?MENUHIGHLIGHT(io):15, 10); io++; yy += 8; } @@ -2675,7 +2676,7 @@ cheat_for_port_credits: { int io, ii, yy, d=c+160+40, enabled; char *opts[] = { - "Parental lock", + "Parental lock...", "-", "Game messages", "HUD weapon", @@ -2809,7 +2810,7 @@ cheat_for_port_credits: default: break; } - gametextpal(c,yy, opts[ii], enabled?MENUHIGHLIGHT(io):15, 2); + gametextpal(c,yy, opts[ii], enabled?MENUHIGHLIGHT(io):15, 10); io++; yy += 8; } @@ -3223,14 +3224,14 @@ cheat_for_port_credits: break; } // menutext(c+154,50+62+16+16,MENUHIGHLIGHT(5),bpp==8,tempbuf); - gametext(c+154,50+62+16+16-8,tempbuf,MENUHIGHLIGHT(5),2+8+16); + gametextpal(c+154,50+62+16+16-8,tempbuf,MENUHIGHLIGHT(5),bpp==8); menutext(c,50+62+16+16+16,MENUHIGHLIGHT(6),bpp==8,"ANISOTROPY"); if (glanisotropy == 1) strcpy(tempbuf,"NONE"); else sprintf(tempbuf,"%ld-tap",glanisotropy); menutext(c+154,50+62+16+16+16,MENUHIGHLIGHT(6),bpp==8,tempbuf); - menutext(c,50+62+16+16+16+16,MENUHIGHLIGHT(7),bpp==8,"ADVANCED SETTINGS"); + menutext(c,50+62+16+16+16+16,MENUHIGHLIGHT(7),bpp==8,"ADVANCED..."); #endif break; @@ -3436,10 +3437,10 @@ cheat_for_port_credits: } } - gametextpal(40,122,"SENSITIVITY",MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),2); - gametextpal(40,122+9,"MOUSE AIMING TOGGLE",!ud.mouseaiming?MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+1):15,2); - gametextpal(40,122+9+9,"INVERT MOUSE AIM",MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+2),2); - gametextpal(40,122+9+9+9,"ADVANCED...",MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+2+1),2); + gametextpal(40,122,"SENSITIVITY",MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),10); + gametextpal(40,122+9,"MOUSE AIMING TOGGLE",!ud.mouseaiming?MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+1):15,10); + gametextpal(40,122+9+9,"INVERT MOUSE AIM",MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+2),10); + gametextpal(40,122+9+9+9,"ADVANCED...",MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+2+1),10); { short sense; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 953d8f469..19fb2989b 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -107,11 +107,11 @@ static int osdcmd_changelevel(const osdfuncparm_t *parm) { ud.m_volume_number = volume; ud.m_level_number = level; - + if (ps[myconnectindex].i) { int i; - + Bmemset(votes,0,sizeof(votes)); Bmemset(gotvote,0,sizeof(gotvote)); votes[myconnectindex] = gotvote[myconnectindex] = 1; @@ -201,19 +201,19 @@ static int osdcmd_map(const osdfuncparm_t *parm) if (myconnectindex == connecthead && networkmode == 0) { sendboardname(); - mpchangemap(0,7); + mpchangemap(0,7); } else if (voting == -1) { sendboardname(); - + ud.m_volume_number = 0; ud.m_level_number = 7; - + if (ps[myconnectindex].i) { int i; - + Bmemset(votes,0,sizeof(votes)); Bmemset(gotvote,0,sizeof(gotvote)); votes[myconnectindex] = gotvote[myconnectindex] = 1; @@ -240,31 +240,19 @@ static int osdcmd_map(const osdfuncparm_t *parm) return OSDCMD_OK; } + osdcmd_cheatsinfo_stat.cheatnum = -1; + ud.m_volume_number = 0; + ud.m_level_number = 7; - if (ps[myconnectindex].gm & MODE_GAME) - { - // in-game behave like a cheat - osdcmd_cheatsinfo_stat.cheatnum = 2; - osdcmd_cheatsinfo_stat.volume = 0; - osdcmd_cheatsinfo_stat.level = 7; - } - else - { - // out-of-game behave like a menu command - osdcmd_cheatsinfo_stat.cheatnum = -1; - ud.m_volume_number = 0; - ud.m_level_number = 7; + ud.m_monsters_off = ud.monsters_off = 0; - ud.m_monsters_off = ud.monsters_off = 0; + ud.m_respawn_items = 0; + ud.m_respawn_inventory = 0; - ud.m_respawn_items = 0; - ud.m_respawn_inventory = 0; + ud.multimode = 1; - ud.multimode = 1; - - newgame(ud.m_volume_number,ud.m_level_number,ud.m_player_skill); - if (enterlevel(MODE_GAME)) backtomenu(); - } + newgame(ud.m_volume_number,ud.m_level_number,ud.m_player_skill); + if (enterlevel(MODE_GAME)) backtomenu(); return OSDCMD_OK; } @@ -336,7 +324,7 @@ static int osdcmd_rate(const osdfuncparm_t *parm) { extern int packetrate; int i; - + if (parm->numparms == 0) { OSD_Printf("\"rate\" is \"%d\"\n", packetrate); @@ -355,6 +343,22 @@ static int osdcmd_rate(const osdfuncparm_t *parm) return OSDCMD_OK; } +static int osdcmd_restartsound(const osdfuncparm_t *parm) +{ + SoundShutdown(); + MusicShutdown(); + + initprintf("Checking music inits...\n"); + MusicStartup(); + initprintf("Checking sound inits...\n"); + SoundStartup(); + + FX_StopAllSounds(); + clearsoundlocks(); + + return OSDCMD_OK; +} + static int osdcmd_restartvid(const osdfuncparm_t *parm) { resetvideomode(); @@ -630,7 +634,7 @@ cvar[] = { "cl_messagetime", "cl_messagetime: length of time to display multiplayer chat messages\n", (void*)&ud.msgdisptime, CVAR_INT, 0, 0, 3600 }, - { "cl_mousebias", "cl_mousebias: hacky thing to make the mouse suck\n", (void*)&MouseBias, CVAR_INT, 0, 0, 32 }, + { "cl_mousebias", "cl_mousebias: emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time\n", (void*)&MouseBias, CVAR_INT, 0, 0, 32 }, { "cl_mousefilter", "cl_mousefilter: amount of mouse movement to filter out\n", (void*)&MouseFilter, CVAR_INT, 0, 0, 512 }, { "cl_showcoords", "cl_showcoords: show your position in the game world", (void*)&ud.coords, CVAR_BOOL, 0, 0, 1 }, @@ -648,9 +652,19 @@ cvar[] = { "pr_verbosity", "pr_verbosity: verbosity level of the polymer renderer", (void*)&pr_verbosity, CVAR_INT, 0, 0, 3 }, { "pr_wireframe", "pr_wireframe: toggles wireframe mode", (void*)&pr_wireframe, CVAR_INT, 0, 0, 1 }, #endif - { "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&useprecache, CVAR_BOOL, 0, 0, 1 } - }; + { "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&useprecache, CVAR_BOOL, 0, 0, 1 }, + { "snd_ambience", "snd_ambience: enables/disables ambient sounds", (void*)&AmbienceToggle, CVAR_BOOL, 0, 0, 1 }, + { "snd_duketalk", "snd_duketalk: enables/disables Duke's speech", (void*)&VoiceToggle, CVAR_INT, 0, 0, 2 }, + { "snd_fxvolume", "snd_fxvolume: volume of sound effects", (void*)&FXVolume, CVAR_INT, 0, 0, 255 }, + { "snd_mixrate", "snd_mixrate: sound mixing rate", (void*)&MixRate, CVAR_INT, 0, 0, 48000 }, + { "snd_musvolume", "snd_musvolume: volume of midi music", (void*)&MusicVolume, CVAR_INT, 0, 0, 255 }, + { "snd_numbits", "snd_numbits: sound bits", (void*)&NumBits, CVAR_INT, 0, 8, 16 }, + { "snd_numchannels", "snd_numchannels: the number of sound channels", (void*)&NumChannels, CVAR_INT, 0, 0, 2 }, + { "snd_numvoices", "snd_numvoices: the number of concurrent sounds", (void*)&NumVoices, CVAR_INT, 0, 0, 32 }, + { "snd_reversestereo", "snd_reversestereo: reverses the stereo channels", (void*)&ReverseStereo, CVAR_BOOL, 0, 0, 16 }, + }; + static int osdcmd_cvar_set(const osdfuncparm_t *parm) { int showval = (parm->numparms == 0); @@ -927,6 +941,7 @@ int registerosdcommands(void) OSD_RegisterFunction("quit","quit: exits the game immediately", osdcmd_quit); OSD_RegisterFunction("rate","rate: sets the multiplayer packet send rate, in packets/sec",osdcmd_rate); + OSD_RegisterFunction("restartsound","restartsound: reinitialises the sound system",osdcmd_restartsound); OSD_RegisterFunction("restartvid","restartvid: reinitialises the video mode",osdcmd_restartvid); OSD_RegisterFunction("sensitivity","sensitivity : changes the mouse sensitivity", osdcmd_sensitivity); diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 702c6042b..55cc0c61f 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1243,9 +1243,9 @@ int getteampal(int team) switch (team) { case 0: - return 10; - case 1: return 3; + case 1: + return 10; case 2: return 11; case 3: