Changeset 4021 in orxonox.OLD for orxonox/branches/heightMap/src
- Timestamp:
- May 3, 2005, 12:55:39 AM (20 years ago)
- Location:
- orxonox/branches/heightMap/src
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/heightMap/src/game_loader.cc
r3727 r4021 96 96 Campaign* debugCampaign = new Campaign(); 97 97 98 /* 98 99 World* world0 = new World(DEBUG_WORLD_0); 99 100 world0->setNextStoryID(WORLD_ID_1); … … 105 106 106 107 World* world2 = new World(DEBUG_WORLD_2); 107 world2->setNextStoryID(WORLD_ID_ GAMEEND);108 world2->setNextStoryID(WORLD_ID_3); 108 109 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); 109 114 110 115 this->currentCampaign = debugCampaign; -
orxonox/branches/heightMap/src/story_entities/story_def.h
r3472 r4021 11 11 #define DEBUG_WORLD_1 101 12 12 #define DEBUG_WORLD_2 102 13 #define DEBUG_WORLD_3 103 14 13 15 14 16 #define WORLD_ID_0 0 -
orxonox/branches/heightMap/src/story_entities/world.cc
r3870 r4021 543 543 544 544 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; 545 607 } 608 609 546 610 default: 547 611 printf("World::load() - no world with ID %i found", this->debugWorldNr ); 548 612 } 613 549 614 } 550 615 else if(this->worldName != NULL) … … 561 626 glEndList(); 562 627 563 terrain = new Terrain("../data/ worlds/newGround.obj");628 terrain = new Terrain("../data/pictures/heightmapHello.bmp"); 564 629 terrain->setRelCoor(Vector(0,-10,0)); 565 630 this->spawn(terrain); -
orxonox/branches/heightMap/src/world_entities/terrain.cc
r3677 r4021 45 45 if (strstr(fileName, ".obj") || strstr(fileName, ".OBJ")) 46 46 { 47 // the obj case 47 48 this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_LEVEL); 48 49 } 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 } 49 55 else 50 56 { 51 // load the hightMap here.57 // nor .obj nor .bmp 52 58 } 53 59 }
Note: See TracChangeset
for help on using the changeset viewer.