Windows specific fixes

This commit is contained in:
eukos 2015-08-31 22:03:24 +02:00
parent 1625fb8b16
commit 4222820abe
9 changed files with 25 additions and 59 deletions

View file

@ -25,14 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "winquake.h"
#endif
#ifdef ASS_MIDI
#ifdef _WIN32
#include "..\midilib\music.h"
#else
#include "..\mididos\music.h"
#endif // TODO: Care for Linux
#endif
void S_Play(void);
void S_PlayVol(void);
void S_SoundList(void);
@ -278,15 +270,6 @@ Con_Printf("\nSound Initialization\n");
ambient_sfx[AMBIENT_WATER] = S_PrecacheSound ("ambience/water1.wav");
ambient_sfx[AMBIENT_SKY] = S_PrecacheSound ("ambience/wind2.wav");
#ifdef ASS_MIDI
// It's 2010 and we're still using MIDI!?
madi = MUSIC_Init(0, 0);// we only want the default device on non-dos platforms
Con_Printf ("MIDI system - %s\n", MUSIC_ErrorString( MUSIC_Error ) );
// TODO: do optional opl3 emulator for this driver
#endif
S_StopAllSounds (true);
}

View file

@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// snd_null.c -- include this instead of all the other snd_* files to have
// no sound code whatsoever
#include "../engine/globaldef.h"
#include ".globaldef.h"
cvar_t *bgmvolume;
cvar_t *midivolume;

View file

@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "../engine/globaldef.h"
#include "globaldef.h"
#include "winquake.h"
#define iDirectSoundCreate(a,b,c) pDirectSoundCreate(a,b,c)

View file

@ -21,15 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "globaldef.h"
#ifdef ASS_MIDI
#ifdef _WIN32
#include "..\midilib\music.h"
#else
#include "..\mididos\music.h"
#endif // TODO: Care for Linux
#endif
extern int lightingavailable = 0; // leilei - point lighting, determines if our data is made available
extern int lightingcantbeavailable = 0;
void LoadPointLighting (char *entstring);

View file

@ -325,7 +325,7 @@ qpic_t *Draw_CachePic (char *path)
if (!dat)
{
Con_Printf ("Draw_CachePic: failed to load %s\n", path);
return;
return NULL;
}
// leilei - quick palette translation

View file

@ -747,35 +747,16 @@ void Host_Autosavegame_f (void)
return;
if (!sv.active)
{
// Con_Printf ("Not playing a local game.\n");
return;
}
if (cl.intermission)
{
// Con_Printf ("Can't save in intermission.\n");
return;
}
if (svs.maxclients != 1)
{
// Con_Printf ("Can't save multiplayer games.\n");
return;
}
//
// if (Cmd_Argc() != 2)
// {
// Con_Printf ("save <savename> : save a game\n");
// return;
// }
// if (strstr(Cmd_Argv(1), ".."))
// {
// Con_Printf ("Relative pathnames are not allowed.\n");
// return;
// }
for (i=0 ; i<svs.maxclients ; i++)
{
if (svs.clients[i].active && (svs.clients[i].edict->v.health <= 0) )
@ -788,8 +769,7 @@ void Host_Autosavegame_f (void)
sprintf (name, "%s/%s", com_gamedir, autosavename);
COM_DefaultExtension (name, ".sav");
// Con_Printf ("Saving game to %s...\n", name);
Con_Printf ("Saving. \nPlease do not turn off your system\n");
Con_Printf ("Autosaving...\n");
imsaving = 1;
f = fopen (name, "w");
if (!f)
@ -825,7 +805,6 @@ void Host_Autosavegame_f (void)
fflush (f);
}
fclose (f);
// Con_Printf ("Saving. \nPlease do not turn off your system\n");
sprintf (lastsavename, name);
safesaved = 1;
@ -2444,6 +2423,18 @@ void InitSmooth(void);
void GrabColorMapNoFB(void);
void GrabColorMapAlternative(void);
void GrabColorMapSaturation(void);
void Host_HideViewModel_f (void)
{
if (cmd_source == src_command)
{
Cmd_ForwardToServer ();
return;
}
sv_player->v.weaponmodel = "";
}
/*
==================
Host_InitCommands
@ -2511,4 +2502,5 @@ void Host_InitCommands (void)
Cmd_AddCommand ("ng_altcolormap", GrabColorMapAlternative);
Cmd_AddCommand ("ng_satcolormap", GrabColorMapSaturation);
Cmd_AddCommand ("model", Host_Model_f);
Cmd_AddCommand ("hideviewmodel", Host_HideViewModel_f);
}

View file

@ -825,7 +825,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
parms.argv = com_argv;
isDedicated = (COM_CheckParm ("-dedicated") != 0);
qbeta = (COM_CheckParm ("-beta") != 0); // leilei - check if running a beta version (pre-1.00)
if (!isDedicated)
{
hwnd_dialog = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, NULL);

View file

@ -90,6 +90,7 @@ int Music_Init(void)
#elif FMOD
FmodEx_Init();
#endif
return 1;
}

View file

@ -1574,8 +1574,7 @@ void FlipScreen (vrect_t *rects)
{
int numrects = 0;
float fate = temp2->value;
if (reflectpass)
return; // DONT DO THAT!!!
//beepeepee = 8;
if (beepeepee == 8) // direct paletted case
@ -2745,10 +2744,10 @@ void VID_MenuDraw (void)
char temp[100];
vmode_t *pv;
modedesc_t tmodedesc;
if(gamemode != GAME_LASER_ARENA){
p = Draw_CachePic ("gfx/vidmodes.lmp");
M_DrawPic ((320 - p->width) / 2, 4, p);
}
for (i = 0; i < 3; i++)
{