This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
if (cdfile == -1 || !enabled)
return; // no cd init'd
- if ( ioctl(cdfile, CDROMEJECT) == -1 )
+ if ( ioctl(cdfile, CDROMEJECT) == -1 )
Con_DPrintf("ioctl cdromeject failed\n");
}
if (cdfile == -1 || !enabled)
return; // no cd init'd
- if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 )
+ if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 )
Con_DPrintf("ioctl cdromclosetray failed\n");
}
cdValid = false;
- if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 )
+ if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 )
{
Con_DPrintf("ioctl cdromreadtochdr failed\n");
return -1;
if (cdfile == -1 || !enabled)
return;
-
+
if (!cdValid)
{
CDAudio_GetAudioDiskInfo();
ti.cdti_ind0 = 1;
ti.cdti_ind1 = 99;
- if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
+ if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
{
Con_DPrintf("ioctl cdromplaytrkind failed\n");
return;
}
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
+ if ( ioctl(cdfile, CDROMRESUME) == -1 )
Con_DPrintf("ioctl cdromresume failed\n");
playLooping = looping;
{
if (cdfile == -1 || !enabled)
return;
-
+
if (!playing)
return;
if (!playing)
return;
- if ( ioctl(cdfile, CDROMPAUSE) == -1 )
+ if ( ioctl(cdfile, CDROMPAUSE) == -1 )
Con_DPrintf("ioctl cdrompause failed\n");
wasPlaying = playing;
{
if (cdfile == -1 || !enabled)
return;
-
+
if (!cdValid)
return;
if (!wasPlaying)
return;
-
+
if ( ioctl(cdfile, CDROMRESUME) == -1 )
Con_DPrintf("ioctl cdromresume failed\n");
playing = true;
}
if ((cdfile = open(cd_dev, O_RDONLY)) == -1) {
- Con_Printf("CDAudio_Init: open of \"%s\" failed (%i)\n", cd_dev, errno);
+ Con_DPrintf("CDAudio_Init: open of \"%s\" failed (%i)\n", cd_dev, errno);
cdfile = -1;
return -1;
}
if (CDAudio_GetAudioDiskInfo())
{
- Con_Printf("CDAudio_Init: No CD in player.\n");
+ Con_DPrintf("CDAudio_Init: No CD in player.\n");
cdValid = false;
}
Cmd_AddCommand ("cd", CD_f);
- Con_Printf("CD Audio Initialized\n");
+ Con_DPrintf("CD Audio Initialized\n");
return 0;
}
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
if (!enabled)
return;
-
+
if (!cdValid)
{
CDAudio_GetAudioDiskInfo();
if (!enabled)
return;
-
+
if (!playing)
return;
if (!enabled)
return;
-
+
if (!cdValid)
return;
if (!wasPlaying)
return;
-
+
mciPlayParms.dwFrom = MCI_MAKE_TMSF(playTrack, 0, 0, 0);
mciPlayParms.dwTo = MCI_MAKE_TMSF(playTrack + 1, 0, 0, 0);
mciPlayParms.dwCallback = (DWORD)mainwindow;
if (CDAudio_GetAudioDiskInfo())
{
- Con_Printf("CDAudio_Init: No CD in player.\n");
+ Con_DPrintf("CDAudio_Init: No CD in player.\n");
cdValid = false;
}
Cmd_AddCommand ("cd", CD_f);
- Con_Printf("CD Audio Initialized\n");
+ Con_DPrintf("CD Audio Initialized\n");
return 0;
}
cvar_t chase_back = {CVAR_SAVE, "chase_back", "48"};
cvar_t chase_up = {CVAR_SAVE, "chase_up", "24"};
cvar_t chase_active = {CVAR_SAVE, "chase_active", "0"};
+// GAME_GOODVSBAD2
+cvar_t chase_stevie = {0, "chase_stevie", "0"};
void Chase_Init (void)
{
Cvar_RegisterVariable (&chase_back);
Cvar_RegisterVariable (&chase_up);
Cvar_RegisterVariable (&chase_active);
+ if (gamemode == GAME_GOODVSBAD2)
+ Cvar_RegisterVariable (&chase_stevie);
}
void Chase_Reset (void)
void Chase_Update (void)
{
- vec3_t forward, stop, chase_dest, normal;
- float dist;
-
- chase_back.value = bound(0, chase_back.value, 128);
- chase_up.value = bound(-48, chase_up.value, 96);
-
- AngleVectors (cl.viewangles, forward, NULL, NULL);
+ vec_t camback, camup, dist, forward[3], stop[3], chase_dest[3], normal[3], projectangles[3];
+
+ camback = bound(0, chase_back.value, 128);
+ if (chase_back.value != camback)
+ Cvar_SetValueQuick(&chase_back, camback);
+ camup = bound(-48, chase_up.value, 96);
+ if (chase_up.value != camup)
+ Cvar_SetValueQuick(&chase_up, camup);
+
+ VectorCopy(cl.viewangles, projectangles);
+ if (gamemode == GAME_GOODVSBAD2 && chase_stevie.integer)
+ {
+ projectangles[0] = 90;
+ r_refdef.viewangles[0] = 90;
+ camback = 1024;
+ }
+ AngleVectors (projectangles, forward, NULL, NULL);
dist = -chase_back.value - 8;
chase_dest[0] = r_refdef.vieworg[0] + forward[0] * dist;
while (count--)
{
k = particlepalette[color + (rand()&7)];
- particle(pt_static, PARTICLE_BILLBOARD, k, k, tex_particle, false, PBLEND_ALPHA, 1, 1, 255, 512, 9999, 0, 0, org[0] + lhrandom(-8, 8), org[1] + lhrandom(-8, 8), org[2] + lhrandom(-8, 8), lhrandom(-15, 15), lhrandom(-15, 15), lhrandom(-15, 15), 0, 0, 0, 0, 0, 0);
+ particle(pt_static, PARTICLE_BILLBOARD, k, k, tex_particle, false, PBLEND_ALPHA, 5, 5, 255, 300, 9999, 0, 0, org[0] + lhrandom(-8, 8), org[1] + lhrandom(-8, 8), org[2] + lhrandom(-8, 8), lhrandom(-10, 10), lhrandom(-10, 10), lhrandom(-10, 10), 0, 0, 0, 0, 0, 0);
}
}
while(count--)
{
k = particlepalette[colorbase + (rand()&3)];
- particle(pt_rain, PARTICLE_SPARK, k, k, tex_particle, true, PBLEND_ADD, 0.5, 0.02, lhrandom(8, 16), 0, t, 0, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), lhrandom(minz, maxz), dir[0], dir[1], dir[2], cl.time + 9999, dir[0], dir[1], dir[2], 0, 0);
+ if (gamemode == GAME_GOODVSBAD2)
+ {
+ particle(pt_rain, PARTICLE_SPARK, k, k, tex_particle, true, PBLEND_ADD, 20, 20, lhrandom(8, 16), 0, t, 0, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), lhrandom(minz, maxz), dir[0], dir[1], dir[2], cl.time + 9999, dir[0], dir[1], dir[2], 0, 0);
+ }
+ else
+ {
+ particle(pt_rain, PARTICLE_SPARK, k, k, tex_particle, true, PBLEND_ADD, 0.5, 0.02, lhrandom(8, 16), 0, t, 0, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), lhrandom(minz, maxz), dir[0], dir[1], dir[2], cl.time + 9999, dir[0], dir[1], dir[2], 0, 0);
+ }
}
break;
case 1:
while(count--)
{
k = particlepalette[colorbase + (rand()&3)];
- particle(pt_rain, PARTICLE_BILLBOARD, k, k, tex_particle, false, PBLEND_ADD, 1, 1, lhrandom(64, 128), 0, t, 0, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), lhrandom(minz, maxz), dir[0], dir[1], dir[2], 0, dir[0], dir[1], dir[2], 0, 0);
+ if (gamemode == GAME_GOODVSBAD2)
+ {
+ particle(pt_rain, PARTICLE_BILLBOARD, k, k, tex_particle, false, PBLEND_ADD, 20, 20, lhrandom(64, 128), 0, t, 0, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), lhrandom(minz, maxz), dir[0], dir[1], dir[2], 0, dir[0], dir[1], dir[2], 0, 0);
+ }
+ else
+ {
+ particle(pt_rain, PARTICLE_BILLBOARD, k, k, tex_particle, false, PBLEND_ADD, 1, 1, lhrandom(64, 128), 0, t, 0, 0, lhrandom(mins[0], maxs[0]), lhrandom(mins[1], maxs[1]), lhrandom(minz, maxz), dir[0], dir[1], dir[2], 0, dir[0], dir[1], dir[2], 0, 0);
+ }
}
break;
default:
*/
void CL_LavaSplash (vec3_t origin)
{
- int i, j, k;
+ int i, j, k, l, inc;
float vel;
vec3_t dir, org;
if (!cl_particles.integer) return;
- for (i=-128 ; i<128 ; i+=16)
+ inc = 32;
+ for (i = -128;i < 128;i += inc)
{
- for (j=-128 ; j<128 ; j+=16)
+ for (j = -128;j < 128;j += inc)
{
dir[0] = j + lhrandom(0, 8);
dir[1] = i + lhrandom(0, 8);
org[1] = origin[1] + dir[1];
org[2] = origin[2] + lhrandom(0, 64);
vel = lhrandom(50, 120) / VectorLength(dir); // normalize and scale
- k = particlepalette[224 + (rand()&7)];
- particle(pt_static, PARTICLE_BILLBOARD, k, k, tex_particle, false, PBLEND_ADD, 7, 7, 255, 192, 9999, 0.05, 0, org[0], org[1], org[2], dir[0] * vel, dir[1] * vel, dir[2] * vel, 0, 0, 0, 0, 0, 0);
+ if (gamemode == GAME_GOODVSBAD2)
+ {
+ k = particlepalette[0 + (rand()&255)];
+ l = particlepalette[0 + (rand()&255)];
+ particle(pt_static, PARTICLE_BILLBOARD, k, l, tex_particle, false, PBLEND_ADD, 12, 12, 255, 240, 9999, 0.05, 1, org[0], org[1], org[2], dir[0] * vel, dir[1] * vel, dir[2] * vel, 0, 0, 0, 0, 0, 0);
+ }
+ else
+ {
+ k = l = particlepalette[224 + (rand()&7)];
+ particle(pt_static, PARTICLE_BILLBOARD, k, l, tex_particle, false, PBLEND_ADD, 12, 12, 255, 240, 9999, 0.05, 0, org[0], org[1], org[2], dir[0] * vel, dir[1] * vel, dir[2] * vel, 0, 0, 0, 0, 0, 0);
+ }
}
}
}
dec = 6;
if (smoke)
{
- particle(pt_static, PARTICLE_BILLBOARD, 0x002000, 0x003000, tex_particle, false, PBLEND_ADD, dec, dec, 128, 384, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(-8, 8), 0, 0, 0, 0, 0, 0);
+ if (gamemode == GAME_GOODVSBAD2)
+ {
+ particle(pt_static, PARTICLE_BILLBOARD, 0x00002E, 0x000030, tex_particle, false, PBLEND_ADD, dec, dec, 128, 384, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(-8, 8), 0, 0, 0, 0, 0, 0);
+ }
+ else
+ {
+ particle(pt_static, PARTICLE_BILLBOARD, 0x002000, 0x003000, tex_particle, false, PBLEND_ADD, dec, dec, 128, 384, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(-8, 8), 0, 0, 0, 0, 0, 0);
+ }
}
break;
dec = 6;
if (smoke)
{
- particle(pt_static, PARTICLE_BILLBOARD, 0x502030, 0x502030, tex_particle, false, PBLEND_ADD, dec, dec, 128, 384, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(-8, 8), 0, 0, 0, 0, 0, 0);
+ if (gamemode == GAME_GOODVSBAD2)
+ {
+ particle(pt_static, PARTICLE_BILLBOARD, particlepalette[0 + (rand()&255)], particlepalette[0 + (rand()&255)], tex_particle, false, PBLEND_ALPHA, dec, dec, 255, 384, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(-8, 8), 0, 0, 0, 0, 0, 0);
+ }
+ else
+ {
+ particle(pt_static, PARTICLE_BILLBOARD, 0x502030, 0x502030, tex_particle, false, PBLEND_ADD, dec, dec, 128, 384, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(-8, 8), 0, 0, 0, 0, 0, 0);
+ }
}
break;
Con_Printf ("couldn't exec %s\n",Cmd_Argv(1));
return;
}
- Con_Printf ("execing %s\n",Cmd_Argv(1));
+ Con_DPrintf ("execing %s\n",Cmd_Argv(1));
Cbuf_InsertText (f);
Mem_Free(f);
static void gl_backend_start(void)
{
- Con_Printf("OpenGL Backend started\n");
+ Con_DPrintf("OpenGL Backend started\n");
if (qglDrawRangeElements != NULL)
{
CHECKGLERROR
CHECKGLERROR
qglGetIntegerv(GL_MAX_ELEMENTS_INDICES, &gl_maxdrawrangeelementsindices);
CHECKGLERROR
- Con_Printf("glDrawRangeElements detected (max vertices %i, max indices %i)\n", gl_maxdrawrangeelementsvertices, gl_maxdrawrangeelementsindices);
+ Con_DPrintf("glDrawRangeElements detected (max vertices %i, max indices %i)\n", gl_maxdrawrangeelementsvertices, gl_maxdrawrangeelementsindices);
}
backendunits = min(MAX_TEXTUREUNITS, gl_textureunits);
backendunits = 0;
backendactive = false;
- Con_Printf("OpenGL Backend shutting down\n");
+ Con_DPrintf("OpenGL Backend shutting down\n");
GL_Backend_FreeArrays();
}
VID_CheckExtensions();
// LordHavoc: report supported extensions
- Con_Printf ("\nengine extensions: %s\n", ENGINE_EXTENSIONS);
+ Con_DPrintf("\nengine extensions: %s\n", ENGINE_EXTENSIONS);
}
int R_CullBox(const vec3_t mins, const vec3_t maxs)
host_initialized = true;
- Con_Printf ("========Quake Initialized=========\n");
+ Con_DPrintf ("========Initialized=========\n");
if (cls.state != ca_dedicated)
VID_Open();
Con_Printf ("Max %i demos in demoloop\n", MAX_DEMOS);
c = MAX_DEMOS;
}
- Con_Printf ("%i demo(s) in loop\n", c);
+ Con_DPrintf ("%i demo(s) in loop\n", c);
for (i=1 ; i<c+1 ; i++)
strncpy (cls.demos[i-1], Cmd_Argv(i), sizeof(cls.demos[0])-1);
// Load the DLL
if (! (jpeg_dll = Sys_LoadLibrary (dllname)))
{
- Con_Printf ("Can't find %s. JPEG support disabled\n", dllname);
+ Con_DPrintf("Can't find %s. JPEG support disabled\n", dllname);
return false;
}
for (func = jpegfuncs; func && func->name != NULL; func++)
if (!(*func->funcvariable = (void *) Sys_GetProcAddress (jpeg_dll, func->name)))
{
- Con_Printf ("missing function \"%s\" - broken JPEG library!\n", func->name);
+ Con_Printf("missing function \"%s\" - broken JPEG library!\n", func->name);
JPEG_CloseLibrary ();
return false;
}
- Con_Printf ("%s loaded. JPEG support enabled\n", dllname);
+ Con_DPrintf("%s loaded. JPEG support enabled\n", dllname);
return true;
}
p = Draw_CachePic ("gfx/ttl_sgl.lmp");
// Transfusion doesn't have a single player mode
- if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ)
+ if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2)
{
M_DrawPic ((320 - p->width) / 2, 4, "gfx/ttl_sgl.lmp");
M_DrawTextBox (60, 8 * 8, 23, 4);
if (gamemode == GAME_NEXUIZ)
M_PrintWhite (95, 10 * 8, "Nexuiz is for");
+ else if (gamemode == GAME_GOODVSBAD2)
+ M_PrintWhite (95, 10 * 8, "Good Vs Bad 2 is for");
else
M_PrintWhite (95, 10 * 8, "Transfusion is for");
M_PrintWhite (83, 11 * 8, "multiplayer play only");
void M_SinglePlayer_Key (int key)
{
- if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ)
+ if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2)
{
if (key == K_ESCAPE || key == K_ENTER)
m_state = m_main;
//=============================================================================
/* SETUP MENU */
-int setup_cursor = 4;
-int setup_cursor_table[] = {40, 56, 80, 104, 140};
+int setup_cursor = 3;
+int setup_cursor_table[] = {40, 64, 88, 124};
-char setup_hostname[16];
-char setup_myname[16];
+char setup_myname[32];
int setup_oldtop;
int setup_oldbottom;
int setup_top;
int setup_bottom;
-#define NUM_SETUP_CMDS 5
+#define NUM_SETUP_CMDS 4
void M_Menu_Setup_f (void)
{
m_state = m_setup;
m_entersound = true;
strcpy(setup_myname, cl_name.string);
- strcpy(setup_hostname, hostname.string);
setup_top = setup_oldtop = cl_color.integer >> 4;
setup_bottom = setup_oldbottom = cl_color.integer & 15;
}
p = Draw_CachePic ("gfx/p_multi.lmp");
M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
- M_Print (64, 40, "Hostname");
+ M_Print (64, 40, "Your name");
M_DrawTextBox (160, 32, 16, 1);
- M_Print (168, 40, setup_hostname);
+ M_Print (168, 40, setup_myname);
- M_Print (64, 56, "Your name");
- M_DrawTextBox (160, 48, 16, 1);
- M_Print (168, 56, setup_myname);
-
- M_Print (64, 80, "Shirt color");
- M_Print (64, 104, "Pants color");
-
- M_DrawTextBox (64, 140-8, 14, 1);
- M_Print (72, 140, "Accept Changes");
+ if (gamemode != GAME_GOODVSBAD2)
+ {
+ M_Print (64, 64, "Shirt color");
+ M_Print (64, 88, "Pants color");
+ }
- M_DrawPic (160, 64, "gfx/bigbox.lmp");
+ M_DrawTextBox (64, 124-8, 14, 1);
+ M_Print (72, 124, "Accept Changes");
// LordHavoc: rewrote this code greatly
if (menuplyr_load)
menuplyr_translated[i] = palette_complete[translationTable[menuplyr_pixels[i]]];
Draw_NewPic("gfx/menuplyr.lmp", menuplyr_width, menuplyr_height, true, (qbyte *)menuplyr_translated);
}
- M_DrawPic(172, 72, "gfx/menuplyr.lmp");
+ M_DrawPic(160, 48, "gfx/bigbox.lmp");
+ M_DrawPic(172, 56, "gfx/menuplyr.lmp");
}
- M_DrawCharacter (56, setup_cursor_table [setup_cursor], 12+((int)(realtime*4)&1));
-
if (setup_cursor == 0)
- M_DrawCharacter (168 + 8*strlen(setup_hostname), setup_cursor_table [setup_cursor], 10+((int)(realtime*4)&1));
-
- if (setup_cursor == 1)
M_DrawCharacter (168 + 8*strlen(setup_myname), setup_cursor_table [setup_cursor], 10+((int)(realtime*4)&1));
+ else
+ M_DrawCharacter (56, setup_cursor_table [setup_cursor], 12+((int)(realtime*4)&1));
}
break;
case K_LEFTARROW:
- if (setup_cursor < 2)
+ if (setup_cursor < 1)
return;
S_LocalSound ("misc/menu3.wav");
- if (setup_cursor == 2)
+ if (setup_cursor == 1)
setup_top = setup_top - 1;
- if (setup_cursor == 3)
+ if (setup_cursor == 2)
setup_bottom = setup_bottom - 1;
break;
case K_RIGHTARROW:
- if (setup_cursor < 2)
+ if (setup_cursor < 1)
return;
forward:
S_LocalSound ("misc/menu3.wav");
- if (setup_cursor == 2)
+ if (setup_cursor == 1)
setup_top = setup_top + 1;
- if (setup_cursor == 3)
+ if (setup_cursor == 2)
setup_bottom = setup_bottom + 1;
break;
case K_ENTER:
- if (setup_cursor == 0 || setup_cursor == 1)
+ if (setup_cursor == 0)
return;
- if (setup_cursor == 2 || setup_cursor == 3)
+ if (setup_cursor == 1 || setup_cursor == 2)
goto forward;
- // setup_cursor == 4 (OK)
+ // setup_cursor == 3 (Accept changes)
if (strcmp(cl_name.string, setup_myname) != 0)
Cbuf_AddText ( va ("name \"%s\"\n", setup_myname) );
- if (strcmp(hostname.string, setup_hostname) != 0)
- Cvar_Set("hostname", setup_hostname);
if (setup_top != setup_oldtop || setup_bottom != setup_oldbottom)
Cbuf_AddText( va ("color %i %i\n", setup_top, setup_bottom) );
m_entersound = true;
case K_BACKSPACE:
if (setup_cursor == 0)
- {
- if (strlen(setup_hostname))
- setup_hostname[strlen(setup_hostname)-1] = 0;
- }
-
- if (setup_cursor == 1)
{
if (strlen(setup_myname))
setup_myname[strlen(setup_myname)-1] = 0;
if (k < 32 || k > 127)
break;
if (setup_cursor == 0)
- {
- l = strlen(setup_hostname);
- if (l < 15)
- {
- setup_hostname[l+1] = 0;
- setup_hostname[l] = k;
- }
- }
- if (setup_cursor == 1)
{
l = strlen(setup_myname);
if (l < 15)
}
-#define OPTIONS_ITEMS 28
+#define OPTIONS_ITEMS 29
int options_cursor;
m_entersound = true;
}
+extern cvar_t snd_staticvolume;
extern cvar_t gl_delayfinish;
extern cvar_t slowmo;
extern dllhandle_t jpeg_dll;
case 16: // sfx volume
Cvar_SetValueQuick (&volume, bound(0, volume.value + dir * 0.1, 1));
break;
- case 17:
- Cvar_SetValueQuick (&crosshair, bound(0, crosshair.integer + dir, 5));
+ case 17: // static volume
+ Cvar_SetValueQuick (&snd_staticvolume, bound(0, snd_staticvolume.value + dir * 0.1, 1));
break;
case 18:
+ Cvar_SetValueQuick (&crosshair, bound(0, crosshair.integer + dir, 5));
+ break;
+ case 19:
Cvar_SetValueQuick (&crosshair_size, bound(1, crosshair_size.value + dir, 5));
break;
- case 19: // static crosshair
+ case 20: // static crosshair
Cvar_SetValueQuick (&crosshair_static, !crosshair_static.integer);
break;
- case 20: // show framerate
+ case 21: // show framerate
Cvar_SetValueQuick (&showfps, !showfps.integer);
break;
- case 21: // always run
+ case 22: // always run
if (cl_forwardspeed.value > 200)
{
Cvar_SetValueQuick (&cl_forwardspeed, 200);
Cvar_SetValueQuick (&cl_backspeed, 400);
}
break;
- case 22: // lookspring
+ case 23: // lookspring
Cvar_SetValueQuick (&lookspring, !lookspring.integer);
break;
- case 23: // lookstrafe
+ case 24: // lookstrafe
Cvar_SetValueQuick (&lookstrafe, !lookstrafe.integer);
break;
- case 24: // mouse speed
+ case 25: // mouse speed
Cvar_SetValueQuick (&sensitivity, bound(1, sensitivity.value + dir * 0.5, 50));
break;
- case 25: // mouse look
+ case 26: // mouse look
Cvar_SetValueQuick (&freelook, !freelook.integer);
break;
- case 26: // invert mouse
+ case 27: // invert mouse
Cvar_SetValueQuick (&m_pitch, -m_pitch.value);
break;
- case 27: // windowed mouse
+ case 28: // windowed mouse
Cvar_SetValueQuick (&vid_mouse, !vid_mouse.integer);
break;
}
M_Print(16, y, " Screen size");M_DrawSlider(220, y, scr_viewsize.value, 30, 120);y += 8;
M_ItemPrint(16, y, " JPEG screenshots", jpeg_dll != NULL);M_DrawCheckbox(220, y, scr_screenshot_jpeg.integer);y += 8;
M_Print(16, y, " Sky");M_DrawCheckbox(220, y, r_sky.integer);y += 8;
+ // LordHavoc: FIXME: overbright needs to be disabled in GAME_GOODVSBAD2 but combine should not be disabled
+ // LordHavoc: perhaps it's time for Overbright Bits to die, and a r_lightmapintensity option to be added?
M_Print(16, y, " Overbright Bits");M_DrawSlider(220, y, v_overbrightbits.value, 0, 4);y += 8;
M_Print(16, y, " Texture Combine");M_DrawCheckbox(220, y, gl_combine.integer);y += 8;
M_Print(16, y, " Dithering");M_DrawCheckbox(220, y, gl_dither.integer);y += 8;
M_ItemPrint(16, y, " Game Speed", sv.active);M_DrawSlider(220, y, slowmo.value, 0, 5);y += 8;
M_ItemPrint(16, y, " CD Music Volume", cdaudioinitialized);M_DrawSlider(220, y, bgmvolume.value, 0, 1);y += 8;
M_ItemPrint(16, y, " Sound Volume", snd_initialized);M_DrawSlider(220, y, volume.value, 0, 1);y += 8;
+ if (gamemode == GAME_GOODVSBAD2)
+ M_ItemPrint(16, y, " Music Volume", snd_initialized);
+ else
+ M_ItemPrint(16, y, " Ambient Sound Volume", snd_initialized);
+ M_DrawSlider(220, y, snd_staticvolume.value, 0, 1);
+ y += 8;
M_Print(16, y, " Crosshair");M_DrawSlider(220, y, crosshair.value, 0, 5);y += 8;
M_Print(16, y, " Crosshair Size");M_DrawSlider(220, y, crosshair_size.value, 1, 5);y += 8;
M_Print(16, y, " Static Crosshair");M_DrawCheckbox(220, y, crosshair_static.integer);y += 8;
{"impulse 20", "observer mode"}
};
+char *goodvsbad2bindnames[][2] =
+{
+{"impulse 69", "Power 1"},
+{"impulse 70", "Power 2"},
+{"impulse 71", "Power 3"},
+{"+jump", "jump / swim up"},
+{"+forward", "walk forward"},
+{"+back", "backpedal"},
+{"+left", "turn left"},
+{"+right", "turn right"},
+{"+speed", "run"},
+{"+moveleft", "step left"},
+{"+moveright", "step right"},
+{"+strafe", "sidestep"},
+{"+lookup", "look up"},
+{"+lookdown", "look down"},
+{"centerview", "center view"},
+{"+mlook", "mouse look"},
+{"kill", "kill yourself"},
+{"+moveup", "swim up"},
+{"+movedown", "swim down"}
+};
+
int numcommands;
char *(*bindnames)[2];
" ",
};
+char *goodvsbad2quitMessage [] =
+{
+/* .........1.........2.... */
+ " Press Yes To Quit ",
+ " ... ",
+ " Yes ",
+ " ",
+
+ " Do you really want to ",
+ " Quit? ",
+ " Play Good vs bad 3! ",
+ " ",
+
+ " All your quit are ",
+ " belong to long duck ",
+ " dong ",
+ " ",
+
+ " Press Y to quit ",
+ " ",
+ " But are you too legit?",
+ " ",
+
+ " This game was made by ",
+ " e@chip-web.com ",
+ " It is by far the best ",
+ " game ever made. ",
+
+ " Even I really dont ",
+ " know of a game better ",
+ " Press Y to quit ",
+ " like rougue chedder ",
+
+ " After you stop playing",
+ " tell the guys who made ",
+ " counterstrike to just ",
+ " kill themselves now ",
+
+ " Press Y to exit to DOS",
+ " ",
+ " SSH login as user Y ",
+ " to exit to Linux "
+
+ " ",
+ " Press Y like you ",
+ " were waanderers ",
+ " from Ys' ",
+
+ " ",
+ " This game was made in ",
+ " Nippon like the SS ",
+ " announcer's saying ipon",
+
+ " ",
+ " you ",
+ " want to quit? ",
+ " ",
+
+ " ",
+ " Please stop playing ",
+ " this stupid game ",
+ " ",
+};
+
void M_Menu_Quit_f (void)
{
if (m_state == m_quit)
{"Deathmatch Arena", 32, 6}
};
-//MED 01/06/97 added hipnotic levels
+ //MED 01/06/97 added hipnotic levels
level_t hipnoticlevels[] =
{
{"start", "Command HQ"}, // 0
{"Conversions", 33, 5}
};
+level_t goodvsbad2levels[] =
+{
+ {"rts", "Many Paths"}, // 0
+ {"chess", "Chess, Scott Hess"}, // 1
+ {"dot", "Big Wall"},
+ {"city2", "The Big City"},
+ {"bwall", "0 G like Psychic TV"},
+ {"snow", "Wireframed"},
+ {"telep", "Infinite Falling"},
+ {"faces", "Facing Bases"},
+ {"island", "Adventure Islands"},
+};
+
+episode_t goodvsbad2episodes[] =
+{
+ {"Levels? Bevels!", 0, 8},
+};
+
gamelevels_t sharewarequakegame = {"Shareware Quake", quakelevels, quakeepisodes, 2};
gamelevels_t registeredquakegame = {"Quake", quakelevels, quakeepisodes, 7};
gamelevels_t hipnoticgame = {"Scourge of Armagon", hipnoticlevels, hipnoticepisodes, 6};
gamelevels_t roguegame = {"Dissolution of Eternity", roguelevels, rogueepisodes, 4};
gamelevels_t nehahragame = {"Nehahra", nehahralevels, nehahraepisodes, 4};
gamelevels_t transfusiongame = {"Transfusion", transfusionlevels, transfusionepisodes, 7};
+gamelevels_t goodvsbad2game = {"Good Vs. Bad 2", goodvsbad2levels, goodvsbad2episodes, 1};
typedef struct
{
}
-int gameoptions_cursor_table[] = {40, 56, 64, 72, 80, 88, 96, 104, 120, 128};
-#define NUM_GAMEOPTIONS 10
+int gameoptions_cursor_table[] = {40, 56, 64, 72, 80, 88, 96, 104, 132, 152, 160};
+#define NUM_GAMEOPTIONS 11
int gameoptions_cursor;
void M_GameOptions_Draw (void)
M_Print (0, 56, " Max players");
M_Print (160, 56, va("%i", maxplayers) );
- M_Print (0, 64, " Game Type");
- if (gamemode == GAME_TRANSFUSION)
- {
- if (!deathmatch.integer)
- Cvar_SetValue("deathmatch", 1);
- if (deathmatch.integer == 2)
- M_Print (160, 64, "Capture the Flag");
- else
- M_Print (160, 64, "Blood Bath");
- }
- else
+ if (gamemode != GAME_GOODVSBAD2)
{
- if (!coop.integer && !deathmatch.integer)
- Cvar_SetValue("deathmatch", 1);
- if (coop.integer)
- M_Print (160, 64, "Cooperative");
+ M_Print (0, 64, " Game Type");
+ if (gamemode == GAME_TRANSFUSION)
+ {
+ if (!deathmatch.integer)
+ Cvar_SetValue("deathmatch", 1);
+ if (deathmatch.integer == 2)
+ M_Print (160, 64, "Capture the Flag");
+ else
+ M_Print (160, 64, "Blood Bath");
+ }
else
- M_Print (160, 64, "Deathmatch");
- }
-
- M_Print (0, 72, " Teamplay");
- if (gamemode == GAME_ROGUE)
- {
- char *msg;
-
- switch((int)teamplay.integer)
{
- case 1: msg = "No Friendly Fire"; break;
- case 2: msg = "Friendly Fire"; break;
- case 3: msg = "Tag"; break;
- case 4: msg = "Capture the Flag"; break;
- case 5: msg = "One Flag CTF"; break;
- case 6: msg = "Three Team CTF"; break;
- default: msg = "Off"; break;
+ if (!coop.integer && !deathmatch.integer)
+ Cvar_SetValue("deathmatch", 1);
+ if (coop.integer)
+ M_Print (160, 64, "Cooperative");
+ else
+ M_Print (160, 64, "Deathmatch");
}
- M_Print (160, 72, msg);
- }
- else if (gamemode == GAME_TRANSFUSION)
- {
- char *msg;
- switch (teamplay.integer)
+ M_Print (0, 72, " Teamplay");
+ if (gamemode == GAME_ROGUE)
{
- case 0: msg = "Off"; break;
- case 2: msg = "Friendly Fire"; break;
- default: msg = "No Friendly Fire"; break;
- }
- M_Print (160, 72, msg);
- }
- else
- {
- char *msg;
+ char *msg;
- switch((int)teamplay.integer)
+ switch((int)teamplay.integer)
+ {
+ case 1: msg = "No Friendly Fire"; break;
+ case 2: msg = "Friendly Fire"; break;
+ case 3: msg = "Tag"; break;
+ case 4: msg = "Capture the Flag"; break;
+ case 5: msg = "One Flag CTF"; break;
+ case 6: msg = "Three Team CTF"; break;
+ default: msg = "Off"; break;
+ }
+ M_Print (160, 72, msg);
+ }
+ else
{
- case 1: msg = "No Friendly Fire"; break;
- case 2: msg = "Friendly Fire"; break;
- default: msg = "Off"; break;
+ char *msg;
+
+ switch (teamplay.integer)
+ {
+ case 0: msg = "Off"; break;
+ case 2: msg = "Friendly Fire"; break;
+ default: msg = "No Friendly Fire"; break;
+ }
+ M_Print (160, 72, msg);
}
- M_Print (160, 72, msg);
- }
- M_Print (0, 80, " Skill");
- if (skill.integer == 0)
- M_Print (160, 80, "Easy difficulty");
- else if (skill.integer == 1)
- M_Print (160, 80, "Normal difficulty");
- else if (skill.integer == 2)
- M_Print (160, 80, "Hard difficulty");
- else
- M_Print (160, 80, "Nightmare difficulty");
+ M_Print (0, 80, " Skill");
+ if (skill.integer == 0)
+ M_Print (160, 80, "Easy difficulty");
+ else if (skill.integer == 1)
+ M_Print (160, 80, "Normal difficulty");
+ else if (skill.integer == 2)
+ M_Print (160, 80, "Hard difficulty");
+ else
+ M_Print (160, 80, "Nightmare difficulty");
- M_Print (0, 88, " Frag Limit");
- if (fraglimit.integer == 0)
- M_Print (160, 88, "none");
- else
- M_Print (160, 88, va("%i frags", fraglimit.integer));
+ M_Print (0, 88, " Frag Limit");
+ if (fraglimit.integer == 0)
+ M_Print (160, 88, "none");
+ else
+ M_Print (160, 88, va("%i frags", fraglimit.integer));
- M_Print (0, 96, " Time Limit");
- if (timelimit.integer == 0)
- M_Print (160, 96, "none");
- else
- M_Print (160, 96, va("%i minutes", timelimit.integer));
+ M_Print (0, 96, " Time Limit");
+ if (timelimit.integer == 0)
+ M_Print (160, 96, "none");
+ else
+ M_Print (160, 96, va("%i minutes", timelimit.integer));
+ }
M_Print (0, 104, " Public server");
M_Print (160, 104, (sv_public.integer == 0) ? "no" : "yes");
+ M_Print (0, 120, " Server name");
+ M_DrawTextBox (0, 124, 38, 1);
+ M_Print (8, 132, hostname.string);
+
g = lookupgameinfo();
- M_Print (0, 120, " Episode");
- M_Print (160, 120, g->episodes[startepisode].description);
+ if (gamemode != GAME_GOODVSBAD2)
+ {
+ M_Print (0, 152, " Episode");
+ M_Print (160, 152, g->episodes[startepisode].description);
+ }
- M_Print (0, 128, " Level");
- M_Print (160, 128, g->levels[g->episodes[startepisode].firstLevel + startlevel].description);
- M_Print (160, 136, g->levels[g->episodes[startepisode].firstLevel + startlevel].name);
+ M_Print (0, 160, " Level");
+ M_Print (160, 160, g->levels[g->episodes[startepisode].firstLevel + startlevel].description);
+ M_Print (160, 168, g->levels[g->episodes[startepisode].firstLevel + startlevel].name);
// line cursor
- M_DrawCharacter (144, gameoptions_cursor_table[gameoptions_cursor], 12+((int)(realtime*4)&1));
+ if (gameoptions_cursor == 8)
+ M_DrawCharacter (8 + 8 * strlen(hostname.string), gameoptions_cursor_table[gameoptions_cursor], 10+((int)(realtime*4)&1));
+ else
+ M_DrawCharacter (144, gameoptions_cursor_table[gameoptions_cursor], 12+((int)(realtime*4)&1));
if (m_serverInfoMessage)
{
M_Print (x, 170, " havoc@telefragged.com ");
}
else
- {
m_serverInfoMessage = false;
- }
}
}
break;
case 2:
+ if (gamemode == GAME_GOODVSBAD2)
+ break;
if (gamemode == GAME_TRANSFUSION)
{
if (deathmatch.integer == 2) // changing from CTF to BloodBath
break;
case 3:
+ if (gamemode == GAME_GOODVSBAD2)
+ break;
if (gamemode == GAME_ROGUE)
count = 6;
else
break;
case 4:
+ if (gamemode == GAME_GOODVSBAD2)
+ break;
Cvar_SetValueQuick (&skill, skill.integer + dir);
if (skill.integer > 3)
Cvar_SetValueQuick (&skill, 0);
break;
case 5:
+ if (gamemode == GAME_GOODVSBAD2)
+ break;
Cvar_SetValueQuick (&fraglimit, fraglimit.integer + dir*10);
if (fraglimit.integer > 100)
Cvar_SetValueQuick (&fraglimit, 0);
break;
case 6:
+ if (gamemode == GAME_GOODVSBAD2)
+ break;
Cvar_SetValueQuick (&timelimit, timelimit.value + dir*5);
if (timelimit.value > 60)
Cvar_SetValueQuick (&timelimit, 0);
break;
case 8:
+ break;
+
+ case 9:
+ if (gamemode == GAME_GOODVSBAD2)
+ break;
startepisode += dir;
g = lookupgameinfo();
startlevel = 0;
break;
- case 9:
+ case 10:
startlevel += dir;
g = lookupgameinfo();
void M_GameOptions_Key (int key)
{
gamelevels_t *g;
+ int l;
+ char hostnamebuf[128];
switch (key)
{
M_NetStart_Change (1);
break;
+
+ case K_BACKSPACE:
+ if (gameoptions_cursor == 8)
+ {
+ l = strlen(hostname.string);
+ if (l)
+ {
+ l = min(l - 1, 37);
+ memcpy(hostnamebuf, hostname.string, l);
+ hostnamebuf[l] = 0;
+ Cvar_Set("hostname", hostnamebuf);
+ }
+ }
+ break;
+
+ default:
+ if (key < 32 || key > 127)
+ break;
+ if (gameoptions_cursor == 8)
+ {
+ l = strlen(hostname.string);
+ if (l < 37)
+ {
+ memcpy(hostnamebuf, hostname.string, l);
+ hostnamebuf[l] = key;
+ hostnamebuf[l+1] = 0;
+ Cvar_Set("hostname", hostnamebuf);
+ }
+ }
}
}
numcommands = sizeof(transfusionbindnames) / sizeof(transfusionbindnames[0]);
bindnames = transfusionbindnames;
}
+ else if (gamemode == GAME_GOODVSBAD2)
+ {
+ numcommands = sizeof(goodvsbad2bindnames) / sizeof(goodvsbad2bindnames[0]);
+ bindnames = goodvsbad2bindnames;
+ }
else
{
numcommands = sizeof(quakebindnames) / sizeof(quakebindnames[0]);
if (sb_lines > 24)
{
- Sbar_DrawInventory ();
+ if (gamemode != GAME_GOODVSBAD2)
+ Sbar_DrawInventory ();
if (cl.maxclients != 1)
Sbar_DrawFrags ();
}
if (sb_showscores || cl.stats[STAT_HEALTH] <= 0)
{
- Sbar_DrawAlphaPic (0, 0, sb_scorebar, 0.4);
+ if (gamemode != GAME_GOODVSBAD2)
+ Sbar_DrawAlphaPic (0, 0, sb_scorebar, 0.4);
Sbar_DrawScoreboard ();
}
else if (sb_lines)
Sbar_DrawPic (209, 12, sb_items[1]);
}
// armor
- if (cl.items & IT_INVULNERABILITY)
+ if (gamemode != GAME_GOODVSBAD2)
{
- Sbar_DrawNum (24, 0, 666, 3, 1);
- Sbar_DrawPic (0, 0, sb_disc);
- }
- else
- {
- if (gamemode == GAME_ROGUE)
+ if (cl.items & IT_INVULNERABILITY)
{
- Sbar_DrawNum (24, 0, cl.stats[STAT_ARMOR], 3, cl.stats[STAT_ARMOR] <= 25);
- if (cl.items & RIT_ARMOR3)
- Sbar_DrawPic (0, 0, sb_armor[2]);
- else if (cl.items & RIT_ARMOR2)
- Sbar_DrawPic (0, 0, sb_armor[1]);
- else if (cl.items & RIT_ARMOR1)
- Sbar_DrawPic (0, 0, sb_armor[0]);
+ Sbar_DrawNum (24, 0, 666, 3, 1);
+ Sbar_DrawPic (0, 0, sb_disc);
}
else
{
- Sbar_DrawNum (24, 0, cl.stats[STAT_ARMOR], 3, cl.stats[STAT_ARMOR] <= 25);
- if (cl.items & IT_ARMOR3)
- Sbar_DrawPic (0, 0, sb_armor[2]);
- else if (cl.items & IT_ARMOR2)
- Sbar_DrawPic (0, 0, sb_armor[1]);
- else if (cl.items & IT_ARMOR1)
- Sbar_DrawPic (0, 0, sb_armor[0]);
+ if (gamemode == GAME_ROGUE)
+ {
+ Sbar_DrawNum (24, 0, cl.stats[STAT_ARMOR], 3, cl.stats[STAT_ARMOR] <= 25);
+ if (cl.items & RIT_ARMOR3)
+ Sbar_DrawPic (0, 0, sb_armor[2]);
+ else if (cl.items & RIT_ARMOR2)
+ Sbar_DrawPic (0, 0, sb_armor[1]);
+ else if (cl.items & RIT_ARMOR1)
+ Sbar_DrawPic (0, 0, sb_armor[0]);
+ }
+ else
+ {
+ Sbar_DrawNum (24, 0, cl.stats[STAT_ARMOR], 3, cl.stats[STAT_ARMOR] <= 25);
+ if (cl.items & IT_ARMOR3)
+ Sbar_DrawPic (0, 0, sb_armor[2]);
+ else if (cl.items & IT_ARMOR2)
+ Sbar_DrawPic (0, 0, sb_armor[1]);
+ else if (cl.items & IT_ARMOR1)
+ Sbar_DrawPic (0, 0, sb_armor[0]);
+ }
}
}
cvar_t bgmvolume = {CVAR_SAVE, "bgmvolume", "1"};
cvar_t volume = {CVAR_SAVE, "volume", "0.7"};
+cvar_t snd_staticvolume = {CVAR_SAVE, "snd_staticvolume", "1"};
cvar_t nosound = {0, "nosound", "0"};
cvar_t snd_precache = {0, "snd_precache", "1"};
*/
void S_Init (void)
{
- Con_Printf("\nSound Initialization\n");
+ Con_DPrintf("\nSound Initialization\n");
S_RawSamples_ClearQueue();
Cvar_RegisterVariable(&volume);
Cvar_RegisterVariable(&bgmvolume);
+ Cvar_RegisterVariable(&snd_staticvolume);
if (COM_CheckParm("-nosound") || COM_CheckParm("-safe"))
return;
if (!sound_started)
return;
- Con_Printf ("Sound sampling rate: %i\n", shm->speed);
+ Con_DPrintf ("Sound sampling rate: %i\n", shm->speed);
// provides a tick sound until washed clean
*/
channel_t *SND_PickChannel(int entnum, int entchannel)
{
- int ch_idx;
- int first_to_die;
- int life_left;
+ int ch_idx;
+ int first_to_die;
+ int life_left;
// Check for replacement sound, or find the best one to replace
- first_to_die = -1;
- life_left = 0x7fffffff;
- for (ch_idx=NUM_AMBIENTS ; ch_idx < NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS ; ch_idx++)
- {
+ first_to_die = -1;
+ life_left = 0x7fffffff;
+ for (ch_idx=NUM_AMBIENTS ; ch_idx < NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS ; ch_idx++)
+ {
if (entchannel != 0 // channel 0 never overrides
&& channels[ch_idx].entnum == entnum
&& (channels[ch_idx].entchannel == entchannel || entchannel == -1) )
life_left = channels[ch_idx].end - paintedtime;
first_to_die = ch_idx;
}
- }
+ }
if (first_to_die == -1)
return NULL;
if (channels[first_to_die].sfx)
channels[first_to_die].sfx = NULL;
- return &channels[first_to_die];
+ return &channels[first_to_die];
}
/*
SND_Spatialize
=================
*/
-void SND_Spatialize(channel_t *ch)
+void SND_Spatialize(channel_t *ch, int isstatic)
{
- vec_t dot;
- vec_t dist;
- vec_t lscale, rscale, scale;
- vec3_t source_vec;
+ vec_t dot;
+ vec_t dist;
+ vec_t lscale, rscale, scale;
+ vec3_t source_vec;
sfx_t *snd;
// anything coming from the view entity will always be full volume
{
ch->leftvol = ch->master_vol;
ch->rightvol = ch->master_vol;
- return;
}
+ else
+ {
+ // calculate stereo seperation and distance attenuation
+ snd = ch->sfx;
+ VectorSubtract(ch->origin, listener_origin, source_vec);
-// calculate stereo seperation and distance attenuation
+ dist = VectorNormalizeLength(source_vec) * ch->dist_mult;
- snd = ch->sfx;
- VectorSubtract(ch->origin, listener_origin, source_vec);
+ dot = DotProduct(listener_right, source_vec);
- dist = VectorNormalizeLength(source_vec) * ch->dist_mult;
+ if (shm->channels == 1)
+ {
+ rscale = 1.0;
+ lscale = 1.0;
+ }
+ else
+ {
+ rscale = 1.0 + dot;
+ lscale = 1.0 - dot;
+ }
- dot = DotProduct(listener_right, source_vec);
+ // add in distance effect
+ scale = (1.0 - dist) * rscale;
+ ch->rightvol = (int) (ch->master_vol * scale);
+ if (ch->rightvol < 0)
+ ch->rightvol = 0;
- if (shm->channels == 1)
- {
- rscale = 1.0;
- lscale = 1.0;
+ scale = (1.0 - dist) * lscale;
+ ch->leftvol = (int) (ch->master_vol * scale);
+ if (ch->leftvol < 0)
+ ch->leftvol = 0;
}
- else
+ // LordHavoc: allow adjusting volume of static sounds
+ if (isstatic)
{
- rscale = 1.0 + dot;
- lscale = 1.0 - dot;
+ ch->leftvol *= snd_staticvolume.value;
+ ch->rightvol *= snd_staticvolume.value;
}
-
-// add in distance effect
- scale = (1.0 - dist) * rscale;
- ch->rightvol = (int) (ch->master_vol * scale);
- if (ch->rightvol < 0)
- ch->rightvol = 0;
-
- scale = (1.0 - dist) * lscale;
- ch->leftvol = (int) (ch->master_vol * scale);
- if (ch->leftvol < 0)
- ch->leftvol = 0;
}
target_chan->sfx = sfx;
target_chan->pos = 0.0;
- target_chan->end = paintedtime + sc->length;
+ target_chan->end = paintedtime + sc->length;
// if an identical sound has also been started this frame, offset the pos
// a bit to keep it from just making the first one louder
check = &channels[NUM_AMBIENTS];
- for (ch_idx=NUM_AMBIENTS ; ch_idx < NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS ; ch_idx++, check++)
- {
+ for (ch_idx=NUM_AMBIENTS ; ch_idx < NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS ; ch_idx++, check++)
+ {
if (check == target_chan)
continue;
if (check->sfx == sfx && !check->pos)
VectorCopy (origin, ss->origin);
ss->master_vol = vol;
ss->dist_mult = (attenuation/64) / sound_nominal_clip_dist;
- ss->end = paintedtime + sc->length;
+ ss->end = paintedtime + sc->length;
SND_Spatialize (ss);
}
{
if (!ch->sfx)
continue;
- SND_Spatialize(ch); // respatialize channel
+ SND_Spatialize(ch, i > MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS); // respatialize channel
if (!ch->leftvol && !ch->rightvol)
continue;
{
s->silentlymissing = !complain;
if (complain)
- Con_Printf ("Couldn't load %s\n", namebuffer);
+ Con_DPrintf ("Couldn't load %s\n", namebuffer);
return NULL;
}
vidmode_ext = false;
else
{
- Con_Printf("Using XFree86-VidModeExtension Version %d.%d\n", MajorVersion, MinorVersion);
+ Con_DPrintf("Using XFree86-VidModeExtension Version %d.%d\n", MajorVersion, MinorVersion);
vidmode_ext = true;
}
int GL_OpenLibrary(const char *name)
{
- Con_Printf("Loading GL driver %s\n", name);
+ Con_Printf("Loading OpenGL driver %s\n", name);
GL_CloseLibrary();
if (!(prjobj = dlopen(name, RTLD_LAZY)))
{
int failed = false;
const dllfunction_t *func;
- Con_Printf("checking for %s... ", name);
+ Con_DPrintf("checking for %s... ", name);
for (func = funcs;func && func->name;func++)
*func->funcvariable = NULL;
if (disableparm && COM_CheckParm(disableparm))
{
- Con_Printf("disabled by commandline\n");
+ Con_DPrintf("disabled by commandline\n");
return false;
}
if (!(*func->funcvariable = (void *) GL_GetProcAddress(func->name)))
{
if (!silent)
- Con_Printf("missing function \"%s\" - broken driver!\n", func->name);
+ Con_Printf("OpenGL extension \"%s\" is missing function \"%s\" - broken driver!\n", name, func->name);
failed = true;
}
}
// delay the return so it prints all missing functions
if (failed)
return false;
- Con_Printf("enabled\n");
+ Con_DPrintf("enabled\n");
return true;
}
else
{
- Con_Printf("not detected\n");
+ Con_DPrintf("not detected\n");
return false;
}
}
if (!GL_CheckExtension("OpenGL 1.1.0", opengl110funcs, NULL, false))
Sys_Error("OpenGL 1.1.0 functions not found\n");
- Con_Printf ("GL_VENDOR: %s\n", gl_vendor);
- Con_Printf ("GL_RENDERER: %s\n", gl_renderer);
- Con_Printf ("GL_VERSION: %s\n", gl_version);
- Con_Printf ("GL_EXTENSIONS: %s\n", gl_extensions);
- Con_Printf ("%s_EXTENSIONS: %s\n", gl_platform, gl_platformextensions);
+ Con_DPrintf ("GL_VENDOR: %s\n", gl_vendor);
+ Con_DPrintf ("GL_RENDERER: %s\n", gl_renderer);
+ Con_DPrintf ("GL_VERSION: %s\n", gl_version);
+ Con_DPrintf ("GL_EXTENSIONS: %s\n", gl_extensions);
+ Con_DPrintf ("%s_EXTENSIONS: %s\n", gl_platform, gl_platformextensions);
- Con_Printf("Checking OpenGL extensions...\n");
+ Con_DPrintf("Checking OpenGL extensions...\n");
if (!GL_CheckExtension("glDrawRangeElements", drawrangeelementsfuncs, "-nodrawrangeelements", true))
GL_CheckExtension("GL_EXT_draw_range_elements", drawrangeelementsextfuncs, "-nodrawrangeelements", false);
Cvar_RegisterVariable(&m_filter);
Cmd_AddCommand("force_centerview", Force_CenterView_f);
Cmd_AddCommand("vid_restart", VID_Restart_f);
+ if (gamemode == GAME_GOODVSBAD2)
+ Cvar_Set("gl_combine", "0");
}
int current_vid_fullscreen;
Cvar_SetValueQuick(&vid_stencil, 0);
}
- Con_Printf("Starting video system\n");
+ Con_DPrintf("Starting video system\n");
if (!VID_Mode(vid_fullscreen.integer, vid_width.integer, vid_height.integer, vid_bitsperpixel.integer, vid_stencil.integer))
{
Con_Printf("Desired video mode fail, trying fallbacks...\n");
int GL_OpenLibrary(const char *name)
{
- Con_Printf("Loading GL driver %s\n", name);
+ Con_Printf("Loading OpenGL driver %s\n", name);
GL_CloseLibrary();
if (!(gldll = LoadLibrary(name)))
{