moved code from header to source files
This commit is contained in:
16
test/color.c
16
test/color.c
@@ -2,27 +2,27 @@
|
||||
|
||||
#include "tim.h"
|
||||
|
||||
static void foo(int x, int y, int c) {
|
||||
static void foo(i32 x, i32 y, i32 c) {
|
||||
char buf[16] = {0};
|
||||
sprintf(buf, " %02x ", c);
|
||||
draw_str(buf, x * 4, y, 4, 0, c);
|
||||
tim_draw_str(buf, x * 4, y, 4, 0, c);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
i32 main(void) {
|
||||
while (tim_run(0)) {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
for (i32 i = 0; i < 16; i++) {
|
||||
foo(i % 8, i / 8, i);
|
||||
}
|
||||
for (int i = 0; i < 108; i++) {
|
||||
for (i32 i = 0; i < 108; i++) {
|
||||
foo(i % 6, i / 6 + 3, i + 16);
|
||||
}
|
||||
for (int i = 0; i < 108; i++) {
|
||||
for (i32 i = 0; i < 108; i++) {
|
||||
foo(i % 6 + 7, i / 6 + 3, i + 124);
|
||||
}
|
||||
for (int i = 0; i < 24; i++) {
|
||||
for (i32 i = 0; i < 24; i++) {
|
||||
foo(i % 12, i / 12 + 22, i + 232);
|
||||
}
|
||||
if (is_key_press('q') || is_key_press(TimKey_Escape)) {
|
||||
if (tim_is_key_press('q') || tim_is_key_press(TimKey_Escape)) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user