xoreos
0.0.5
|
An LYT, BioWare's Layout Format. More...
#include <lytfile.h>
Classes | |
struct | ArtPlaceable |
A simple, non-interactive placeable. More... | |
struct | DoorHook |
A place a door hooks into. More... | |
struct | Room |
A room. More... | |
Public Types | |
typedef std::vector< Room > | RoomArray |
typedef std::vector< ArtPlaceable > | ArtPlaceableArray |
typedef std::vector< DoorHook > | DoorHookArray |
Public Member Functions | |
LYTFile () | |
~LYTFile () | |
void | clear () |
Clear all information. More... | |
void | load (Common::SeekableReadStream &lyt) |
Load a LYT file. More... | |
const RoomArray & | getRooms () const |
Get all rooms in this layout. More... | |
const ArtPlaceableArray & | getArtPlaceables () const |
Get art placeables in this layout. More... | |
const DoorHookArray & | getDoorHooks () const |
Get all door hooks in this layout. More... | |
Common::UString | getFileDependency () const |
Get the file dependency in this layout. More... | |
Private Member Functions | |
void | assertTokenCount (const std::vector< Common::UString > &tokens, size_t n, const Common::UString &name) |
Private Attributes | |
RoomArray | _rooms |
ArtPlaceableArray | _artPlaceables |
DoorHookArray | _doorHooks |
Common::UString | _fileDependency |
An LYT, BioWare's Layout Format.
A LYT file is a simple ASCII file specifying the layout of an area in the two Knights of the Old Republic games and Jade Empire. The LYT defines the general visual structure of an area.
This includes:
As well as these fields we don't support yet:
typedef std::vector<ArtPlaceable> Aurora::LYTFile::ArtPlaceableArray |
typedef std::vector<DoorHook> Aurora::LYTFile::DoorHookArray |
typedef std::vector<Room> Aurora::LYTFile::RoomArray |
Aurora::LYTFile::LYTFile | ( | ) |
Definition at line 35 of file lytfile.cpp.
Aurora::LYTFile::~LYTFile | ( | ) |
Definition at line 38 of file lytfile.cpp.
|
private |
Definition at line 48 of file lytfile.cpp.
References Common::UString::c_str().
Referenced by load().
void Aurora::LYTFile::clear | ( | ) |
Clear all information.
Definition at line 41 of file lytfile.cpp.
References _artPlaceables, _doorHooks, _fileDependency, _rooms, and Common::UString::clear().
Referenced by load().
const LYTFile::ArtPlaceableArray & Aurora::LYTFile::getArtPlaceables | ( | ) | const |
Get art placeables in this layout.
Definition at line 206 of file lytfile.cpp.
References _artPlaceables.
const LYTFile::DoorHookArray & Aurora::LYTFile::getDoorHooks | ( | ) | const |
Get all door hooks in this layout.
Definition at line 210 of file lytfile.cpp.
References _doorHooks.
Common::UString Aurora::LYTFile::getFileDependency | ( | ) | const |
Get the file dependency in this layout.
Definition at line 214 of file lytfile.cpp.
References _fileDependency.
const LYTFile::RoomArray & Aurora::LYTFile::getRooms | ( | ) | const |
Get all rooms in this layout.
Definition at line 202 of file lytfile.cpp.
References _rooms.
Referenced by Engines::Jade::AreaLayout::loadRooms(), Engines::KotOR2::Area::loadRooms(), and Engines::KotOR::Area::loadRooms().
void Aurora::LYTFile::load | ( | Common::SeekableReadStream & | lyt | ) |
Load a LYT file.
lyt | A stream of an LYT file. |
Definition at line 56 of file lytfile.cpp.
References _artPlaceables, _doorHooks, _fileDependency, _rooms, Common::StreamTokenizer::addChunkEnd(), Common::StreamTokenizer::addIgnore(), Common::StreamTokenizer::addSeparator(), assertTokenCount(), clear(), Common::ReadStream::eos(), Common::StreamTokenizer::getTokens(), Common::StreamTokenizer::kRuleIgnoreAll, Common::StreamTokenizer::nextChunk(), and Common::parseString().
Referenced by Engines::Jade::AreaLayout::loadLYT(), Engines::KotOR2::Area::loadLYT(), and Engines::KotOR::Area::loadLYT().
|
private |
Definition at line 108 of file lytfile.h.
Referenced by clear(), getArtPlaceables(), and load().
|
private |
Definition at line 109 of file lytfile.h.
Referenced by clear(), getDoorHooks(), and load().
|
private |
Definition at line 110 of file lytfile.h.
Referenced by clear(), getFileDependency(), and load().
|
private |
Definition at line 107 of file lytfile.h.
Referenced by clear(), getRooms(), and load().