void Door::loadObject(const Aurora::GFFStruct &gff) { // Generic type _genericType = gff.getUint("GenericType", _genericType); // State _state = (State) gff.getUint("AnimationState", (uint) _state); // Linked to _linkedToFlag = (LinkedToFlag) gff.getUint("LinkedToFlags", (uint) _linkedToFlag); _linkedTo = gff.getString("LinkedTo"); }
void Area::loadProperties(const Aurora::GFFStruct &props) { // Ambient sound const Aurora::TwoDAFile &ambientSound = TwoDAReg.get("ambientsound"); uint32 ambientDay = props.getUint("AmbientSndDay" , Aurora::kStrRefInvalid); uint32 ambientNight = props.getUint("AmbientSndNight", Aurora::kStrRefInvalid); _ambientDay = ambientSound.getRow(ambientDay ).getString("Resource"); _ambientNight = ambientSound.getRow(ambientNight).getString("Resource"); uint32 ambientDayVol = CLIP<uint32>(props.getUint("AmbientSndDayVol" , 127), 0, 127); uint32 ambientNightVol = CLIP<uint32>(props.getUint("AmbientSndNightVol", 127), 0, 127); _ambientDayVol = 1.25 * (1.0 - (1.0 / powf(5.0, ambientDayVol / 127.0))); _ambientNightVol = 1.25 * (1.0 - (1.0 / powf(5.0, ambientNightVol / 127.0))); // TODO: PresetInstance0 - PresetInstance7 // Ambient music const Aurora::TwoDAFile &ambientMusic = TwoDAReg.get("ambientmusic"); uint32 musicDay = props.getUint("MusicDay" , Aurora::kStrRefInvalid); uint32 musicNight = props.getUint("MusicNight" , Aurora::kStrRefInvalid); _musicDay = ambientMusic.getRow(musicDay ).getString("Resource"); _musicNight = ambientMusic.getRow(musicNight).getString("Resource"); // Battle music uint32 musicBattle = props.getUint("MusicBattle", Aurora::kStrRefInvalid); if (musicBattle != Aurora::kStrRefInvalid) { _musicBattle = ambientMusic.getRow(musicBattle).getString("Resource"); // Battle stingers Common::UString stinger[3]; stinger[0] = ambientMusic.getRow(musicBattle).getString("Stinger1"); stinger[1] = ambientMusic.getRow(musicBattle).getString("Stinger2"); stinger[2] = ambientMusic.getRow(musicBattle).getString("Stinger3"); for (int i = 0; i < 3; i++) if (!stinger[i].empty()) _musicBattleStinger.push_back(stinger[i]); } }
void Creature::loadProperties(const Aurora::GFFStruct &gff) { // Tag _tag = gff.getString("Tag", _tag); // Name if (gff.hasField("LocName")) { Aurora::LocString name; gff.getLocString("LocName", name); _name = name.getString(); } // Description if (gff.hasField("Description")) { Aurora::LocString description; gff.getLocString("Description", description); _description = description.getString(); } // Portrait loadPortrait(gff); // Appearance _appearance = gff.getUint("Appearance_Type", _appearance); // Static _static = gff.getBool("Static", _static); // Usable _usable = gff.getBool("Useable", _usable); }
void Situated::loadPortrait(const Aurora::GFFStruct &gff) { uint32 portraitID = gff.getUint("PortraitId"); if (portraitID != 0) { const Aurora::TwoDAFile &twoda = TwoDAReg.get("portraits"); Common::UString portrait = twoda.getRow(portraitID).getString("BaseResRef"); if (!portrait.empty()) _portrait = "po_" + portrait; } _portrait = gff.getString("Portrait", _portrait); }
void Situated::loadProperties(const Aurora::GFFStruct &gff) { // Tag _tag = gff.getString("Tag", _tag); // Name if (gff.hasField("LocName")) { Aurora::LocString name; gff.getLocString("LocName", name); _name = name.getString(); } // Description if (gff.hasField("Description")) { Aurora::LocString description; gff.getLocString("Description", description); _description = description.getString(); } // Portrait loadPortrait(gff); // Appearance _appearanceID = gff.getUint("Appearance", _appearanceID); // Conversation _conversation = gff.getString("Conversation", _conversation); // Static _static = gff.getBool("Static", _static); // Usable _usable = gff.getBool("Useable", _usable); // Locked _locked = gff.getBool("Locked", _locked); // Scripts readScripts(gff); }
void Door::loadObject(const Aurora::GFFStruct &gff) { _genericType = gff.getUint("GenericType", _genericType); }
void Placeable::loadObject(const Aurora::GFFStruct &gff) { // State _state = (State) gff.getUint("AnimationState", (uint) _state); }