Minor changes

This commit is contained in:
Loïc Guégan 2023-12-24 18:53:13 +01:00
parent b7851385fa
commit ce6f056fa8
3 changed files with 7 additions and 6 deletions

View file

@ -4,7 +4,7 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
ScreenInit(); ScreenInit(800,400);
while (!WindowShouldClose()){ while (!WindowShouldClose()){
ScreenUpdate(); ScreenUpdate();

View file

@ -1,9 +1,7 @@
#include "screen.h" #include "screen.h"
void ScreenInit(){ void ScreenInit(int width, int height){
const int screenWidth = 800; InitWindow(width, height, "Chip-8 Emulator");
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
SetTargetFPS(60); // Set game to run at 60 frames-per-second SetTargetFPS(60); // Set game to run at 60 frames-per-second
} }

View file

@ -1,5 +1,8 @@
#include "raylib.h" #include "raylib.h"
void ScreenInit(); #define MODE_CHIP8 0 // Chip-8
#define MODE_SCHIP 1 // Super-Chip
void ScreenInit(int width, int height);
void ScreenUpdate(); void ScreenUpdate();
void ScreenFinish(); void ScreenFinish();