src/GameState.hh
author terom
Fri, 05 Dec 2008 00:44:25 +0000
changeset 209 68cc4248a508
parent 199 f5c86420facd
child 222 293ddf4c067d
permissions -rw-r--r--
sneak in some ugly ugly ugly Multiple Inheritance that hopefully nobody ever notices
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
     1
#ifndef GAMESTATE_HH
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
     2
#define GAMESTATE_HH
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
     3
196
e2d32c4601ce kaikki hajoo
ekku
parents: 190
diff changeset
     4
class GameState;
e2d32c4601ce kaikki hajoo
ekku
parents: 190
diff changeset
     5
e2d32c4601ce kaikki hajoo
ekku
parents: 190
diff changeset
     6
#include "PhysicsWorld.hh"
e2d32c4601ce kaikki hajoo
ekku
parents: 190
diff changeset
     7
#include "Player.hh"
e2d32c4601ce kaikki hajoo
ekku
parents: 190
diff changeset
     8
#include "Projectile.hh"
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
     9
#include "Input.hh"
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    10
#include "Config.hh"
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    11
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    12
#include <list>
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    13
#include <stdexcept>
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    14
#include <cmath>
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    15
199
f5c86420facd Jeejee, hirvee hinaus ohi toistaseks.
saiam
parents: 196
diff changeset
    16
class GameState {
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    17
public:
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    18
    std::list<Player*> player_list;
199
f5c86420facd Jeejee, hirvee hinaus ohi toistaseks.
saiam
parents: 196
diff changeset
    19
    PhysicsWorld world;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    20
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    21
    // only one local player is supported
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    22
    LocalPlayer *local_player;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    23
199
f5c86420facd Jeejee, hirvee hinaus ohi toistaseks.
saiam
parents: 196
diff changeset
    24
    GameState (void);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    25
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    26
    /*
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    27
     * This will return NULL if we don't have a local player - yet
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    28
     */
199
f5c86420facd Jeejee, hirvee hinaus ohi toistaseks.
saiam
parents: 196
diff changeset
    29
    LocalPlayer *getLocalPlayer (void);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    30
199
f5c86420facd Jeejee, hirvee hinaus ohi toistaseks.
saiam
parents: 196
diff changeset
    31
    void newLocalPlayer (LocalPlayer *player);        
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    32
209
68cc4248a508 sneak in some ugly ugly ugly Multiple Inheritance that hopefully nobody ever notices
terom
parents: 199
diff changeset
    33
    void newPlayer (Player *player);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    34
199
f5c86420facd Jeejee, hirvee hinaus ohi toistaseks.
saiam
parents: 196
diff changeset
    35
    void removePlayer (Player *player);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    36
};
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    37
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    38
#endif