Clean up Variable
FossilOrigin-Name: 0ee94739cea768327664b83a23470a366e90ac45fd6c51537b5188268aa8e97c
This commit is contained in:
parent
f76b9643ec
commit
fb8a872695
20 changed files with 145 additions and 125 deletions
|
@ -6,10 +6,10 @@ OF_ASSUME_NONNULL_BEGIN
|
||||||
OF_CONSTRUCTOR() \
|
OF_CONSTRUCTOR() \
|
||||||
{ \
|
{ \
|
||||||
enqueueInit(^{ \
|
enqueueInit(^{ \
|
||||||
[Identifier \
|
Identifier.identifiers[@ #name] = \
|
||||||
addIdentifier:[Command commandWithName:@ #name \
|
[Command commandWithName:@ #name \
|
||||||
argumentsTypes:nargs \
|
argumentsTypes:nargs \
|
||||||
block:block_]]; \
|
block:block_]; \
|
||||||
}); \
|
}); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#import "Command.h"
|
#import "Command.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
OF_APPLICATION_DELEGATE(Cube)
|
OF_APPLICATION_DELEGATE(Cube)
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,9 @@ OF_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface Identifier: OFObject
|
@interface Identifier: OFObject
|
||||||
@property (readonly, copy, nonatomic) OFString *name;
|
@property (readonly, copy, nonatomic) OFString *name;
|
||||||
|
@property (class, readonly, nonatomic)
|
||||||
|
OFMutableDictionary<OFString *, __kindof Identifier *> *identifiers;
|
||||||
|
|
||||||
+ (void)addIdentifier:(__kindof Identifier *)identifier;
|
|
||||||
+ (__kindof Identifier *)identifierForName:(OFString *)name;
|
|
||||||
+ (void)enumerateIdentifiersUsingBlock:(void (^)(__kindof Identifier *))block;
|
|
||||||
- (instancetype)init OF_UNAVAILABLE;
|
- (instancetype)init OF_UNAVAILABLE;
|
||||||
- (instancetype)initWithName:(OFString *)name;
|
- (instancetype)initWithName:(OFString *)name;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -10,22 +10,9 @@ static OFMutableDictionary<OFString *, __kindof Identifier *> *identifiers;
|
||||||
identifiers = [[OFMutableDictionary alloc] init];
|
identifiers = [[OFMutableDictionary alloc] init];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)addIdentifier:(__kindof Identifier *)identifier
|
+ (OFMutableDictionary<OFString *, __kindof Identifier *> *)identifiers
|
||||||
{
|
{
|
||||||
identifiers[identifier.name] = identifier;
|
return identifiers;
|
||||||
}
|
|
||||||
|
|
||||||
+ (__kindof Identifier *)identifierForName:(OFString *)name
|
|
||||||
{
|
|
||||||
return identifiers[name];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)enumerateIdentifiersUsingBlock:(void (^)(__kindof Identifier *))block
|
|
||||||
{
|
|
||||||
[identifiers enumerateKeysAndObjectsUsingBlock:^(
|
|
||||||
OFString *name, __kindof Identifier *identifier, bool *stop) {
|
|
||||||
block(identifier);
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithName:(OFString *)name
|
- (instancetype)initWithName:(OFString *)name
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#import "Entity.h"
|
#import "Entity.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
static OFMutableArray<Monster *> *monsters;
|
static OFMutableArray<Monster *> *monsters;
|
||||||
static int nextmonster, spawnremain, numkilled, monstertotal, mtimestart;
|
static int nextmonster, spawnremain, numkilled, monstertotal, mtimestart;
|
||||||
|
|
|
@ -2,24 +2,95 @@
|
||||||
|
|
||||||
OF_ASSUME_NONNULL_BEGIN
|
OF_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
#define VARP(name, min_, cur, max_) \
|
||||||
|
int name = cur; \
|
||||||
|
\
|
||||||
|
OF_CONSTRUCTOR() \
|
||||||
|
{ \
|
||||||
|
enqueueInit(^{ \
|
||||||
|
Variable *variable = \
|
||||||
|
[Variable variableWithName:@ #name \
|
||||||
|
min:min_ \
|
||||||
|
max:max_ \
|
||||||
|
storage:&name \
|
||||||
|
function:NULL \
|
||||||
|
persisted:true]; \
|
||||||
|
Identifier.identifiers[@ #name] = variable; \
|
||||||
|
}); \
|
||||||
|
}
|
||||||
|
#define VAR(name, min_, cur, max_) \
|
||||||
|
int name = cur; \
|
||||||
|
\
|
||||||
|
OF_CONSTRUCTOR() \
|
||||||
|
{ \
|
||||||
|
enqueueInit(^{ \
|
||||||
|
Variable *variable = \
|
||||||
|
[Variable variableWithName:@ #name \
|
||||||
|
min:min_ \
|
||||||
|
max:max_ \
|
||||||
|
storage:&name \
|
||||||
|
function:NULL \
|
||||||
|
persisted:false]; \
|
||||||
|
Identifier.identifiers[@ #name] = variable; \
|
||||||
|
}); \
|
||||||
|
}
|
||||||
|
#define VARF(name, min_, cur, max_, body) \
|
||||||
|
static void var_##name(); \
|
||||||
|
static int name = cur; \
|
||||||
|
\
|
||||||
|
OF_CONSTRUCTOR() \
|
||||||
|
{ \
|
||||||
|
enqueueInit(^{ \
|
||||||
|
Variable *variable = \
|
||||||
|
[Variable variableWithName:@ #name \
|
||||||
|
min:min_ \
|
||||||
|
max:max_ \
|
||||||
|
storage:&name \
|
||||||
|
function:var_##name \
|
||||||
|
persisted:false]; \
|
||||||
|
Identifier.identifiers[@ #name] = variable; \
|
||||||
|
}); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
static void var_##name() { body; }
|
||||||
|
#define VARFP(name, min_, cur, max_, body) \
|
||||||
|
static void var_##name(); \
|
||||||
|
static int name = cur; \
|
||||||
|
\
|
||||||
|
OF_CONSTRUCTOR() \
|
||||||
|
{ \
|
||||||
|
enqueueInit(^{ \
|
||||||
|
Variable *variable = \
|
||||||
|
[Variable variableWithName:@ #name \
|
||||||
|
min:min_ \
|
||||||
|
max:max_ \
|
||||||
|
storage:&name \
|
||||||
|
function:var_##name \
|
||||||
|
persisted:true]; \
|
||||||
|
Identifier.identifiers[@ #name] = variable; \
|
||||||
|
}); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
static void var_##name() { body; }
|
||||||
|
|
||||||
@interface Variable: Identifier
|
@interface Variable: Identifier
|
||||||
@property (readonly, nonatomic) int min, max;
|
@property (readonly, nonatomic) int min, max;
|
||||||
@property (readonly, nonatomic) int *storage;
|
@property (readonly, nonatomic) int *storage;
|
||||||
@property (readonly, nonatomic) void (*__cdecl function)();
|
@property (readonly, nullable, nonatomic) void (*function)();
|
||||||
@property (readonly, nonatomic) bool persisted;
|
@property (readonly, nonatomic) bool persisted;
|
||||||
|
|
||||||
+ (instancetype)variableWithName:(OFString *)name
|
+ (instancetype)variableWithName:(OFString *)name
|
||||||
min:(int)min
|
min:(int)min
|
||||||
max:(int)max
|
max:(int)max
|
||||||
storage:(int *)storage
|
storage:(int *)storage
|
||||||
function:(void (*__cdecl)())function
|
function:(void (*_Nullable)())function
|
||||||
persisted:(bool)persisted;
|
persisted:(bool)persisted;
|
||||||
- (instancetype)initWithName:(OFString *)name OF_UNAVAILABLE;
|
- (instancetype)initWithName:(OFString *)name OF_UNAVAILABLE;
|
||||||
- (instancetype)initWithName:(OFString *)name
|
- (instancetype)initWithName:(OFString *)name
|
||||||
min:(int)min
|
min:(int)min
|
||||||
max:(int)max
|
max:(int)max
|
||||||
storage:(int *)storage
|
storage:(int *)storage
|
||||||
function:(void (*__cdecl)())function
|
function:(void (*_Nullable)())function
|
||||||
persisted:(bool)persisted;
|
persisted:(bool)persisted;
|
||||||
- (void)printValue;
|
- (void)printValue;
|
||||||
- (void)setValue:(int)value;
|
- (void)setValue:(int)value;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#import "Monster.h"
|
#import "Monster.h"
|
||||||
#import "OFString+Cube.h"
|
#import "OFString+Cube.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
int nextmode = 0; // nextmode becomes gamemode after next map load
|
int nextmode = 0; // nextmode becomes gamemode after next map load
|
||||||
VAR(gamemode, 1, 0, 0);
|
VAR(gamemode, 1, 0, 0);
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#import "Command.h"
|
#import "Command.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
static ENetHost *clienthost = NULL;
|
static ENetHost *clienthost = NULL;
|
||||||
static int connecting = 0;
|
static int connecting = 0;
|
||||||
|
|
|
@ -18,12 +18,12 @@ cleanup(char **string)
|
||||||
void
|
void
|
||||||
alias(OFString *name, OFString *action)
|
alias(OFString *name, OFString *action)
|
||||||
{
|
{
|
||||||
Alias *alias = [Identifier identifierForName:name];
|
Alias *alias = Identifier.identifiers[name];
|
||||||
|
|
||||||
if (alias == nil)
|
if (alias == nil)
|
||||||
[Identifier addIdentifier:[Alias aliasWithName:name
|
Identifier.identifiers[name] = [Alias aliasWithName:name
|
||||||
action:action
|
action:action
|
||||||
persisted:true]];
|
persisted:true];
|
||||||
else {
|
else {
|
||||||
if ([alias isKindOfClass:Alias.class])
|
if ([alias isKindOfClass:Alias.class])
|
||||||
alias.action = action;
|
alias.action = action;
|
||||||
|
@ -37,23 +37,10 @@ COMMAND(alias, ARG_2STR, ^(OFString *name, OFString *action) {
|
||||||
alias(name, action);
|
alias(name, action);
|
||||||
})
|
})
|
||||||
|
|
||||||
int
|
|
||||||
variable(OFString *name, int min, int cur, int max, int *storage,
|
|
||||||
void (*function)(), bool persisted)
|
|
||||||
{
|
|
||||||
[Identifier addIdentifier:[Variable variableWithName:name
|
|
||||||
min:min
|
|
||||||
max:max
|
|
||||||
storage:storage
|
|
||||||
function:function
|
|
||||||
persisted:persisted]];
|
|
||||||
return cur;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
setvar(OFString *name, int i)
|
setvar(OFString *name, int i)
|
||||||
{
|
{
|
||||||
Variable *variable = [Identifier identifierForName:name];
|
Variable *variable = Identifier.identifiers[name];
|
||||||
|
|
||||||
if ([variable isKindOfClass:Variable.class])
|
if ([variable isKindOfClass:Variable.class])
|
||||||
*variable.storage = i;
|
*variable.storage = i;
|
||||||
|
@ -62,7 +49,7 @@ setvar(OFString *name, int i)
|
||||||
int
|
int
|
||||||
getvar(OFString *name)
|
getvar(OFString *name)
|
||||||
{
|
{
|
||||||
Variable *variable = [Identifier identifierForName:name];
|
Variable *variable = Identifier.identifiers[name];
|
||||||
|
|
||||||
if ([variable isKindOfClass:Variable.class])
|
if ([variable isKindOfClass:Variable.class])
|
||||||
return *variable.storage;
|
return *variable.storage;
|
||||||
|
@ -73,13 +60,13 @@ getvar(OFString *name)
|
||||||
bool
|
bool
|
||||||
identexists(OFString *name)
|
identexists(OFString *name)
|
||||||
{
|
{
|
||||||
return ([Identifier identifierForName:name] != nil);
|
return (Identifier.identifiers[name] != nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
OFString *
|
OFString *
|
||||||
getalias(OFString *name)
|
getalias(OFString *name)
|
||||||
{
|
{
|
||||||
Alias *alias = [Identifier identifierForName:name];
|
Alias *alias = Identifier.identifiers[name];
|
||||||
|
|
||||||
if ([alias isKindOfClass:Alias.class])
|
if ([alias isKindOfClass:Alias.class])
|
||||||
return alias.action;
|
return alias.action;
|
||||||
|
@ -153,7 +140,7 @@ OFString *
|
||||||
lookup(OFString *n)
|
lookup(OFString *n)
|
||||||
{
|
{
|
||||||
__kindof Identifier *identifier =
|
__kindof Identifier *identifier =
|
||||||
[Identifier identifierForName:[n substringFromIndex:1]];
|
Identifier.identifiers[[n substringFromIndex:1]];
|
||||||
|
|
||||||
if ([identifier isKindOfClass:Variable.class]) {
|
if ([identifier isKindOfClass:Variable.class]) {
|
||||||
return [OFString stringWithFormat:@"%d", *[identifier storage]];
|
return [OFString stringWithFormat:@"%d", *[identifier storage]];
|
||||||
|
@ -260,7 +247,7 @@ execute(OFString *string, bool isDown)
|
||||||
if (c.length == 0)
|
if (c.length == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
val = executeIdentifier([Identifier identifierForName:c],
|
val = executeIdentifier(Identifier.identifiers[c],
|
||||||
[OFArray arrayWithObjects:w count:numargs], isDown);
|
[OFArray arrayWithObjects:w count:numargs], isDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,8 +279,8 @@ complete(OFMutableString *s)
|
||||||
}
|
}
|
||||||
|
|
||||||
__block int idx = 0;
|
__block int idx = 0;
|
||||||
[Identifier enumerateIdentifiersUsingBlock:^(
|
[Identifier.identifiers enumerateKeysAndObjectsUsingBlock:^(
|
||||||
__kindof Identifier *identifier) {
|
OFString *name, __kindof Identifier *identifier, bool *stop) {
|
||||||
if (strncmp(identifier.name.UTF8String, s.UTF8String + 1,
|
if (strncmp(identifier.name.UTF8String, s.UTF8String + 1,
|
||||||
completesize) == 0 &&
|
completesize) == 0 &&
|
||||||
idx++ == completeidx)
|
idx++ == completeidx)
|
||||||
|
@ -359,8 +346,8 @@ writecfg()
|
||||||
writeclientinfo(stream);
|
writeclientinfo(stream);
|
||||||
[stream writeString:@"\n"];
|
[stream writeString:@"\n"];
|
||||||
|
|
||||||
[Identifier
|
[Identifier.identifiers enumerateKeysAndObjectsUsingBlock:^(
|
||||||
enumerateIdentifiersUsingBlock:^(__kindof Identifier *identifier) {
|
OFString *name, __kindof Identifier *identifier, bool *stop) {
|
||||||
if (![identifier isKindOfClass:Variable.class] ||
|
if (![identifier isKindOfClass:Variable.class] ||
|
||||||
![identifier persisted])
|
![identifier persisted])
|
||||||
return;
|
return;
|
||||||
|
@ -373,8 +360,8 @@ writecfg()
|
||||||
writebinds(stream);
|
writebinds(stream);
|
||||||
[stream writeString:@"\n"];
|
[stream writeString:@"\n"];
|
||||||
|
|
||||||
[Identifier
|
[Identifier.identifiers enumerateKeysAndObjectsUsingBlock:^(
|
||||||
enumerateIdentifiersUsingBlock:^(__kindof Identifier *identifier) {
|
OFString *name, __kindof Identifier *identifier, bool *stop) {
|
||||||
if (![identifier isKindOfClass:Alias.class] ||
|
if (![identifier isKindOfClass:Alias.class] ||
|
||||||
[identifier.name hasPrefix:@"nextmap_"])
|
[identifier.name hasPrefix:@"nextmap_"])
|
||||||
return;
|
return;
|
||||||
|
|
45
src/cube.h
45
src/cube.h
|
@ -331,51 +331,6 @@ enum {
|
||||||
ARG_VARI
|
ARG_VARI
|
||||||
};
|
};
|
||||||
|
|
||||||
// nasty macros for registering script functions, abuses globals to avoid
|
|
||||||
// excessive infrastructure
|
|
||||||
#define VARP(name, min, cur, max) \
|
|
||||||
int name; \
|
|
||||||
OF_CONSTRUCTOR() \
|
|
||||||
{ \
|
|
||||||
enqueueInit(^{ \
|
|
||||||
name = variable( \
|
|
||||||
@ #name, min, cur, max, &name, NULL, true); \
|
|
||||||
}); \
|
|
||||||
}
|
|
||||||
#define VAR(name, min, cur, max) \
|
|
||||||
int name; \
|
|
||||||
OF_CONSTRUCTOR() \
|
|
||||||
{ \
|
|
||||||
enqueueInit(^{ \
|
|
||||||
name = variable( \
|
|
||||||
@ #name, min, cur, max, &name, NULL, false); \
|
|
||||||
}); \
|
|
||||||
}
|
|
||||||
#define VARF(name, min, cur, max, body) \
|
|
||||||
void var_##name(); \
|
|
||||||
static int name; \
|
|
||||||
OF_CONSTRUCTOR() \
|
|
||||||
{ \
|
|
||||||
enqueueInit(^{ \
|
|
||||||
name = variable( \
|
|
||||||
@ #name, min, cur, max, &name, var_##name, false); \
|
|
||||||
}); \
|
|
||||||
} \
|
|
||||||
void var_##name() { body; }
|
|
||||||
#define VARFP(name, min, cur, max, body) \
|
|
||||||
void var_##name(); \
|
|
||||||
static int name; \
|
|
||||||
OF_CONSTRUCTOR() \
|
|
||||||
{ \
|
|
||||||
enqueueInit(^{ \
|
|
||||||
name = variable( \
|
|
||||||
@ #name, min, cur, max, &name, var_##name, true); \
|
|
||||||
}); \
|
|
||||||
} \
|
|
||||||
void var_##name() { body; }
|
|
||||||
|
|
||||||
#define ATOI(s) strtol(s, NULL, 0) // supports hexadecimal numbers
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# include "windows.h"
|
# include "windows.h"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#import "Monster.h"
|
#import "Monster.h"
|
||||||
#import "OFString+Cube.h"
|
#import "OFString+Cube.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
bool editmode = false;
|
bool editmode = false;
|
||||||
|
|
||||||
|
@ -15,17 +16,27 @@ bool editmode = false;
|
||||||
// invariant: all code assumes that these are kept inside MINBORD distance of
|
// invariant: all code assumes that these are kept inside MINBORD distance of
|
||||||
// the edge of the map
|
// the edge of the map
|
||||||
|
|
||||||
struct block sel;
|
struct block sel = { 0, 0, 0, 0 };
|
||||||
|
|
||||||
OF_CONSTRUCTOR()
|
OF_CONSTRUCTOR()
|
||||||
{
|
{
|
||||||
enqueueInit(^{
|
enqueueInit(^{
|
||||||
sel = (struct block) {
|
static const struct {
|
||||||
variable(@"selx", 0, 0, 4096, &sel.x, NULL, false),
|
OFString *name;
|
||||||
variable(@"sely", 0, 0, 4096, &sel.y, NULL, false),
|
int *storage;
|
||||||
variable(@"selxs", 0, 0, 4096, &sel.xs, NULL, false),
|
} vars[4] = { { @"selx", &sel.x }, { @"sely", &sel.y },
|
||||||
variable(@"selys", 0, 0, 4096, &sel.ys, NULL, false),
|
{ @"selxs", &sel.xs }, { @"selys", &sel.ys } };
|
||||||
};
|
|
||||||
|
for (size_t i = 0; i < 4; i++) {
|
||||||
|
Variable *variable =
|
||||||
|
[Variable variableWithName:vars[i].name
|
||||||
|
min:0
|
||||||
|
max:4096
|
||||||
|
storage:vars[i].storage
|
||||||
|
function:NULL
|
||||||
|
persisted:false];
|
||||||
|
Identifier.identifiers[vars[i].name] = variable;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#import "MapModelInfo.h"
|
#import "MapModelInfo.h"
|
||||||
#import "Monster.h"
|
#import "Monster.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
// collide with player or monster
|
// collide with player or monster
|
||||||
static bool
|
static bool
|
||||||
|
|
|
@ -5,8 +5,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// command
|
// command
|
||||||
extern int variable(OFString *name, int min, int cur, int max, int *storage,
|
|
||||||
void (*fun)(), bool persist);
|
|
||||||
extern void setvar(OFString *name, int i);
|
extern void setvar(OFString *name, int i);
|
||||||
extern int getvar(OFString *name);
|
extern int getvar(OFString *name);
|
||||||
extern bool identexists(OFString *name);
|
extern bool identexists(OFString *name);
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "cube.h"
|
#include "cube.h"
|
||||||
|
|
||||||
#import "Command.h"
|
#import "Command.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
static struct vertex *verts = NULL;
|
static struct vertex *verts = NULL;
|
||||||
int curvert;
|
int curvert;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#import "Command.h"
|
#import "Command.h"
|
||||||
#import "Entity.h"
|
#import "Entity.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
line(int x1, int y1, float z1, int x2, int y2, float z2)
|
line(int x1, int y1, float z1, int x2, int y2, float z2)
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#import "Monster.h"
|
#import "Monster.h"
|
||||||
#import "OFString+Cube.h"
|
#import "OFString+Cube.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
#ifdef DARWIN
|
#ifdef DARWIN
|
||||||
# define GL_COMBINE_EXT GL_COMBINE_ARB
|
# define GL_COMBINE_EXT GL_COMBINE_ARB
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "cube.h"
|
#include "cube.h"
|
||||||
|
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
#define MAXPARTICLES 10500
|
#define MAXPARTICLES 10500
|
||||||
const int NUMPARTCUTOFF = 20;
|
const int NUMPARTCUTOFF = 20;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#import "Entity.h"
|
#import "Entity.h"
|
||||||
#import "Monster.h"
|
#import "Monster.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
#ifdef OF_BIG_ENDIAN
|
#ifdef OF_BIG_ENDIAN
|
||||||
static const int islittleendian = 0;
|
static const int islittleendian = 0;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#import "Command.h"
|
#import "Command.h"
|
||||||
#import "Player.h"
|
#import "Player.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
#include <SDL_mixer.h>
|
#include <SDL_mixer.h>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#import "DynamicEntity.h"
|
#import "DynamicEntity.h"
|
||||||
#import "Entity.h"
|
#import "Entity.h"
|
||||||
#import "Monster.h"
|
#import "Monster.h"
|
||||||
|
#import "Variable.h"
|
||||||
|
|
||||||
extern bool hasoverbright;
|
extern bool hasoverbright;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue