From a765be8cee133455870f93e5518b1f23f46b6858 Mon Sep 17 00:00:00 2001 From: Bjorn Einar Bjarntes Date: Sat, 18 Dec 2021 21:43:36 +0100 Subject: [PATCH] could make some fancy loader --- src/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index d0c1a78..8bb9a3a 100644 --- a/src/main.c +++ b/src/main.c @@ -1,3 +1,4 @@ +#include #define BYTE unsigned char short i; @@ -24,13 +25,13 @@ void clearHiRes() { } void setAndClearHiRes(){ - setHiRes(); clearHiRes(); + setHiRes(); } BYTE isPositionWhite() { ad = 0x2000+(320 * (BYTE)(y/8)) + (y & 7)+8 * (BYTE)(x/8); - return *(BYTE*)(ad) & 1 << ((7-(x & 7))); + return *(short*)(ad) & 1 << ((7-(x & 7))); } // https://archive.org/details/The_Graphics_Book_for_the_Commodore_64/page/n129/ @@ -68,6 +69,7 @@ void makeMove() { } int main(void) { + printf("Please wait will the graphics memory is cleaning up..."); setAndClearHiRes(); x = 160; y = 100;