Rise
The Vieneo Province
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)
 
void LoadTexture (LPDIRECT3DTEXTURE9 *resource, const std::string &pointerName, const WCHAR *file, D3DFORMAT format=D3DFMT_A8R8G8B8)
 
void FlightDirectorOn () const
 
void GearUpShift () const
 
void GearDownShift () const
 
void AutopilotDisconnect () const
 
bool TurnOffTVM () const
 
bool TurnOffDOR () const
 
void LostScannerTarget (const char *msg) const
 
void LostVerticalTarget () const
 
void UseOrDisuseInventoryItemType (int itemtype, int itemId, int vehicleId) const
 
void GetProgramVersion (int &major, int &minor, int &build, int &revision) const
 
void AddTrackedResource (const char *name, _D3DPOOL pool=D3DPOOL_MANAGED)
 
void UpdateTrackedResource (const char *name, int status)
 
HRESULT InitDirectInput (HWND hDlg) const
 
void ScreenCapture () const
 

Static Public Member Functions

static void TouchFile (const WCHAR *str)
 
static bool CALLBACK IsDeviceAcceptable (D3DCAPS9 *pCaps, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, bool bWindowed, void *pUserContext)
 
static bool CALLBACK ModifyDeviceSettings (DXUTDeviceSettings *pDeviceSettings, void *pUserContext)
 
static HRESULT CALLBACK OnCreateDevice (IDirect3DDevice9 *pd3dDevice, const D3DSURFACE_DESC *pBackBufferSurfaceDesc, void *pUserContext)
 
static HRESULT CALLBACK OnResetDevice (IDirect3DDevice9 *pd3dDevice, const D3DSURFACE_DESC *pBackBufferSurfaceDesc, void *pUserContext)
 
static void CALLBACK OnFrameMove (double fTime, float fElapsedTime, void *pUserContext)
 
static void CALLBACK OnFrameRender (IDirect3DDevice9 *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] {}
 
int screenShotStatus = 0
 
Networkingnetworking = nullptr
 
Soundsound = nullptr
 
Graphicsgraphics = nullptr
 
HMIGUI = nullptr
 
Viewscreenviewscreen = nullptr
 
Busbus = nullptr
 
Loggerlogger = nullptr
 
Displaysdisplays = nullptr
 
DiscordRPCdiscord = nullptr
 
std::vector< Module * > modules
 
float FrameElapsedTime = 0
 
GameState displaystage = GameState::STATUS_SPLASH
 
short loadstage = 0
 
short stage = 0
 
short instage = 0
 
unsigned char beginScene = 0
 
float displayscale = 0
 
float dpiscale = 0
 
float displayWidth = 0
 
float displayHeight = 0
 
bool showKeymapOverlay = false
 

Private Member Functions

void InitializeGame ()
 
BOOL IsDepthFormatOk (D3DFORMAT DepthFormat, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat) const
 
void SendScreenShot (HBITMAP hbitmap) const
 

Private Attributes

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

Detailed Description

Definition at line 42 of file GameClass.h.

Constructor & Destructor Documentation

◆ GameClass()

GameClass::GameClass ( )

Definition at line 15 of file GameClass.cpp.

Here is the call graph for this function:

◆ ~GameClass()

GameClass::~GameClass ( )

Definition at line 48 of file GameClass.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ AddTrackedResource()

void GameClass::AddTrackedResource ( const char *  name,
_D3DPOOL  pool = D3DPOOL_MANAGED 
)

Definition at line 2702 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 2233 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 72 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 1660 of file GameClass.cpp.

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

◆ GearDownShift()

void GameClass::GearDownShift ( ) const

Definition at line 2133 of file GameClass.cpp.

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

◆ GearUpShift()

void GameClass::GearUpShift ( ) const

Definition at line 2070 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 2692 of file GameClass.cpp.

Here is the caller graph for this function:

◆ GetProgramVersion()

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

Definition at line 2644 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 318 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:

◆ IsDepthFormatOk()

BOOL GameClass::IsDepthFormatOk ( D3DFORMAT  DepthFormat,
D3DFORMAT  AdapterFormat,
D3DFORMAT  BackBufferFormat 
) const
private

Definition at line 470 of file GameClass.cpp.

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

◆ IsDeviceAcceptable()

bool CALLBACK GameClass::IsDeviceAcceptable ( D3DCAPS9 *  pCaps,
D3DFORMAT  AdapterFormat,
D3DFORMAT  BackBufferFormat,
bool  bWindowed,
void *  pUserContext 
)
static

Definition at line 505 of file GameClass.cpp.

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

◆ KeyboardProc()

void CALLBACK GameClass::KeyboardProc ( UINT  nChar,
bool  bKeyDown,
bool  bAltDown,
void *  pUserContext 
)
static
Todo:
we are so close to getting rid of this block my only hesitation is the VK_OEM_2 and "56" mapping right
Bug:
https://jira.risetvp.com/view.php?id=1694

Definition at line 2287 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 125 of file GameClass.cpp.

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

◆ LoadTexture()

void GameClass::LoadTexture ( LPDIRECT3DTEXTURE9 *  resource,
const std::string &  pointerName,
const WCHAR *  file,
D3DFORMAT  format = D3DFMT_A8R8G8B8 
)

Definition at line 2020 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 2191 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

Definition at line 2222 of file GameClass.cpp.

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

◆ ModifyDeviceSettings()

bool CALLBACK GameClass::ModifyDeviceSettings ( DXUTDeviceSettings *  pDeviceSettings,
void *  pUserContext 
)
static

Definition at line 516 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 1694 of file GameClass.cpp.

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

◆ OnCreateDevice()

HRESULT CALLBACK GameClass::OnCreateDevice ( IDirect3DDevice9 *  pd3dDevice,
const D3DSURFACE_DESC *  pBackBufferSurfaceDesc,
void *  pUserContext 
)
static

Definition at line 610 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 2603 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 771 of file GameClass.cpp.

Here is the caller graph for this function:

◆ OnFrameRender()

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

Definition at line 1495 of file GameClass.cpp.

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

◆ OnLostDevice()

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

Definition at line 2544 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 ( IDirect3DDevice9 *  pd3dDevice,
const D3DSURFACE_DESC *  pBackBufferSurfaceDesc,
void *  pUserContext 
)
static

Definition at line 654 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 168 of file GameClass.cpp.

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 132 of file GameClass.cpp.

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

◆ ScreenCapture()

void GameClass::ScreenCapture ( ) const

Definition at line 436 of file GameClass.cpp.

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

◆ SendScreenShot()

void GameClass::SendScreenShot ( HBITMAP  hbitmap) const
private

Definition at line 361 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 143 of file GameClass.cpp.

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

◆ TurnOffDOR()

bool GameClass::TurnOffDOR ( ) const

Definition at line 2262 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 2243 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 2725 of file GameClass.cpp.

Here is the call graph for this function:

◆ UseOrDisuseInventoryItemType()

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

Definition at line 729 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 126 of file GameClass.h.

◆ bus

Bus* GameClass::bus = nullptr

Definition at line 112 of file GameClass.h.

◆ config

Config GameClass::config

Definition at line 102 of file GameClass.h.

◆ dev_notify

HDEVNOTIFY GameClass::dev_notify = nullptr
private

Definition at line 55 of file GameClass.h.

◆ discord

DiscordRPC* GameClass::discord = nullptr

Definition at line 115 of file GameClass.h.

◆ displayHeight

float GameClass::displayHeight = 0

Definition at line 129 of file GameClass.h.

◆ displays

Displays* GameClass::displays = nullptr

Definition at line 114 of file GameClass.h.

◆ displayscale

float GameClass::displayscale = 0

Definition at line 128 of file GameClass.h.

◆ displaystage

GameState GameClass::displaystage = GameState::STATUS_SPLASH

Definition at line 121 of file GameClass.h.

◆ displayWidth

float GameClass::displayWidth = 0

Definition at line 129 of file GameClass.h.

◆ dpiscale

float GameClass::dpiscale = 0

Definition at line 128 of file GameClass.h.

◆ FrameElapsedTime

float GameClass::FrameElapsedTime = 0

Definition at line 119 of file GameClass.h.

◆ graphics

Graphics* GameClass::graphics = nullptr

Definition at line 109 of file GameClass.h.

◆ GUI

HMI* GameClass::GUI = nullptr

Definition at line 110 of file GameClass.h.

◆ instage

short GameClass::instage = 0

Definition at line 124 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.

◆ loadstage

short GameClass::loadstage = 0

Definition at line 122 of file GameClass.h.

◆ logger

Logger* GameClass::logger = nullptr

Definition at line 113 of file GameClass.h.

◆ maximized

bool GameClass::maximized = false
private

Definition at line 56 of file GameClass.h.

◆ modules

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

Definition at line 117 of file GameClass.h.

◆ networking

Networking* GameClass::networking = nullptr

Definition at line 107 of file GameClass.h.

◆ screenShotStatus

int GameClass::screenShotStatus = 0

Definition at line 105 of file GameClass.h.

◆ showKeymapOverlay

bool GameClass::showKeymapOverlay = false

Definition at line 131 of file GameClass.h.

◆ sound

Sound* GameClass::sound = nullptr

Definition at line 108 of file GameClass.h.

◆ stage

short GameClass::stage = 0

Definition at line 124 of file GameClass.h.

◆ trackedResources

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

Definition at line 50 of file GameClass.h.

◆ viewscreen

Viewscreen* GameClass::viewscreen = nullptr

Definition at line 111 of file GameClass.h.

◆ vphelp

bool GameClass::vphelp[vphelpC] {}

Definition at line 103 of file GameClass.h.


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