xoreos  0.0.5
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Aurora::LYTFile Class Reference

An LYT, BioWare's Layout Format. More...

#include <lytfile.h>

Collaboration diagram for Aurora::LYTFile:
Collaboration graph
[legend]

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< RoomRoomArray
 
typedef std::vector< ArtPlaceableArtPlaceableArray
 
typedef std::vector< DoorHookDoorHookArray
 

Public Member Functions

 LYTFile ()
 
 ~LYTFile ()
 
void clear ()
 Clear all information. More...
 
void load (Common::SeekableReadStream &lyt)
 Load a LYT file. More...
 
const RoomArraygetRooms () const
 Get all rooms in this layout. More...
 
const ArtPlaceableArraygetArtPlaceables () const
 Get art placeables in this layout. More...
 
const DoorHookArraygetDoorHooks () 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
 

Detailed Description

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:

Definition at line 55 of file lytfile.h.

Member Typedef Documentation

◆ ArtPlaceableArray

Definition at line 79 of file lytfile.h.

◆ DoorHookArray

Definition at line 80 of file lytfile.h.

◆ RoomArray

typedef std::vector<Room> Aurora::LYTFile::RoomArray

Definition at line 78 of file lytfile.h.

Constructor & Destructor Documentation

◆ LYTFile()

Aurora::LYTFile::LYTFile ( )

Definition at line 35 of file lytfile.cpp.

◆ ~LYTFile()

Aurora::LYTFile::~LYTFile ( )

Definition at line 38 of file lytfile.cpp.

Member Function Documentation

◆ assertTokenCount()

void Aurora::LYTFile::assertTokenCount ( const std::vector< Common::UString > &  tokens,
size_t  n,
const Common::UString name 
)
private

Definition at line 48 of file lytfile.cpp.

References Common::UString::c_str().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getArtPlaceables()

const LYTFile::ArtPlaceableArray & Aurora::LYTFile::getArtPlaceables ( ) const

Get art placeables in this layout.

Definition at line 206 of file lytfile.cpp.

References _artPlaceables.

◆ getDoorHooks()

const LYTFile::DoorHookArray & Aurora::LYTFile::getDoorHooks ( ) const

Get all door hooks in this layout.

Definition at line 210 of file lytfile.cpp.

References _doorHooks.

◆ getFileDependency()

Common::UString Aurora::LYTFile::getFileDependency ( ) const

Get the file dependency in this layout.

Definition at line 214 of file lytfile.cpp.

References _fileDependency.

◆ getRooms()

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().

Here is the caller graph for this function:

◆ load()

void Aurora::LYTFile::load ( Common::SeekableReadStream lyt)

Member Data Documentation

◆ _artPlaceables

ArtPlaceableArray Aurora::LYTFile::_artPlaceables
private

Definition at line 108 of file lytfile.h.

Referenced by clear(), getArtPlaceables(), and load().

◆ _doorHooks

DoorHookArray Aurora::LYTFile::_doorHooks
private

Definition at line 109 of file lytfile.h.

Referenced by clear(), getDoorHooks(), and load().

◆ _fileDependency

Common::UString Aurora::LYTFile::_fileDependency
private

Definition at line 110 of file lytfile.h.

Referenced by clear(), getFileDependency(), and load().

◆ _rooms

RoomArray Aurora::LYTFile::_rooms
private

Definition at line 107 of file lytfile.h.

Referenced by clear(), getRooms(), and load().


The documentation for this class was generated from the following files: