Syntax fixes for ruamoko/game.

This one actually would compile if object files were working.
This commit is contained in:
Bill Currie 2011-02-14 22:44:08 +09:00
parent 6af747705c
commit 9ac6929cf7
4 changed files with 11 additions and 10 deletions

View file

@ -7,7 +7,7 @@
@interface Axe: Object <Weapon>
{
Entity[] owner;
Entity *owner;
float damage;
}

View file

@ -18,7 +18,7 @@
return self;
}
- (void) setOwner: (Entity []) o
- (void) setOwner: (Entity *) o
{
owner = o;
}

View file

@ -5,7 +5,7 @@
@protocol Weapon
- (void) setOwner: (Entity [])o;
- (void) setOwner: (Entity *)o;
- (void) fire;
@end

View file

@ -8,12 +8,12 @@ integer deathmatch;
@interface BodyQueue: Object
{
entity[MAX_BODIES] bodies;
entity bodies[MAX_BODIES];
integer head;
}
- (id) init;
- (void) addEntity: (GameEntity [])ent;
- (void) addEntity: (GameEntity *)ent;
@end
@ -27,7 +27,7 @@ integer deathmatch;
head = nil;
for (i = 0; i < MAX_BODIES; i++) {
local GameEntity[] ent = nil;
local GameEntity* ent = nil;
ent = [[GameEntity alloc] init];
bodies[i] = ent.ent;
}
@ -36,9 +36,10 @@ integer deathmatch;
bodies[i] = [[[GameEntity alloc] init] ent];
}
#endif
return self;
}
- (void) addEntity: (GameEntity[])ent
- (void) addEntity: (GameEntity*)ent
{
local entity be = bodies[head++];
local entity e = [ent ent];
@ -63,7 +64,7 @@ integer deathmatch;
}
- (void) spawn: (entity)ent;
- (void) copyToBodyQueue: (GameEntity [])ent;
- (void) copyToBodyQueue: (GameEntity *)ent;
@end
@ -75,7 +76,7 @@ integer deathmatch;
bodyque = [[BodyQueue alloc] init];
}
- (void) copyToBodyQueue: (GameEntity [])ent
- (void) copyToBodyQueue: (GameEntity *)ent
{
[bodyque addEntity: ent];
}