2022-02-28 15:38:08 +01:00
|
|
|
#define LZY_IMPLEMENTATION
|
|
|
|
#include "lzy.h"
|
2022-02-28 18:01:06 +01:00
|
|
|
#include <stdint.h>
|
2022-02-28 15:38:08 +01:00
|
|
|
|
|
|
|
int main(void) {
|
2022-02-28 18:01:06 +01:00
|
|
|
uint8_t c = 0;
|
|
|
|
|
|
|
|
if (LZY_Init("lzy example", 30)) {
|
2022-02-28 16:26:59 +01:00
|
|
|
LZY_Log(LZY_GetError());
|
|
|
|
LZY_Quit();
|
2022-02-28 15:38:08 +01:00
|
|
|
return 1;
|
2022-02-28 16:26:59 +01:00
|
|
|
}
|
|
|
|
LZY_Log("init was great success!");
|
2022-02-28 15:38:08 +01:00
|
|
|
|
|
|
|
do {
|
|
|
|
LZY_CycleEvents();
|
2022-02-28 16:43:45 +01:00
|
|
|
if (LZY_KeyDown(LZYK_LEFT))
|
2022-02-28 18:01:06 +01:00
|
|
|
c -= 8;
|
2022-02-28 16:43:45 +01:00
|
|
|
if (LZY_KeyDown(LZYK_RIGHT))
|
2022-02-28 18:01:06 +01:00
|
|
|
c += 8;
|
|
|
|
|
|
|
|
LZY_DrawBegin();
|
|
|
|
LZY_DrawSetColor(c, c, c);
|
|
|
|
LZY_DrawClear();
|
|
|
|
LZY_DrawEnd();
|
2022-02-28 16:26:59 +01:00
|
|
|
} while (!LZY_ShouldQuit());
|
2022-02-28 15:38:08 +01:00
|
|
|
|
2022-02-28 16:26:59 +01:00
|
|
|
LZY_Log("cya");
|
|
|
|
LZY_Quit();
|
|
|
|
return 0;
|
2022-02-28 15:38:08 +01:00
|
|
|
}
|