rDrawBegin, rDrawEnd, dclear, drect.

This commit is contained in:
KikooDX 2021-03-08 16:41:39 +01:00
parent ff3b538ecb
commit bdb14fc3ee
3 changed files with 15 additions and 10 deletions

View File

@ -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`

View File

@ -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);

View File

@ -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