diff --git a/README.md b/README.md index c4889d1..deb7597 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ Macros: Functions: * `void rDisplayInit(void);` * `void rDisplayDeinit(void);` +* `void rDrawBegin(void);` +* `void rDrawEnd(void);` +* `void dclear(int color);` +* `void drect(int x1, int y1, int x2, int y2, int color);` * `void dupdate(void);` ## `raygint/keyboard.h` diff --git a/include/raygint/display.h b/include/raygint/display.h index d0e8576..6781020 100644 --- a/include/raygint/display.h +++ b/include/raygint/display.h @@ -9,6 +9,7 @@ /* Colors. */ #define C_WHITE WHITE /* Simple functions. */ +#define dclear(c) ClearBackground(c) #define drect(x, y, w, h, c) DrawRectangle(x, y, (x) - (w), (y) - (h), c) #endif /* RAYLIB */ @@ -21,4 +22,6 @@ /* Function prototypes. */ void rInitDisplay(void); void rDeinitDisplay(void); +void rDrawBegin(void); +void rDrawEnd(void); void dupdate(void); diff --git a/src/display.c b/src/display.c index f96fa98..2acb655 100644 --- a/src/display.c +++ b/src/display.c @@ -1,16 +1,14 @@ #include "raygint/display.h" #ifdef RAYLIB -void rInitDisplay(void) { - InitWindow(DWIDTH, DHEIGHT, "raygint"); -} - -void rDeinitDisplay(void) { - CloseWindow(); -} - +void rInitDisplay(void) { InitWindow(DWIDTH, DHEIGHT, "raygint"); } +void rDeinitDisplay(void) { CloseWindow(); } +void rDrawBegin(void) { BeginDrawing(); } +void rDrawEnd(void) { EndDrawing(); } void dupdate(void) {} #else -void rInitDisplay(void) {}; -void rDeinitDisplay(void) {}; +void rInitDisplay(void) {} +void rDeinitDisplay(void) {} +void rDrawBegin(void) {} +void rDrawEnd(void) {} #endif