From 16f7128a0c81a508940ee1a8e8d1b8fe36f83259 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 25 Dec 2023 09:11:45 +0100 Subject: Minor changes --- src/screen.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/screen.c') diff --git a/src/screen.c b/src/screen.c index 24a1eb8..d312a8d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -12,7 +12,8 @@ void ScreenInit(int width, int height){ Screen.originX=(width-64*Screen.pixel)/2; Screen.originY=(height-32*Screen.pixel)/2; ScreenClear(); - + + SetTraceLogLevel(LOG_ERROR); // Disable anoying raylib logs InitWindow(width, height, "Chip-8 Emulator"); SetTargetFPS(60); // Set game to run at 60 frames-per-second } @@ -43,6 +44,13 @@ void ScreenSetPixel(int x, int y, unsigned char state){ Screen.pixels[x+y*64]=(state==0) ? 0: 1; } +void ScreenPixelFlip(int x, int y){ + if(Screen.pixels[x+y*64]==0) + Screen.pixels[x+y*64]=1; + else + Screen.pixels[x+y*64]=0; +} + void ScreenClose(){ CloseWindow(); // Close window and OpenGL context } -- cgit v1.2.3