summaryrefslogtreecommitdiff
path: root/src/null
diff options
context:
space:
mode:
authorMikko Tiusanen <ams@daug.net>2014-05-04 01:18:52 +0300
committerMikko Tiusanen <ams@daug.net>2014-05-04 01:18:52 +0300
commit01beb9919b95479d8be040bec74abc5cc67a5e43 (patch)
tree65f0b79e793848491832756a4c3a32b23668fab3 /src/null
parent191d731da136b7ee959a17e63111c9146219a768 (diff)
Initial import.
Diffstat (limited to 'src/null')
-rw-r--r--src/null/mac_net.c55
-rw-r--r--src/null/null_client.c93
-rw-r--r--src/null/null_glimp.c57
-rw-r--r--src/null/null_input.c38
-rw-r--r--src/null/null_main.c117
-rw-r--r--src/null/null_net.c54
-rw-r--r--src/null/null_snddma.c61
7 files changed, 475 insertions, 0 deletions
diff --git a/src/null/mac_net.c b/src/null/mac_net.c
new file mode 100644
index 0000000..cca208b
--- /dev/null
+++ b/src/null/mac_net.c
@@ -0,0 +1,55 @@
+/*
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2009 Darklegion Development
+
+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 2 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, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
+
+#include "../qcommon/q_shared.h"
+#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_client.c b/src/null/null_client.c
new file mode 100644
index 0000000..aca1406
--- /dev/null
+++ b/src/null/null_client.c
@@ -0,0 +1,93 @@
+/*
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2009 Darklegion Development
+
+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 2 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, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
+
+#include "../qcommon/q_shared.h"
+#include "../qcommon/qcommon.h"
+
+cvar_t *cl_shownet;
+
+void CL_Shutdown( char *finalmsg ) {
+}
+
+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( netadr_t from, msg_t *msg ) {
+}
+
+void CL_CharEvent( int key ) {
+}
+
+void CL_Disconnect( qboolean showMainMenu ) {
+}
+
+void CL_MapLoading( void ) {
+}
+
+qboolean CL_GameCommand( void ) {
+ return qfalse;
+}
+
+void CL_KeyEvent (int key, qboolean down, unsigned time) {
+}
+
+qboolean UI_GameCommand( void ) {
+ return qfalse;
+}
+
+void CL_ForwardCommandToServer( const char *string ) {
+}
+
+void CL_ConsolePrint( char *txt ) {
+}
+
+void CL_JoystickEvent( int axis, int value, int time ) {
+}
+
+void CL_InitKeyCommands( void ) {
+}
+
+void CL_CDDialog( void ) {
+}
+
+void CL_FlushMemory( void ) {
+}
+
+void CL_StartHunkUsers( qboolean rendererOnly ) {
+}
+
+void CL_Snd_Restart(void)
+{
+}
+
+void CL_ShutdownAll(void) {}
diff --git a/src/null/null_glimp.c b/src/null/null_glimp.c
new file mode 100644
index 0000000..aae34eb
--- /dev/null
+++ b/src/null/null_glimp.c
@@ -0,0 +1,57 @@
+/*
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2009 Darklegion Development
+
+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 2 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, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
+#include "../renderer/tr_local.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 ) {
+}
+
+int GLimp_Init( void )
+{
+}
+
+void GLimp_Shutdown( void ) {
+}
+
+void GLimp_EnableLogging( qboolean enable ) {
+}
+
+void GLimp_LogComment( char *comment ) {
+}
+
+qboolean QGL_Init( const char *dllname ) {
+ return qtrue;
+}
+
+void QGL_Shutdown( void ) {
+}
diff --git a/src/null/null_input.c b/src/null/null_input.c
new file mode 100644
index 0000000..d6cf79a
--- /dev/null
+++ b/src/null/null_input.c
@@ -0,0 +1,38 @@
+/*
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2009 Darklegion Development
+
+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 2 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, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
+
+void IN_Init( void ) {
+}
+
+void IN_Frame (void) {
+}
+
+void IN_Shutdown( void ) {
+}
+
+void IN_Restart( void ) {
+}
+
+void Sys_SendKeyEvents (void) {
+}
+
diff --git a/src/null/null_main.c b/src/null/null_main.c
new file mode 100644
index 0000000..ae77595
--- /dev/null
+++ b/src/null/null_main.c
@@ -0,0 +1,117 @@
+/*
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2009 Darklegion Development
+
+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 2 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, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
+// sys_null.h -- null system driver to aid porting efforts
+
+#include <errno.h>
+#include <stdio.h>
+#include "../qcommon/qcommon.h"
+
+int sys_curtime;
+
+
+//===================================================================
+
+void Sys_BeginStreamedFile( FILE *f, int readAhead ) {
+}
+
+void Sys_EndStreamedFile( FILE *f ) {
+}
+
+int Sys_StreamedRead( void *buffer, int size, int count, FILE *f ) {
+ return fread( buffer, size, count, f );
+}
+
+void Sys_StreamSeek( FILE *f, int offset, int origin ) {
+ fseek( f, offset, origin );
+}
+
+
+//===================================================================
+
+
+void Sys_mkdir ( const char *path ) {
+}
+
+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);
+}
+
+void Sys_UnloadGame (void) {
+}
+
+void *Sys_GetGameAPI (void *parms) {
+ return NULL;
+}
+
+char *Sys_GetClipboardData( void ) {
+ return NULL;
+}
+
+int Sys_Milliseconds (void) {
+ return 0;
+}
+
+void Sys_Mkdir (char *path) {
+}
+
+char *Sys_FindFirst (char *path, unsigned musthave, unsigned canthave) {
+ return NULL;
+}
+
+char *Sys_FindNext (unsigned musthave, unsigned canthave) {
+ return NULL;
+}
+
+void Sys_FindClose (void) {
+}
+
+void Sys_Init (void) {
+}
+
+
+void Sys_EarlyOutput( char *string ) {
+ printf( "%s", string );
+}
+
+
+void main (int argc, char **argv) {
+ Com_Init (argc, argv);
+
+ while (1) {
+ Com_Frame( );
+ }
+}
+
+
diff --git a/src/null/null_net.c b/src/null/null_net.c
new file mode 100644
index 0000000..9562eac
--- /dev/null
+++ b/src/null/null_net.c
@@ -0,0 +1,54 @@
+/*
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2009 Darklegion Development
+
+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 2 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, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
+
+#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.c b/src/null/null_snddma.c
new file mode 100644
index 0000000..2dd5e33
--- /dev/null
+++ b/src/null/null_snddma.c
@@ -0,0 +1,61 @@
+/*
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2009 Darklegion Development
+
+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 2 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, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
+
+// snddma_null.c
+// all other sound mixing is portable
+
+#include "../qcommon/q_shared.h"
+#include "../qcommon/qcommon.h"
+
+qboolean SNDDMA_Init(void)
+{
+ return qfalse;
+}
+
+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, qboolean compressed )
+{
+ return 0;
+}
+
+void S_StartLocalSound( sfxHandle_t sfxHandle, int channelNum ) {
+}
+
+void S_ClearSoundBuffer( void ) {
+}