Changeset 8391 in orxonox.OLD for branches/script_engine/src
- Timestamp:
- Jun 14, 2006, 3:35:34 PM (18 years ago)
- Location:
- branches/script_engine/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/script.cc
r8390 r8391 37 37 void Script::loadParams(const TiXmlElement* root) 38 38 { 39 printf("Loading params for %p \n",this);39 //printf("Loading params for %p \n",this); 40 40 BaseObject::loadParams(root); 41 41 … … 77 77 else 78 78 { 79 printf("ERROR while loading file %s: ",filename.c_str());79 printf("ERROR while loading file %s: \n",filename.c_str()); 80 80 reportError(error); 81 81 } … … 84 84 else 85 85 { 86 printf("ERROR while loading file %s: ",filename.c_str());86 printf("ERROR while loading file %s: \n",filename.c_str()); 87 87 reportError(error); 88 88 } … … 94 94 void Script::addObject(const std::string& className, const std::string& objectName) 95 95 { 96 printf("Script %p: I am about to add %s of class %s\n",this,objectName.c_str(),className.c_str());96 //printf("Script %p: I am about to add %s of class %s\n",this,objectName.c_str(),className.c_str()); 97 97 98 98 BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS); 99 printf("The script class for %s is at %p \n",className.c_str(),scriptClass);99 //printf("The script class for %s is at %p \n",className.c_str(),scriptClass); 100 100 WorldObject tmpObj; 101 101 if (scriptClass != NULL) … … 108 108 109 109 BaseObject* object = ClassList::getObject(objectName, className); 110 printf("%s is at %p \n",objectName.c_str(),object);110 //printf("%s is at %p \n",objectName.c_str(),object); 111 111 if (object != NULL && !objectIsAdded(objectName)) 112 112 { -
branches/script_engine/src/story_entities/game_world.cc
r8385 r8391 233 233 this->bPaused = false; 234 234 this->bRunning = true; 235 State::setScriptManager(&this->scriptManager); //make sure we have th right script manager235 State::setScriptManager(&this->scriptManager); //make sure we have the right script manager 236 236 this->run(); 237 237 } -
branches/script_engine/src/world_entities/script_trigger.cc
r8379 r8391 146 146 { 147 147 std::string file("lunartest2.lua"); 148 // Script script;148 //get script 149 149 Script* script = State::getScriptManager()->getScriptByFile(file); 150 150 printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState())); 151 152 // Register classes with the script153 // Lunar<Account>::Register(&script);154 //Lunar<Object>::Register(&script);155 156 //Object* obj= new Object();157 //Account a;158 //Account *b = new Account(30);159 160 // Add instances to the script161 //Lunar<Object>::insertObject(&script,obj,"Obj",true);162 //Lunar<Account>::insertObject(&script,&a,"a",false);163 //Lunar<Account>::insertObject(&script,b,"b",true);164 //printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));165 166 //Load a file167 //std::string file("lunartest2.lua");168 169 //if(script.loadFile(file))170 //printf("File %s succefully loaded\n", file.c_str());171 //printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));172 151 173 152 //execute a function
Note: See TracChangeset
for help on using the changeset viewer.