Changeset 4094 in orxonox.OLD
- Timestamp:
- May 6, 2005, 8:49:29 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/defs/debug.h
r4085 r4094 61 61 #define DEBUG_MODULE_COMMAND_NODE 4 62 62 #define DEBUG_MODULE_GRAPHICS 0 63 #define DEBUG_MODULE_LOAD 063 #define DEBUG_MODULE_LOAD 2 64 64 65 65 #define DEBUG_MODULE_IMPORTER 3 -
orxonox/trunk/src/game_loader.cc
r4091 r4094 25 25 #include "command_node.h" 26 26 #include "vector.h" 27 #include "resource_manager.h" 27 28 #include "factory.h" 28 29 … … 76 77 { 77 78 ErrorMessage errorCode; 78 79 this->currentCampaign = this->fileToCampaign(name); 79 char* campaignName; 80 if (ResourceManager::isFile(name)) 81 { 82 this->currentCampaign = this->fileToCampaign(name); 83 } 84 else 85 { 86 campaignName = new char[strlen(ResourceManager::getInstance()->getDataDir())+strlen(name)]; 87 sprintf(campaignName, "%s%s", ResourceManager::getInstance()->getDataDir(), name); 88 this->currentCampaign = this->fileToCampaign(campaignName); 89 delete campaignName; 90 } 80 91 } 81 92 -
orxonox/trunk/src/lib/graphics/graphics_engine.cc
r3844 r4094 17 17 18 18 #include "graphics_engine.h" 19 #include "resource_manager.h" 19 20 20 21 #include "debug.h" … … 101 102 102 103 // TO DO: Create a cool icon and use it here 103 SDL_WM_SetIcon(SDL_LoadBMP("../data/pictures/orxonox-icon32x32.bmp"), NULL); 104 104 char* loadPic = new char[strlen(ResourceManager::getInstance()->getDataDir())+ 100]; 105 sprintf(loadPic, "%s%s", ResourceManager::getInstance()->getDataDir(), "pictures/orxonox-icon32x32.bmp"); 106 SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL); 107 delete loadPic; 105 108 // Enable default GL stuff 106 109 glEnable(GL_DEPTH_TEST); -
orxonox/trunk/src/orxonox.cc
r4091 r4094 247 247 248 248 this->gameLoader = GameLoader::getInstance(); 249 this->gameLoader->loadCampaign(" ../data/worlds/DefaultCampaign.oxc");249 this->gameLoader->loadCampaign("worlds/DefaultCampaign.oxc"); 250 250 // this->gameLoader->loadDebugCampaign(DEBUG_CAMPAIGN_0); 251 251 this->gameLoader->init(); -
orxonox/trunk/src/story_entities/world.cc
r4091 r4094 121 121 { 122 122 this->constuctorInit("", -1); 123 123 this->path = NULL; 124 124 const char *string; 125 125 char *name; … … 169 169 World::World (char* name) 170 170 { 171 this->path = NULL; 171 172 this->constuctorInit(name, -1); 172 173 //NullParent* np = NullParent::getInstance(); … … 179 180 World::World (int worldID) 180 181 { 182 this->path = NULL; 181 183 this->constuctorInit(NULL, worldID); 182 184 } … … 266 268 ErrorMessage World::load() 267 269 { 268 PRINTF 0("> Loading world: '%s'\n", getPath());270 PRINTF(0)("> Loading world: '%s'\n", getPath()); 269 271 270 272 GameLoader* loader = GameLoader::getInstance(); … … 467 469 glEndList(); 468 470 469 terrain = new Terrain(" ../data/worlds/newGround.obj");471 terrain = new Terrain("worlds/newGround.obj"); 470 472 terrain->setRelCoor(Vector(0,-10,0)); 471 473 this->spawn(terrain); … … 590 592 591 593 // Create SkySphere 592 sky = new Skysphere(" ../data/pictures/sky-replace.jpg");594 sky = new Skysphere("pictures/sky-replace.jpg"); 593 595 this->localPlayer->addChild(this->sky); 594 596 this->spawn(this->sky); … … 635 637 636 638 // Create SkySphere 637 this->sky = new Skysphere(" ../data/pictures/sky-replace.jpg");639 this->sky = new Skysphere("pictures/sky-replace.jpg"); 638 640 this->sky->setName("SkySphere"); 639 641 this->spawn(this->sky); … … 1231 1233 void World::setPath( const char* name) 1232 1234 { 1233 this->path = new char[strlen(name)+1]; 1234 strcpy(this->path, name); 1235 if (this->path) 1236 delete this->path; 1237 if (ResourceManager::isFile(name)) 1238 { 1239 this->path = new char[strlen(name)+1]; 1240 strcpy(this->path, name); 1241 } 1242 else 1243 { 1244 this->path = new char[strlen(ResourceManager::getInstance()->getDataDir()) + strlen(name) +1]; 1245 sprintf(this->path, "%s%s", ResourceManager::getInstance()->getDataDir(), name); 1246 } 1235 1247 } 1236 1248 -
orxonox/trunk/src/world_entities/environment.cc
r3986 r4094 30 30 { 31 31 this->model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL); 32 // this->model = new OBJModel("../data/models/fighter.obj");33 32 } 34 33 -
orxonox/trunk/src/world_entities/skysphere.cc
r3763 r4094 44 44 { 45 45 if (fileName == NULL) 46 this->initialize(" ../data/pictures/sky-replace.jpg");46 this->initialize("pictures/sky-replace.jpg"); 47 47 else 48 48 this->initialize(fileName);
Note: See TracChangeset
for help on using the changeset viewer.