Optimize a bit

This commit is contained in:
Miloslav Ciz 2024-08-02 00:05:03 +02:00
parent 2241b4d635
commit 880ae3c805
6 changed files with 120 additions and 25 deletions

9
game.h
View file

@ -46,6 +46,13 @@ void LCR_sleep(uint16_t timeMs);
*/
void LCR_drawPixel(unsigned long index, uint16_t color);
/**
Implement this in your frontend. This function will be called to log what the
program is doing. If you want to ignore logging, simply make the function do
nothing.
*/
void LCR_log(const char *str);
/**
Call this function in your frontend at the start of the program.
*/
@ -106,6 +113,8 @@ static inline void LCR_drawPixelXYSafe(unsigned int x, unsigned int y,
void LCR_gameInit(void)
{
LCR_log("initializing");
for (int i = 0; i < LCR_KEYS_TOTAL; ++i)
LCR_keyStates[i] = 0;