Skip to content

Commit

Permalink
NULL: added more null code to prepare for unittest support
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Apr 8, 2022
1 parent 445d831 commit 9619ae4
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
54 changes: 54 additions & 0 deletions code/null/null_server.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
===========================================================================
Copyright (C) 2021 Padworld Entertainment
This file is part of the World of Padman source code.
World of Padman 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 2 of the License,
or (at your option) any later version.
World of Padman 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 World of Padman source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

#include "q_shared.h"
#include "qcommon.h"

void SV_Shutdown(const char *finalmsg) {
}

void SV_ShutdownGameProgs(void) {
}

void SV_Init(void) {
}

void SV_Frame(int msec) {
}

void SV_PacketEvent(netadr_t from, msg_t *msg) {
}

int SV_FrameMsec(void) {
return 0;
}

qboolean SV_GameCommand(void) {
return qfalse;
}

int SV_SendQueuedPackets(void) {
return 0;
}

void BotDrawDebugPolygons(void (*drawPoly)(int color, int numPoints, float *points), int value) {
}
67 changes: 67 additions & 0 deletions code/null/null_sys.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
===========================================================================
Copyright (C) 2021 Padworld Entertainment
This file is part of the World of Padman source code.
World of Padman 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 2 of the License,
or (at your option) any later version.
World of Padman 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 World of Padman source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/

#include "q_shared.h"
#include "qcommon.h"

void Sys_Print(const char *msg) {
}

void Sys_Error(const char *error, ...) {
exit(1);
}

void Sys_SigHandler(int signal) {
}

char *Sys_DefaultInstallPath(void) {
return ".";
}

void Sys_Quit(void) {
exit(0);
}

void Sys_Init(void) {
}

char *Sys_ConsoleInput(void) {
return NULL;
}

cpuFeatures_t Sys_GetProcessorFeatures(void) {
return 0;
}

void Sys_InitPIDFile(const char *gamedir) {
}

void Sys_RemovePIDFile(const char *gamedir) {
}

void *Sys_LoadGameDll(const char *name, intptr_t(QDECL **entryPoint)(int, ...),
intptr_t (*systemcalls)(intptr_t, ...)) {
return NULL;
}

void Sys_UnloadDll(void *dllHandle) {
}

0 comments on commit 9619ae4

Please sign in to comment.