mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 12:31:32 +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
|
||||
// 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")
|
||||
|| !stricmp(v->name, "use_joystick2"))
|
||||
&& atoi(valstr) == 0)
|
||||
|
|
|
@ -33,10 +33,6 @@
|
|||
#include "m_menu.h"
|
||||
#include "filesrch.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include "win32/win_main.h"
|
||||
#endif
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h"
|
||||
#endif
|
||||
|
@ -1292,19 +1288,9 @@ void CONS_Printf(const char *fmt, ...)
|
|||
// if not in display loop, force screen update
|
||||
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
|
||||
CON_Drawer();
|
||||
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
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include "win32/win_main.h" // I_DoStartupMouse
|
||||
#endif
|
||||
|
||||
#ifdef HW3SOUND
|
||||
#include "hardware/hw3sound.h"
|
||||
#endif
|
||||
|
@ -626,11 +622,6 @@ void D_SRB2Loop(void)
|
|||
|
||||
// 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();
|
||||
|
||||
// end of loading screen: CONS_Printf() will no more call FinishUpdate()
|
||||
|
@ -1071,9 +1062,7 @@ void D_SRB2Main(void)
|
|||
#endif
|
||||
|
||||
// for dedicated server
|
||||
#if !defined (_WINDOWS) //already check in win_main.c
|
||||
dedicated = M_CheckParm("-dedicated") != 0;
|
||||
#endif
|
||||
|
||||
#ifdef PC_DOS
|
||||
D_Titlebar();
|
||||
|
|
|
@ -3557,8 +3557,6 @@ static void Command_Version_f(void)
|
|||
// Base library
|
||||
#if defined( HAVE_SDL)
|
||||
CONS_Printf("SDL ");
|
||||
#elif defined(_WINDOWS)
|
||||
CONS_Printf("DD ");
|
||||
#endif
|
||||
|
||||
// OS
|
||||
|
|
|
@ -47,17 +47,6 @@
|
|||
#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
|
||||
#define ASMCALL __cdecl
|
||||
#else
|
||||
|
|
|
@ -27,18 +27,10 @@
|
|||
// __declspec(dllexport) <return->type> (WINAPI *<function-name>) (<arguments>);
|
||||
|
||||
#ifdef _CREATE_DLL_
|
||||
#ifdef _WINDOWS
|
||||
#ifdef __cplusplus
|
||||
#define EXPORT extern "C" __declspec(dllexport)
|
||||
#else
|
||||
#define EXPORT __declspec(dllexport)
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
#define EXPORT extern "C"
|
||||
#else
|
||||
#ifdef __cplusplus
|
||||
#define EXPORT extern "C"
|
||||
#else
|
||||
#define EXPORT
|
||||
#endif
|
||||
#define EXPORT
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#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*/;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
|
||||
#elif defined (__CYGWIN__)
|
||||
#if defined (__CYGWIN__)
|
||||
void _init() __attribute__((constructor));
|
||||
void _fini() __attribute__((destructor));
|
||||
#else
|
||||
|
|
|
@ -36,9 +36,6 @@ EXPORT boolean HWRAPI(Init) (I_Error_t ErrorFunction);
|
|||
#ifndef HAVE_SDL
|
||||
EXPORT void HWRAPI(Shutdown) (void);
|
||||
#endif
|
||||
#ifdef _WINDOWS
|
||||
EXPORT void HWRAPI(GetModeList) (vmode_t **pvidmodes, INT32 *numvidmodes);
|
||||
#endif
|
||||
EXPORT void HWRAPI(SetPalette) (RGBA_t *ppal);
|
||||
EXPORT void HWRAPI(FinishUpdate) (INT32 waitvbl);
|
||||
EXPORT void HWRAPI(Draw2DLine) (F2DCoord *v1, F2DCoord *v2, RGBA_t Color);
|
||||
|
@ -97,9 +94,6 @@ struct hwdriver_s
|
|||
SetTransform pfnSetTransform;
|
||||
GetTextureUsed pfnGetTextureUsed;
|
||||
GetRenderVersion pfnGetRenderVersion;
|
||||
#ifdef _WINDOWS
|
||||
GetModeList pfnGetModeList;
|
||||
#endif
|
||||
#ifndef HAVE_SDL
|
||||
Shutdown pfnShutdown;
|
||||
#endif
|
||||
|
|
|
@ -125,49 +125,6 @@ enum {IS_2DSOURCE = 0, IS_3DSOURCE = 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
|
||||
// **************************************************************************
|
||||
|
|
10
src/m_menu.c
10
src/m_menu.c
|
@ -1407,9 +1407,7 @@ static menuitem_t OP_OpenGLOptionsMenu[] =
|
|||
#ifdef ALAM_LIGHTING
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Lighting...", &OP_OpenGLLightingDef, 134},
|
||||
#endif
|
||||
#if defined (_WINDOWS) && (!((defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)))
|
||||
{IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 144},
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
|
@ -11924,16 +11922,8 @@ static void M_VideoModeMenu(INT32 choice)
|
|||
vidm_selected = 0;
|
||||
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
|
||||
i = 0;
|
||||
#endif
|
||||
for (; i < nummodes && vidm_nummodes < MAXMODEDESCS; 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};
|
||||
#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?
|
||||
#endif
|
||||
|
||||
// stereo reverse
|
||||
consvar_t stereoreverse = {"stereoreverse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
|
Loading…
Reference in a new issue