Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Selenite::loadGame(const std::string& file)
- {
- std::ifstream fs;
- fs.open(file,std::ios::binary|std::ios::in);
- if(fs.is_open())
- {
- if(lua)lua_close(lua);lua=0;
- lua=luaL_newstate();
- /*
- luaL_newmetatable(lua, "object");
- lua_pushliteral(lua, "__index");
- lua_pushcfunction(lua,apiObjectIndex);
- lua_rawset(lua, -3);
- lua_pop(lua, 1);
- */
- if(rootObject)delete rootObject;
- rootObject=new TGameObject();
- rootObject->load(fs);
- std::string currentSceneUUID=ioutil::readString(fs);
- fs.close();
- //TScene* scene=(TScene*)rootObject->getObject(currentSceneUUID);
- //selectScene(scene);
- }
- else
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement