diff --git a/engine/projects/uniquake/dllmain.cpp b/engine/projects/uniquake/dllmain.cpp deleted file mode 100644 index f266597..0000000 --- a/engine/projects/uniquake/dllmain.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// dllmain.cpp : Defines the entry point for the DLL application. -#include "pch.h" - -BOOL APIENTRY DllMain( HMODULE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved - ) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - diff --git a/engine/projects/uniquake/framework.h b/engine/projects/uniquake/framework.h deleted file mode 100644 index 54b83e9..0000000 --- a/engine/projects/uniquake/framework.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files -#include diff --git a/engine/projects/uniquake/pch.cpp b/engine/projects/uniquake/pch.cpp deleted file mode 100644 index 64b7eef..0000000 --- a/engine/projects/uniquake/pch.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// pch.cpp: source file corresponding to the pre-compiled header - -#include "pch.h" - -// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/engine/projects/uniquake/pch.h b/engine/projects/uniquake/pch.h deleted file mode 100644 index 885d5d6..0000000 --- a/engine/projects/uniquake/pch.h +++ /dev/null @@ -1,13 +0,0 @@ -// pch.h: This is a precompiled header file. -// Files listed below are compiled only once, improving build performance for future builds. -// This also affects IntelliSense performance, including code completion and many code browsing features. -// However, files listed here are ALL re-compiled if any one of them is updated between builds. -// Do not add files here that you will be updating frequently as this negates the performance advantage. - -#ifndef PCH_H -#define PCH_H - -// add headers that you want to pre-compile here -#include "framework.h" - -#endif //PCH_H diff --git a/engine/projects/uniquake/sys_uniquake.c b/engine/projects/uniquake/sys_uniquake.c new file mode 100644 index 0000000..a9982cf --- /dev/null +++ b/engine/projects/uniquake/sys_uniquake.c @@ -0,0 +1,40 @@ +#include "uniquake.h" + +#include "../../code/quakedef.h" + +const unity_syscalls_t *unity_syscalls; + +void Sys_Error(char *error, ...) +{ + va_list argptr; + char text[1024]; + + va_start(argptr, error); + vsprintf(text, error, argptr); + va_end(argptr); + + unity_syscalls->SysError(unity_syscalls->target, text); +} + +void Sys_Printf(char *fmt, ...) +{ + va_list argptr; + char text[1024]; + + va_start(argptr, fmt); + vsprintf(text, fmt, argptr); + va_end(argptr); + + unity_syscalls->SysPrint(unity_syscalls->target, text); +} + +void Sys_Quit(void) +{ + Host_Shutdown(); + unity_syscalls->SysQuit(unity_syscalls->target); +} + +double Sys_FloatTime(void) +{ + return unity_syscalls->SysFloatTime(unity_syscalls->target); +} diff --git a/engine/projects/uniquake/uniquake.c b/engine/projects/uniquake/uniquake.c index de8c7fa..c1cf13a 100644 --- a/engine/projects/uniquake/uniquake.c +++ b/engine/projects/uniquake/uniquake.c @@ -1,49 +1,7 @@ -// uniquake.cpp : Defines the exported functions for the DLL. -// - -#include "pch.h" -#include "framework.h" #include "uniquake.h" #include "../../code/quakedef.h" -const unity_syscalls_t *unity_syscalls; - -void Sys_Error(char *error, ...) -{ - va_list argptr; - char text[1024]; - - va_start(argptr, error); - vsprintf(text, error, argptr); - va_end(argptr); - - unity_syscalls->SysError(unity_syscalls->target, text); -} - -void Sys_Printf(char *fmt, ...) -{ - va_list argptr; - char text[1024]; - - va_start(argptr, fmt); - vsprintf(text, fmt, argptr); - va_end(argptr); - - unity_syscalls->SysPrint(unity_syscalls->target, text); -} - -void Sys_Quit(void) -{ - Host_Shutdown(); - unity_syscalls->SysQuit(unity_syscalls->target); -} - -double Sys_FloatTime(void) -{ - return unity_syscalls->SysFloatTime(unity_syscalls->target); -} - UNIQUAKE_API void UniQuake_Init(quakeparms_t *parms, const unity_syscalls_t *syscalls) { unity_syscalls = syscalls; diff --git a/engine/projects/uniquake/uniquake.h b/engine/projects/uniquake/uniquake.h index 2802759..75b3462 100644 --- a/engine/projects/uniquake/uniquake.h +++ b/engine/projects/uniquake/uniquake.h @@ -1,3 +1,8 @@ +#ifdef _WIN32 +#define WIN32_LEAN_AND_MEAN +#include +#endif + #ifdef UNIQUAKE_EXPORTS #define UNIQUAKE_API __declspec(dllexport) #else diff --git a/engine/projects/uniquake/uniquake.vcxproj b/engine/projects/uniquake/uniquake.vcxproj index 1029a54..27e96d0 100644 --- a/engine/projects/uniquake/uniquake.vcxproj +++ b/engine/projects/uniquake/uniquake.vcxproj @@ -248,8 +248,6 @@ - - @@ -348,13 +346,7 @@ - - - Create - Create - Create - Create - + diff --git a/engine/projects/uniquake/uniquake.vcxproj.filters b/engine/projects/uniquake/uniquake.vcxproj.filters index d75c403..201581e 100644 --- a/engine/projects/uniquake/uniquake.vcxproj.filters +++ b/engine/projects/uniquake/uniquake.vcxproj.filters @@ -27,15 +27,9 @@ - - Header Files - Header Files - - Header Files - engine @@ -245,12 +239,6 @@ - - Source Files - - - Source Files - engine @@ -539,6 +527,9 @@ Source Files + + Source Files +