Browse Source
Moved native Sys_ calls into their own separate compilation unit, and removed some auto-generated Windows garbage
console
Moved native Sys_ calls into their own separate compilation unit, and removed some auto-generated Windows garbage
console
9 changed files with 49 additions and 105 deletions
-
19engine/projects/uniquake/dllmain.cpp
-
5engine/projects/uniquake/framework.h
-
5engine/projects/uniquake/pch.cpp
-
13engine/projects/uniquake/pch.h
-
40engine/projects/uniquake/sys_uniquake.c
-
42engine/projects/uniquake/uniquake.c
-
5engine/projects/uniquake/uniquake.h
-
10engine/projects/uniquake/uniquake.vcxproj
-
15engine/projects/uniquake/uniquake.vcxproj.filters
@ -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; |
|||
} |
|||
|
|||
@ -1,5 +0,0 @@ |
|||
#pragma once |
|||
|
|||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers |
|||
// Windows Header Files |
|||
#include <windows.h> |
|||
@ -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.
|
|||
@ -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 |
|||
@ -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); |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue