Started replacing CG_Printf's by the new logger ...

- added multiple include guards to headers to fix compiling
This commit is contained in:
Walter Julius Hennecke 2013-09-03 22:37:10 +02:00
parent 8b397da7df
commit d2b765a9e3
4 changed files with 20 additions and 2 deletions

View File

@ -7,6 +7,9 @@
#include "cg_public.h" #include "cg_public.h"
#include "list.h" #include "list.h"
#ifndef CG_LOCAL_H_
#define CG_LOCAL_H_
// The entire cgame module is unloaded and reloaded on each level change, // The entire cgame module is unloaded and reloaded on each level change,
// so there is NO persistant data between levels on the client side. // so there is NO persistant data between levels on the client side.
// If you absolutely need something stored, it can either be kept // If you absolutely need something stored, it can either be kept
@ -2271,3 +2274,6 @@ void CG_ResetThirdPersonViewDamp ( void );
void trap_R_RemapShader( const char *oldShader, const char *newShader, const char *timeOffset ); void trap_R_RemapShader( const char *oldShader, const char *newShader, const char *timeOffset );
void CG_ShaderStateChanged(void); void CG_ShaderStateChanged(void);
#endif /* CG_LOCAL_H_ */

View File

@ -7,6 +7,7 @@
#include "cg_local.h" #include "cg_local.h"
#include "cg_text.h" #include "cg_text.h"
#include "cg_logger.h"
void CG_Init( int32_t serverMessageNum, int32_t serverCommandSequence ); void CG_Init( int32_t serverMessageNum, int32_t serverCommandSequence );
void CG_Shutdown( void ); void CG_Shutdown( void );
@ -358,7 +359,7 @@ void CG_PrecacheRemapShaders(void) {
len = trap_FS_FOpenFile(filepath, &f, FS_READ); len = trap_FS_FOpenFile(filepath, &f, FS_READ);
if(!f) { if(!f) {
CG_Printf("No precache file ...\n"); CG_Logger(LL_INFO, "No precache file ...\n");
return; return;
} }
@ -1173,7 +1174,7 @@ void CG_Init( int32_t serverMessageNum, int32_t serverCommandSequence ) {
const char *s; const char *s;
int32_t i; int32_t i;
CG_Printf ("This is RPG-X version %s compiled by %s on %s.\n", RPGX_VERSION, RPGX_COMPILEDBY, RPGX_COMPILEDATE); CG_Logger(LL_ALWAYS, "This is RPG-X version %s compiled by %s on %s.\n", RPGX_VERSION, RPGX_COMPILEDBY, RPGX_COMPILEDATE);
// clear everything // clear everything
memset( &cgs, 0, sizeof( cgs ) ); memset( &cgs, 0, sizeof( cgs ) );

View File

@ -6,6 +6,9 @@
// Copyright (C) 1999-2000 Id Software, Inc. // Copyright (C) 1999-2000 Id Software, Inc.
// //
#ifndef CG_PUBLIC_H_
#define CG_PUBLIC_H_
#define CMD_BACKUP 64 #define CMD_BACKUP 64
#define CMD_MASK (CMD_BACKUP - 1) #define CMD_MASK (CMD_BACKUP - 1)
// allow a lot of command backups for very fast systems // allow a lot of command backups for very fast systems
@ -171,3 +174,5 @@ typedef enum {
} cgameExport_t; } cgameExport_t;
//---------------------------------------------- //----------------------------------------------
#endif /* CG_PUBLIC_H_ */

View File

@ -2,6 +2,9 @@
// //
// bg_public.h -- definitions shared by both the server game and client game modules // bg_public.h -- definitions shared by both the server game and client game modules
#ifndef BG_PUBLIC_H_
#define BG_PUBLIC_H_
// meh somehow preprocessor G_LUA won't work for me // meh somehow preprocessor G_LUA won't work for me
#define G_LUA 1 #define G_LUA 1
#define CG_LUA 1 #define CG_LUA 1
@ -1072,3 +1075,6 @@ char *EndWord(char *pos);
#define PHASER_AMMO_MAX 50 #define PHASER_AMMO_MAX 50
extern int Max_Ammo[]; extern int Max_Ammo[];
#endif /* BG_PUBLIC_H_ */