From e9f05424209818ac320dcee3f16fc14da1e5ad81 Mon Sep 17 00:00:00 2001 From: Shaun Inman Date: Thu, 19 Jan 2023 22:25:53 -0500 Subject: [PATCH] recovered (but disabled) frame ticker code --- src/minarch/main.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/minarch/main.c b/src/minarch/main.c index 70e0904..97f9a26 100644 --- a/src/minarch/main.c +++ b/src/minarch/main.c @@ -1100,6 +1100,37 @@ static void video_refresh_callback(const void *data, unsigned width, unsigned he GFX_clearAll(); } scaler((void*)data,screen->pixels+dst_offset,width,height,pitch,SCREEN_PITCH); + + if (0) { + static int frame = 0; + int w = 8; + int h = 16; + int fps = 60; + int x = frame * w; + + void *dst = screen->pixels; + + dst += (SCREEN_WIDTH - (w * fps)) / 2 * SCREEN_BPP; + + void* _dst = dst; + memset(_dst, 0, (h * SCREEN_PITCH)); + for (int y=0; y=fps) frame -= fps; + } + GFX_flip(screen); return; // TODO: tmp