diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2023-12-26 17:51:39 +0100 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2023-12-26 17:51:39 +0100 |
| commit | 5eadac72916ce9d53ffdc3f908a6e414858fe7e0 (patch) | |
| tree | 4c94efaa376280b44c510bad96eee41c43fc6c3a /src/screen.h | |
| parent | 24aadae14da23e852285d4d726148d260edc147d (diff) | |
Cleaning repository
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(); |
