void DECFile::load(Common::SeekableSubReadStreamEndian &dec, const Common::String &fileName) { dec.skip(2); // Unused int16 backdropCount = dec.readUint16(); int16 layerCount = dec.readUint16(); // Sanity checks if (backdropCount > 1) warning("DECFile::load(): More than one backdrop (%d) in file \"%s\"", backdropCount, fileName.c_str()); if (layerCount < 1) warning("DECFile::load(): Less than one layer (%d) in file \"%s\"", layerCount, fileName.c_str()); // Load the backdrop if (backdropCount > 0) { loadBackdrop(dec); // We only support one backdrop, skip the rest dec.skip((backdropCount - 1) * (13 + (_hasPadding ? 1 : 0))); } // Load the layers _layers.reserve(MAX(0, layerCount - 1)); for (int i = 0; i < layerCount - 1; i++) _layers.push_back(loadLayer(dec)); // Load the backdrop parts if (backdropCount > 0) loadParts(dec); }
// Create a model by deserializing it from Json Model::Model(const Json::Value& root, const std::string& directory, TextureCache &_textureCache) : meshes(0, NULL), skeleton(new Node()), textureCache(_textureCache), previousProgram(NULL), uploaded(false) { // Load animations loadAnimations(root); // Load materials loadMaterials(root, directory); // Load mesh data loadMeshes(root); // Load node data loadSkeleton(root); // Load parts loadParts(root); }
ofxBox& ofxBox::load(string _objName){ objDir = _objName; string _path = objDir+ "/config.box"; loadParts( _path ); return * this; }
ResearchInfo::ResearchInfo() { loadParts(); }