1
2
3
4
5
6
7
8
9
|
// rendergl.cpp: core opengl rendering stuff
#include "cube.h"
#import "Command.h"
#import "DynamicEntity.h"
#import "Monster.h"
#import "OFString+Cube.h"
|
>
>
|
1
2
3
4
5
6
7
8
9
10
11
|
// rendergl.cpp: core opengl rendering stuff
#define gamma math_gamma
#include "cube.h"
#import "Command.h"
#import "DynamicEntity.h"
#import "Monster.h"
#import "OFString+Cube.h"
|
319
320
321
322
323
324
325
326
327
328
329
330
331
332
|
if (strips == nil)
strips = [[OFMutableData alloc]
initWithItemSize:sizeof(struct strip)];
struct strip s = { .tex = tex, .start = start, .num = n };
[strips addItem:&s];
}
VARFP(gamma, 30, 100, 300, {
float f = gamma / 100.0f;
Uint16 ramp[256];
SDL_CalculateGammaRamp(f, ramp);
|
>
>
|
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
if (strips == nil)
strips = [[OFMutableData alloc]
initWithItemSize:sizeof(struct strip)];
struct strip s = { .tex = tex, .start = start, .num = n };
[strips addItem:&s];
}
#undef gamma
VARFP(gamma, 30, 100, 300, {
float f = gamma / 100.0f;
Uint16 ramp[256];
SDL_CalculateGammaRamp(f, ramp);
|