mirror of https://github.com/bjornbytes/lovr.git
Details;
This commit is contained in:
parent
e368723248
commit
67b76e08c2
|
@ -17,12 +17,11 @@
|
||||||
#define LOVR_THREAD_LOCAL __thread
|
#define LOVR_THREAD_LOCAL __thread
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CHECK_SIZEOF(T) int(*_o)[sizeof(T)]=1
|
|
||||||
|
|
||||||
#define MAX(a, b) (a > b ? a : b)
|
#define MAX(a, b) (a > b ? a : b)
|
||||||
#define MIN(a, b) (a < b ? a : b)
|
#define MIN(a, b) (a < b ? a : b)
|
||||||
#define CLAMP(x, min, max) MAX(min, MIN(max, x))
|
#define CLAMP(x, min, max) MAX(min, MIN(max, x))
|
||||||
#define ALIGN(p, n) ((uintptr_t) (p) & -n)
|
#define ALIGN(p, n) ((uintptr_t) (p) & -n)
|
||||||
|
#define CHECK_SIZEOF(T) int(*_o)[sizeof(T)]=1
|
||||||
|
|
||||||
typedef struct Color { float r, g, b, a; } Color;
|
typedef struct Color { float r, g, b, a; } Color;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
static float* lovrFontAlignLine(float* x, float* lineEnd, float width, HorizontalAlign halign) {
|
static float* lovrFontAlignLine(float* x, float* lineEnd, float width, HorizontalAlign halign) {
|
||||||
while(x < lineEnd) {
|
while (x < lineEnd) {
|
||||||
if (halign == ALIGN_CENTER) {
|
if (halign == ALIGN_CENTER) {
|
||||||
*x -= width / 2.f;
|
*x -= width / 2.f;
|
||||||
} else if (halign == ALIGN_RIGHT) {
|
} else if (halign == ALIGN_RIGHT) {
|
||||||
|
|
Loading…
Reference in New Issue