From 9619ae43e583ec5b5b61606bc84ddcb6a2263cc1 Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Fri, 8 Apr 2022 15:49:41 +0200 Subject: [PATCH] NULL: added more null code to prepare for unittest support --- code/null/null_server.c | 54 +++++++++++++++++++++++++++++++++ code/null/null_sys.c | 67 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 code/null/null_server.c create mode 100644 code/null/null_sys.c diff --git a/code/null/null_server.c b/code/null/null_server.c new file mode 100644 index 000000000..59b3eb44e --- /dev/null +++ b/code/null/null_server.c @@ -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) { +} diff --git a/code/null/null_sys.c b/code/null/null_sys.c new file mode 100644 index 000000000..3eef44e19 --- /dev/null +++ b/code/null/null_sys.c @@ -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) { +}