xoreos  0.0.5
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Engines Namespace Reference

Namespaces

 DragonAge
 
 DragonAge2
 
 Jade
 
 KotOR
 
 KotOR2
 
 NWN
 
 NWN2
 
 Sonic
 
 Witcher
 

Classes

class  Console
 
class  ConsoleWindow
 
class  Engine
 The base class for an engine within BioWare's Aurora family. More...
 
class  EngineManager
 The global engine manager. More...
 
class  EngineProbe
 A probe able to detect one specific game. More...
 
class  FreeRoamCamera
 
class  GameInstance
 
class  GameInstanceEngine
 
class  GameThread
 The game thread, running all game logic. More...
 
class  GUI
 A GUI. More...
 
class  KotORInventoryItem
 
class  KotORJadeWidget
 
class  LoadProgress
 
class  ModelLoader
 
class  SatelliteCamera
 
class  TokenManager
 Manager for tokens in Aurora engines text strings. More...
 
class  Trigger
 
class  Widget
 A widget in a GUI. More...
 
class  WidgetButton
 
class  WidgetCheckBox
 
class  WidgetLabel
 
class  WidgetListBox
 
class  WidgetPanel
 
class  WidgetProgressbar
 
class  WidgetProtoItem
 
class  WidgetScrollbar
 
class  WidgetSlider
 

Typedefs

typedef std::list< Common::ChangeIDChangeList
 

Enumerations

enum  ListBoxItemType { kLBItemTypeDefault = 0, kLBItemTypeKotORInventory = 1 }
 

Functions

void registerModelLoader (ModelLoader *loader)
 
void unregisterModelLoader ()
 
Graphics::Aurora::ModelloadModelObject (const Common::UString &resref, const Common::UString &texture)
 
Graphics::Aurora::ModelloadModelGUI (const Common::UString &resref)
 
void freeModel (Graphics::Aurora::Model *&model)
 
void indexMandatoryArchive (const Common::UString &file, uint32 priority, const std::vector< byte > &password, Common::ChangeID *changeID)
 
void indexMandatoryArchive (const Common::UString &file, uint32 priority, const std::vector< byte > &password, ChangeList &changes)
 
void indexMandatoryArchive (const Common::UString &file, uint32 priority, Common::ChangeID *changeID=0)
 Add an archive file to the resource manager, erroring out if it does not exist. More...
 
void indexMandatoryArchive (const Common::UString &file, uint32 priority, ChangeList &changes)
 
bool indexOptionalArchive (const Common::UString &file, uint32 priority, const std::vector< byte > &password, Common::ChangeID *changeID)
 
bool indexOptionalArchive (const Common::UString &file, uint32 priority, const std::vector< byte > &password, ChangeList &changes)
 
bool indexOptionalArchive (const Common::UString &file, uint32 priority, Common::ChangeID *changeID=0)
 Add an archive file to the resource manager, if it exists. More...
 
bool indexOptionalArchive (const Common::UString &file, uint32 priority, ChangeList &changes)
 
void indexMandatoryDirectory (const Common::UString &dir, const char *glob, int depth, uint32 priority, Common::ChangeID *changeID=0)
 Add a directory to the resource manager, erroring out if it does not exist. More...
 
void indexMandatoryDirectory (const Common::UString &dir, const char *glob, int depth, uint32 priority, ChangeList &changes)
 
bool indexOptionalDirectory (const Common::UString &dir, const char *glob, int depth, uint32 priority, Common::ChangeID *changeID=0)
 Add a directory to the resource manager, if it exists. More...
 
bool indexOptionalDirectory (const Common::UString &dir, const char *glob, int depth, uint32 priority, ChangeList &changes)
 
void deindexResources (Common::ChangeID &changeID)
 Remove previously added resources from the ResourceManager. More...
 
void deindexResources (ChangeList &changes)
 
void playVideo (const Common::UString &video)
 Play this video resource. More...
 
Sound::ChannelHandle playSound (const Common::UString &sound, Sound::SoundType soundType, bool loop=false, float volume=1.0f, bool pitchVariance=false)
 Play this sound resource. More...
 
void checkConfigInt (const Common::UString &key, int min, int max)
 Make sure that an int config value is in the right range. More...
 
void checkConfigDouble (const Common::UString &key, double min, double max)
 Make sure that a double config value is in the right range. More...
 
bool longDelay (uint32 ms)
 Wait for a "long" amount of time, returning prematurely with true in the case of a requested quit. More...
 
Aurora::GFF3FileloadOptionalGFF3 (const Common::UString &gff3, Aurora::FileType type, uint32 id=0xFFFFFFFF, bool repairNWNPremium=false)
 Load a GFF3, but return 0 instead of throwing on error. More...
 
Aurora::GFF4FileloadOptionalGFF4 (const Common::UString &gff4, Aurora::FileType fileType, uint32 type=0xFFFFFFFF)
 Load a GFF4, but return 0 instead of throwing on error. More...
 
bool dumpResList (const Common::UString &name)
 Debug method to quickly dump the current list of resource to disk. More...
 
bool dumpStream (Common::SeekableReadStream &stream, const Common::UString &fileName)
 Debug method to quickly dump a stream to disk. More...
 
bool dumpResource (const Common::UString &name, Aurora::FileType type, const Common::UString &file="")
 Debug method to quickly dump a resource to disk. More...
 
bool dumpResource (const Common::UString &name, const Common::UString &file="")
 Debug method to quickly dump a resource to disk. More...
 
bool dumpTGA (const Common::UString &name, const Common::UString &file="")
 Debug method to quickly dump an image resource to disk. More...
 
bool dump2DA (const Common::UString &name, const Common::UString &file="")
 Debug method to quickly dump a 2DA to disk. More...
 
static bool hasLanguage (const std::vector< Aurora::Language > &langs, Aurora::Language lang)
 
static void fiddleLangChinese (const std::vector< Aurora::Language > &langs, Aurora::Language &lang)
 
static bool resolveLangInvalid (const std::vector< Aurora::Language > &langs, Aurora::Language &lang, const Common::UString &conf, const Common::UString &specifier, bool find)
 
static bool resolveLangUnavailable (const std::vector< Aurora::Language > &langs, Aurora::Language &lang, const Common::UString &specifier, bool find)
 

Variables

static ModelLoaderkModelLoader = 0
 
static const float kRotationSpeed = M_PI / 2.f
 

Typedef Documentation

◆ ChangeList

Definition at line 41 of file resources.h.

Enumeration Type Documentation

◆ ListBoxItemType

Enumerator
kLBItemTypeDefault 
kLBItemTypeKotORInventory 

Definition at line 35 of file listbox.h.

Function Documentation

◆ checkConfigDouble()

void Engines::checkConfigDouble ( const Common::UString key,
double  min,
double  max 
)

Make sure that a double config value is in the right range.

Definition at line 127 of file util.cpp.

References Common::UString::c_str(), ConfigMan, and warning().

Here is the call graph for this function:

◆ checkConfigInt()

void Engines::checkConfigInt ( const Common::UString key,
int  min,
int  max 
)

Make sure that an int config value is in the right range.

Definition at line 116 of file util.cpp.

References Common::UString::c_str(), ConfigMan, and warning().

Referenced by Engines::KotOR2::KotOR2Engine::checkConfig(), Engines::KotOR::KotOREngine::checkConfig(), and Engines::NWN::NWNEngine::checkConfig().

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

◆ deindexResources() [1/2]

void Engines::deindexResources ( Common::ChangeID changeID)

◆ deindexResources() [2/2]

void Engines::deindexResources ( ChangeList changes)

Definition at line 168 of file resources.cpp.

References deindexResources().

Here is the call graph for this function:

◆ dump2DA()

bool Engines::dump2DA ( const Common::UString name,
const Common::UString file = "" 
)

Debug method to quickly dump a 2DA to disk.

Definition at line 232 of file util.cpp.

References Common::UString::empty(), Aurora::kFileType2DA, ResMan, and Aurora::TwoDAFile::writeASCII().

Referenced by Engines::Console::cmdDump2DA(), and Engines::Console::cmdDumpAll2DA().

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

◆ dumpResList()

bool Engines::dumpResList ( const Common::UString name)

Debug method to quickly dump the current list of resource to disk.

Definition at line 172 of file util.cpp.

References ResMan.

Referenced by Engines::Console::cmdDumpResList().

Here is the caller graph for this function:

◆ dumpResource() [1/2]

bool Engines::dumpResource ( const Common::UString name,
Aurora::FileType  type,
const Common::UString file = "" 
)

Debug method to quickly dump a resource to disk.

Definition at line 207 of file util.cpp.

References dumpStream(), Common::UString::empty(), ResMan, and TypeMan.

Referenced by Engines::Console::cmdDumpRes(), and dumpResource().

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

◆ dumpResource() [2/2]

bool Engines::dumpResource ( const Common::UString name,
const Common::UString file = "" 
)

Debug method to quickly dump a resource to disk.

Definition at line 215 of file util.cpp.

References dumpResource(), Aurora::kFileTypeNone, and TypeMan.

Here is the call graph for this function:

◆ dumpStream()

bool Engines::dumpStream ( Common::SeekableReadStream stream,
const Common::UString fileName 
)

Debug method to quickly dump a stream to disk.

Definition at line 184 of file util.cpp.

References Common::WriteFile::close(), Common::WriteFile::flush(), Common::WriteFile::open(), Common::SeekableReadStream::pos(), Common::SeekableReadStream::seek(), and Common::WriteStream::writeStream().

Referenced by dumpResource().

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

◆ dumpTGA()

bool Engines::dumpTGA ( const Common::UString name,
const Common::UString file = "" 
)

Debug method to quickly dump an image resource to disk.

Definition at line 221 of file util.cpp.

References Common::UString::empty(), and Graphics::Aurora::Texture::loadImage().

Referenced by Engines::Console::cmdDumpTGA().

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

◆ fiddleLangChinese()

static void Engines::fiddleLangChinese ( const std::vector< Aurora::Language > &  langs,
Aurora::Language lang 
)
static

Definition at line 110 of file engine.cpp.

References hasLanguage(), Aurora::kLanguageChinese, Aurora::kLanguageChineseSimplified, Aurora::kLanguageChineseTraditional, LangMan, and status().

Referenced by Engines::Engine::evaluateLanguage().

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

◆ freeModel()

void Engines::freeModel ( Graphics::Aurora::Model *&  model)

Definition at line 82 of file model.cpp.

References Engines::ModelLoader::free(), and kModelLoader.

Referenced by Engines::NWN::ModelWidget::~ModelWidget().

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

◆ hasLanguage()

static bool Engines::hasLanguage ( const std::vector< Aurora::Language > &  langs,
Aurora::Language  lang 
)
static

Definition at line 106 of file engine.cpp.

Referenced by fiddleLangChinese(), and resolveLangUnavailable().

Here is the caller graph for this function:

◆ indexMandatoryArchive() [1/4]

void Engines::indexMandatoryArchive ( const Common::UString file,
uint32  priority,
const std::vector< byte > &  password,
Common::ChangeID changeID 
)

◆ indexMandatoryArchive() [2/4]

void Engines::indexMandatoryArchive ( const Common::UString file,
uint32  priority,
const std::vector< byte > &  password,
ChangeList changes 
)

Definition at line 50 of file resources.cpp.

References indexMandatoryArchive().

Here is the call graph for this function:

◆ indexMandatoryArchive() [3/4]

void Engines::indexMandatoryArchive ( const Common::UString file,
uint32  priority,
Common::ChangeID changeID = 0 
)

Add an archive file to the resource manager, erroring out if it does not exist.

Definition at line 57 of file resources.cpp.

References indexMandatoryArchive().

Here is the call graph for this function:

◆ indexMandatoryArchive() [4/4]

void Engines::indexMandatoryArchive ( const Common::UString file,
uint32  priority,
ChangeList changes 
)

Definition at line 63 of file resources.cpp.

References indexMandatoryArchive().

Here is the call graph for this function:

◆ indexMandatoryDirectory() [1/2]

void Engines::indexMandatoryDirectory ( const Common::UString dir,
const char *  glob,
int  depth,
uint32  priority,
Common::ChangeID changeID = 0 
)

◆ indexMandatoryDirectory() [2/2]

void Engines::indexMandatoryDirectory ( const Common::UString dir,
const char *  glob,
int  depth,
uint32  priority,
ChangeList changes 
)

Definition at line 126 of file resources.cpp.

References indexMandatoryDirectory().

Here is the call graph for this function:

◆ indexOptionalArchive() [1/4]

bool Engines::indexOptionalArchive ( const Common::UString file,
uint32  priority,
const std::vector< byte > &  password,
Common::ChangeID changeID 
)

◆ indexOptionalArchive() [2/4]

bool Engines::indexOptionalArchive ( const Common::UString file,
uint32  priority,
const std::vector< byte > &  password,
ChangeList changes 
)

Definition at line 88 of file resources.cpp.

References indexOptionalArchive().

Here is the call graph for this function:

◆ indexOptionalArchive() [3/4]

bool Engines::indexOptionalArchive ( const Common::UString file,
uint32  priority,
Common::ChangeID changeID = 0 
)

Add an archive file to the resource manager, if it exists.

Definition at line 100 of file resources.cpp.

References indexOptionalArchive().

Here is the call graph for this function:

◆ indexOptionalArchive() [4/4]

bool Engines::indexOptionalArchive ( const Common::UString file,
uint32  priority,
ChangeList changes 
)

Definition at line 106 of file resources.cpp.

References indexOptionalArchive().

Here is the call graph for this function:

◆ indexOptionalDirectory() [1/2]

bool Engines::indexOptionalDirectory ( const Common::UString dir,
const char *  glob,
int  depth,
uint32  priority,
Common::ChangeID changeID = 0 
)

◆ indexOptionalDirectory() [2/2]

bool Engines::indexOptionalDirectory ( const Common::UString dir,
const char *  glob,
int  depth,
uint32  priority,
ChangeList changes 
)

Definition at line 152 of file resources.cpp.

References indexOptionalDirectory().

Here is the call graph for this function:

◆ loadModelGUI()

Graphics::Aurora::Model * Engines::loadModelGUI ( const Common::UString resref)

◆ loadModelObject()

Graphics::Aurora::Model * Engines::loadModelObject ( const Common::UString resref,
const Common::UString texture 
)

Definition at line 47 of file model.cpp.

References Common::UString::c_str(), Common::UString::empty(), Common::exceptionDispatcherWarning(), kModelLoader, Graphics::Aurora::kModelTypeObject, and Engines::ModelLoader::load().

Referenced by Engines::KotOR::Creature::changeWeapon(), Engines::KotOR::CharacterGenerationInfo::getModel(), Engines::Jade::Room::load(), Engines::KotOR::Room::load(), Engines::KotOR2::Room::load(), Engines::DragonAge::Placeable::load(), Engines::DragonAge2::Placeable::load(), Engines::Sonic::Placeable::load(), Engines::KotOR2::Situated::load(), Engines::KotOR::Situated::load(), Engines::Jade::Placeable::loadAppearance(), Engines::Witcher::Area::loadAreaModel(), Engines::NWN2::Creature::loadArmorModel(), Engines::Jade::Creature::loadBody(), Engines::KotOR2::Creature::loadBody(), Engines::KotOR::Creature::loadBody(), Engines::NWN2::Creature::loadHairModel(), Engines::Jade::Creature::loadHead(), Engines::KotOR2::Creature::loadHead(), Engines::KotOR::Creature::loadHead(), Engines::NWN2::Creature::loadHeadModel(), Engines::DragonAge2::Room::loadLayout(), Engines::DragonAge::Room::loadLayout(), Engines::NWN2::Situated::loadModel(), Engines::NWN::Situated::loadModel(), Engines::Witcher::Situated::loadModel(), Engines::NWN::Item::loadModel(), Engines::NWN::Creature::loadModel(), Engines::DragonAge2::Creature::loadModelsHead(), Engines::DragonAge::Creature::loadModelsHead(), Engines::DragonAge2::Creature::loadModelsHeadList(), Engines::DragonAge::Creature::loadModelsHeadList(), Engines::DragonAge2::Creature::loadModelsHeadMorph(), Engines::DragonAge::Creature::loadModelsHeadMorph(), Engines::DragonAge2::Creature::loadModelsParts(), Engines::DragonAge::Creature::loadModelsParts(), Engines::DragonAge2::Creature::loadModelsSimple(), Engines::DragonAge::Creature::loadModelsSimple(), Engines::DragonAge2::Creature::loadModelsWelded(), Engines::DragonAge::Creature::loadModelsWelded(), Engines::NWN2::Area::loadTileModels(), Engines::NWN::Area::loadTiles(), Engines::KotOR::MainMenu::MainMenu(), and Engines::KotOR::CharacterGenerationInfo::recreateHead().

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

◆ loadOptionalGFF3()

Aurora::GFF3File * Engines::loadOptionalGFF3 ( const Common::UString gff3,
Aurora::FileType  type,
uint32  id = 0xFFFFFFFF,
bool  repairNWNPremium = false 
)

◆ loadOptionalGFF4()

Aurora::GFF4File * Engines::loadOptionalGFF4 ( const Common::UString gff4,
Aurora::FileType  fileType,
uint32  type = 0xFFFFFFFF 
)

Load a GFF4, but return 0 instead of throwing on error.

Definition at line 161 of file util.cpp.

◆ longDelay()

bool Engines::longDelay ( uint32  ms)

Wait for a "long" amount of time, returning prematurely with true in the case of a requested quit.

Definition at line 138 of file util.cpp.

References EventMan.

◆ playSound()

Sound::ChannelHandle Engines::playSound ( const Common::UString sound,
Sound::SoundType  soundType,
bool  loop = false,
float  volume = 1.0f,
bool  pitchVariance = false 
)

Play this sound resource.

Definition at line 81 of file util.cpp.

References Common::UString::c_str(), debugC(), Common::exceptionDispatcherWarning(), Common::kDebugEngineSound, Aurora::kResourceMusic, Aurora::kResourceSound, Sound::kSoundTypeMusic, ResMan, and SoundMan.

Referenced by Engines::Console::cmdPlaySound(), Engines::WidgetCheckBox::enter(), Engines::WidgetProtoItem::enter(), Engines::WidgetButton::enter(), Engines::NWN::Game::mainMenu(), Engines::NWN::WidgetClose::mouseDown(), Engines::NWN::WidgetListItemBaseButton::mouseDown(), Engines::NWN::WidgetCheckBox::mouseDown(), Engines::NWN::WidgetButton::mouseDown(), Engines::WidgetCheckBox::mouseUp(), Engines::WidgetProtoItem::mouseUp(), Engines::WidgetButton::mouseUp(), Engines::NWN::WidgetButton::mouseUp(), Engines::KotOR2::Area::playAmbientMusic(), Engines::Witcher::Area::playAmbientMusic(), Engines::NWN2::Area::playAmbientMusic(), Engines::NWN::Area::playAmbientMusic(), Engines::KotOR::Area::playAmbientMusic(), Engines::KotOR2::Area::playAmbientSound(), Engines::NWN2::Area::playAmbientSound(), Engines::NWN::Area::playAmbientSound(), Engines::KotOR::Area::playAmbientSound(), Engines::KotOR2::Game::playMenuMusic(), Engines::KotOR::Game::playMenuMusic(), Engines::NWN::Game::playMenuMusic(), Engines::KotOR2::Object::playSound(), Engines::KotOR::Object::playSound(), Engines::Witcher::Object::playSound(), Engines::NWN2::Object::playSound(), Engines::NWN::Object::playSound(), Engines::Witcher::Functions::playSound(), Engines::NWN2::Functions::playSound(), Engines::NWN::Functions::playSound(), Engines::Witcher::Functions::playSoundByStrRef(), Engines::NWN2::Functions::playSoundByStrRef(), Engines::NWN::Functions::playSoundByStrRef(), Engines::KotOR::DialogGUIBase::playSounds(), Engines::WidgetListBox::selectItemByWidgetTag(), Engines::WidgetListBox::selectNextItem(), Engines::WidgetListBox::selectPreviousItem(), Engines::NWN::CharInfoVoice::show(), Engines::KotOR2::MainMenu::startChargenMusic(), Engines::KotOR::MainMenu::startCharGenMusic(), Engines::KotOR2::MainMenu::startMainMusic(), Engines::KotOR::MainMenu::startMainMusic(), and Engines::NWN::WidgetGridBox::subActive().

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

◆ playVideo()

void Engines::playVideo ( const Common::UString video)

◆ registerModelLoader()

void Engines::registerModelLoader ( ModelLoader loader)

◆ resolveLangInvalid()

static bool Engines::resolveLangInvalid ( const std::vector< Aurora::Language > &  langs,
Aurora::Language lang,
const Common::UString conf,
const Common::UString specifier,
bool  find 
)
static

Definition at line 149 of file engine.cpp.

References Common::UString::c_str(), Common::UString::empty(), Aurora::kLanguageInvalid, LangMan, status(), and warning().

Referenced by Engines::Engine::evaluateLanguage().

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

◆ resolveLangUnavailable()

static bool Engines::resolveLangUnavailable ( const std::vector< Aurora::Language > &  langs,
Aurora::Language lang,
const Common::UString specifier,
bool  find 
)
static

Definition at line 173 of file engine.cpp.

References Common::UString::c_str(), hasLanguage(), LangMan, status(), and warning().

Referenced by Engines::Engine::evaluateLanguage().

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

◆ unregisterModelLoader()

void Engines::unregisterModelLoader ( )

Definition at line 41 of file model.cpp.

References kModelLoader.

Referenced by Engines::EngineManager::cleanup(), Engines::KotOR2::KotOR2Engine::deinit(), Engines::KotOR::KotOREngine::deinit(), and Engines::NWN::NWNEngine::deinit().

Here is the caller graph for this function:

Variable Documentation

◆ kModelLoader

ModelLoader* Engines::kModelLoader = 0
static

◆ kRotationSpeed

const float Engines::kRotationSpeed = M_PI / 2.f
static

Definition at line 35 of file satellitecamera.cpp.

Referenced by Engines::SatelliteCamera::update().