#include "direction.h"
#include "math/vector.h"
-#include "audio/musicref.h"
#include "video/drawing_context.h"
namespace lisp {
class Bullet;
class CollisionGrid;
class ScriptInterpreter;
-
-class SpawnPoint
-{
-public:
- std::string name;
- Vector pos;
-};
+class SpawnPoint;
+class MovingObject;
enum MusicType {
LEVEL_MUSIC,
void activate(const std::string& spawnpoint);
void activate(const Vector& player_pos);
- void action(float elapsed_time);
+ void update(float elapsed_time);
void update_game_objects();
void draw(DrawingContext& context);
bool add_smoke_cloud(const Vector& pos);
void add_floating_text(const Vector& pos, const std::string& text);
- /** @evil@ but can't always be avoided in current design... */
+ /** get currently activated sector. */
static Sector* current()
{ return _current; }
private:
void collision_object(MovingObject* object1, MovingObject* object2);
- void load_music();
GameObject* parse_object(const std::string& name, const lisp::Lisp& lisp);
static Sector* _current;
std::string name;
- MusicRef level_song;
-
public:
std::string song_title;
float gravity;
private:
std::vector<Bullet*> bullets;
- ScriptInterpreter* interpreter;
std::string init_script;
public: // TODO make this private again
private:
void fix_old_tiles();
- /// container for newly created objects, they'll be added in Sector::action
+ /// container for newly created objects, they'll be added in Sector::update
GameObjects gameobjects_new;
MusicType currentmusic;