|
OpenGothic
Open source reimplementation of Gothic I and II
|
#include <gothic.h>
Classes | |
| struct | Options |
Public Types | |
| enum class | LoadState : int { Idle = 0 , Loading = 1 , Saving = 2 , Finalize = 3 , FailedLoad = 4 , FailedSave = 5 } |
Public Member Functions | |
| Gothic () | |
| ~Gothic () | |
| auto | version () const -> const VersionInfo & |
| bool | isInGame () const |
| bool | isInGameAndAlive () const |
| std::string_view | defaultWorld () const |
| std::string_view | defaultPlayer () const |
| std::string_view | defaultSave () const |
| std::string_view | defaultGameDatFile () const |
| std::string_view | defaultOutputUnits () const |
| std::string_view | menuMain () const |
| void | setGame (std::unique_ptr< GameSession > &&w) |
| auto | clearGame () -> std::unique_ptr< GameSession > |
| auto | gameSession () const -> const GameSession * |
| auto | gameSession () -> GameSession * |
| const World * | world () const |
| World * | world () |
| WorldView * | worldView () const |
| Npc * | player () |
| Camera * | camera () |
| auto | questLog () const -> const QuestLog * |
| void | setupGlobalScripts () |
| auto | loadingBanner () const -> const Tempest::Texture2d * |
| int | loadingProgress () const |
| void | setLoadingProgress (int v) |
| SoundFx * | loadSoundFx (std::string_view name) |
| SoundFx * | loadSoundWavFx (std::string_view name) |
| auto | loadParticleFx (std::string_view name, bool relaxed=false) -> const ParticleFx * |
| auto | loadParticleFx (const ParticleFx *base, const VisualFx::Key *key) -> const ParticleFx * |
| auto | loadVisualFx (std::string_view name) -> const VisualFx * |
| void | emitGlobalSound (std::string_view sfx) |
| void | emitGlobalSound (const SoundFx *sfx) |
| void | emitGlobalSound (const Tempest::Sound &sfx) |
| void | emitGlobalSoundWav (std::string_view wav) |
| void | pushPause () |
| void | popPause () |
| bool | isPause () const |
| bool | isMarvinEnabled () const |
| void | setMarvinEnabled (bool m) |
| bool | isGodMode () const |
| void | setGodMode (bool g) |
| void | toggleDesktop () |
| bool | isDesktop () |
| bool | doFrate () const |
| void | setFRate (bool f) |
| bool | doClock () const |
| void | setClock (bool t) |
| bool | isBenchmarkMode () const |
| bool | isBenchmarkModeCi () const |
| void | setBenchmarkMode (Benchmark b) |
| LoadState | checkLoading () const |
| bool | finishLoading () |
| void | startLoad (std::string_view banner, const std::function< std::unique_ptr< GameSession >(std::unique_ptr< GameSession > &&)> f) |
| void | startSave (Tempest::Texture2d &&tex, const std::function< std::unique_ptr< GameSession >(std::unique_ptr< GameSession > &&)> f) |
| void | cancelLoading () |
| void | tick (uint64_t dt) |
| void | updateAnimation (uint64_t dt) |
| void | quickSave () |
| void | quickLoad () |
| void | save (std::string_view slot, std::string_view usrName) |
| void | load (std::string_view slot) |
| auto | updateDialog (const GameScript::DlgChoice &dlg, Npc &player, Npc &npc) -> std::vector< GameScript::DlgChoice > |
| void | dialogExec (const GameScript::DlgChoice &dlg, Npc &player, Npc &npc) |
| void | openDialogPipe (Npc &player, Npc &npc, AiOuputPipe *&pipe) |
| bool | isNpcInDialog (const Npc &npc) const |
| bool | isInDialog () const |
| std::string_view | messageFromSvm (std::string_view id, int voice) const |
| std::string_view | messageByName (std::string_view id) const |
| uint32_t | messageTime (std::string_view id) const |
| std::unique_ptr< zenkit::DaedalusVm > | createPhoenixVm (std::string_view datFile, const ScriptLang lang=ScriptLang::NONE) |
| zenkit::DaedalusScript | loadScript (std::string_view datFile, const ScriptLang lang) |
| void | setupCommonScriptClasses (zenkit::DaedalusScript &sc) |
| void | setupVmCommonApi (zenkit::DaedalusVm &vm) |
Static Public Member Functions | |
| static Gothic & | inst () |
| static auto | invCatOrder () -> const std::vector< ItmFlags > & |
| static auto | options () -> const Options & |
| static float | interfaceScale (const Tempest::Widget *w) |
| static std::u16string | nestedPath (const std::initializer_list< const char16_t * > &name, Tempest::Dir::FileType type) |
| static const FightAi & | fai () |
| static const SoundDefinitions & | sfx () |
| static const MusicDefinitions & | musicDef () |
| static const CameraDefinitions & | cameraDef () |
| static bool | settingsHasSection (std::string_view sec) |
| static int | settingsGetI (std::string_view sec, std::string_view name) |
| static void | settingsSetI (std::string_view sec, std::string_view name, int val) |
| static std::string_view | settingsGetS (std::string_view sec, std::string_view name) |
| static void | settingsSetS (std::string_view sec, std::string_view name, std::string_view val) |
| static float | settingsGetF (std::string_view sec, std::string_view name) |
| static void | settingsSetF (std::string_view sec, std::string_view name, float val) |
| static void | flushSettings () |
Public Attributes | |
| Tempest::Signal< void()> | toggleGi |
| Tempest::Signal< void()> | toggleVsm |
| Tempest::Signal< void()> | toggleRtsm |
| Tempest::Signal< void(std::string_view)> | onStartGame |
| Tempest::Signal< void(std::string_view)> | onLoadGame |
| Tempest::Signal< void(std::string_view, std::string_view)> | onSaveGame |
| Tempest::Signal< void(Npc &, Npc &, AiOuputPipe *&)> | onDialogPipe |
| std::function< bool(const Npc *)> | isNpcInDialogFn |
| Tempest::Signal< void(std::string_view, int, int, int, const GthFont &)> | onPrintScreen |
| Tempest::Signal< void(std::string_view)> | onPrint |
| Tempest::Signal< void(std::string_view)> | onVideo |
| Tempest::Signal< void(const ChapterScreen::Show &)> | onIntroChapter |
| Tempest::Signal< void(const DocumentMenu::Show &)> | onShowDocument |
| Tempest::Signal< void()> | onWorldLoaded |
| Tempest::Signal< void()> | onStartLoading |
| Tempest::Signal< void()> | onSessionExit |
| Tempest::Signal< void()> | onSettingsChanged |
| Tempest::Signal< void()> | onBenchmarkFinished |
|
strong |
| Gothic::Gothic | ( | ) |
Definition at line 47 of file gothic.cpp.
| Gothic::~Gothic | ( | ) |
Definition at line 245 of file gothic.cpp.
| Camera * Gothic::camera | ( | ) |
Definition at line 319 of file gothic.cpp.
|
static |
Definition at line 663 of file gothic.cpp.
| void Gothic::cancelLoading | ( | ) |
Definition at line 591 of file gothic.cpp.
| Gothic::LoadState Gothic::checkLoading | ( | ) | const |
Definition at line 500 of file gothic.cpp.
| std::unique_ptr< GameSession > Gothic::clearGame | ( | ) | -> std::unique_ptr<GameSession> |
Definition at line 295 of file gothic.cpp.
| std::unique_ptr< zenkit::DaedalusVm > Gothic::createPhoenixVm | ( | std::string_view | datFile, |
| const ScriptLang | lang = ScriptLang::NONE |
||
| ) |
Definition at line 711 of file gothic.cpp.
| std::string_view Gothic::defaultGameDatFile | ( | ) | const |
Definition at line 697 of file gothic.cpp.
| std::string_view Gothic::defaultOutputUnits | ( | ) | const |
Definition at line 701 of file gothic.cpp.
| std::string_view Gothic::defaultPlayer | ( | ) | const |
Definition at line 689 of file gothic.cpp.
| std::string_view Gothic::defaultSave | ( | ) | const |
Definition at line 693 of file gothic.cpp.
| std::string_view Gothic::defaultWorld | ( | ) | const |
Definition at line 685 of file gothic.cpp.
| void Gothic::dialogExec | ( | const GameScript::DlgChoice & | dlg, |
| Npc & | player, | ||
| Npc & | npc | ||
| ) |
Definition at line 635 of file gothic.cpp.
| void Gothic::emitGlobalSound | ( | const SoundFx * | sfx | ) |
Definition at line 399 of file gothic.cpp.
| void Gothic::emitGlobalSound | ( | const Tempest::Sound & | sfx | ) |
Definition at line 417 of file gothic.cpp.
| void Gothic::emitGlobalSound | ( | std::string_view | sfx | ) |
Definition at line 395 of file gothic.cpp.
| void Gothic::emitGlobalSoundWav | ( | std::string_view | wav | ) |
Definition at line 432 of file gothic.cpp.
|
static |
Definition at line 651 of file gothic.cpp.
| bool Gothic::finishLoading | ( | ) |
Definition at line 504 of file gothic.cpp.
|
static |
Definition at line 858 of file gothic.cpp.
| GameSession * Gothic::gameSession | ( | ) | -> GameSession* |
Definition at line 303 of file gothic.cpp.
| const GameSession * Gothic::gameSession | ( | ) | const -> const GameSession* |
Definition at line 299 of file gothic.cpp.
|
static |
Definition at line 249 of file gothic.cpp.
|
static |
Definition at line 471 of file gothic.cpp.
Definition at line 447 of file gothic.cpp.
| bool Gothic::isBenchmarkMode | ( | ) | const |
Definition at line 484 of file gothic.cpp.
| bool Gothic::isBenchmarkModeCi | ( | ) | const |
Definition at line 488 of file gothic.cpp.
| bool Gothic::isInDialog | ( | ) | const |
Definition at line 647 of file gothic.cpp.
| bool Gothic::isInGame | ( | ) | const |
Definition at line 267 of file gothic.cpp.
| bool Gothic::isInGameAndAlive | ( | ) | const |
Definition at line 271 of file gothic.cpp.
| bool Gothic::isMarvinEnabled | ( | ) | const |
Definition at line 463 of file gothic.cpp.
| bool Gothic::isNpcInDialog | ( | const Npc & | npc | ) | const |
Definition at line 643 of file gothic.cpp.
| bool Gothic::isPause | ( | ) | const |
Definition at line 459 of file gothic.cpp.
| void Gothic::load | ( | std::string_view | slot | ) |
Definition at line 627 of file gothic.cpp.
| const Tempest::Texture2d * Gothic::loadingBanner | ( | ) | const -> const Tempest::Texture2d* |
Definition at line 339 of file gothic.cpp.
| int Gothic::loadingProgress | ( | ) | const |
Definition at line 331 of file gothic.cpp.
| const ParticleFx * Gothic::loadParticleFx | ( | const ParticleFx * | base, |
| const VisualFx::Key * | key | ||
| ) | -> const ParticleFx* |
Definition at line 391 of file gothic.cpp.
| const ParticleFx * Gothic::loadParticleFx | ( | std::string_view | name, |
| bool | relaxed = false |
||
| ) | -> const ParticleFx* |
Definition at line 387 of file gothic.cpp.
| zenkit::DaedalusScript Gothic::loadScript | ( | std::string_view | datFile, |
| const ScriptLang | lang | ||
| ) |
Definition at line 720 of file gothic.cpp.
| SoundFx * Gothic::loadSoundFx | ( | std::string_view | name | ) |
Definition at line 343 of file gothic.cpp.
| SoundFx * Gothic::loadSoundWavFx | ( | std::string_view | name | ) |
Definition at line 364 of file gothic.cpp.
Definition at line 383 of file gothic.cpp.
| std::string_view Gothic::menuMain | ( | ) | const |
Definition at line 705 of file gothic.cpp.
| std::string_view Gothic::messageByName | ( | std::string_view | id | ) | const |
Definition at line 673 of file gothic.cpp.
| std::string_view Gothic::messageFromSvm | ( | std::string_view | id, |
| int | voice | ||
| ) | const |
Definition at line 667 of file gothic.cpp.
| uint32_t Gothic::messageTime | ( | std::string_view | id | ) | const |
Definition at line 679 of file gothic.cpp.
|
static |
Definition at line 659 of file gothic.cpp.
|
static |
Definition at line 949 of file gothic.cpp.
| void Gothic::openDialogPipe | ( | Npc & | player, |
| Npc & | npc, | ||
| AiOuputPipe *& | pipe | ||
| ) |
Definition at line 639 of file gothic.cpp.
|
static |
Definition at line 496 of file gothic.cpp.
| Npc * Gothic::player | ( | ) |
Definition at line 313 of file gothic.cpp.
| void Gothic::popPause | ( | ) |
Definition at line 455 of file gothic.cpp.
| void Gothic::pushPause | ( | ) |
Definition at line 451 of file gothic.cpp.
Definition at line 325 of file gothic.cpp.
| void Gothic::quickLoad | ( | ) |
Definition at line 619 of file gothic.cpp.
| void Gothic::quickSave | ( | ) |
Definition at line 615 of file gothic.cpp.
| void Gothic::save | ( | std::string_view | slot, |
| std::string_view | usrName | ||
| ) |
Definition at line 623 of file gothic.cpp.
| void Gothic::setBenchmarkMode | ( | Benchmark | b | ) |
Definition at line 492 of file gothic.cpp.
| void Gothic::setGame | ( | std::unique_ptr< GameSession > && | w | ) |
Definition at line 290 of file gothic.cpp.
| void Gothic::setLoadingProgress | ( | int | v | ) |
Definition at line 335 of file gothic.cpp.
| void Gothic::setMarvinEnabled | ( | bool | m | ) |
Definition at line 467 of file gothic.cpp.
|
static |
Definition at line 841 of file gothic.cpp.
|
static |
Definition at line 807 of file gothic.cpp.
|
static |
Definition at line 824 of file gothic.cpp.
|
static |
Definition at line 798 of file gothic.cpp.
|
static |
Definition at line 853 of file gothic.cpp.
|
static |
Definition at line 819 of file gothic.cpp.
|
static |
Definition at line 836 of file gothic.cpp.
| void Gothic::setupCommonScriptClasses | ( | zenkit::DaedalusScript & | sc | ) |
Definition at line 761 of file gothic.cpp.
| void Gothic::setupGlobalScripts | ( | ) |
Definition at line 254 of file gothic.cpp.
| void Gothic::setupVmCommonApi | ( | zenkit::DaedalusVm & | vm | ) |
Definition at line 953 of file gothic.cpp.
|
static |
Definition at line 655 of file gothic.cpp.
| void Gothic::startLoad | ( | std::string_view | banner, |
| const std::function< std::unique_ptr< GameSession >(std::unique_ptr< GameSession > &&)> | f | ||
| ) |
Definition at line 526 of file gothic.cpp.
| void Gothic::startSave | ( | Tempest::Texture2d && | tex, |
| const std::function< std::unique_ptr< GameSession >(std::unique_ptr< GameSession > &&)> | f | ||
| ) |
Definition at line 520 of file gothic.cpp.
| void Gothic::tick | ( | uint64_t | dt | ) |
Definition at line 598 of file gothic.cpp.
| void Gothic::updateAnimation | ( | uint64_t | dt | ) |
Definition at line 610 of file gothic.cpp.
| std::vector< GameScript::DlgChoice > Gothic::updateDialog | ( | const GameScript::DlgChoice & | dlg, |
| Npc & | player, | ||
| Npc & | npc | ||
| ) | -> std::vector<GameScript::DlgChoice> |
Definition at line 631 of file gothic.cpp.
| const VersionInfo & Gothic::version | ( | ) | const -> const VersionInfo& |
Definition at line 263 of file gothic.cpp.
| World * Gothic::world | ( | ) |
Definition at line 284 of file gothic.cpp.
| const World * Gothic::world | ( | ) | const |
Definition at line 278 of file gothic.cpp.
| WorldView * Gothic::worldView | ( | ) | const |
Definition at line 307 of file gothic.cpp.
| Tempest::Signal<void(Npc&,Npc&,AiOuputPipe*&)> Gothic::onDialogPipe |
| Tempest::Signal<void(const ChapterScreen::Show&)> Gothic::onIntroChapter |
| Tempest::Signal<void(std::string_view,int,int,int,const GthFont&)> Gothic::onPrintScreen |
| Tempest::Signal<void(std::string_view,std::string_view)> Gothic::onSaveGame |
| Tempest::Signal<void(const DocumentMenu::Show&)> Gothic::onShowDocument |
| Tempest::Signal<void(std::string_view)> Gothic::onStartGame |