diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index f458b044c..f84cd2942 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -6,7 +6,6 @@ PANDORA\ HAIKU\ DUMMY\ - DJGPPDOS\ SOLARIS\ MACOSX\ diff --git a/src/console.c b/src/console.c index 7cbcb85a9..08d04e318 100644 --- a/src/console.c +++ b/src/console.c @@ -35,10 +35,6 @@ #include "filesrch.h" #include "m_misc.h" -#ifdef _WINDOWS -#include "win32/win_main.h" -#endif - #ifdef HWRENDER #include "hardware/hw_main.h" #endif @@ -1550,13 +1546,6 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...) // void CONS_Error(const char *msg) { -#if defined(RPC_NO_WINDOWS_H) && defined(_WINDOWS) - if (!graphics_started) - { - MessageBoxA(vid.WndParent, msg, "Dr. Robotnik's Ring Racers Warning", MB_OK); - return; - } -#endif CONS_Printf("\x82%s", msg); // write error msg in different colour CONS_Printf(M_GetText("Press ENTER to continue\n")); diff --git a/src/d_main.c b/src/d_main.c index d6dcfbcab..0fc8fc60c 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -85,10 +85,6 @@ #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 @@ -714,11 +710,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 - I_UpdateTime(cv_timescale.value); oldentertics = I_GetTime(); @@ -1258,9 +1249,7 @@ void D_SRB2Main(void) #endif // for dedicated server -#if !defined (_WINDOWS) //already check in win_main.c dedicated = M_CheckParm("-dedicated") != 0; -#endif if (devparm) CONS_Printf(M_GetText("Development mode ON.\n")); diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 08937cd53..56e78a1a5 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -4708,8 +4708,6 @@ static void Command_Version_f(void) // Base library #if defined( HAVE_SDL) CONS_Printf("SDL "); -#elif defined(_WINDOWS) - CONS_Printf("DD "); #endif // OS diff --git a/src/d_netfil.c b/src/d_netfil.c index 7add20feb..3de3a0030 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -15,7 +15,7 @@ #include -#if defined (_WIN32) || defined (__DJGPP__) +#ifdef _WIN32 #include #include #else @@ -30,10 +30,6 @@ #elif defined (_WIN32) #include #endif -#ifdef __DJGPP__ -#include -#include -#endif #ifdef HAVE_CURL #include "curl/curl.h" diff --git a/src/doomdef.h b/src/doomdef.h index d7c77588f..8ba2689ad 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -55,12 +55,6 @@ #endif #endif -#ifdef _WINDOWS -#if !defined (HWRENDER) && !defined (NOHW) -#define HWRENDER -#endif -#endif - #ifdef _WIN32 #define ASMCALL __cdecl #else @@ -99,7 +93,7 @@ #include #include -#if defined (_WIN32) || defined (__DJGPP__) +#ifdef _WIN32 #include #endif diff --git a/src/doomtype.h b/src/doomtype.h index 5d14fceae..4aabab8b0 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -54,17 +54,6 @@ typedef long ssize_t; #define PDWORD_PTR PDWORD #endif #endif -#elif defined (__DJGPP__) -#define UINT8 unsigned char -#define SINT8 signed char - -#define UINT16 unsigned short int -#define INT16 signed short int - -#define INT32 signed long -#define UINT32 unsigned long -#define INT64 signed long long -#define UINT64 unsigned long long #else #define __STDC_LIMIT_MACROS #include diff --git a/src/hardware/hw_dll.h b/src/hardware/hw_dll.h index d22c8c312..80ff590b5 100644 --- a/src/hardware/hw_dll.h +++ b/src/hardware/hw_dll.h @@ -20,18 +20,10 @@ // __declspec(dllexport) type> (WINAPI *) (); #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 @@ -56,9 +48,7 @@ void GL_DBG_Printf(const char *format, ...) /*FUNCPRINTF*/; -#ifdef _WINDOWS -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); -#elif defined (__CYGWIN__) +#ifdef __CYGWIN__ void _init() __attribute__((constructor)); void _fini() __attribute__((destructor)); #else diff --git a/src/hardware/hw_drv.h b/src/hardware/hw_drv.h index 808afd701..7e808ef58 100644 --- a/src/hardware/hw_drv.h +++ b/src/hardware/hw_drv.h @@ -29,9 +29,6 @@ EXPORT boolean HWRAPI(Init) (void); #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); @@ -104,9 +101,6 @@ struct hwdriver_s CreateModelVBOs pfnCreateModelVBOs; SetTransform pfnSetTransform; GetTextureUsed pfnGetTextureUsed; -#ifdef _WINDOWS - GetModeList pfnGetModeList; -#endif #ifndef HAVE_SDL Shutdown pfnShutdown; #endif diff --git a/src/i_addrinfo.c b/src/i_addrinfo.c index 36633cfa3..e8bff686b 100644 --- a/src/i_addrinfo.c +++ b/src/i_addrinfo.c @@ -20,10 +20,6 @@ #else #include #endif -#elif !defined (__DJGPP__) -#include -#include -#include #endif #include "i_addrinfo.h" diff --git a/src/i_tcp.c b/src/i_tcp.c index 2de24a3a4..d99029b44 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -100,15 +100,6 @@ #endif #endif // USE_WINSOCK -#ifdef __DJGPP__ - #ifdef WATTCP // Alam_GBC: Wattcp may need this - #include - #define strerror strerror_s - #else // wattcp - #include - #endif // libsocket -#endif // djgpp - typedef union { struct sockaddr any; @@ -142,7 +133,7 @@ typedef union #include "doomstat.h" // win32 or djgpp -#if defined (USE_WINSOCK) || defined (__DJGPP__) +#ifdef USE_WINSOCK // winsock stuff (in winsock a socket is not a file) #define ioctl ioctlsocket #define close closesocket @@ -150,15 +141,7 @@ typedef union #include "i_addrinfo.h" -#ifdef __DJGPP__ - -#ifdef WATTCP #define SELECTTEST -#endif - -#else -#define SELECTTEST -#endif #define DEFAULTPORT "5029" @@ -174,8 +157,8 @@ typedef union #define ERRSOCKET (-1) #endif -// define socklen_t in DOS/Windows if it is not already defined -#if (defined (WATTCP) && !defined (__libsocket_socklen_t)) || defined (USE_WINSOCK1) +// define socklen_t in Windows if it is not already defined +#ifdef USE_WINSOCK1 typedef int socklen_t; #endif @@ -208,18 +191,6 @@ static boolean init_tcp_driver = false; static const char *serverport_name = DEFAULTPORT; static const char *clientport_name;/* any port */ -#ifdef WATTCP -static void wattcp_outch(char s) -{ - static char old = '\0'; - char pr[2] = {s,0}; - if (s == old && old == ' ') return; - else old = s; - if (s == '\r') CONS_Printf("\n"); - else if (s != '\n') CONS_Printf(pr); -} -#endif - #ifdef USE_WINSOCK // stupid microsoft makes things complicated static char *get_WSAErrorStr(int e) @@ -820,11 +791,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen int opt; socklen_t opts; #ifdef FIONBIO -#ifdef WATTCP - char trueval = true; -#else unsigned long trueval = true; -#endif #endif mysockaddr_t straddr; struct sockaddr_in sin; @@ -1192,61 +1159,7 @@ boolean I_InitTcpDriver(void) CONS_Debug(DBG_NETPLAY, "WinSock description: %s\n",WSAData.szDescription); CONS_Debug(DBG_NETPLAY, "WinSock System Status: %s\n",WSAData.szSystemStatus); #endif -#ifdef __DJGPP__ -#ifdef WATTCP // Alam_GBC: survive bootp, dhcp, rarp and wattcp/pktdrv from failing to load - survive_eth = 1; // would be needed to not exit if pkt_eth_init() fails - survive_bootp = 1; // ditto for BOOTP - survive_dhcp = 1; // ditto for DHCP/RARP - survive_rarp = 1; - //_watt_do_exit = false; - //_watt_handle_cbreak = false; - //_watt_no_config = true; - _outch = wattcp_outch; - init_misc(); -//#ifdef DEBUGFILE - dbug_init(); -//#endif - switch (sock_init()) - { - case 0: - init_tcp_driver = true; - break; - case 3: - CONS_Debug(DBG_NETPLAY, "No packet driver detected\n"); - break; - case 4: - CONS_Debug(DBG_NETPLAY, "Error while talking to packet driver\n"); - break; - case 5: - CONS_Debug(DBG_NETPLAY, "BOOTP failed\n"); - break; - case 6: - CONS_Debug(DBG_NETPLAY, "DHCP failed\n"); - break; - case 7: - CONS_Debug(DBG_NETPLAY, "RARP failed\n"); - break; - case 8: - CONS_Debug(DBG_NETPLAY, "TCP/IP failed\n"); - break; - case 9: - CONS_Debug(DBG_NETPLAY, "PPPoE login/discovery failed\n"); - break; - default: - CONS_Debug(DBG_NETPLAY, "Unknown error with TCP/IP stack\n"); - break; - } - hires_timer(0); -#else // wattcp - if (__lsck_init()) - init_tcp_driver = true; - else - CONS_Debug(DBG_NETPLAY, "No TCP/IP driver detected\n"); -#endif // libsocket -#endif // __DJGPP__ -#ifndef __DJGPP__ init_tcp_driver = true; -#endif } if (!tcp_was_up && init_tcp_driver) { @@ -1269,10 +1182,8 @@ static void SOCK_CloseSocket(void) if (mysockets[i] != (SOCKET_TYPE)ERRSOCKET && FD_ISSET(mysockets[i], &masterset)) { -#if !defined (__DJGPP__) || defined (WATTCP) FD_CLR(mysockets[i], &masterset); close(mysockets[i]); -#endif } mysockets[i] = ERRSOCKET; } @@ -1287,14 +1198,6 @@ void I_ShutdownTcpDriver(void) WS_addrinfocleanup(); WSACleanup(); #endif -#ifdef __DJGPP__ -#ifdef WATTCP // wattcp - //_outch = NULL; - sock_exit(); -#else - __lsck_uninit(); -#endif // libsocket -#endif // __DJGPP__ CONS_Printf("shut down\n"); init_tcp_driver = false; } diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 2fceb77c8..144bc4525 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -4581,16 +4581,8 @@ void M_VideoModeMenu(INT32 choice) optionsmenu.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 && optionsmenu.vidm_nummodes < MAXMODEDESCS; i++) { desc = VID_GetModeName(i); diff --git a/src/m_fixed.h b/src/m_fixed.h index 021f84d89..fd8e79b94 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -77,7 +77,7 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FloatToFixed(float f) value [eax] \ modify exact [eax edx] #elif defined (__GNUC__) && defined (__i386__) && !defined (NOASM) - // DJGPP, i386 linux, cygwin or mingw + // i386 linux, cygwin or mingw FUNCMATH FUNCINLINE static inline fixed_t FixedMul(fixed_t a, fixed_t b) // asm { fixed_t ret; diff --git a/src/m_misc.c b/src/m_misc.c index 0628ef3b6..d64c620df 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -72,8 +72,6 @@ typedef off_t off64_t; #else #define PRIdS "u" #endif -#elif defined (DJGPP) -#define PRIdS "u" #else #define PRIdS "zu" #endif @@ -930,8 +928,6 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png char interfacetxt[] = #ifdef HAVE_SDL "SDL"; -#elif defined (_WINDOWS) - "DirectX"; #else "Unknown"; #endif diff --git a/src/s_sound.c b/src/s_sound.c index 12e35e5c5..c1255e69e 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -62,15 +62,7 @@ static lumpnum_t S_GetMusicLumpNum(const char *mname); static boolean S_CheckQueue(void); -#if defined (_WINDOWS) && !defined (SURROUND) //&& defined (_X86_) -#define SURROUND -#endif - -#ifdef _WINDOWS -consvar_t cv_samplerate = CVAR_INIT ("samplerate", "44100", 0, CV_Unsigned, NULL); //Alam: For easy hacking? -#else consvar_t cv_samplerate = CVAR_INIT ("samplerate", "22050", 0, CV_Unsigned, NULL); //Alam: For easy hacking? -#endif // stereo reverse consvar_t stereoreverse = CVAR_INIT ("stereoreverse", "Off", CV_SAVE, CV_OnOff, NULL); @@ -996,11 +988,9 @@ void S_SetSfxVolume(INT32 volume) void S_ClearSfx(void) { -#ifndef DJGPPDOS size_t i; for (i = 1; i < NUMSFX; i++) I_FreeSfx(S_sfx + i); -#endif } static void S_StopChannel(INT32 cnum)