Rise
The Vieneo Province
Loading...
Searching...
No Matches
GameClass Class Reference

#include <GameClass.h>

Collaboration diagram for GameClass:
[legend]

Public Member Functions

 GameClass ()
 ~GameClass ()
void Close ()
void KillScannerData () const
void RequestScannerData () const
void RepairVehicle () const
void RequestClose () const
void ToggleFullScreen (bool goFullScreen)
HRESULT InitializeGameHud ()
void LoadTexture (Rendering::RenderTexture **resource, const std::string &pointerName, const WCHAR *file, Rendering::ImageFormat format=Rendering::ImageFormat::BGRA8)
void ChangeGear (char newGear, bool isInit=false) const
void FlightDirectorOn () const
void AutopilotDisconnect () const
bool TurnOffTVM () const
bool TurnOffDOR (bool preserveGuidance=false) const
void LostScannerTarget (const char *msg) const
void LostVerticalTarget (const char *msg) const
void UseOrDisuseInventoryItemType (int itemtype, int itemsubtype, int itemId, int vehicleId) const
void GetProgramVersion (int &major, int &minor, int &build, int &revision) const
void AddTrackedResource (const char *name, Rendering::ResourcePool pool=Rendering::ResourcePool::Managed)
void UpdateTrackedResource (const char *name, int status)
HRESULT InitDirectInput (HWND hDlg) const
HRESULT OnFramePresented ()

Static Public Member Functions

static void TouchFile (const WCHAR *str)
static HRESULT CALLBACK OnCreateDevice (Rendering::RenderDevice *pd3dDevice, const Rendering::SurfaceDescription *pBackBufferSurfaceDesc, void *pUserContext)
static HRESULT CALLBACK OnResetDevice (Rendering::RenderDevice *pd3dDevice, const Rendering::SurfaceDescription *pBackBufferSurfaceDesc, void *pUserContext)
static void CALLBACK OnFrameMove (double fTime, float fElapsedTime, void *pUserContext)
static void CALLBACK OnFrameRender (Rendering::RenderDevice *pd3dDevice, double fTime, float fElapsedTime, void *pUserContext)
static LRESULT CALLBACK MsgProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool *pbNoFurtherProcessing, void *pUserContext)
static void CALLBACK KeyboardProc (UINT nChar, bool bKeyDown, bool bAltDown, void *pUserContext)
static void CALLBACK OnLostDevice (void *pUserContext)
static void CALLBACK OnDestroyDevice (void *pUserContext)
static float GetCpuSpeedMhz ()

Public Attributes

Config config
bool vphelp [vphelpC] {}
std::unique_ptr< Networking > networking
std::unique_ptr< Sound > sound
std::unique_ptr< Graphics > graphics
std::unique_ptr< HMI > GUI
std::unique_ptr< Viewscreen > viewscreen
std::unique_ptr< Bus > bus
std::unique_ptr< Logger > logger
std::unique_ptr< Displays > displays
std::unique_ptr< DiscordIntegration > discord
std::vector< std::unique_ptr< Module > > modules
ModuleScheduler moduleScheduler
float FrameElapsedTime = 0
GameState displaystage = GameState::STATUS_SPLASH
short loadstage = 0
short stage = 0
short instage = 0
bool gameGraphicsReady = false
bool loadingLabelsReady = false
bool gameWindowShown = false
bool loadingReadyToContinue = false
unsigned char beginScene = 0
float displayscale = 0
float dpiscale = 0
float displayWidth = 0
float displayHeight = 0
bool showKeymapOverlay = false
bool timeLapse = false

Private Member Functions

void InitializeGame ()
void UnregisterDeviceNotifications ()

Private Attributes

std::vector< Resource > trackedResources
float lastDeviceChange = 2.0f
bool lastDeviceChangedSound = false
bool lastDeviceChangedInput = false
HDEVNOTIFY dev_notify = nullptr
bool maximized = false

Detailed Description

Definition at line 43 of file GameClass.h.

Constructor & Destructor Documentation

◆ GameClass()

GameClass::GameClass ( )

Definition at line 22 of file GameClass.cpp.

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

◆ ~GameClass()

GameClass::~GameClass ( )

Definition at line 61 of file GameClass.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ AddTrackedResource()

void GameClass::AddTrackedResource ( const char * name,
Rendering::ResourcePool pool = Rendering::ResourcePool::Managed )

Definition at line 2486 of file GameClass.cpp.

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

◆ AutopilotDisconnect()

void GameClass::AutopilotDisconnect ( ) const

Definition at line 2065 of file GameClass.cpp.

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

◆ ChangeGear()

void GameClass::ChangeGear ( char newGear,
bool isInit = false ) const

Definition at line 1890 of file GameClass.cpp.

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

◆ Close()

void GameClass::Close ( )

Definition at line 102 of file GameClass.cpp.

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

◆ FlightDirectorOn()

void GameClass::FlightDirectorOn ( ) const

Definition at line 1451 of file GameClass.cpp.

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

◆ GetCpuSpeedMhz()

float GameClass::GetCpuSpeedMhz ( )
static

Definition at line 2481 of file GameClass.cpp.

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

◆ GetProgramVersion()

void GameClass::GetProgramVersion ( int & major,
int & minor,
int & build,
int & revision ) const

Definition at line 2433 of file GameClass.cpp.

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

◆ InitDirectInput()

HRESULT GameClass::InitDirectInput ( HWND hDlg) const

Definition at line 310 of file GameClass.cpp.

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

◆ InitializeGame()

void GameClass::InitializeGame ( )
private

Definition at line 293 of file GameClass.cpp.

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

◆ InitializeGameHud()

HRESULT GameClass::InitializeGameHud ( )

Definition at line 423 of file GameClass.cpp.

Here is the caller graph for this function:

◆ KeyboardProc()

void CALLBACK GameClass::KeyboardProc ( UINT nChar,
bool bKeyDown,
bool bAltDown,
void * pUserContext )
static

Definition at line 2143 of file GameClass.cpp.

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

◆ KillScannerData()

void GameClass::KillScannerData ( ) const

Definition at line 116 of file GameClass.cpp.

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

◆ LoadTexture()

void GameClass::LoadTexture ( Rendering::RenderTexture ** resource,
const std::string & pointerName,
const WCHAR * file,
Rendering::ImageFormat format = Rendering::ImageFormat::BGRA8 )

Definition at line 1852 of file GameClass.cpp.

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

◆ LostScannerTarget()

void GameClass::LostScannerTarget ( const char * msg) const

Definition at line 2021 of file GameClass.cpp.

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

◆ LostVerticalTarget()

void GameClass::LostVerticalTarget ( const char * msg) const

Definition at line 2052 of file GameClass.cpp.

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

◆ MsgProc()

LRESULT CALLBACK GameClass::MsgProc ( HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam,
bool * pbNoFurtherProcessing,
void * pUserContext )
static

Definition at line 1495 of file GameClass.cpp.

Here is the caller graph for this function:

◆ OnCreateDevice()

HRESULT CALLBACK GameClass::OnCreateDevice ( Rendering::RenderDevice * pd3dDevice,
const Rendering::SurfaceDescription * pBackBufferSurfaceDesc,
void * pUserContext )
static

Definition at line 356 of file GameClass.cpp.

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

◆ OnDestroyDevice()

void CALLBACK GameClass::OnDestroyDevice ( void * pUserContext)
static

Definition at line 2390 of file GameClass.cpp.

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

◆ OnFrameMove()

void CALLBACK GameClass::OnFrameMove ( double fTime,
float fElapsedTime,
void * pUserContext )
static

Definition at line 548 of file GameClass.cpp.

Here is the caller graph for this function:

◆ OnFramePresented()

HRESULT GameClass::OnFramePresented ( )

Definition at line 399 of file GameClass.cpp.

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

◆ OnFrameRender()

void CALLBACK GameClass::OnFrameRender ( Rendering::RenderDevice * pd3dDevice,
double fTime,
float fElapsedTime,
void * pUserContext )
static

Definition at line 1238 of file GameClass.cpp.

Here is the caller graph for this function:

◆ OnLostDevice()

void CALLBACK GameClass::OnLostDevice ( void * pUserContext)
static

Definition at line 2320 of file GameClass.cpp.

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

◆ OnResetDevice()

HRESULT CALLBACK GameClass::OnResetDevice ( Rendering::RenderDevice * pd3dDevice,
const Rendering::SurfaceDescription * pBackBufferSurfaceDesc,
void * pUserContext )
static

Definition at line 458 of file GameClass.cpp.

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

◆ RepairVehicle()

void GameClass::RepairVehicle ( ) const

Definition at line 161 of file GameClass.cpp.

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

◆ RequestClose()

void GameClass::RequestClose ( ) const

Definition at line 261 of file GameClass.cpp.

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

◆ RequestScannerData()

void GameClass::RequestScannerData ( ) const

Definition at line 123 of file GameClass.cpp.

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

◆ ToggleFullScreen()

void GameClass::ToggleFullScreen ( bool goFullScreen)

Definition at line 269 of file GameClass.cpp.

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

◆ TouchFile()

void GameClass::TouchFile ( const WCHAR * str)
static

Definition at line 134 of file GameClass.cpp.

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

◆ TurnOffDOR()

bool GameClass::TurnOffDOR ( bool preserveGuidance = false) const

Definition at line 2103 of file GameClass.cpp.

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

◆ TurnOffTVM()

bool GameClass::TurnOffTVM ( ) const

Definition at line 2083 of file GameClass.cpp.

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

◆ UnregisterDeviceNotifications()

void GameClass::UnregisterDeviceNotifications ( )
private

Definition at line 92 of file GameClass.cpp.

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

◆ UpdateTrackedResource()

void GameClass::UpdateTrackedResource ( const char * name,
int status )

Definition at line 2509 of file GameClass.cpp.

Here is the call graph for this function:

◆ UseOrDisuseInventoryItemType()

void GameClass::UseOrDisuseInventoryItemType ( int itemtype,
int itemsubtype,
int itemId,
int vehicleId ) const

Definition at line 515 of file GameClass.cpp.

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

Member Data Documentation

◆ beginScene

unsigned char GameClass::beginScene = 0

Definition at line 128 of file GameClass.h.

◆ bus

std::unique_ptr<Bus> GameClass::bus

Definition at line 108 of file GameClass.h.

◆ config

Config GameClass::config

Definition at line 100 of file GameClass.h.

◆ dev_notify

HDEVNOTIFY GameClass::dev_notify = nullptr
private

Definition at line 55 of file GameClass.h.

◆ discord

std::unique_ptr<DiscordIntegration> GameClass::discord

Definition at line 111 of file GameClass.h.

◆ displayHeight

float GameClass::displayHeight = 0

Definition at line 131 of file GameClass.h.

◆ displays

std::unique_ptr<Displays> GameClass::displays

Definition at line 110 of file GameClass.h.

◆ displayscale

float GameClass::displayscale = 0

Definition at line 130 of file GameClass.h.

◆ displaystage

GameState GameClass::displaystage = GameState::STATUS_SPLASH

Definition at line 118 of file GameClass.h.

◆ displayWidth

float GameClass::displayWidth = 0

Definition at line 131 of file GameClass.h.

◆ dpiscale

float GameClass::dpiscale = 0

Definition at line 130 of file GameClass.h.

◆ FrameElapsedTime

float GameClass::FrameElapsedTime = 0

Definition at line 116 of file GameClass.h.

◆ gameGraphicsReady

bool GameClass::gameGraphicsReady = false

Definition at line 125 of file GameClass.h.

◆ gameWindowShown

bool GameClass::gameWindowShown = false

Definition at line 125 of file GameClass.h.

◆ graphics

std::unique_ptr<Graphics> GameClass::graphics

Definition at line 105 of file GameClass.h.

◆ GUI

std::unique_ptr<HMI> GameClass::GUI

Definition at line 106 of file GameClass.h.

◆ instage

short GameClass::instage = 0

Definition at line 121 of file GameClass.h.

◆ lastDeviceChange

float GameClass::lastDeviceChange = 2.0f
private

Definition at line 52 of file GameClass.h.

◆ lastDeviceChangedInput

bool GameClass::lastDeviceChangedInput = false
private

Definition at line 54 of file GameClass.h.

◆ lastDeviceChangedSound

bool GameClass::lastDeviceChangedSound = false
private

Definition at line 53 of file GameClass.h.

◆ loadingLabelsReady

bool GameClass::loadingLabelsReady = false

Definition at line 125 of file GameClass.h.

◆ loadingReadyToContinue

bool GameClass::loadingReadyToContinue = false

Definition at line 126 of file GameClass.h.

◆ loadstage

short GameClass::loadstage = 0

Definition at line 119 of file GameClass.h.

◆ logger

std::unique_ptr<Logger> GameClass::logger

Definition at line 109 of file GameClass.h.

◆ maximized

bool GameClass::maximized = false
private

Definition at line 56 of file GameClass.h.

◆ modules

std::vector<std::unique_ptr<Module> > GameClass::modules

Definition at line 113 of file GameClass.h.

◆ moduleScheduler

ModuleScheduler GameClass::moduleScheduler

Definition at line 114 of file GameClass.h.

◆ networking

std::unique_ptr<Networking> GameClass::networking

Definition at line 103 of file GameClass.h.

◆ showKeymapOverlay

bool GameClass::showKeymapOverlay = false

Definition at line 133 of file GameClass.h.

◆ sound

std::unique_ptr<Sound> GameClass::sound

Definition at line 104 of file GameClass.h.

◆ stage

short GameClass::stage = 0

Definition at line 121 of file GameClass.h.

◆ timeLapse

bool GameClass::timeLapse = false

Definition at line 134 of file GameClass.h.

◆ trackedResources

std::vector<Resource> GameClass::trackedResources
private

Definition at line 50 of file GameClass.h.

◆ viewscreen

std::unique_ptr<Viewscreen> GameClass::viewscreen

Definition at line 107 of file GameClass.h.

◆ vphelp

bool GameClass::vphelp[vphelpC] {}

Definition at line 101 of file GameClass.h.


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