Work around conflicting declaration of gamma
FossilOrigin-Name: 7c3936be15500a3bdaa3aa603479e02786123f92c9f697b4a420d3b7411aa998
This commit is contained in:
parent
45f4039f3b
commit
4596a656dc
3 changed files with 4 additions and 10 deletions
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
#import <ObjFW/ObjFW.h>
|
#import <ObjFW/ObjFW.h>
|
||||||
|
|
||||||
#define gamma gamma__
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#undef gamma
|
|
||||||
|
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// rendergl.cpp: core opengl rendering stuff
|
// rendergl.cpp: core opengl rendering stuff
|
||||||
|
|
||||||
|
#define gamma math_gamma
|
||||||
|
|
||||||
#include "cube.h"
|
#include "cube.h"
|
||||||
|
|
||||||
#import "Command.h"
|
#import "Command.h"
|
||||||
|
@ -324,6 +326,8 @@ addstrip(int tex, int start, int n)
|
||||||
[strips addItem:&s];
|
[strips addItem:&s];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef gamma
|
||||||
|
|
||||||
VARFP(gamma, 30, 100, 300, {
|
VARFP(gamma, 30, 100, 300, {
|
||||||
float f = gamma / 100.0f;
|
float f = gamma / 100.0f;
|
||||||
Uint16 ramp[256];
|
Uint16 ramp[256];
|
||||||
|
|
|
@ -3,16 +3,8 @@
|
||||||
#ifndef _TOOLS_H
|
#ifndef _TOOLS_H
|
||||||
#define _TOOLS_H
|
#define _TOOLS_H
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# define gamma __gamma
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# undef gamma
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue