Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10585 in orxonox.OLD


Ignore:
Timestamp:
Feb 8, 2007, 6:14:35 PM (17 years ago)
Author:
snellen
Message:

Removed classes Account and Object (both needed only to test the scriptingframework)and removed example.cc, cleaned commented code in script_trigger.cc and gameworld.cc. … more to come

Location:
branches/cleanup/src
Files:
3 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • branches/cleanup/src/story_entities/game_world.cc

    r10523 r10585  
    193193  this->dataXML = (TiXmlElement*)root->Clone();
    194194
    195   //remove this after finished testing !!!!
    196   //Object* obj= new Object();
    197   //obj->setName("Obj");
    198   //Account* a = new Account();
    199   //a->setName("a");
    200   //Account *b = new Account(30);
    201   //b->setName("b");
    202 
    203 
    204195  LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams);
    205196
  • branches/cleanup/src/world_entities/script_trigger.cc

    r10381 r10585  
    244244  }
    245245}
    246 
    247 /*
    248  void ScriptTrigger::testScriptingFramework()
    249 {
    250    std::string file("lunartest2.lua");
    251    //get script
    252    Script* script = State::getScriptManager()->getScriptByFile(file);
    253    printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));
    254 
    255       //execute a function
    256    printf("----------- main -----------\n");
    257    std::string main("main");
    258    if( script->selectFunction(main,3))
    259      printf("function %s selected\n",main.c_str());
    260 
    261    script->pushParam(3.14159,main);
    262    printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));
    263    script->executeFunction();
    264 
    265    int ret = script->getReturnedInt();
    266    printf("main returned %i\n",ret);
    267 
    268    if(script->getReturnedBool())
    269      printf("main returned true\n");
    270    else
    271      printf("main returned false\n");
    272 
    273    float retf = script->getReturnedFloat();
    274    printf("main returned %f\n",retf);
    275 
    276 
    277    printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));
    278       //execute a 2nd function
    279    printf("----------- test -----------\n");
    280    std::string test("test");
    281    if( script->selectFunction(test,0))
    282      printf("function %s selected\n",test.c_str());
    283 
    284    script->executeFunction();
    285 
    286 
    287       //if(argc>1) lua_dofile(script.getLuaState(), argv[1]);
    288    printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));
    289 
    290 }*/
  • branches/cleanup/src/world_entities/script_trigger.h

    r9869 r10585  
    3030    virtual void tick(float timestep);
    3131    virtual void executeAction(float timestep);
    32     void testScriptingFramework();
    3332
    3433    /// SET MEMBER
Note: See TracChangeset for help on using the changeset viewer.