diff --git a/Descent3/BOA.cpp b/Descent3/BOA.cpp index 8a45d307..e3671d72 100644 --- a/Descent3/BOA.cpp +++ b/Descent3/BOA.cpp @@ -131,7 +131,6 @@ #include "room.h" #include #include -#include #include "object.h" #include "bsp.h" #include "pserror.h" diff --git a/Descent3/TerrainSearch.cpp b/Descent3/TerrainSearch.cpp index 9d6ae70f..c79540f3 100644 --- a/Descent3/TerrainSearch.cpp +++ b/Descent3/TerrainSearch.cpp @@ -227,7 +227,6 @@ #include "gameloop.h" #include #include -#include #include "config.h" #include "dedicated_server.h" diff --git a/Descent3/dedicated_server.cpp b/Descent3/dedicated_server.cpp index 54376273..844cf430 100644 --- a/Descent3/dedicated_server.cpp +++ b/Descent3/dedicated_server.cpp @@ -786,11 +786,8 @@ void PrintDedicatedMessage(const char *fmt, ...) { #ifdef __LINUX__ #include #include -#include -#include #include #include -#include #include #include #include diff --git a/Descent3/levelgoal.h b/Descent3/levelgoal.h index f56da645..2ad0a97e 100644 --- a/Descent3/levelgoal.h +++ b/Descent3/levelgoal.h @@ -21,11 +21,7 @@ #include "object.h" #include "cfile.h" -#if defined(MACOSX) -#include -#else -#include -#endif +#include #include "mem.h" #include "levelgoal_external.h" diff --git a/Descent3/loki_utils.c b/Descent3/loki_utils.c index c059a191..cee806f9 100644 --- a/Descent3/loki_utils.c +++ b/Descent3/loki_utils.c @@ -18,18 +18,11 @@ #include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#if defined(MACOSX) #include +#endif #include "SDL.h" diff --git a/dd_lnxsound/sdlsound.cpp b/dd_lnxsound/sdlsound.cpp index ca769785..40866f1e 100644 --- a/dd_lnxsound/sdlsound.cpp +++ b/dd_lnxsound/sdlsound.cpp @@ -23,11 +23,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include "cfile.h" diff --git a/dd_sndlib/ddsoundload.cpp b/dd_sndlib/ddsoundload.cpp index 40c14245..1657d07c 100644 --- a/dd_sndlib/ddsoundload.cpp +++ b/dd_sndlib/ddsoundload.cpp @@ -96,11 +96,7 @@ #endif #include "ssl_lib.h" -#if defined(MACOSX) -#include -#else -#include -#endif +#include #include "cfile.h" #include "mem.h" #include "pserror.h" diff --git a/ddebug/lnxmono.cpp b/ddebug/lnxmono.cpp index 0a0b4063..4f561b5d 100644 --- a/ddebug/lnxmono.cpp +++ b/ddebug/lnxmono.cpp @@ -84,7 +84,6 @@ bool Debug_print_block = false; // pthread library functions // =============================== #include -#include #include diff --git a/ddio_lnx/CMakeLists.txt b/ddio_lnx/CMakeLists.txt index 5ce7c131..f8035f7b 100644 --- a/ddio_lnx/CMakeLists.txt +++ b/ddio_lnx/CMakeLists.txt @@ -8,7 +8,6 @@ set(CPPS lnxkey_null.cpp lnxmouse.cpp lnxtimer.cpp - lnxkey_raw.cpp lnxcdrom.cpp lnxkey_sdl.cpp) diff --git a/ddio_lnx/ddio_lnx.h b/ddio_lnx/ddio_lnx.h index 8bfea601..d8c80dd3 100644 --- a/ddio_lnx/ddio_lnx.h +++ b/ddio_lnx/ddio_lnx.h @@ -29,43 +29,4 @@ class oeLnxApplication; extern oeLnxApplication *Lnx_app_obj; -/* -typedef struct dinput_data { - oeWin32Application *app; - HWND hwnd; - LPDIRECTINPUT lpdi; - - LPDIRECTINPUTDEVICE lpkeydev; - HHOOK hkeyhook; - BOOL key_acquired; - bool preemptive; - - LPDIRECTINPUTDEVICE lpmsedev; - HHOOK hmsehook; - BOOL mse_acquired; - int num_mse_buttons; - int num_mse_axes; -} dinput_data; - -extern dinput_data DInputData; -extern bool DDIO_init; -extern bool DDIO_preemptive; - - -// Internal functions -// thread handlers -// -keyboard - -bool ddio_JoyHandler(); -void ddio_DebugMessage(unsigned err, char *fmt, ...); -float ddio_TickToSeconds(unsigned int ticks); - -void ddio_KeyHandler(MSG *msg); -void ddio_MouseHandler(MSG *msg); - -#define DDIO_MESSAGE(_m) ddio_DebugMessage _m - -#define MAKE_DDIO_TIME(_ms) ddio_TickToSeconds(_ms) - -*/ #endif diff --git a/ddio_lnx/lnxcdrom.cpp b/ddio_lnx/lnxcdrom.cpp index 79e31cff..d7380618 100644 --- a/ddio_lnx/lnxcdrom.cpp +++ b/ddio_lnx/lnxcdrom.cpp @@ -86,7 +86,6 @@ * $NoKeywords: $ */ -#include #include #include #include diff --git a/ddio_lnx/lnxfile.cpp b/ddio_lnx/lnxfile.cpp index 64aa9d47..d36a97dd 100644 --- a/ddio_lnx/lnxfile.cpp +++ b/ddio_lnx/lnxfile.cpp @@ -511,98 +511,6 @@ void ddio_FindFileClose() { #endif } -glob_t fdres = {0, NULL, 0}; -int globdirindex = -1; -bool ddio_FindDirStart(const char *wildcard, char *namebuf) { - ASSERT(wildcard); - ASSERT(namebuf); - if (globdirindex != -1) - ddio_FindDirClose(); - int rc, flags; - flags = GLOB_MARK; // put a / to the end of directories, making it easier to find em - rc = glob(wildcard, flags, globerrfn, &fdres); - if (rc == GLOB_NOSPACE) { - mprintf((0, "Out of space during glob\n")); - namebuf[0] = '\0'; - globdirindex = -1; - return false; - } - - if (!fdres.gl_pathc) { - namebuf[0] = '\0'; - globdirindex = -1; - return false; - } - - globdirindex = 0; - int glpathlen = strlen(fdres.gl_pathv[0]); - - if (fdres.gl_pathv[0][glpathlen - 1] == '/') { - // return only the last directory - fdres.gl_pathv[0][glpathlen - 1] = '\0'; // lose the ending '/' - char *endptr = &fdres.gl_pathv[0][glpathlen - 1]; - while (endptr >= fdres.gl_pathv[0] && *endptr != '/') - endptr--; - if (*endptr == '/') { - strcpy(namebuf, endptr + 1); - } else { - strcpy(namebuf, fdres.gl_pathv[0]); - } - return true; - } else { - return ddio_FindNextDir(namebuf); - } - - namebuf[0] = '\0'; - return false; -} - -bool ddio_FindNextDir(char *namebuf) { - ASSERT(namebuf); - if (globdirindex == -1) - return false; - globdirindex++; - if (globdirindex >= fdres.gl_pathc) - return false; - - bool done = false; - bool found = false; - - while (!done) { - if (globdirindex >= fdres.gl_pathc) { - namebuf[0] = '\0'; - done = true; - continue; - } - int glpathlen = strlen(fdres.gl_pathv[globdirindex]); - if (fdres.gl_pathv[globdirindex][glpathlen - 1] == '/') { - // return only the last directory - fdres.gl_pathv[globdirindex][glpathlen - 1] = '\0'; // lose the ending '/' - char *endptr = &fdres.gl_pathv[globdirindex][glpathlen - 1]; - while (endptr >= fdres.gl_pathv[globdirindex] && *endptr != '/') - endptr--; - if (*endptr == '/') { - strcpy(namebuf, endptr + 1); - } else { - strcpy(namebuf, fdres.gl_pathv[globdirindex]); - } - done = true; - found = true; - } else { - globdirindex++; - } - } - - return found; -} - -void ddio_FindDirClose() { - if (globdirindex == -1) - return; - globdirindex = -1; - globfree(&fdres); -} - // pass in a pathname (could be from ddio_SplitPath), root_path will have the drive name. void ddio_GetRootFromPath(const char *srcPath, char *root_path) { assert(root_path); diff --git a/ddio_lnx/lnxkey.cpp b/ddio_lnx/lnxkey.cpp index f1f80a07..f9a4f451 100644 --- a/ddio_lnx/lnxkey.cpp +++ b/ddio_lnx/lnxkey.cpp @@ -56,21 +56,12 @@ #include "application.h" #include #include -#include -#include -#include #include -#include -// #include -// #include #include #include -// #include -#include #include #include #include -// #include volatile struct tLnxKeys { union { @@ -84,17 +75,6 @@ volatile struct tLnxKeys { bool status; } LKeys[DDIO_MAX_KEYS]; -// normal mode ddio -bool ddio_normal_InternalKeyInit(ddio_init_info *init_info); -void ddio_normal_InternalKeyClose(); -bool ddio_normal_InternalKeyState(ubyte key); -void ddio_normal_InternalKeySuspend(); -void ddio_normal_InternalKeyResume(); -float ddio_normal_InternalKeyDownTime(ubyte key); -void ddio_normal_InternalResetKey(ubyte key); -bool ddio_normal_KeyFrame(); -void ddio_normal_InternalKeyFrame(void); - // null mode ddio bool ddio_null_InternalKeyInit(ddio_init_info *init_info); void ddio_null_InternalKeyClose(); @@ -117,31 +97,7 @@ void ddio_sdl_InternalResetKey(ubyte key); bool ddio_sdl_KeyFrame(); void ddio_sdl_InternalKeyFrame(void); -/* -//xwin mode ddio -bool ddio_xwin_InternalKeyInit(ddio_init_info *init_info); -void ddio_xwin_InternalKeyClose(); -bool ddio_xwin_InternalKeyState(ubyte key); -void ddio_xwin_InternalKeySuspend(); -void ddio_xwin_InternalKeyResume(); -float ddio_xwin_InternalKeyDownTime(ubyte key); -void ddio_xwin_InternalResetKey(ubyte key); -void ddio_xwin_InternalKeyFrame(void); - -//svga mode ddio -bool ddio_svga_InternalKeyInit(ddio_init_info *init_info); -void ddio_svga_InternalKeyClose(); -bool ddio_svga_InternalKeyState(ubyte key); -void ddio_svga_InternalKeySuspend(); -void ddio_svga_InternalKeyResume(); -float ddio_svga_InternalKeyDownTime(ubyte key); -void ddio_svga_InternalResetKey(ubyte key); -bool ddio_svga_KeyFrame(); -void ddio_svga_InternalKeyFrame(void); -*/ - enum { - Input_normal, Input_null, Input_sdl // Input_svga,Input_xwin } Keyboard_mode; @@ -160,38 +116,14 @@ bool ddio_InternalKeyInit(ddio_init_info *init_info) { app->get_info(&app_info); - // determine if we are to use normal or null mode - Keyboard_mode = Input_normal; - if (app_info.flags & APPFLAG_USESERVICE) { - // use null mode! - Keyboard_mode = Input_null; - } else { - Keyboard_mode = Input_sdl; - /* - if(app_info.flags&APPFLAG_USESVGA) - { - //use svgalib mode! - Keyboard_mode = Input_svga; - } - else if (app_info.m_Display) { - // we're under xwindows and we're not forcing any type of keyboard input. - Keyboard_mode = Input_xwin; - } - */ - } + // determine if we are to use SDL or null mode + Keyboard_mode = (app_info.flags & APPFLAG_USESERVICE) ? Input_null : Input_sdl; switch (Keyboard_mode) { - case Input_normal: - return ddio_normal_InternalKeyInit(init_info); case Input_null: return ddio_null_InternalKeyInit(init_info); case Input_sdl: return ddio_sdl_InternalKeyInit(init_info); - - // case Input_svga: - // return ddio_svga_InternalKeyInit(init_info); - // case Input_xwin: - // return ddio_xwin_InternalKeyInit(init_info); } return false; @@ -199,35 +131,19 @@ bool ddio_InternalKeyInit(ddio_init_info *init_info) { void ddio_InternalKeyClose() { switch (Keyboard_mode) { - case Input_normal: - return ddio_normal_InternalKeyClose(); case Input_null: return ddio_null_InternalKeyClose(); case Input_sdl: return ddio_sdl_InternalKeyClose(); - /* - case Input_svga: - return ddio_svga_InternalKeyClose(); - case Input_xwin: - return ddio_xwin_InternalKeyClose(); - */ } } bool ddio_InternalKeyState(ubyte key) { switch (Keyboard_mode) { - case Input_normal: - return ddio_normal_InternalKeyState(key); case Input_null: return ddio_null_InternalKeyState(key); case Input_sdl: return ddio_sdl_InternalKeyState(key); - /* - case Input_svga: - return ddio_svga_InternalKeyState(key); - case Input_xwin: - return ddio_xwin_InternalKeyState(key); - */ } return false; @@ -235,62 +151,30 @@ bool ddio_InternalKeyState(ubyte key) { void ddio_InternalKeySuspend() { switch (Keyboard_mode) { - case Input_normal: - ddio_normal_InternalKeySuspend(); - break; case Input_null: ddio_null_InternalKeySuspend(); break; case Input_sdl: return ddio_sdl_InternalKeySuspend(); - - /* - case Input_svga: - ddio_svga_InternalKeySuspend(); - break; - case Input_xwin: - ddio_xwin_InternalKeySuspend(); - break; - */ } } void ddio_InternalKeyResume() { switch (Keyboard_mode) { - case Input_normal: - ddio_normal_InternalKeyResume(); - break; case Input_null: ddio_null_InternalKeyResume(); break; case Input_sdl: return ddio_sdl_InternalKeyResume(); - - /* - case Input_svga: - ddio_svga_InternalKeyResume(); - break; - case Input_xwin: - ddio_xwin_InternalKeyResume(); - break; - */ } } float ddio_InternalKeyDownTime(ubyte key) { switch (Keyboard_mode) { - case Input_normal: - return ddio_normal_InternalKeyDownTime(key); case Input_null: return ddio_null_InternalKeyDownTime(key); case Input_sdl: return ddio_sdl_InternalKeyDownTime(key); - /* - case Input_svga: - return ddio_svga_InternalKeyDownTime(key); - case Input_xwin: - return ddio_xwin_InternalKeyDownTime(key); - */ } return 0.0f; @@ -298,22 +182,11 @@ float ddio_InternalKeyDownTime(ubyte key) { void ddio_InternalResetKey(ubyte key) { switch (Keyboard_mode) { - case Input_normal: - ddio_normal_InternalResetKey(key); - break; case Input_null: ddio_null_InternalResetKey(key); break; case Input_sdl: return ddio_sdl_InternalResetKey(key); - /* - case Input_svga: - ddio_svga_InternalResetKey(key); - break; - case Input_xwin: - ddio_xwin_InternalResetKey(key); - break; - */ } } @@ -321,14 +194,8 @@ bool ddio_KeyFrame() { switch (Keyboard_mode) { case Input_sdl: break; - case Input_normal: - return ddio_normal_KeyFrame(); case Input_null: return ddio_null_KeyFrame(); - /* - case Input_svga: - return ddio_svga_KeyFrame(); - */ } return true; @@ -336,22 +203,11 @@ bool ddio_KeyFrame() { void ddio_InternalKeyFrame(void) { switch (Keyboard_mode) { - case Input_normal: - ddio_normal_InternalKeyFrame(); - break; case Input_null: ddio_null_InternalKeyFrame(); break; case Input_sdl: return ddio_sdl_InternalKeyFrame(); - /* - case Input_svga: - ddio_svga_InternalKeyFrame(); - break; - case Input_xwin: - ddio_xwin_InternalKeyFrame(); - break; - */ } } diff --git a/ddio_lnx/lnxkey_null.cpp b/ddio_lnx/lnxkey_null.cpp index 4c83a033..75a9fa9f 100644 --- a/ddio_lnx/lnxkey_null.cpp +++ b/ddio_lnx/lnxkey_null.cpp @@ -46,20 +46,11 @@ #include #include #include -#include -#include -#include #include -#include #include #include -#include #include #include -// #include -// #include -// #include -// #include extern volatile struct tLnxKeys { union { diff --git a/ddio_lnx/lnxkey_raw.cpp b/ddio_lnx/lnxkey_raw.cpp deleted file mode 100644 index f4146d4d..00000000 --- a/ddio_lnx/lnxkey_raw.cpp +++ /dev/null @@ -1,354 +0,0 @@ -/* -* Descent 3 -* Copyright (C) 2024 Parallax Software -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -/* - * $Logfile: /DescentIII/Main/ddio_lnx/lnxkey_raw.cpp $ - * $Revision: 1.2 $ - * $Date: 2004/02/25 00:04:06 $ - * $Author: ryan $ - * - * Linux stdin/stdout routines - * - * $Log: lnxkey_raw.cpp,v $ - * Revision 1.2 2004/02/25 00:04:06 ryan - * Removed loki_utils dependency and ported to MacOS X (runs, but incomplete). - * - * Revision 1.1.1.1 2000/04/18 00:00:33 icculus - * initial checkin - * - * - * 7 7/19/99 12:53p Jeff - * put in hacks for enter and backspace keys - * - * 6 7/14/99 9:06p Jeff - * added comment header - * - * $NoKeywords: $ - */ - -// Keyboard handler for SVGAlib - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// #include -#include -#include -#include -#include -// #include -#include -#include - -#include "ddio_common.h" -#include "ddio.h" -#include "mono.h" - -// ########################################################## -// raw Interface Functions -// ########################################################## -void ddio_raw_EmergencyQuit(int id); -void ddio_raw_InternalKeyInit(void); -void ddio_raw_KeyBoardEventHandler(int scancode, int press); -static int ddio_raw_TransKey(int scancode); -void ddio_raw_DoKeyFrame(void); -void ddio_raw_InternalClose(void); -void init_keyboard(); -void close_keyboard(); -int kbhit(); -int readch(); -// ########################################################## - -extern volatile struct tLnxKeys { - union { - int up_ticks; - float up_time; - }; - union { - int down_ticks; - float down_time; - }; - bool status; -} LKeys[DDIO_MAX_KEYS]; -bool DDIO_key_suspend = false; - -bool ddio_normal_InternalKeyInit(ddio_init_info *init_info) { - static bool first_call = true; - // reset key list - for (int i = 0; i < DDIO_MAX_KEYS; i++) { - LKeys[i].down_ticks = 0; - LKeys[i].up_ticks = 0; - LKeys[i].status = false; - } - DDIO_key_suspend = false; - - ddio_raw_InternalKeyInit(); - - if (first_call) { - atexit(ddio_InternalKeyClose); - first_call = false; - } - - return true; -} - -void ddio_normal_InternalKeyClose() { ddio_raw_InternalClose(); } - -// ddio_KeyFrame -// handle input of keyboard per frame. -bool ddio_normal_KeyFrame(void) { - ddio_raw_DoKeyFrame(); - return true; -} - -void ddio_normal_InternalKeyFrame(void) { - ddio_KeyFrame(); // which gets called? -} - -bool ddio_normal_InternalKeyState(ubyte key) { return LKeys[key].status; } - -void ddio_normal_InternalKeySuspend() { DDIO_key_suspend = true; } - -void ddio_normal_InternalKeyResume() { DDIO_key_suspend = false; } - -float ddio_normal_InternalKeyDownTime(ubyte key) { - float down_time = 0.0f; - if (LKeys[key].status) { - float timer = timer_GetTime(); - down_time = timer - LKeys[key].down_time; - LKeys[key].down_time = timer; - } else { - down_time = LKeys[key].up_time - LKeys[key].down_time; - LKeys[key].down_time = LKeys[key].up_time = 0.0f; - } - - return down_time; -} - -void ddio_normal_InternalResetKey(ubyte key) { - LKeys[key].down_time = 0.0f; - LKeys[key].up_time = 0.0f; - LKeys[key].status = false; -} - -// ################################################# -// raw Interface Functions -// ################################################# -void (*kb_event_handler)(int scancode, int press); -void ddio_raw_InternalKeyInit(void) { - static bool first_time = true; - - if (!first_time) { - return; - } - first_time = false; - - struct sigaction sact; - sact.sa_handler = ddio_raw_EmergencyQuit; - sigfillset(&sact.sa_mask); - sact.sa_flags = 0; - sigaction(SIGINT, &sact, NULL); - - init_keyboard(); - kb_event_handler = ddio_raw_KeyBoardEventHandler; -} - -void ddio_raw_InternalClose(void) { - static bool first_time = true; - - if (first_time) { - close_keyboard(); - first_time = false; - } -} - -void ddio_raw_EmergencyQuit(int id) { - ddio_raw_InternalClose(); - // somehow we need to signal quit here - exit(-1); -} - -void ddio_raw_KeyBoardEventHandler(int scancode, int press) { - int transkey; - - switch (scancode) { - case 10: // enter key hack - transkey = KEY_ENTER; - break; - case 127: // backspace key hack - transkey = KEY_BACKSP; - break; - default: - transkey = ddio_AsciiToKey(scancode); - break; - } - - float key_time = timer_GetTime(); - - if (transkey & KEY_SHIFTED) { - transkey &= ~KEY_SHIFTED; - if (press == 1) { - LKeys[KEY_LSHIFT].status = 1; - LKeys[KEY_LSHIFT].down_time = key_time; - ddio_UpdateKeyState(KEY_LSHIFT, true); - } - if (press == 0) { - LKeys[KEY_LSHIFT].status = 0; - LKeys[KEY_LSHIFT].up_time = key_time; - ddio_UpdateKeyState(KEY_LSHIFT, false); - } - } - if (transkey & KEY_ALTED) { - transkey &= ~KEY_ALTED; - if (press == 1) { - LKeys[KEY_LALT].status = 1; - LKeys[KEY_LALT].down_time = key_time; - ddio_UpdateKeyState(KEY_LALT, true); - } - if (press == 0) { - LKeys[KEY_LALT].status = 0; - LKeys[KEY_LALT].up_time = key_time; - ddio_UpdateKeyState(KEY_LALT, false); - } - } - if (transkey & KEY_CTRLED) { - transkey &= ~KEY_CTRLED; - if (press == 1) { - LKeys[KEY_LCTRL].status = 1; - LKeys[KEY_LCTRL].down_time = key_time; - ddio_UpdateKeyState(KEY_LCTRL, true); - } - if (press == 0) { - LKeys[KEY_LCTRL].status = 0; - LKeys[KEY_LCTRL].up_time = key_time; - ddio_UpdateKeyState(KEY_LCTRL, false); - } - } - - if (press == 1) { - LKeys[transkey].status = 1; - LKeys[transkey].down_time = key_time; - ddio_UpdateKeyState(transkey, true); - } - if (press == 0) { - LKeys[transkey].status = 0; - LKeys[transkey].up_time = key_time; - ddio_UpdateKeyState(transkey, false); - } -} - -void ddio_raw_DoKeyFrame(void) { - // make all down keys up - for (int i = 0; i < DDIO_MAX_KEYS; i++) { - if (LKeys[i].status) { - LKeys[i].status = 0; - LKeys[i].up_time = timer_GetTime(); - ddio_UpdateKeyState(i, false); - } - } - char keyboard_buf; - - if (kbhit()) { - keyboard_buf = readch(); - } else { - return; - } - /* - fd_set rdfd; - int fd = fileno(stdin); - - FD_ZERO(&rdfd); - FD_SET(fd,&rdfd); - if(select(fd+1,&rdfd,NULL,NULL,NULL)<=0){ - return; - } - - mprintf((0,"Reading keys...\n")); - char keyboard_buf[16]; - int n = read(fd,keyboard_buf,sizeof(keyboard_buf)); - if(n==0) - return; - - for(int i=0;i #define MODPROCADDRESS void * #define DLLFUNCEXPORT diff --git a/lib/networking.h b/lib/networking.h index 43b9eedf..ea210080 100644 --- a/lib/networking.h +++ b/lib/networking.h @@ -193,8 +193,6 @@ inline void INADDR_GET_SUN_SUNB(struct in_addr *st, unsigned char *s_b1, unsigne #include #include -#include -#include #include #include #include diff --git a/lib/pserror.h b/lib/pserror.h index ebbe3247..4d58d6a3 100644 --- a/lib/pserror.h +++ b/lib/pserror.h @@ -199,11 +199,7 @@ inline void SetDebugBreakHandlers(void (*stop)(), void (*resume)()) { // Does a DEBUG_BREAK() if debugging is turned on. Also does an mprintf(). // Define the macros #ifndef RELEASE -#if defined(MACOSX) -#include -#else -#include -#endif +#include #if defined(WIN32) #define DEBUG_BREAK() \ do { \ diff --git a/mem/mem.cpp b/mem/mem.cpp index 1f820efc..fa8ebe37 100644 --- a/mem/mem.cpp +++ b/mem/mem.cpp @@ -201,7 +201,6 @@ #include #include #ifdef WIN32 -#include // Non-Linux Includes #include #include diff --git a/model/newstyle.cpp b/model/newstyle.cpp index 48642db8..a4c58e8c 100644 --- a/model/newstyle.cpp +++ b/model/newstyle.cpp @@ -97,7 +97,6 @@ #include "findintersection.h" #include -#include #include #include "psrand.h" diff --git a/module/module.cpp b/module/module.cpp index 8d5a72d7..a733a44d 100644 --- a/module/module.cpp +++ b/module/module.cpp @@ -97,6 +97,8 @@ #include "ddio.h" #ifdef __LINUX__ +#include + bool mod_FindRealFileNameCaseInsenstive(const char *directory, const char *filename, char *new_filename); #endif @@ -493,7 +495,6 @@ int mod_GetLastError(void) { #include #include #include -#include #include void dd_GetWorkingDir(char *path, int len); diff --git a/movie/d3movie.cpp b/movie/d3movie.cpp index 1c844217..e9359447 100644 --- a/movie/d3movie.cpp +++ b/movie/d3movie.cpp @@ -19,7 +19,6 @@ #include #ifdef __LINUX__ -#include #include #include #include diff --git a/netcon/includes/inetgetfile.h b/netcon/includes/inetgetfile.h index b216c880..0b825955 100644 --- a/netcon/includes/inetgetfile.h +++ b/netcon/includes/inetgetfile.h @@ -131,8 +131,6 @@ inline int WSAGetLastError() { return errno; } #endif -#include -// #include /* typedef int (*pthread_create_fp)(pthread_t *__thread,__const pthread_attr_t *__attr,void *(*__start_routine) (void diff --git a/networking/networking.cpp b/networking/networking.cpp index c7b24c45..32040984 100644 --- a/networking/networking.cpp +++ b/networking/networking.cpp @@ -299,11 +299,8 @@ typedef int socklen_t; #include #endif #include -#include -#include #include #include -#include #include #include #include diff --git a/physics/newstyle_fi.cpp b/physics/newstyle_fi.cpp index 8f380d28..41a9337f 100644 --- a/physics/newstyle_fi.cpp +++ b/physics/newstyle_fi.cpp @@ -24,7 +24,6 @@ #include "game.h" #include -#include #include #ifndef NED_PHYSICS #include "multi.h" diff --git a/renderer/lnxscreenmode.cpp b/renderer/lnxscreenmode.cpp index 8297fd9d..47985640 100644 --- a/renderer/lnxscreenmode.cpp +++ b/renderer/lnxscreenmode.cpp @@ -60,7 +60,6 @@ #include #include #include -#include #include "lnxscreenmode.h" #include "pserror.h" #include "args.h" diff --git a/ui/UIGroup.cpp b/ui/UIGroup.cpp index 3539497d..ba144a51 100644 --- a/ui/UIGroup.cpp +++ b/ui/UIGroup.cpp @@ -46,11 +46,7 @@ #include "UIlib.h" #include -#if defined(MACOSX) -#include -#else -#include -#endif +#include #include "mem.h" // ----------------------------------------------------------------------------