This commit is contained in:
bjorn 2019-05-20 04:15:24 -07:00
parent e368723248
commit 67b76e08c2
2 changed files with 2 additions and 3 deletions

View File

@ -17,12 +17,11 @@
#define LOVR_THREAD_LOCAL __thread
#endif
#define CHECK_SIZEOF(T) int(*_o)[sizeof(T)]=1
#define MAX(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 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;

View File

@ -7,7 +7,7 @@
#include <stdio.h>
static float* lovrFontAlignLine(float* x, float* lineEnd, float width, HorizontalAlign halign) {
while(x < lineEnd) {
while (x < lineEnd) {
if (halign == ALIGN_CENTER) {
*x -= width / 2.f;
} else if (halign == ALIGN_RIGHT) {