diff options
Diffstat (limited to 'src/screen.h')
| -rw-r--r-- | src/screen.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/src/screen.h b/src/screen.h index 671285a..075d45a 100644 --- a/src/screen.h +++ b/src/screen.h @@ -3,7 +3,7 @@ #include "raylib.h" #define MODE_CHIP8 0 // Chip-8 64x32 -#define MODE_SCHIP 1 // Super-Chip 128x64 +#define MODE_SCHIP 1 // Super-Chip 128x64 (not supported yet) typedef struct SCREEN_DATA { int width, height; @@ -13,10 +13,46 @@ typedef struct SCREEN_DATA { char pixels[64*32]; } SCREEN_DATA; +/** + * @brief Must be called first! + * + * @param width + * @param height + */ void ScreenInit(int width, int height); + +/** + * @brief Clear the entire simulated screen + * + */ void ScreenClear(); + +/** + * @brief Set the pixel's state of the simulated screen (follow the chip-8 specification) + * + * @param x + * @param y + * @param state + * @return char 1 if pixel was already on and 0 otherwise + */ char ScreenPixelApply(int x, int y, unsigned char state); -void ScreenPixelFlip(int x, int y); + +/** + * @brief Get simulated screen dimensions + * + * @param width + * @param height + */ void ScreenWH(int *width, int *height); + +/** + * @brief Draw simulated screen instantly + * + */ void ScreenUpdate(); + +/** + * @brief Close screen (must be called before quit) + * + */ void ScreenClose(); |
