void Area::loadProperties(const Aurora::GFF3Struct &props) { // Ambient sound const Aurora::TwoDAFile &ambientSound = TwoDAReg.get2DA("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.25f * (1.0f - (1.0f / powf(5.0f, ambientDayVol / 127.0f))); _ambientNightVol = 1.25f * (1.0f - (1.0f / powf(5.0f, ambientNightVol / 127.0f))); // TODO: PresetInstance0 - PresetInstance7 // Ambient music setMusicDayTrack (props.getUint("MusicDay" , Aurora::kStrRefInvalid)); setMusicNightTrack(props.getUint("MusicNight" , Aurora::kStrRefInvalid)); // Battle music setMusicBattleTrack(props.getUint("MusicBattle", Aurora::kStrRefInvalid)); }
void Area::loadProperties(const Aurora::GFF3Struct &props) { setMusicDayTrack (props.getUint("MusicDay" , Aurora::kStrRefInvalid)); setMusicNightTrack (props.getUint("MusicNight" , Aurora::kStrRefInvalid)); setMusicBattleTrack(props.getUint("MusicBattle", Aurora::kStrRefInvalid)); }