Add new records plus comments

This commit is contained in:
Miloslav Ciz 2025-06-08 15:33:43 +02:00
parent 8d9abb6eda
commit 89da509806
8 changed files with 82 additions and 69 deletions

View file

@ -6,12 +6,19 @@
Licar: general
This file holds general definitions used by all modules.
All Licar code uses LCR_ (or _LCR_) prefix as a kind of namespace preventing
collision with 3rd party identifiers.
*/
#include <stdint.h>
#include "settings.h"
#define _LCR_MODULE_NAME "general"
#ifdef LCR_MODULE_NAME
#undef LCR_MODULE_NAME
#endif
#define LCR_MODULE_NAME "general" ///< Used by logging functions.
#ifndef LCR_LOG0
#define LCR_LOG0(s) ;
@ -37,14 +44,6 @@
#define LCR_LOG2_NUM(x) ;
#endif
// constants (not supposed to be changed, doing so may break stuff):
#define LCR_EFFECTIVE_RESOLUTION_X \
(LCR_SETTING_RESOLUTION_X / LCR_SETTING_RESOLUTION_SUBDIVIDE)
#define LCR_EFFECTIVE_RESOLUTION_Y \
(LCR_SETTING_RESOLUTION_Y / LCR_SETTING_RESOLUTION_SUBDIVIDE)
#if LCR_SETTING_332_COLOR
#define LCR_CONVERT_COLOR(c) \
(((c & 0xe000) >> 8) | ((c & 0x0700) >> 6) | ((c & 0x001f) >> 3))
@ -113,5 +112,5 @@ char _LCR_triangleWinding(int x0, int y0, int x1, int y1, int x2, int y2)
return x0 != 0 ? (x0 > 0 ? 1 : -1) : 0;
}
#undef _LCR_MODULE_NAME
#undef LCR_MODULE_NAME
#endif // guard