mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-16 17:11:33 +00:00
Purge _WINDOWS
This commit is contained in:
parent
dd2dc7eb4f
commit
892be79206
10 changed files with 5 additions and 120 deletions
|
@ -2034,7 +2034,7 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr)
|
||||||
|
|
||||||
// JOYSTICK DEFAULTS
|
// JOYSTICK DEFAULTS
|
||||||
// use_joystick was changed from 0 to 1 to automatically use a joystick if available
|
// use_joystick was changed from 0 to 1 to automatically use a joystick if available
|
||||||
#if defined(HAVE_SDL) || defined(_WINDOWS)
|
#if defined(HAVE_SDL)
|
||||||
if ((!stricmp(v->name, "use_joystick")
|
if ((!stricmp(v->name, "use_joystick")
|
||||||
|| !stricmp(v->name, "use_joystick2"))
|
|| !stricmp(v->name, "use_joystick2"))
|
||||||
&& atoi(valstr) == 0)
|
&& atoi(valstr) == 0)
|
||||||
|
|
|
@ -33,10 +33,6 @@
|
||||||
#include "m_menu.h"
|
#include "m_menu.h"
|
||||||
#include "filesrch.h"
|
#include "filesrch.h"
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
|
||||||
#include "win32/win_main.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
#include "hardware/hw_main.h"
|
#include "hardware/hw_main.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1292,19 +1288,9 @@ void CONS_Printf(const char *fmt, ...)
|
||||||
// if not in display loop, force screen update
|
// if not in display loop, force screen update
|
||||||
if (con_startup && (!setrenderneeded))
|
if (con_startup && (!setrenderneeded))
|
||||||
{
|
{
|
||||||
#ifdef _WINDOWS
|
|
||||||
patch_t *con_backpic = W_CachePatchName("CONSBACK", PU_PATCH);
|
|
||||||
|
|
||||||
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
|
|
||||||
V_DrawScaledPatch(0, 0, 0, con_backpic);
|
|
||||||
|
|
||||||
W_UnlockCachedPatch(con_backpic);
|
|
||||||
I_LoadingScreen(txt); // Win32/OS2 only
|
|
||||||
#else
|
|
||||||
// here we display the console text
|
// here we display the console text
|
||||||
CON_Drawer();
|
CON_Drawer();
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
src/d_main.c
11
src/d_main.c
|
@ -83,10 +83,6 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
|
||||||
#include "hardware/hw_main.h" // 3D View Rendering
|
#include "hardware/hw_main.h" // 3D View Rendering
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
|
||||||
#include "win32/win_main.h" // I_DoStartupMouse
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
#ifdef HW3SOUND
|
||||||
#include "hardware/hw3sound.h"
|
#include "hardware/hw3sound.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -626,11 +622,6 @@ void D_SRB2Loop(void)
|
||||||
|
|
||||||
// Pushing of + parameters is now done back in D_SRB2Main, not here.
|
// Pushing of + parameters is now done back in D_SRB2Main, not here.
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
|
||||||
CONS_Printf("I_StartupMouse()...\n");
|
|
||||||
I_DoStartupMouse();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
oldentertics = I_GetTime();
|
oldentertics = I_GetTime();
|
||||||
|
|
||||||
// end of loading screen: CONS_Printf() will no more call FinishUpdate()
|
// end of loading screen: CONS_Printf() will no more call FinishUpdate()
|
||||||
|
@ -1071,9 +1062,7 @@ void D_SRB2Main(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// for dedicated server
|
// for dedicated server
|
||||||
#if !defined (_WINDOWS) //already check in win_main.c
|
|
||||||
dedicated = M_CheckParm("-dedicated") != 0;
|
dedicated = M_CheckParm("-dedicated") != 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PC_DOS
|
#ifdef PC_DOS
|
||||||
D_Titlebar();
|
D_Titlebar();
|
||||||
|
|
|
@ -3557,8 +3557,6 @@ static void Command_Version_f(void)
|
||||||
// Base library
|
// Base library
|
||||||
#if defined( HAVE_SDL)
|
#if defined( HAVE_SDL)
|
||||||
CONS_Printf("SDL ");
|
CONS_Printf("SDL ");
|
||||||
#elif defined(_WINDOWS)
|
|
||||||
CONS_Printf("DD ");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// OS
|
// OS
|
||||||
|
|
|
@ -47,17 +47,6 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
|
||||||
#define NONET
|
|
||||||
#if !defined (HWRENDER) && !defined (NOHW)
|
|
||||||
#define HWRENDER
|
|
||||||
#endif
|
|
||||||
// judgecutor: 3D sound support
|
|
||||||
#if !defined(HW3SOUND) && !defined (NOHS)
|
|
||||||
#define HW3SOUND
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define ASMCALL __cdecl
|
#define ASMCALL __cdecl
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -27,18 +27,10 @@
|
||||||
// __declspec(dllexport) <return->type> (WINAPI *<function-name>) (<arguments>);
|
// __declspec(dllexport) <return->type> (WINAPI *<function-name>) (<arguments>);
|
||||||
|
|
||||||
#ifdef _CREATE_DLL_
|
#ifdef _CREATE_DLL_
|
||||||
#ifdef _WINDOWS
|
#ifdef __cplusplus
|
||||||
#ifdef __cplusplus
|
#define EXPORT extern "C"
|
||||||
#define EXPORT extern "C" __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#define EXPORT
|
||||||
#define EXPORT extern "C"
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define HWRAPI(fn) WINAPI fn
|
#define HWRAPI(fn) WINAPI fn
|
||||||
|
@ -65,9 +57,7 @@ typedef void (*I_Error_t) (const char *error, ...) FUNCIERROR;
|
||||||
|
|
||||||
void DBG_Printf(const char *lpFmt, ...) /*FUNCPRINTF*/;
|
void DBG_Printf(const char *lpFmt, ...) /*FUNCPRINTF*/;
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#if defined (__CYGWIN__)
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
|
|
||||||
#elif defined (__CYGWIN__)
|
|
||||||
void _init() __attribute__((constructor));
|
void _init() __attribute__((constructor));
|
||||||
void _fini() __attribute__((destructor));
|
void _fini() __attribute__((destructor));
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -36,9 +36,6 @@ EXPORT boolean HWRAPI(Init) (I_Error_t ErrorFunction);
|
||||||
#ifndef HAVE_SDL
|
#ifndef HAVE_SDL
|
||||||
EXPORT void HWRAPI(Shutdown) (void);
|
EXPORT void HWRAPI(Shutdown) (void);
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WINDOWS
|
|
||||||
EXPORT void HWRAPI(GetModeList) (vmode_t **pvidmodes, INT32 *numvidmodes);
|
|
||||||
#endif
|
|
||||||
EXPORT void HWRAPI(SetPalette) (RGBA_t *ppal);
|
EXPORT void HWRAPI(SetPalette) (RGBA_t *ppal);
|
||||||
EXPORT void HWRAPI(FinishUpdate) (INT32 waitvbl);
|
EXPORT void HWRAPI(FinishUpdate) (INT32 waitvbl);
|
||||||
EXPORT void HWRAPI(Draw2DLine) (F2DCoord *v1, F2DCoord *v2, RGBA_t Color);
|
EXPORT void HWRAPI(Draw2DLine) (F2DCoord *v1, F2DCoord *v2, RGBA_t Color);
|
||||||
|
@ -97,9 +94,6 @@ struct hwdriver_s
|
||||||
SetTransform pfnSetTransform;
|
SetTransform pfnSetTransform;
|
||||||
GetTextureUsed pfnGetTextureUsed;
|
GetTextureUsed pfnGetTextureUsed;
|
||||||
GetRenderVersion pfnGetRenderVersion;
|
GetRenderVersion pfnGetRenderVersion;
|
||||||
#ifdef _WINDOWS
|
|
||||||
GetModeList pfnGetModeList;
|
|
||||||
#endif
|
|
||||||
#ifndef HAVE_SDL
|
#ifndef HAVE_SDL
|
||||||
Shutdown pfnShutdown;
|
Shutdown pfnShutdown;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -125,49 +125,6 @@ enum {IS_2DSOURCE = 0, IS_3DSOURCE = 1};
|
||||||
|
|
||||||
#define NEW_HANDLE -1
|
#define NEW_HANDLE -1
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, // handle to DLL module
|
|
||||||
DWORD fdwReason, // reason for calling function
|
|
||||||
LPVOID lpvReserved) // reserved
|
|
||||||
{
|
|
||||||
// Perform actions based on the reason for calling
|
|
||||||
UNREFERENCED_PARAMETER(lpvReserved);
|
|
||||||
switch ( fdwReason )
|
|
||||||
{
|
|
||||||
case DLL_PROCESS_ATTACH:
|
|
||||||
// Initialize once for each new process.
|
|
||||||
// Return FALSE to fail DLL load.
|
|
||||||
#ifdef DEBUG_TO_FILE
|
|
||||||
logstream = fopen("s_ds3d.log", "wt");
|
|
||||||
if (logstream == NULL)
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
DisableThreadLibraryCalls(hinstDLL);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
// Do thread-specific initialization.
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
// Do thread-specific cleanup.
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
|
||||||
// Perform any necessary cleanup.
|
|
||||||
#ifdef DEBUG_TO_FILE
|
|
||||||
if (logstream)
|
|
||||||
{
|
|
||||||
fclose(logstream);
|
|
||||||
logstream = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return TRUE; // Successful DLL_PROCESS_ATTACH.
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// FUNCTIONS
|
// FUNCTIONS
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
10
src/m_menu.c
10
src/m_menu.c
|
@ -1407,9 +1407,7 @@ static menuitem_t OP_OpenGLOptionsMenu[] =
|
||||||
#ifdef ALAM_LIGHTING
|
#ifdef ALAM_LIGHTING
|
||||||
{IT_SUBMENU|IT_STRING, NULL, "Lighting...", &OP_OpenGLLightingDef, 134},
|
{IT_SUBMENU|IT_STRING, NULL, "Lighting...", &OP_OpenGLLightingDef, 134},
|
||||||
#endif
|
#endif
|
||||||
#if defined (_WINDOWS) && (!((defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)))
|
|
||||||
{IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 144},
|
{IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 144},
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ALAM_LIGHTING
|
#ifdef ALAM_LIGHTING
|
||||||
|
@ -11924,16 +11922,8 @@ static void M_VideoModeMenu(INT32 choice)
|
||||||
vidm_selected = 0;
|
vidm_selected = 0;
|
||||||
nummodes = VID_NumModes();
|
nummodes = VID_NumModes();
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
|
||||||
// clean that later: skip windowed mode 0, video modes menu only shows FULL SCREEN modes
|
|
||||||
if (nummodes <= NUMSPECIALMODES)
|
|
||||||
i = 0; // unless we have nothing
|
|
||||||
else
|
|
||||||
i = NUMSPECIALMODES;
|
|
||||||
#else
|
|
||||||
// DOS does not skip mode 0, because mode 0 is ALWAYS present
|
// DOS does not skip mode 0, because mode 0 is ALWAYS present
|
||||||
i = 0;
|
i = 0;
|
||||||
#endif
|
|
||||||
for (; i < nummodes && vidm_nummodes < MAXMODEDESCS; i++)
|
for (; i < nummodes && vidm_nummodes < MAXMODEDESCS; i++)
|
||||||
{
|
{
|
||||||
desc = VID_GetModeName(i);
|
desc = VID_GetModeName(i);
|
||||||
|
|
|
@ -79,15 +79,7 @@ consvar_t sndserver_cmd = {"sndserver_cmd", "llsndserv", CV_SAVE, NULL, 0, NULL,
|
||||||
consvar_t sndserver_arg = {"sndserver_arg", "-quiet", CV_SAVE, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t sndserver_arg = {"sndserver_arg", "-quiet", CV_SAVE, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (_WINDOWS) && !defined (SURROUND) //&& defined (_X86_)
|
|
||||||
#define SURROUND
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
|
||||||
consvar_t cv_samplerate = {"samplerate", "44100", 0, CV_Unsigned, NULL, 44100, NULL, NULL, 0, 0, NULL}; //Alam: For easy hacking?
|
|
||||||
#else
|
|
||||||
consvar_t cv_samplerate = {"samplerate", "22050", 0, CV_Unsigned, NULL, 22050, NULL, NULL, 0, 0, NULL}; //Alam: For easy hacking?
|
consvar_t cv_samplerate = {"samplerate", "22050", 0, CV_Unsigned, NULL, 22050, NULL, NULL, 0, 0, NULL}; //Alam: For easy hacking?
|
||||||
#endif
|
|
||||||
|
|
||||||
// stereo reverse
|
// stereo reverse
|
||||||
consvar_t stereoreverse = {"stereoreverse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t stereoreverse = {"stereoreverse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
Loading…
Reference in a new issue