From 425decdf7e9284d15aa726e3ae96b9942fb0e3ea Mon Sep 17 00:00:00 2001 From: IronClawTrem Date: Sun, 16 Feb 2020 03:40:06 +0000 Subject: create tremded branch --- src/null/null_client.cpp | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ src/null/null_glimp.cpp | 63 ++++++++++++++++++++++++++++++++ src/null/null_input.cpp | 37 +++++++++++++++++++ src/null/null_main.cpp | 83 ++++++++++++++++++++++++++++++++++++++++++ src/null/null_net.cpp | 55 ++++++++++++++++++++++++++++ src/null/null_snddma.cpp | 62 +++++++++++++++++++++++++++++++ 6 files changed, 395 insertions(+) create mode 100644 src/null/null_client.cpp create mode 100644 src/null/null_glimp.cpp create mode 100644 src/null/null_input.cpp create mode 100644 src/null/null_main.cpp create mode 100644 src/null/null_net.cpp create mode 100644 src/null/null_snddma.cpp (limited to 'src/null') diff --git a/src/null/null_client.cpp b/src/null/null_client.cpp new file mode 100644 index 0000000..697780e --- /dev/null +++ b/src/null/null_client.cpp @@ -0,0 +1,95 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2013 Darklegion Development +Copyright (C) 2015-2019 GrangerHub + +This file is part of Tremulous. + +Tremulous 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. + +Tremulous 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 Tremulous; if not, see + +=========================================================================== +*/ + +#include "qcommon/cvar.h" +#include "qcommon/msg.h" +#include "qcommon/net.h" +#include "qcommon/q_shared.h" +#include "qcommon/qcommon.h" + +cvar_t *cl_shownet; + +void CL_Shutdown(const char *finalmsg, bool disconnect, bool quit) +{ +} + +void CL_Init( void ) { + cl_shownet = Cvar_Get ("cl_shownet", "0", CVAR_TEMP ); +} + +void CL_MouseEvent( int dx, int dy, int time ) { +} + +void Key_WriteBindings( fileHandle_t f ) { +} + +void CL_Frame ( int msec ) { +} + +void CL_PacketEvent( struct netadr_t from, struct msg_t *msg ) { +} + +void CL_CharEvent( int key ) { +} + +void CL_Disconnect( bool showMainMenu ) { +} + +void CL_MapLoading( void ) { +} + +bool CL_GameCommand( void ) { + return false; +} + +void CL_KeyEvent (int key, bool down, unsigned time) { +} + +bool UI_GameCommand( void ) { + return false; +} + +void CL_ForwardCommandToServer( const char *string ) { +} + +void CL_ConsolePrint( const char *txt ) { +} + +void CL_JoystickEvent( int axis, int value, int time ) { +} + +void CL_InitKeyCommands( void ) { +} + +void CL_FlushMemory(void) +{ +} + +void CL_ShutdownAll(bool shutdownRef) +{ +} + +void CL_StartHunkUsers( bool rendererOnly ) +{ +} diff --git a/src/null/null_glimp.cpp b/src/null/null_glimp.cpp new file mode 100644 index 0000000..3f9f602 --- /dev/null +++ b/src/null/null_glimp.cpp @@ -0,0 +1,63 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2013 Darklegion Development +Copyright (C) 2015-2019 GrangerHub + +This file is part of Tremulous. + +Tremulous 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. + +Tremulous 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 Tremulous; if not, see + +=========================================================================== +*/ + +#include "renderercommon/tr_common.h" + +qboolean ( * qwglSwapIntervalEXT)( int interval ); +void ( * qglMultiTexCoord2fARB )( GLenum texture, float s, float t ); +void ( * qglActiveTextureARB )( GLenum texture ); +void ( * qglClientActiveTextureARB )( GLenum texture ); + + +void ( * qglLockArraysEXT)( int, int); +void ( * qglUnlockArraysEXT) ( void ); + + +void GLimp_EndFrame( void ) { +} + +void GLimp_Init( void ) { +} + +void GLimp_Shutdown( void ) { +} + +void GLimp_EnableLogging( qboolean enable ) { +} + +void GLimp_LogComment( const char *comment ) { +} + +qboolean QGL_Init( const char *dllname ) { + return qtrue; +} + +void QGL_Shutdown( void ) { +} + +void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned char blue[256] ) { +} + +void GLimp_Minimize( void ) { +} diff --git a/src/null/null_input.cpp b/src/null/null_input.cpp new file mode 100644 index 0000000..05bfff8 --- /dev/null +++ b/src/null/null_input.cpp @@ -0,0 +1,37 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2013 Darklegion Development +Copyright (C) 2015-2019 GrangerHub + +This file is part of Tremulous. + +Tremulous 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. + +Tremulous 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 Tremulous; if not, see + +=========================================================================== +*/ + +#include "sys/sys_local.h" + +void IN_Init( void ) { +} + +void IN_Frame (void) { +} + +void IN_Shutdown( void ) { +} + +void IN_Restart( void ) { +} diff --git a/src/null/null_main.cpp b/src/null/null_main.cpp new file mode 100644 index 0000000..f30850a --- /dev/null +++ b/src/null/null_main.cpp @@ -0,0 +1,83 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2013 Darklegion Development +Copyright (C) 2015-2019 GrangerHub + +This file is part of Tremulous. + +Tremulous 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. + +Tremulous 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 Tremulous; if not, see + +=========================================================================== +*/ +// null_main.c -- null system driver to aid porting efforts + +#include +#include + +#include "qcommon/qcommon.h" + +int sys_curtime; + + +//=================================================================== + + +void Sys_Error (char *error, ...) { + va_list argptr; + + printf ("Sys_Error: "); + 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; +} + +int Sys_Milliseconds (void) { + return 0; +} + +FILE *Sys_FOpen(const char *ospath, const char *mode) { + return fopen( ospath, mode ); +} + +void Sys_Mkdir (char *path) { +} + +bool Sys_OpenWithDefault( const char *path ) +{ + return false; +} + +void Sys_Init (void) { +} + + +void main (int argc, char **argv) { + Com_Init (argc, argv); + + while (1) { + Com_Frame( ); + } +} diff --git a/src/null/null_net.cpp b/src/null/null_net.cpp new file mode 100644 index 0000000..97b2d9c --- /dev/null +++ b/src/null/null_net.cpp @@ -0,0 +1,55 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2013 Darklegion Development +Copyright (C) 2015-2019 GrangerHub + +This file is part of Tremulous. + +Tremulous 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. + +Tremulous 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 Tremulous; if not, see + +=========================================================================== +*/ + +#include "qcommon/qcommon.h" + +/* +============= +NET_StringToAdr + +localhost +idnewt +idnewt:28000 +192.246.40.70 +192.246.40.70:28000 +============= +*/ +qboolean NET_StringToAdr (char *s, netadr_t *a) +{ + if (!strcmp (s, "localhost")) { + memset (a, 0, sizeof(*a)); + a->type = NA_LOOPBACK; + return true; + } + + return false; +} + +/* +================== +Sys_SendPacket +================== +*/ +void Sys_SendPacket( int length, void *data, netadr_t to ) { +} diff --git a/src/null/null_snddma.cpp b/src/null/null_snddma.cpp new file mode 100644 index 0000000..d77899b --- /dev/null +++ b/src/null/null_snddma.cpp @@ -0,0 +1,62 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2013 Darklegion Development +Copyright (C) 2015-2019 GrangerHub + +This file is part of Tremulous. + +Tremulous 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. + +Tremulous 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 Tremulous; if not, see + +=========================================================================== +*/ + +// snddma_null.c +// all other sound mixing is portable + +#include "qcommon/q_shared.h" +#include "qcommon/qcommon.h" + +bool SNDDMA_Init(void) +{ + return false; +} + +int SNDDMA_GetDMAPos(void) +{ + return 0; +} + +void SNDDMA_Shutdown(void) +{ +} + +void SNDDMA_BeginPainting (void) +{ +} + +void SNDDMA_Submit(void) +{ +} + +sfxHandle_t S_RegisterSound( const char *name, bool compressed ) +{ + return 0; +} + +void S_StartLocalSound( sfxHandle_t sfxHandle, int channelNum ) { +} + +void S_ClearSoundBuffer( void ) { +} -- cgit