Rise
The Vieneo Province
Loading...
Searching...
No Matches
cockpit.h
Go to the documentation of this file.
1#pragma once
2
3#include <WinSock2.h>
4#include <WS2tcpip.h>
5#include <Windows.h>
7#include "../Logger.h"
8#include "../PropAudio.h"
9#include "CockpitLightning.h"
10#include <memory>
11#include <vector>
12
13class Viewscreen;
14namespace SparkoProp { class Controller; class TraceFile; }
15
17{
18public:
19 cockpit(Viewscreen* ptr);
21
22 void Load(unsigned char newType) const;
23 void RefreshExternalCameras() const;
24 void CacheEngineSounds(bool useExteriorModel) const;
26 void FrameMove(float fElapsedTime) const;
27 void ResetProps(const char* reason) const;
28 void FrameMovePropSounds(float elapsedTime) const;
29 // excludes !visible and windshield type and HUD type
30 void Render(Rendering::RenderDevice* pd3dDevice, const LocalLightning::Frame& strike = {}) const;
31 void OnLostDevice() const;
32 HRESULT OnResetDevice(Rendering::RenderDevice* pd3dDevice) const;
33 void ResetHelp() const;
34
35private:
39 struct DisplayDraw { UINT startvertex, primitives; DirectX::XMFLOAT4 bounds; };
40 mutable std::vector<std::vector<DisplayDraw>> displayDraws;
41 mutable std::unique_ptr<SparkoProp::Controller> sparkoProp;
43 // Define SparkoPhysicsLog project-wide to enable local per-frame CSV capture.
44#ifdef SparkoPhysicsLog
45 mutable std::unique_ptr<SparkoProp::TraceFile> sparkoTrace;
46#endif
47 mutable unsigned char externalCameraVehicleType = 0;
48 mutable bool externalCameraUsesParent = false;
49
50 RiseMath::Matrix ComputeSimulatorMotion(unsigned char ordinal, float fElapsedTime) const;
51};
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
void ResetHelp() const
Definition cockpit.cpp:4664
bool externalCameraUsesParent
Definition cockpit.h:48
std::unique_ptr< SparkoProp::Controller > sparkoProp
Definition cockpit.h:41
std::vector< std::vector< DisplayDraw > > displayDraws
Definition cockpit.h:40
void Load(unsigned char newType) const
Definition cockpit.cpp:216
void Render(Rendering::RenderDevice *pd3dDevice, const LocalLightning::Frame &strike={}) const
Definition cockpit.cpp:2586
Logger * logger
Definition cockpit.h:37
void ResetProps(const char *reason) const
Definition cockpit.cpp:25
Viewscreen * viewscreen
Definition cockpit.h:36
bool UsesParentExternalCameras() const
Definition cockpit.h:25
RiseMath::Matrix ComputeSimulatorMotion(unsigned char ordinal, float fElapsedTime) const
Definition cockpit.cpp:4839
unsigned char externalCameraVehicleType
Definition cockpit.h:47
cockpit(Viewscreen *ptr)
Definition cockpit.cpp:17
void FrameMovePropSounds(float elapsedTime) const
Definition cockpit.cpp:36
void RefreshExternalCameras() const
Definition cockpit.cpp:65
void FrameMove(float fElapsedTime) const
Definition cockpit.cpp:2202
HRESULT OnResetDevice(Rendering::RenderDevice *pd3dDevice) const
Definition cockpit.cpp:3545
void CacheEngineSounds(bool useExteriorModel) const
Definition cockpit.cpp:189
CockpitLightning::Apertures lightningWindows
Definition cockpit.h:38
void OnLostDevice() const
Definition cockpit.cpp:3457
PropAudio::State propAudio
Definition cockpit.h:42
DirectX::XMFLOAT4 bounds
Definition cockpit.h:39