xoreos
0.0.5
|
A VIS, BioWare's Visibility Format. More...
#include <visfile.h>
Public Member Functions | |
VISFile () | |
~VISFile () | |
void | clear () |
Clear all information. More... | |
void | load (Common::SeekableReadStream &vis) |
Load a VIS file. More... | |
const std::vector< Common::UString > & | getVisibilityArray (const Common::UString &room) const |
Return the visibility array for a given room. More... | |
Private Attributes | |
std::map< Common::UString, std::vector< Common::UString > > | _map |
A VIS, BioWare's Visibility Format.
A VIS file is a simple ASCII file defining the inter-room visibility in an area, i.e. which rooms are visible from any given other room. The definitions of the rooms themselves can be found in LYT files (see class LYTFile).
VIS files are used by the two Knights of the Old Republic games and Jade Empire.
Aurora::VISFile::VISFile | ( | ) |
Definition at line 35 of file visfile.cpp.
Aurora::VISFile::~VISFile | ( | ) |
Definition at line 38 of file visfile.cpp.
void Aurora::VISFile::clear | ( | ) |
Clear all information.
Definition at line 41 of file visfile.cpp.
References _map.
Referenced by load().
const std::vector< Common::UString > & Aurora::VISFile::getVisibilityArray | ( | const Common::UString & | room | ) | const |
Return the visibility array for a given room.
This is a list of rooms that are visible from that given room
Definition at line 118 of file visfile.cpp.
References _map, Aurora::emptyRoom, and Common::UString::toLower().
Referenced by Engines::KotOR2::Area::getRoomsVisibleFrom(), Engines::KotOR::Area::getRoomsVisibleFrom(), Engines::KotOR2::Area::notifyPCMoved(), and Engines::KotOR::Area::notifyPCMoved().
void Aurora::VISFile::load | ( | Common::SeekableReadStream & | vis | ) |
Load a VIS file.
vis | A stream of an VIS file. |
Definition at line 45 of file visfile.cpp.
References _map, Common::StreamTokenizer::addChunkEnd(), Common::StreamTokenizer::addIgnore(), Common::StreamTokenizer::addSeparator(), clear(), Common::ReadStream::eos(), Common::StreamTokenizer::getTokens(), Common::StreamTokenizer::kRuleIgnoreAll, Common::StreamTokenizer::nextChunk(), Common::parseString(), Common::SeekableReadStream::pos(), Common::ReadStream::readChar(), Common::SeekableReadStream::seek(), and warning().
Referenced by Engines::Jade::AreaLayout::loadVIS(), Engines::KotOR2::Area::loadVIS(), and Engines::KotOR::Area::loadVIS().
|
private |
Definition at line 73 of file visfile.h.
Referenced by clear(), getVisibilityArray(), and load().