54 std::memset(
_id, 0,
sizeof(
_id));
131 const size_t idSize =
_isSave ? 32 : 16;
134 if (
id && (id->read(
_id, idSize) != idSize))
144 if (ifoTop.
hasField(
"Mod_HakList")) {
147 for (GFF3List::const_iterator h = haks.begin(); h != haks.end(); ++h)
148 _haks.insert(
_haks.begin(), (*h)->getString(
"Mod_Hak"));
157 if (ifoTop.
hasField(
"Mod_Area_list")) {
160 for (GFF3List::const_iterator a = areas.begin(); a != areas.end(); ++a)
161 _areas.push_back((*a)->getString(
"Area_Name"));
167 if (ifoTop.
hasField(
"Mod_CacheNSSList")) {
170 for (GFF3List::const_iterator n = nss.begin(); n != nss.end(); ++n)
171 _nssCache.push_back((*n)->getString(
"ResRef"));
175 if (ifoTop.
hasField(
"Quest_list")) {
178 for (GFF3List::const_iterator q = quests.begin(); q != quests.end(); ++q)
179 _quests.push_back((*q)->getString(
"Quest"));
181 if (ifoTop.
hasField(
"QuestBase_list")) {
184 for (GFF3List::const_iterator q = quests.begin(); q != quests.end(); ++q)
185 _questDBs.push_back((*q)->getString(
"QuestBase"));
189 if (ifoTop.
hasField(
"StoryNPC_list")) {
192 for (GFF3List::const_iterator n = npcs.begin(); n != npcs.end(); ++n)
193 _storyNPCs.push_back((*n)->getString(
"StoryNPC"));
195 if (ifoTop.
hasField(
"MonsterNPC_list")) {
198 for (GFF3List::const_iterator n = npcs.begin(); n != npcs.end(); ++n)
236 load(stream, repairNWNPremium);
248 return &
_gff->getTopLevel();
int64 getSint(const Common::UString &field, int64 def=0) const
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
uint8 _hourDawn
The hour dawn starts.
#define ResMan
Shortcut for accessing the sound manager.
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like 'DATA', to ensure portability.
bool isSave() const
Is the module a save file?
int32 _maxWeatherIntensity
Maximum weather intensity.
const Common::UString & getTLK() const
Return the custom TLK table this module uses.
bool getLocString(const Common::UString &field, LocString &str) const
uint32 getMinutesPerHour() const
Return the number of real time minutes per game hour.
A class holding an UTF-8 string.
int32 getMaxWeatherIntensity() const
Return the maximum weather intensity.
uint32 _creatorID
ID of the IFO file creator.
std::vector< Common::UString > _storyNPCs
List of story NPCs used in the module.
void unload()
Unload a currently loaded IFO.
Common::UString _entryArea
The area the PC starts in.
uint32 getCreatorID() const
Return the ID of the IFO file creator.
bool hasField(const Common::UString &field) const
Does this specific field exist?
float _entryZ
The Z position the PC starts in.
Common::UString _customTLK
The custom TLK the module uses.
const LocString & getDescription() const
Return the description of the module.
std::vector< Common::UString > _monsterNPCs
List of monster NPCs used in the module.
int32 _snowChance
Chance for snow.
void getEntryDirection(float &x, float &y) const
Return the entry direction.
int _minVersionMajor
Minimum major game version this module needs.
uint64 getUint(const Common::UString &field, uint64 def=0) const
void getMinVersion(int &major, int &minor) const
Return the minimum game version the module needs to run.
uint8 _minutesPerHour
Number of real time minutes per game hour.
int _minVersionMinor
Minimum minor game version this module needs.
std::vector< Common::UString > _nssCache
Scripts that should be cached.
float _entryDirY
The Y orientation the PC starts in.
Common::UString _tag
The module's tag.
std::vector< Common::UString > _areas
Areas found in the module.
const std::vector< Common::UString > & getHAKs() const
Return the list of required HAK files.
Basic exceptions to throw.
void load(Common::SeekableReadStream *stream, bool repairNWNPremium=false)
Take over this stream and load an IFO out of it.
const std::vector< Common::UString > & getQuestDBs() const
Returns the list of quest databases used in the module.
std::vector< Common::UString > _questDBs
List of quest databases used in the module.
const char * c_str() const
Return the (utf8 encoded) string data.
const std::vector< Common::UString > & getNSSCache() const
Return the list of NSS (script) files that should be cached.
byte _id[32]
The module's unique ID.
Common::UString _startMovie
The movie the module starts with.
Loader for the module.ifo file.
float getXPScale() const
Get the number creature kill XP is multiplied by.
double getDouble(const Common::UString &field, double def=0.0) const
const std::vector< Common::UString > & getStoryNPCs() const
Returns the list of story NPCs used in the module.
float _entryX
The X position the PC starts in.
A GFF (generic file format) V3.2/V3.3 file, found in all Aurora games except Sonic Chronicles: The Da...
std::vector< Common::UString > _haks
HAKs required by the module.
uint8 getDawnHour() const
Return the hour dawn starts.
const std::vector< Common::UString > & getAreas() const
Return the list of areas in the module.
float _entryDirX
The X orientation the PC starts in.
uint8 _startDay
Day the module starts.
bool empty() const
Is the string empty?
uint8 _startMonth
Month the module starts.
void parseVersion(const Common::UString &version)
void getStartTime(uint8 &hour, uint8 &day, uint8 &month, uint32 &year) const
Return the module's starting time.
Basic reading stream interfaces.
std::vector< const GFF3Struct * > GFF3List
uint32 _startYear
Year the module starts.
const GFF3List & getList(const Common::UString &field) const
uint8 _hourDusk
The hour dusk starts.
LocString _name
The module's localized name.
const GFF3Struct * getGFF() const
Return the IFO's GFF struct.
const LocString & getName() const
Return the name of the module.
float _xpScale
The number creature kill XP is multiplied by.
const std::vector< Common::UString > & getQuests() const
Returns the list of quests used in the module.
int32 getMinWeatherIntensity() const
Return the minimum weather intensity.
Common::SeekableReadStream * getData(const Common::UString &field) const
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
uint32 _version
Version of this IFO file.
int32 getRainChance() const
Return the chance that it's going to rain.
const std::vector< Common::UString > & getMonsterNPCs() const
Returns the list of monster NPCs used in the module.
int32 _rainChance
Chance for rain.
uint8 _startHour
Hour the module starts.
uint16 _expansions
Bitfield of required expansions.
const Common::UString & getTag() const
Return the module's tag.
uint16 getExpansions() const
Return the list of required expansions.
void getEntryPosition(float &x, float &y, float &z) const
Return the entry position.
int32 _minWeatherIntensity
Minimum weather intensity.
const Common::UString & getEntryArea() const
Return the entry area.
float _entryY
The Y position the PC starts in.
void clear()
Clear the string's contents.
Common::ScopedPtr< GFF3File > _gff
The module.ifo GFF.
Interface for a seekable & readable data stream.
const Common::UString & getStartMovie() const
Return the starting movie.
std::vector< Common::UString > _quests
List of quests used in the module.
int32 getSnowChance() const
Return the chance that it's going to snow.
LocString _description
The module's localized description.
uint32 getVersion() const
Return the version of this IFO file.
bool _isSave
Is this module a save?
The global resource manager for Aurora resources.
uint8 getDuskHour() const
Return the hour dusk starts.