From 31959bc355c471c573828bf63932850e46c4b5bc Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 9 Feb 2008 23:06:00 +0000 Subject: more entities --- src/game/game.cc | 5 ++++- src/game/shared.h | 4 ++-- src/game/ship.cc | 2 +- src/game/ship.h | 2 -- src/game/star.cc | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/game') diff --git a/src/game/game.cc b/src/game/game.cc index f8b8596..8a50e33 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -97,10 +97,13 @@ bool Game::init() con_print << " " << sectors[n]->label << " " << sectors[n]->name << std::endl; */ - ship = new Ship(); star = new Star(); star->location = Vector3f(256.0f, 0.0f, 256.0f); + star->label = "star: Sabishi Hoshi"; + + ship = new Ship(); ship->location = Vector3f(0,0,0); + ship->label = "ship: Micron Vector"; return true; } diff --git a/src/game/shared.h b/src/game/shared.h index 5c04309..a9228a3 100644 --- a/src/game/shared.h +++ b/src/game/shared.h @@ -10,8 +10,8 @@ namespace game { // entity type constants - const unsigned int ship_enttype = 1; - const unsigned int star_enttype = 2; + const unsigned int ship_enttype = 256; + const unsigned int star_enttype = 257; } diff --git a/src/game/ship.cc b/src/game/ship.cc index 9252f1d..1ef4b9d 100644 --- a/src/game/ship.cc +++ b/src/game/ship.cc @@ -17,7 +17,7 @@ using math::degrees180f; namespace game { -Ship::Ship() : core::Entity(ship_enttype) +Ship::Ship() : core::Entity(0, ship_enttype) { speed = 0; yaw_current = 0; diff --git a/src/game/ship.h b/src/game/ship.h index f83c41e..e919f38 100644 --- a/src/game/ship.h +++ b/src/game/ship.h @@ -42,8 +42,6 @@ public: float speed_max; /// yaw turn speed float yaw_speed; - - static const unsigned int type_id=1; private: /// current yaw, angle in XZ plane, 0-360 float yaw_current; diff --git a/src/game/star.cc b/src/game/star.cc index a8b5e87..4ef22de 100644 --- a/src/game/star.cc +++ b/src/game/star.cc @@ -10,7 +10,7 @@ namespace game { -Star::Star() : core::Entity(star_enttype), +Star::Star() : core::Entity(0, star_enttype), color(1,1,1,1) { radius = 48; -- cgit v1.2.3