mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 13:09:44 +00:00
1169fdc32a
The most prominent change is the new macro which replaces the `DEBUGF` for each stub, but that is the least interesting part. This allows to go through the different steps `Game_Init`, `Game_NowLoading` and once it finally lands into `Game_Play` it calls `func_800F298C`, which is our new `main` function for testing stuff.
36 lines
840 B
C
36 lines
840 B
C
#ifndef LOG_H
|
|
#define LOG_H
|
|
|
|
#include "common.h"
|
|
|
|
typedef enum {
|
|
LOG_LEVEL_D,
|
|
LOG_LEVEL_I,
|
|
LOG_LEVEL_W,
|
|
LOG_LEVEL_E,
|
|
} LOG_LEVEL;
|
|
|
|
#define NAMEOF(var) #var
|
|
#define NOT_IMPLEMENTED DEBUGF("not implemented")
|
|
|
|
#ifndef NO_LOGS
|
|
|
|
#define DEBUGF(...) _log(LOG_LEVEL_D, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
|
#define INFOF(...) _log(LOG_LEVEL_I, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
|
#define WARNF(...) _log(LOG_LEVEL_W, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
|
#define ERRORF(...) _log(LOG_LEVEL_E, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
|
|
|
void SetMinLogLevel(LOG_LEVEL level);
|
|
void _log(unsigned int level, const char* file, unsigned int line,
|
|
const char* func, const char* fmt, ...);
|
|
|
|
#else
|
|
|
|
#define DEBUGF(fmt, ...)
|
|
#define INFOF(fmt, ...)
|
|
#define WARNF(fmt, ...)
|
|
#define ERRORF(fmt, ...)
|
|
|
|
#endif
|
|
|
|
#endif |