honestly this still sucks
This commit is contained in:
parent
6511864509
commit
edc6fb1c5b
|
@ -11,6 +11,7 @@ Macros:
|
|||
* `C_WHITE`
|
||||
* `DWIDTH`
|
||||
* `DHEIGHT`
|
||||
* `C_RGB(r, g, b)`
|
||||
|
||||
Functions:
|
||||
* `void rDisplayInit(void);`
|
||||
|
|
|
@ -15,15 +15,20 @@
|
|||
/* display size */
|
||||
#define DWIDTH 396
|
||||
#define DHEIGHT 224
|
||||
/* Simple functions. */
|
||||
/* macros */
|
||||
#define C_RGB(r, g, b) (Color){r*255/31, g*255/31, b*255/31, 255}
|
||||
/* simple functions */
|
||||
#define dclear(c) ClearBackground(c)
|
||||
#define drect(x1, y1, x2, y2, c) \
|
||||
DrawRectangle(x1, y1, (x2) - (x1), (y2) - (y1), c)
|
||||
/* dummy types */
|
||||
typedef int bopti_image_t;
|
||||
typedef int font_t;
|
||||
#endif /* RAYLIB */
|
||||
|
||||
/* prototypes */
|
||||
void rInitDisplay(void);
|
||||
void rDeinitDisplay(void);
|
||||
void rDisplayInit(void);
|
||||
void rDisplayDeinit(void);
|
||||
void rDrawBegin(void);
|
||||
void rDrawEnd(void);
|
||||
void dupdate(void);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#endif /* GINT */
|
||||
|
||||
#ifdef RAYLIB
|
||||
#include <raylib.h>
|
||||
#define keydown(x) IsKeyDown(x)
|
||||
#define dclear(x) ClearBackground(x)
|
||||
void clearevents(void);
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#include "raygint/display.h"
|
||||
|
||||
#ifdef RAYLIB
|
||||
void rInitDisplay(void) { InitWindow(DWIDTH, DHEIGHT, "raygint"); }
|
||||
void rDeinitDisplay(void) { CloseWindow(); }
|
||||
void rDisplayInit(void) { InitWindow(DWIDTH, DHEIGHT, "raygint"); }
|
||||
void rDisplayDeinit(void) { CloseWindow(); }
|
||||
void rDrawBegin(void) { BeginDrawing(); }
|
||||
void rDrawEnd(void) { EndDrawing(); }
|
||||
void dupdate(void) {}
|
||||
#else
|
||||
void rInitDisplay(void) {}
|
||||
void rDeinitDisplay(void) {}
|
||||
void rDisplayInit(void) {}
|
||||
void rDisplayDeinit(void) {}
|
||||
void rDrawBegin(void) {}
|
||||
void rDrawEnd(void) {}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue