Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4021 in orxonox.OLD


Ignore:
Timestamp:
May 3, 2005, 12:55:39 AM (19 years ago)
Author:
nico
Message:

branches/heightmap/: created new empty files for the heightmap class.

Location:
orxonox/branches/heightMap/src
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/heightMap/src/game_loader.cc

    r3727 r4021  
    9696        Campaign* debugCampaign = new Campaign();
    9797
     98/*
    9899        World* world0 = new World(DEBUG_WORLD_0);
    99100        world0->setNextStoryID(WORLD_ID_1);
     
    105106
    106107        World* world2 = new World(DEBUG_WORLD_2);
    107         world2->setNextStoryID(WORLD_ID_GAMEEND);
     108        world2->setNextStoryID(WORLD_ID_3);
    108109        debugCampaign->addEntity(world2, WORLD_ID_2);
     110*/
     111        World* world3 = new World(DEBUG_WORLD_3);
     112        world3->setNextStoryID(WORLD_ID_GAMEEND);
     113        debugCampaign->addEntity(world3, WORLD_ID_0);
    109114
    110115        this->currentCampaign = debugCampaign;
  • orxonox/branches/heightMap/src/story_entities/story_def.h

    r3472 r4021  
    1111#define DEBUG_WORLD_1 101
    1212#define DEBUG_WORLD_2 102
     13#define DEBUG_WORLD_3 103
     14
    1315
    1416#define WORLD_ID_0 0
  • orxonox/branches/heightMap/src/story_entities/world.cc

    r3870 r4021  
    543543
    544544            break;
     545            }
     546           
     547        case DEBUG_WORLD_3:
     548          {
     549            lightMan->setPosition(-5.0, 10.0, -40.0);
     550            this->nullParent = NullParent::getInstance ();
     551            this->nullParent->setName ("NullParent");
     552
     553            // !\todo old track-system has to be removed
     554
     555            //create helper for player
     556            //HelperParent* hp = new HelperParent ();
     557            /* the player has to be added to this helper */
     558
     559            // create a player
     560            this->localPlayer = new Player ();
     561            this->localPlayer->setName ("player");
     562            this->spawn (this->localPlayer);
     563            /*monitor progress*/
     564            //this->glmis->step();
     565            this->glmis->step();
     566
     567            // bind input
     568            Orxonox *orx = Orxonox::getInstance ();
     569            orx->getLocalInput()->bind (this->localPlayer);
     570           
     571            // bind camera
     572            this->localCamera = new Camera();
     573            this->localCamera->setName ("camera");
     574           
     575            /*monitor progress*/
     576            this->glmis->step();
     577
     578            // Create SkySphere
     579            skyBox = new SkyBox();
     580            skyBox->setTexture("pictures/sky/skybox", "jpg");
     581            skyBox->setParent(localCamera);
     582            this->spawn(skyBox);
     583
     584            /*monitor progress*/
     585            this->glmis->step();
     586
     587            //WorldEntity* env = new Environment();
     588            //env->setName ("env");
     589            //this->spawn(env);
     590
     591            /*monitor progress*/
     592            this->glmis->step();
     593
     594            // trackManager->setBindSlave(env);
     595            PNode* tn = trackManager->getTrackNode();
     596            tn->addChild(this->localPlayer);
     597            this->localCamera->lookAt(tn);
     598
     599            //localCamera->setParent(TrackNode::getInstance());
     600            tn->addChild(this->localCamera);
     601            //      localCamera->lookAt(tn);
     602            this->localPlayer->setMode(PNODE_ALL);
     603            //Vector* cameraOffset = new Vector (0, 5, -10);
     604            trackManager->condition(2, LEFTRIGHT, this->localPlayer);
     605            this->glmis->step();
     606            break;
    545607          }
     608
     609
    546610        default:
    547611          printf("World::load() - no world with ID %i found", this->debugWorldNr );
    548612        }
     613       
    549614    }
    550615  else if(this->worldName != NULL)
     
    561626  glEndList();
    562627
    563   terrain = new Terrain("../data/worlds/newGround.obj");
     628  terrain = new Terrain("../data/pictures/heightmapHello.bmp");
    564629  terrain->setRelCoor(Vector(0,-10,0));
    565630  this->spawn(terrain);
  • orxonox/branches/heightMap/src/world_entities/terrain.cc

    r3677 r4021  
    4545  if (strstr(fileName, ".obj") || strstr(fileName, ".OBJ"))
    4646    {
     47      // the obj case
    4748      this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_LEVEL);
    4849    }
     50  else if (strstr(fileName, ".bmp") || strstr(fileName, ".BMP"))
     51    {
     52      // the heightmap case
     53      this->model = (Heightmap*)ResourceManager::getInstance()->load(fileName, BMP, RP_LEVEL);
     54    }
    4955  else
    5056    {
    51       // load the hightMap here.
     57      // nor .obj nor .bmp
    5258    }
    5359}
Note: See TracChangeset for help on using the changeset viewer.