Initial commit.

This commit is contained in:
Jim Gray
2013-04-04 14:32:05 -07:00
parent ba5c81da32
commit d71d53e8ec
2180 changed files with 1393544 additions and 1 deletions

44
codemp/null/mac_net.c Normal file
View File

@@ -0,0 +1,44 @@
#include "../game/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 ) {
}
/*
==================
Sys_GetPacket
Never called by the game logic, just the system event queing
==================
*/
qboolean Sys_GetPacket ( netadr_t *net_from, msg_t *net_message ) {
return false;
}

View File

@@ -0,0 +1,68 @@
#include "../client/client.h"
char cl_cdkey[17] = "123456789";
cvar_t *cl_shownet;
void CL_Shutdown( void ) {
}
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( const char *txt, qboolean silent ) {
}
void CL_JoystickEvent( int axis, int value, int time ) {
}
void CL_InitKeyCommands( void ) {
}
void CL_CDDialog( const char *msg ) {
}
void CL_FlushMemory( void ) {
}
void CL_StartHunkUsers( void ) {
}

View File

@@ -0,0 +1,74 @@
#include "../game/q_shared.h"
#include "../renderer/tr_local.h"
#ifdef __linux__
typedef unsigned int GLenum;
#endif
#ifdef _WIN32
#include <windows.h>
BOOL (WINAPI * qwglSwapIntervalEXT)( int interval );
//void (APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, float s, float t );
//void (APIENTRY * qglActiveTextureARB )( GLenum texture );
//void (APIENTRY * qglClientActiveTextureARB )( GLenum texture );
void (APIENTRY * qglLockArraysEXT)( int, int);
void (APIENTRY * qglUnlockArraysEXT) ( void );
void GLimp_EndFrame( void ) {
}
void 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 ) {
}
#else
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( char *comment ) {
}
qboolean QGL_Init( const char *dllname ) {
return qtrue;
}
void QGL_Shutdown( void ) {
}
#endif // !WIN32

View File

@@ -0,0 +1,14 @@
#include "../client/client.h"
void IN_Init( void ) {
}
void IN_Frame (void) {
}
void IN_Shutdown( void ) {
}
void Sys_SendKeyEvents (void) {
}

95
codemp/null/null_main.c Normal file
View File

@@ -0,0 +1,95 @@
// 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( );
}
}

43
codemp/null/null_net.c Normal file
View File

@@ -0,0 +1,43 @@
#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 ) {
}
/*
==================
Sys_GetPacket
Never called by the game logic, just the system event queing
==================
*/
qboolean Sys_GetPacket ( netadr_t *net_from, msg_t *net_message ) {
return false;
}

View File

@@ -0,0 +1,21 @@
/* Null renderer functions */
void RB_StageIteratorGeneric(void)
{
}
void RB_StageIteratorSky(void)
{
}
void RB_StageIteratorVertexLitTexture(void)
{
}
void RB_StageIteratorLightmappedMultitexture(void)
{
}
void R_SyncRenderThread(void)
{
}

View File

@@ -0,0 +1,49 @@
// snddma_null.c
// all other sound mixing is portable
#include "../client/client.h"
qboolean gbInsideLoadSound = qfalse; // important to default to this!!!
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 ) {
return 0;
}
void S_StartLocalSound( sfxHandle_t sfxHandle, int channelNum ) {
}
void S_ClearSoundBuffer( void ) {
}
qboolean SND_RegisterAudio_LevelLoadEnd(qboolean something)
{
return qfalse;
}
int SND_FreeOldestSound(void)
{
return 0;
}

1482
codemp/null/win_main.cpp Normal file

File diff suppressed because it is too large Load Diff