32 lines
498 B
C
32 lines
498 B
C
#define LZY_IMPLEMENTATION
|
|
#include "lzy.h"
|
|
#include <stdint.h>
|
|
|
|
int main(void) {
|
|
uint8_t c = 0;
|
|
|
|
if (LZY_Init("lzy example", 30)) {
|
|
LZY_Log(LZY_GetError());
|
|
LZY_Quit();
|
|
return 1;
|
|
}
|
|
LZY_Log("init was great success!");
|
|
|
|
do {
|
|
LZY_CycleEvents();
|
|
if (LZY_KeyDown(LZYK_LEFT))
|
|
c -= 8;
|
|
if (LZY_KeyDown(LZYK_RIGHT))
|
|
c += 8;
|
|
|
|
LZY_DrawBegin();
|
|
LZY_DrawSetColor(c, c, c);
|
|
LZY_DrawClear();
|
|
LZY_DrawEnd();
|
|
} while (!LZY_ShouldQuit());
|
|
|
|
LZY_Log("cya");
|
|
LZY_Quit();
|
|
return 0;
|
|
}
|