Add module names
This commit is contained in:
parent
0bbbc26f2a
commit
eb640d27a1
7 changed files with 73 additions and 6 deletions
20
game.h
20
game.h
|
@ -203,6 +203,8 @@ uint8_t LCR_gameGetNextAudioSample(void);
|
|||
#define LCR_LOG1_NUM(x) ;
|
||||
#define LCR_LOG2_NUM(x) ;
|
||||
|
||||
#define LCR_MODULE_NAME "game"
|
||||
|
||||
#if LCR_SETTING_LOG_LEVEL > 0
|
||||
|
||||
void _LCR_logNum(uint32_t n)
|
||||
|
@ -223,19 +225,19 @@ void _LCR_logNum(uint32_t n)
|
|||
|
||||
#undef LCR_LOG0
|
||||
#undef LCR_LOG0_NUM
|
||||
#define LCR_LOG0(s) LCR_log(s);
|
||||
#define LCR_LOG0(s) LCR_log("[" LCR_MODULE_NAME "] " s);
|
||||
#define LCR_LOG0_NUM(x) _LCR_logNum(x);
|
||||
|
||||
#if LCR_SETTING_LOG_LEVEL > 1
|
||||
#undef LCR_LOG1
|
||||
#undef LCR_LOG1_NUM
|
||||
#define LCR_LOG1(s) LCR_log(s);
|
||||
#define LCR_LOG1(s) LCR_log("[" LCR_MODULE_NAME "] " s);
|
||||
#define LCR_LOG1_NUM(x) _LCR_logNum(x);
|
||||
|
||||
#if LCR_SETTING_LOG_LEVEL > 2
|
||||
#undef LCR_LOG2
|
||||
#undef LCR_LOG2_NUM
|
||||
#define LCR_LOG2(s) LCR_log(s);
|
||||
#define LCR_LOG2(s) LCR_log("[" LCR_MODULE_NAME "] " s);
|
||||
#define LCR_LOG2_NUM(x) _LCR_logNum(x);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -285,6 +287,12 @@ static inline void LCR_gameDrawPixelXYSafe(unsigned int x, unsigned int y,
|
|||
#include "assets.h"
|
||||
#include "renderer.h"
|
||||
|
||||
#ifdef LCR_MODULE_NAME
|
||||
#undef LCR_MODULE_NAME
|
||||
#endif
|
||||
|
||||
#define LCR_MODULE_NAME "game"
|
||||
|
||||
#define LCR_MENU_MAX_ITEMS 9 // don't change
|
||||
#define LCR_DATA_ITEM_CHUNK (LCR_MENU_MAX_ITEMS - 1)
|
||||
#define LCR_MENU_TABS 4
|
||||
|
@ -470,7 +478,8 @@ static inline void LCR_gameDrawPixelXYSafe(unsigned int x, unsigned int y,
|
|||
|
||||
void LCR_gameSetState(uint8_t state)
|
||||
{
|
||||
LCR_LOG1("changing state");
|
||||
LCR_LOG1("changing state to:");
|
||||
LCR_LOG1_NUM(state);
|
||||
LCR_game.statePrev = LCR_game.state;
|
||||
LCR_game.state = state;
|
||||
LCR_game.stateStartTime = LCR_game.time;
|
||||
|
@ -1847,5 +1856,6 @@ uint8_t LCR_gameGetNextAudioSample(void)
|
|||
{
|
||||
return LCR_audioGetNextSample();
|
||||
}
|
||||
|
||||
|
||||
#undef LCR_MODULE_NAME
|
||||
#endif // guard
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue