From 6e08b92bd4f3e32fdf550f0a3e950e3101a1b06f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 2 Mar 2008 21:21:13 +0000 Subject: Rotated world --- src/game/game.cc | 22 +++++++++++++++------- src/game/ship.cc | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'src/game') diff --git a/src/game/game.cc b/src/game/game.cc index cf9f496..828a35b 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -75,14 +75,14 @@ void Game::init() // the star Star *star = new Star(); - star->entity_location = Vector3f(256.0f, 0.0f, 256.0f); + star->entity_location = Vector3f(256.0f, -256.0f, 0.0f); star->entity_name = "star: Sabishi Hoshi"; // the green cube core::Entity *cube = new core::Entity(core::Entity::Solid & core::Entity::Static); cube->entity_shape = core::Entity::Cube; cube->entity_color = Color(0.0f, 0.8f, 0.0f); - cube->entity_location = Vector3f(24.0f, 0.0f, -24.0f); + cube->entity_location = Vector3f(24.0f, 24.0f, 0.0f); cube->entity_name ="ccube: Borg cube green"; cube->entity_modelname = "ccube"; cube->entity_moduletypeid = cube_enttype; @@ -91,24 +91,32 @@ void Game::init() cube = new core::Entity(core::Entity::Solid & core::Entity::Static); cube->entity_shape = core::Entity::Cube; cube->entity_color = Color(1.0f, 0.0f, 0.0f); - cube->entity_location = Vector3f(16.0f, 0.0f, -16.0f); + cube->entity_location = Vector3f(16.0f, 16.0f, 0.0f); cube->entity_name = "cube: Borg cube red"; cube->entity_modelname = "cube"; cube->entity_moduletypeid = cube_enttype; - // diamond + // Thornaider cube = new core::Entity(core::Entity::Solid & core::Entity::Static); cube->entity_shape = core::Entity::Diamond; cube->entity_color = Color(0.5f, 1.0f, 5.0f); - cube->entity_location = Vector3f(16.0f, 0.0f, -20.0f); - cube->entity_name = "diamond: big bucks"; + cube->entity_location = Vector3f(16.0f, 20.0f, 0.0f); + cube->entity_name = "wreck: Thornaider"; cube->entity_modelname = "ship"; + // Micron Vector + cube = new core::Entity(core::Entity::Solid & core::Entity::Static); + cube->entity_shape = core::Entity::Diamond; + cube->entity_color = Color(0.5f, 1.0f, 5.0f); + cube->entity_location = Vector3f(18.0f, 22.0f, 0.0f); + cube->entity_name = "wreck: Micron Vector"; + cube->entity_modelname = "micron_vector"; + // the yellow sphere core::Entity *sphere = new core::Entity(core::Entity::Solid & core::Entity::Static); sphere->entity_shape = core::Entity::Sphere; sphere->entity_color = Color(0.8f, 0.8f, 0.0f); - sphere->entity_location = Vector3f(0.0f, 0.0f, -32.0f); + sphere->entity_location = Vector3f(0.0f, 32.0f, 0.0f); sphere->entity_name ="sphere: The Sphere"; // the galactic origin diff --git a/src/game/ship.cc b/src/game/ship.cc index 1bcdfbf..e2a42d8 100644 --- a/src/game/ship.cc +++ b/src/game/ship.cc @@ -61,7 +61,7 @@ void Ship::frame(float seconds) // location TODO avoid sin/cos calculations entity_location.x += cosf(entity_direction * M_PI / 180) * entity_speed * seconds; - entity_location.z -= sinf(entity_direction * M_PI / 180) * entity_speed * seconds; + entity_location.y += sinf(entity_direction * M_PI / 180) * entity_speed * seconds; entity_dirty = true; } -- cgit v1.2.3