From e2ca3d1f84ec4a1221eb99a89ba80823a08c7095 Mon Sep 17 00:00:00 2001 From: dhewg Date: Mon, 2 Jul 2012 23:49:34 +0200 Subject: [PATCH] Get rid of sys_stub.cpp Unused. --- neo/CMakeLists.txt | 1 - neo/sys/stub/sys_stub.cpp | 210 -------------------------------------- 2 files changed, 211 deletions(-) delete mode 100644 neo/sys/stub/sys_stub.cpp diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 69c8e476..ddfb433b 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -631,7 +631,6 @@ set(src_core set(src_stub_openal sys/stub/openal_stub.cpp) set(src_stub_gl sys/stub/stub_gl.cpp) -set(src_stub_sys sys/stub/sys_stub.cpp) set(src_stub_util sys/stub/util_stub.cpp) set(src_sys_dedicated sys/linux/dedicated.cpp) diff --git a/neo/sys/stub/sys_stub.cpp b/neo/sys/stub/sys_stub.cpp deleted file mode 100644 index b8c700fd..00000000 --- a/neo/sys/stub/sys_stub.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* -=========================================================================== - -Doom 3 GPL Source Code -Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. - -This file is part of the Doom 3 GPL Source Code ("Doom 3 Source Code"). - -Doom 3 Source Code 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. - -Doom 3 Source Code 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 Doom 3 Source Code. If not, see . - -In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. - -If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. - -=========================================================================== -*/ -#include "sys/platform.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_OSPATH 256 - -static unsigned int frameNum; - -unsigned int Sys_Milliseconds( void ) { - return frameNum * 16; -} - -void Sys_Sleep( int msec ) { -} - -void Sys_CreateThread( xthread_t function, void *parms, xthreadInfo& info, const char *name ) { -} - -void Sys_DestroyThread( xthreadInfo& info ) { -} - -void Sys_Error( const char *error, ... ) { - va_list argptr; - char text[4096]; - - va_start (argptr, error); - vprintf (error, argptr); - va_end (argptr); - printf( "\n" ); - - exit( 1 ); -} - -void Sys_Quit( void ) { - exit( 0 ); -} - -char *Sys_GetClipboardData( void ) { - return NULL; -} - -void Sys_GenerateEvents( void ) { -} - -void Sys_Init( void ) { -} - -//========================================================== - -idPort clientPort, serverPort; - -void Sys_InitNetworking( void ) { -} - -bool idPort::GetPacket( netadr_t &net_from, void *data int &size, int maxSize ) { - return false; -} -void idPort::SendPacket( const netadr_t to, const void *data, int size ) { -} - -//========================================================== - -//========================================================== - -void _glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { -} - - -void Sys_InitInput( void ) { -} - -void Sys_ShutdownInput( void ) { -} - -sysEvent_t Sys_GetEvent( void ) { - sysEvent_t ev; - - memset( &ev, 0, sizeof( ev ) ); - ev.evType = SE_NONE; - ev.evTime = Sys_Milliseconds(); - return ev; -} - -void Sys_Mkdir( const char *path ) { -} - -const char *Sys_DefaultBasePath(void) { - return ""; -} - -int Sys_ListFiles( const char *directory, const char *extension, idStrList &list ) -{ - struct dirent *d; - DIR *fdir; - bool dironly = false; - char search[MAX_OSPATH]; - int i; - struct stat st; - - list.Clear(); - - if ( !extension) - extension = ""; - - if ( extension[0] == '/' && extension[1] == 0 ) { - extension = ""; - dironly = true; - } - - // search - if ((fdir = opendir(directory)) == NULL) { - return 0; - } - - while ((d = readdir(fdir)) != NULL) { - idStr::snprintf( search, sizeof(search), "%s/%s", directory, d->d_name ); - if (stat(search, &st) == -1) - continue; - if (!dironly) { - idStr look(search); - idStr ext; - look.ExtractFileExtension( ext ); - if ( extension && extension[0] && ext.Icmp( &extension[1] ) != 0 ) { - continue; - } - } - if ((dironly && !(st.st_mode & S_IFDIR)) || - (!dironly && (st.st_mode & S_IFDIR))) - continue; - - list.Append( d->d_name ); - } - - closedir(fdir); - - return list.Num(); -} - -void Sys_GrabMouseCursor( bool grabIt ) { -} - -bool Sys_StringToNetAdr( const char *s, netadr_t *a ) { - return false; -} - -const char *Sys_NetAdrToString( const netadr_t a ) { - static char s[64]; - - if ( a.type == NA_LOOPBACK ) { - idStr::snPrintf( s, sizeof(s), "localhost" ); - } else if ( a.type == NA_IP ) { - idStr::snPrintf( s, sizeof(s), "%i.%i.%i.%i:%i", - a.ip[0], a.ip[1], a.ip[2], a.ip[3], BigShort(a.port) ); - } - return s; -} - -int main( int argc, char **argv ) { - // combine the args into a windows-style command line - char cmdline[4096]; - cmdline[0] = 0; - for ( int i = 1 ; i < argc ; i++ ) { - strcat( cmdline, argv[i] ); - if ( i < argc - 1 ) { - strcat( cmdline, " " ); - } - } - common->Init( cmdline ); - - while( 1 ) { - common->Async(); - common->Frame(); - frameNum++; - } -}