OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
GameSession Class Referencefinal

#include <gamesession.h>

Public Member Functions

 GameSession ()=delete
 
 GameSession (const GameSession &)=delete
 
 GameSession (std::string file)
 
 GameSession (Serialize &fin)
 
 ~GameSession ()
 
void save (Serialize &fout, std::string_view name, const Tempest::Pixmap &screen)
 
void setupSettings ()
 
void setWorld (std::unique_ptr< World > &&w)
 
auto clearWorld () -> std::unique_ptr< World >
 
void changeWorld (std::string_view world, std::string_view wayPoint)
 
void exitSession ()
 
auto version () const -> const VersionInfo &
 
const Worldworld () const
 
Worldworld ()
 
WorldViewview () const
 
GameScriptscript () const
 
Cameracamera ()
 
auto loadSound (const Tempest::Sound &raw) -> Tempest::SoundEffect
 
auto loadSound (const SoundFx &fx, bool &looped) -> Tempest::SoundEffect
 
Npcplayer ()
 
void updateListenerPos (const Camera::ListenerPos &lpos)
 
gtime time () const
 
void setTime (gtime t)
 
void tick (uint64_t dt)
 
uint64_t tickCount () const
 
void setTimeMultiplyer (float t)
 
void updateAnimation (uint64_t dt)
 
auto updateDialog (const GameScript::DlgChoice &dlg, Npc &player, Npc &npc) -> std::vector< GameScript::DlgChoice >
 
void dialogExec (const GameScript::DlgChoice &dlg, Npc &player, Npc &npc)
 
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
 
AiOuputPipeopenDlgOuput (Npc &player, Npc &npc)
 
bool isNpcInDialog (const Npc &npc) const
 
bool isInDialog () const
 

Detailed Description

Definition at line 23 of file gamesession.h.

Constructor & Destructor Documentation

◆ GameSession() [1/4]

GameSession::GameSession ( )
delete

◆ GameSession() [2/4]

GameSession::GameSession ( const GameSession )
delete

◆ GameSession() [3/4]

GameSession::GameSession ( std::string  file)

Definition at line 69 of file gamesession.cpp.

◆ GameSession() [4/4]

GameSession::GameSession ( Serialize fin)

Definition at line 117 of file gamesession.cpp.

◆ ~GameSession()

GameSession::~GameSession ( )

Definition at line 171 of file gamesession.cpp.

Member Function Documentation

◆ camera()

Camera & GameSession::camera ( )
inline

Definition at line 48 of file gamesession.h.

◆ changeWorld()

void GameSession::changeWorld ( std::string_view  world,
std::string_view  wayPoint 
)

Definition at line 251 of file gamesession.cpp.

◆ clearWorld()

std::unique_ptr< World > GameSession::clearWorld ( ) -> std::unique_ptr<World>

Definition at line 242 of file gamesession.cpp.

◆ dialogExec()

void GameSession::dialogExec ( const GameScript::DlgChoice dlg,
Npc player,
Npc npc 
)

Definition at line 438 of file gamesession.cpp.

◆ exitSession()

void GameSession::exitSession ( )

Definition at line 256 of file gamesession.cpp.

◆ isInDialog()

bool GameSession::isInDialog ( ) const

Definition at line 470 of file gamesession.cpp.

◆ isNpcInDialog()

bool GameSession::isNpcInDialog ( const Npc npc) const

Definition at line 466 of file gamesession.cpp.

◆ loadSound() [1/2]

Tempest::SoundEffect GameSession::loadSound ( const SoundFx fx,
bool &  looped 
) -> Tempest::SoundEffect

Definition at line 280 of file gamesession.cpp.

◆ loadSound() [2/2]

Tempest::SoundEffect GameSession::loadSound ( const Tempest::Sound &  raw) -> Tempest::SoundEffect

Definition at line 270 of file gamesession.cpp.

◆ messageByName()

std::string_view GameSession::messageByName ( std::string_view  id) const

Definition at line 448 of file gamesession.cpp.

◆ messageFromSvm()

std::string_view GameSession::messageFromSvm ( std::string_view  id,
int  voice 
) const

Definition at line 442 of file gamesession.cpp.

◆ messageTime()

uint32_t GameSession::messageTime ( std::string_view  id) const

Definition at line 454 of file gamesession.cpp.

◆ openDlgOuput()

AiOuputPipe * GameSession::openDlgOuput ( Npc player,
Npc npc 
)

Definition at line 460 of file gamesession.cpp.

◆ player()

Npc * GameSession::player ( )

Definition at line 290 of file gamesession.cpp.

◆ save()

void GameSession::save ( Serialize fout,
std::string_view  name,
const Tempest::Pixmap &  screen 
)

Definition at line 174 of file gamesession.cpp.

◆ script()

GameScript * GameSession::script ( ) const
inline

Definition at line 46 of file gamesession.h.

◆ setTime()

void GameSession::setTime ( gtime  t)

Definition at line 301 of file gamesession.cpp.

◆ setTimeMultiplyer()

void GameSession::setTimeMultiplyer ( float  t)

Definition at line 357 of file gamesession.cpp.

◆ setupSettings()

void GameSession::setupSettings ( )

Definition at line 227 of file gamesession.cpp.

◆ setWorld()

void GameSession::setWorld ( std::unique_ptr< World > &&  w)

Definition at line 234 of file gamesession.cpp.

◆ tick()

void GameSession::tick ( uint64_t  dt)

Definition at line 305 of file gamesession.cpp.

◆ tickCount()

uint64_t GameSession::tickCount ( ) const
inline

Definition at line 59 of file gamesession.h.

◆ time()

gtime GameSession::time ( ) const
inline

Definition at line 56 of file gamesession.h.

◆ updateAnimation()

void GameSession::updateAnimation ( uint64_t  dt)

Definition at line 429 of file gamesession.cpp.

◆ updateDialog()

std::vector< GameScript::DlgChoice > GameSession::updateDialog ( const GameScript::DlgChoice dlg,
Npc player,
Npc npc 
) -> std::vector<GameScript::DlgChoice>

Definition at line 434 of file gamesession.cpp.

◆ updateListenerPos()

void GameSession::updateListenerPos ( const Camera::ListenerPos lpos)

Definition at line 296 of file gamesession.cpp.

◆ version()

const VersionInfo & GameSession::version ( ) const -> const VersionInfo&

Definition at line 260 of file gamesession.cpp.

◆ view()

WorldView * GameSession::view ( ) const

Definition at line 264 of file gamesession.cpp.

◆ world() [1/2]

World * GameSession::world ( )
inline

Definition at line 43 of file gamesession.h.

◆ world() [2/2]

const World * GameSession::world ( ) const
inline

Definition at line 42 of file gamesession.h.


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