mirror of
https://github.com/UberGames/rpgxEF.git
synced 2024-11-10 07:11:34 +00:00
- started updating g_missile.c
- add G_Assert function (see g_missile.c for example usage)
This commit is contained in:
parent
a0318c5983
commit
d1edc454ee
9 changed files with 8707 additions and 8639 deletions
3708
code/game/bg_misc.c
3708
code/game/bg_misc.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
12
code/game/g_local.c
Normal file
12
code/game/g_local.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "g_local.h"
|
||||
#include "g_logger.h"
|
||||
|
||||
qboolean _G_Assert(void* ptr, const char* varname, const char* function) {
|
||||
if (ptr == NULL) {
|
||||
G_LocLogger(LL_ERROR, "%s == NULL!\n", varname);
|
||||
G_LocLogger(LL_TRACE, "%s - End\n", function);
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
return qfalse;
|
||||
}
|
|
@ -2906,4 +2906,15 @@ typedef struct {
|
|||
int numShaders;
|
||||
} target_alert_Shaders_s;
|
||||
|
||||
/*
|
||||
* @brief Checks if a pointer is NULL and returns result.
|
||||
* If the pointer is NULL a message get's logged as error
|
||||
* and the function returns qtrue else the function returns
|
||||
* qfalse.
|
||||
* @param ptr The pointer to check.
|
||||
* @return Whether the pointer is NULL or not.
|
||||
*/
|
||||
qboolean _G_Assert(void* ptr, const char* varname, const char* function);
|
||||
#define G_Assert(ptr) _G_Assert(ptr, #ptr, __FUNCTION__)
|
||||
|
||||
#endif //_G_LOCAL_H_
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
2450
code/game/q_shared.h
2450
code/game/q_shared.h
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue