Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 13, 2005, 10:40:25 PM (19 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Got the system to compile, the basic backbone now runs. What remains to be done is implementing all necessary functions to load all vital classes into a world

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/story_entities/campaign.cc

    r3525 r3530  
    2222#include "story_entity.h"
    2323#include "factory.h"
     24#include "game_loader.h"
    2425
    2526using namespace std;
    2627
     28CREATE_FACTORY(Campaign);
    2729
    2830Campaign::Campaign ()
     
    3739{
    3840        TiXmlElement* element;
    39         char string;
     41        const char* string;
    4042        int id;
    4143       
     
    4850  // grab all the necessary parameters
    4951        string = grabParameter( root, "identifier");
    50         if( string == NULL || if( sscanf(string, "%d", &id) != 1))
    51         {
    52                 PRINTF(ERR)("Campaign is missing a proper 'identifier'\n");
    53                 setStoryId( -1);
    54         }
    55         else setStoryId( id);
     52        if( string == NULL || sscanf(string, "%d", &id) != 1)
     53        {
     54                PRINTF(1)("Campaign is missing a proper 'identifier'\n");
     55                this->setStoryID( -1);
     56        }
     57        else this->setStoryID( id);
    5658       
    5759  // find WorldList
     
    6365                StoryEntity* created = (StoryEntity*) loader->fabricate( element);
    6466                if( created != NULL) addEntity( created);
    65                 element = element->nextSiblingElement();
     67                element = element->NextSiblingElement();
    6668        }
    6769}
Note: See TracChangeset for help on using the changeset viewer.