Rise
The Vieneo Province
Loading...
Searching...
No Matches
Viewscreen.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 <memory>
8#include <array>
9
10#ifndef DIRECTINPUT_VERSION
11#define DIRECTINPUT_VERSION 0x0800 // dinput.h throws a notice if we don't define it, We should look at moving this define to globals.h
12#include "dinput.h" //Needed for Directinput like joystick / force feedbacl / keyboard
13#endif
14
15#include "binding.h"
16#include "grid.h" //Class that does stuff related to the grid
17#include "weapon.h" //Pew! Pew!
18#include "buildings.h" //All building update related stuff
19#include "Camera.h"
20#include "HeadAcceleration.h"
21#include "CollisionDamage.h"
22#include "keyboard.h" //To handle all keyboard related things
23#include "joystick.h" //Handles joystick updating
24#include "FreeTrack.h" //Handles Head Tracker updating
25#include "propulsion.h" //Handles propulsion updating
26#include "renderer.h" //Handles render stuff, like loading textures.
28#include "CloudVolumeRenderer.h"
32#include "CityCampaignLogos.h"
33#include "BiometerDiagnostics.h"
35#include "weather.h" //All the code that used to be in fog.cpp is now in here.
36#include "cockpit.h" //Cockpit drawing code in here
37#include "instruments.h" //The old stats.cpp code for now
38#include "waypoints.h"
39
40#include "../GameClass.h"
41#include "../MathUtilities.h"
42
43#define depthFloorResolutionC 2048L
44
45#define TIMELAPSE
46
48{
49 //Utility variable
50 char msg[199];
51
53 float frameRateHeartbeat = 240.0f; // send every 5 minutes but send after first minute
54 float healTimer = 0.0f; // every 15 minutes we add 1 HP
55 float m_fAnimateFrame = 0.0f;
56 float holidayTimer = 0.0f;
57 float timeToNextDecrement = 1.0f;
58 long old41 = -1, old42 = -1;
59 bool grunt = false;
61 float headback = 0.0f, headtilt = 0.0f;
65 bool leftfoot = false; // start on the right
66 float footstep = 0.0f;
67
68 short oldportassigned = -1;
69 bool olddocked = false;
73
74 float pitchTrimTime = 0.0f;
75
78 unsigned char oldZone = 0;
79
80
81public:
83 {
84 float compressionKm = 0.0f;
85 float velocityKms = 0.0f;
86 };
87
95
96 float turbTime = RandomFloat() * 1000.0f;
97 float turbLow = 0.0f; // heave ... used for both wind gusts and in-cloud visibility
98 float turbEnergy = 0.0f; // smoothed turbulence scalar (memory)
99
101 bool pitchTrimMod = false;
102 bool g_bStrapon = true;
103
104 float radioBlackout = 0.0f;
105
106 std::vector<RECT> rooms;
109 // Body-axis delta velocity (km/s) from discrete contacts only. Lift,
110 // thrust, drag, ground support and other sustained loads stay separate.
114 float suspensionHeaveG = 0.0f;
116 std::array<SuspensionWheelState, 4> suspensionWheels = {};
117 unsigned int curbDiagnosticSequence = 0;
118 unsigned int curbDiagnosticFrame = 0;
120
121 float currentBPM = 0.0f;
123 float breathTimer = 0.0f;
124
127
128 // Fonts
133
134 std::vector<std::string> sofTracking;
135
136 std::vector<SCamera> cameras;
137 SCamera* camera = nullptr;
139 size_t cameraOrdinal = 0;
140
141 unsigned char zone;
142
144
145
147 ~Viewscreen();
148 void LogCurbDiagnostic(const char* text);
149 void ResetHeadAccelerationEffects(const char* reason, bool waitForTerrain = false);
155 void ApplySuspensionImpact(float absorbedVelocityKms);
156 float UpdateSuspensionState(float elapsedTime, const RiseMath::Vector3& vehicleG);
158 float GetSuspensionRollOffsetRadians() const;
159
160 void Initialize();
163 HRESULT OnResetDevice(Rendering::RenderDevice* pd3dDevice, const Rendering::SurfaceDescription* pBackBufferSurfaceDesc);
164 void OnLostDevice();
165 void OnDestroyDevice(bool preserveModels = false);
166 void DumpSofTracking();
167 bool AssertTelemetry(const char* location, short id);
168 void ChangeCamera();
169 bool InventoryItemEffectsEnabled() const { return camera && !camera->outside; }
170 void CheckLogo(unsigned char array, char* logofile);
171 static RECT WhichRoom(const std::vector<tagRECT>& rooms, float x, float y, short* roomIndex);
172 void ComputeSimulatorMotion(unsigned char type);
173 static float ComputeSpotlightBrightness(const RiseMath::Vector3& pos);
174 void OnFrameMove(double fTime, float fElapsedTime);
175 void NetworkObjectsProcessing(int t, float fElapsedTime, bool allowOurParent = false);
176 bool ApplyBufferedVehicleState(int t, float fElapsedTime);
177 void OnFrameRender(Rendering::RenderDevice* pd3dDevice, double fTime) const;
179 void OnFrameRender2(Rendering::RenderDevice* pd3dDevice, float fElapsedTime);
180 bool PrepareHullTextures(Rendering::RenderDevice* pd3dDevice, unsigned budget = 2);
181
182 void ApplyEnvironmentMap();
183 float CalculateAGL(short u, short v, RiseMath::Vector3 position, bool makeleveler);
184 float CalculateAGLd(RiseMath::Vector3 terpos, double terprecisionx, double terprecisiony, double terprecisionz, double proposedx, double proposedy, double proposedz, RiseMath::Vector3 proposed, bool makeleveler);
185 void LoadVehicleProfile(short t);
186 float ProbeBoundSphere(RiseMath::Vector3* position, const RiseMath::Vector3* Xsunlight) const;
187 Sani GetAni(float f_time, unsigned char ani) const;
189 static bool CheckPlotRoads(float f_tempu, float f_tempv);
190 // Sani GetAni( float f_time, unsigned char ani );
191 void Movement(short t, float ElapsedTime);
194 //float CalculateBCL(short u, short v, RiseMath::Vector3 position) const;
195 VECTOR2SHORT CalculateWrap(short u, short v, char cube, char* rotate) const;
196 LOCALGRID2 CalculateSRV(short t, short s, VECTOR2SHORT tcp, char cube, SRenderVertex sourcedata);
198 long FontOffset(char letter) const;
199 float CheckDepthMap(VECTOR2SHORT newdepthpos, short u, short v);
200 float CheckFloorMap(VECTOR2SHORT newdepthpos, short u, short v);
201 void Undock() const;
202 static RiseMath::Color HSVtoRGB(float hue, float s, float v);
203 void TriggerBCLLightning(int u, int v, float distanceKm, int seed, int chainedBolts) const;
204 void TriggerBCLLightningAt(const RiseMath::Vector3& ground, const RiseMath::Vector3& cloud, float distanceKm, int seed, int chainedBolts, bool testStrike=false) const;
205
206 RiseMath::Vector3 CalculatePlanar(short u, short v);
207
208
209 //----------- Force feedback and general input devices -> Input class -----------
210 LPDIRECTINPUT8 g_pDI = nullptr; // The DirectInput interface
211
212
213 //----------- Vertex & Index buffers ------------
214 // Static VB, doesn't change every frame
217 Rendering::RenderBuffer* m_avBillboardVertices = nullptr; // Shared quad: sun, lightning, smoke and weapon effects.
218 Rendering::RenderBuffer* m_avRunningLights = nullptr; // For the running lights
221 //Rendering::RenderBuffer* m_aiLocalGrid= nullptr;
223
224 // Dynamic VB, changes every frame
228 Rendering::RenderBuffer* m_avScreen = nullptr; // Alpha blended viewscreen
229 Rendering::RenderBuffer* m_avInstrument = nullptr; // Instrumentation
230
231 //----------- Textures -----------
232 // Static Textures
233 //Rendering::RenderTexture* m_pddsDetail1;
248
258#ifdef smoketestC
259 Rendering::RenderTexture* m_pddsSmoke[smoketrailC];
260#endif
264
265
266 // Cockpit dashes
267 Rendering::RenderTexture* m_pddsGVDialSmall = nullptr; // must be separate, rotates
268 Rendering::RenderTexture* m_pddsGVBackground = nullptr; // could be combined
269 Rendering::RenderTexture* m_pddsNamePlate = nullptr; // could be combined
270 Rendering::RenderTexture* m_pddsGVCompass = nullptr; // must be separate, wraps
271 Rendering::RenderTexture* m_pddsGVDirection = nullptr; // could be combined
272 Rendering::RenderTexture* m_pddsLightsCruiseIcons = nullptr; // could be combined
273 Rendering::RenderTexture* m_pddsFuelIcon = nullptr; // could be combined
274 Rendering::RenderTexture* m_pddsAOA[3]; // could be combined
277 // Not reloaded with new cockpit
278 Rendering::RenderTexture* m_pddsInterlace[2]; // must be separate, wraps
280
281
282
283
284 // Interface
285 //Rendering::RenderTexture* m_pddsCardioscan = nullptr;
287
297
301
306
307 std::vector<Rendering::RenderTexture*> m_pddsLogos;
308 std::vector<std::string> logofiles;
310
311 // Dynamic Textures - Used for shipnames on hull
312 Rendering::RenderTexture* m_pddsDynamicTexture = nullptr; // instrumentation texture
313 Rendering::RenderSurface* m_pddsDynamicSurface = nullptr; // instrumentation surface
314 Rendering::RenderTexture* m_pddsProjectionTexture = nullptr; // projection texture
315 Rendering::RenderSurface* m_pddsProjectionSurface = nullptr; // projection surface
319
321
322
323
324 // Sprites
326
329 std::array<LandingLights::Light, LandingLights::MaxLights> landingLights{}; // World axes, relative to our craft.
331 void UpdateLandingLights(double seconds);
332 void DamageLandingLights(const RiseMath::Vector3& surfaceNormalBody, float planeDistanceKm,
333 const RiseMath::Vector3& impactVelocityBody, const char* cause);
334 void DamageLandingLight(unsigned lamp, float clearanceKm, float closingMps, const char* cause);
335 RiseMath::Vector3 LandingLightImpactVelocity(unsigned lamp, const RiseMath::Vector3& velocityBody) const;
336 void DamageLandingLightsAgainstSphere(const RiseMath::Vector3& centerBody, float radiusKm,
337 const RiseMath::Vector3& velocityBody, float seconds);
340 void UpdateCrashDamage(const RiseMath::Vector3& frameForces, float seconds);
341 void ApplyCollisionImpulse(const RiseMath::Vector3& impulseKms);
343 void EnableLandingLights() const;
344 float fAspect = 0.0f;
347
348
349 bool m_bDeviceSupportsVizQuery = false, m_bCloudShadow = false, m_bFourStages = false, m_bPsize = false;
351 mutable bool m_sunVizPending = false;
353 mutable bool m_nightVisionRangeQueryPending = false;
354 mutable bool m_nightVisionRangefinderActive = false;
357 mutable float m_nightVisionRangeTestKm = 0.0f;
358 mutable float m_nightVisionRangeKm = -1.0f;
359
360
361
362
365 float reentryDamageIntensity = 0.f; // Existing damage timing; independent of the exterior plasma brightness.
369 float insthdgDegrees = 0.0f, lookhdg = 0.0f, insttrk = 0.0f, lookAzimuthDegrees = 0.0f;
370 double terprecisionx = 0.0, terprecisiony = 0.0, terprecisionz = 0.0;
372 float pitchInput = 0.0f, rollInput = 0.0f, yawInput = 0.0f, steerInput = 0.0f;
375 bool advanceframe = false;
376 DeathType causechain = DeathType::ImNotDeadYet; // like old dead used to be
377 unsigned short causearray = 0; // for ship they hit, etc
378 float lateraltime = 0.0f, verticaltime = 0.0f;
379 bool lateralmod = false, verticalmod = false, yawmod = false;
380 short oldRoomIndex = -1; // for menus
381
382 RiseMath::Vector3 position = centerC; // Used in Latitude/Longitude and for facet distances in Vieneo
383 RiseMath::Vector3 posnorml = centerC; // used for wind calculations, etc
384
385 //These came from Viewscreen Keyboard class
386 float lateralincr = 0.1f;
387 float verticalincr = 0.1f;
388
389 // Internal arrays
391
394 short raindrops = 0;
402 mutable bool adWeatherMeasured = false;
405 static constexpr UINT CloudFallbackWarningMessage = WM_APP + 0x43;
406 void QueueCloudFallbackWarning() const;
407 void ShowCloudFallbackWarning(HWND owner) const;
408 mutable bool cloudFallbackWarningPending = false;
409 mutable bool cloudFallbackWarningShown = false;
410 bool hasAnimatedWipers = false;
411 void SetRainProtection(bool enabled);
412 void SetCrashHornFault(bool enabled);
413 bool hornBindingDown = false;
414 void SetHornPressed(bool pressed);
415
416
417 short waterloop = 0;
418 float heartloop = 0.0f;
419 short BCLoffsetu = 0, BCLoffsetv = 0;
420 float H2Ooffsetu = 0.0f;
421 short dockTexture = 0, oldDockTexture = 0;// , dockTextureStage = 0;
422 char flicker = 0;
423 float interlace = 0.0f;
424 float lampTest = 0.0f;
425
426 std::unique_ptr<grid> ptrGrid;
427 std::unique_ptr<weapon> ptrWeapon;
428 std::unique_ptr<buildings> ptrBuildings;
429 std::unique_ptr<keyboard> ptrKeyboard;
430 std::unique_ptr<joystick> ptrJoystick;
431 std::unique_ptr<FreeTrack> ptrFreeTrack;
432 std::unique_ptr<propulsion> ptrPropulsion;
433 std::unique_ptr<renderer> ptrRenderer;
434 std::unique_ptr<weather> ptrWeather;
435 std::unique_ptr<cockpit> ptrCockpit;
436 std::unique_ptr<instruments> ptrInstruments;
437 std::unique_ptr<waypoints> ptrWaypoints;
438
440 Logger* logger = nullptr;
441
442
443
444 float targetLeftright = 0.0f; // Radians
445 float targetUpdown = -RiseMath::ToRadian(10.0f); // Radians
446 float targetZoom = 1.0f; // mag/scale factor
447 float rolltilt = 0.0f; // Radians
448 float counteri = 0.0f, counterj = 0.0f, counterk = 0.0f;
449
450 // For skyring
451 float radperseg = RiseMath::Tau / static_cast<float>(skydomeC);
452
453 void RunBindingFunction(BindingEnum function, bool repeating);
454};
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
float RandomFloat()
#define MAX_SCAN
const RiseMath::Vector3 centerC
BindingEnum
Definition binding.h:6
bool outside
Definition Camera.h:17
float lateraltime
Definition Viewscreen.h:378
float turbLow
Definition Viewscreen.h:97
void ChangeCamera()
short oldRoomIndex
Definition Viewscreen.h:380
Rendering::RenderFont * m_pFontLicense
Definition Viewscreen.h:130
Rendering::RenderTexture * m_pddsShipTexture[shiptextureC]
Definition Viewscreen.h:289
Rendering::RenderQuery * m_pNightVisionRangeQuery
Definition Viewscreen.h:352
Rendering::ProceduralLightning11 proceduralLightning
Definition Viewscreen.h:397
RiseMath::Vector3 position
Definition Viewscreen.h:382
ULONGLONG headAccelerationDiagnosticUntil
Definition Viewscreen.h:64
void EnableLandingLights() const
Definition framemove.cpp:17
float rcsThrustRequestY
Definition Viewscreen.h:374
ULONGLONG headAccelerationNextSample
Definition Viewscreen.h:64
float reentryDamageIntensity
Definition Viewscreen.h:365
bool m_bFourStages
Definition Viewscreen.h:349
RiseMath::Quaternion startorient
Definition Viewscreen.h:70
float GetSuspensionRollOffsetRadians() const
float suspensionNormalLoadG
Definition Viewscreen.h:113
Rendering::RenderTexture * m_pddsHullDynamicTexture[MAX_SCAN]
Definition Viewscreen.h:320
bool olddocked
Definition Viewscreen.h:69
float lookAzimuthDegrees
Definition Viewscreen.h:369
Rendering::RenderBuffer * m_avInstrument
Definition Viewscreen.h:229
double cloudprecisiony
Definition Viewscreen.h:371
Rendering::RenderTexture * m_pddsHeart[heartanimateC]
Definition Viewscreen.h:262
void ShowCloudFallbackWarning(HWND owner) const
void ResetSuspensionState()
Rendering::RenderTexture * m_pddsFlame
Definition Viewscreen.h:263
Rendering::RenderTexture * m_pddsFirework2[firework2C]
Definition Viewscreen.h:255
bool ApplyBufferedVehicleState(int t, float fElapsedTime)
bool pitchTrimMod
Definition Viewscreen.h:101
void Movement(short t, float ElapsedTime)
std::unique_ptr< renderer > ptrRenderer
Definition Viewscreen.h:433
RiseMath::Matrix matrixProjSim
Definition Viewscreen.h:345
std::unique_ptr< keyboard > ptrKeyboard
Definition Viewscreen.h:429
Rendering::RenderTexture * m_pddsSinker[weaponanimateC]
Definition Viewscreen.h:250
RiseMath::Vector3 startoffset
Definition Viewscreen.h:71
float steerInput
Definition Viewscreen.h:372
float CheckFloorMap(VECTOR2SHORT newdepthpos, short u, short v)
Rendering::RenderBuffer * m_avStaticStars
Definition Viewscreen.h:215
float GetSuspensionPitchOffsetRadians() const
Rendering::RenderBuffer * m_avCone
Definition Viewscreen.h:216
void OnFrameRender(Rendering::RenderDevice *pd3dDevice, double fTime) const
Definition render.cpp:16
Rendering::RenderBuffer * m_avSkyDome
Definition Viewscreen.h:226
char msg[199]
Definition Viewscreen.h:50
float yawInput
Definition Viewscreen.h:372
short oldDockTexture
Definition Viewscreen.h:421
unsigned activeLandingLightCount
Definition Viewscreen.h:330
static constexpr UINT CloudFallbackWarningMessage
Definition Viewscreen.h:405
bool advanceframe
Definition Viewscreen.h:375
CloudVolumeRenderer cloudVolume
Definition Viewscreen.h:396
Rendering::RenderToTexture * m_pHullRender2Surface
Definition Viewscreen.h:318
Rendering::Material restore
Definition Viewscreen.h:327
void DamageLandingLight(unsigned lamp, float clearanceKm, float closingMps, const char *cause)
Rendering::RenderTexture * m_pddsNamePlate
Definition Viewscreen.h:269
Rendering::RenderTexture * m_pddsFuelIcon
Definition Viewscreen.h:273
Rendering::RenderTexture * m_pddsBinoculars
Definition Viewscreen.h:238
static float ComputeSpotlightBrightness(const RiseMath::Vector3 &pos)
Rendering::RenderTexture * m_pddsShipLights[shiptextureC]
Definition Viewscreen.h:290
RiseMath::Matrix matrixProjCock
Definition Viewscreen.h:345
bool m_nightVisionRangefinderActive
Definition Viewscreen.h:354
bool hasAnimatedWipers
Definition Viewscreen.h:410
Rendering::RenderBuffer * m_avLocalGrid
Definition Viewscreen.h:222
VECTOR2SHORT oldRts
Definition Viewscreen.h:77
Rendering::RenderBuffer * m_aiCloudGrid
Definition Viewscreen.h:219
float targetZoom
Definition Viewscreen.h:446
bool m_bPsize
Definition Viewscreen.h:349
Rendering::RenderTexture * m_pddsWeapon[weaponanimateC]
Definition Viewscreen.h:249
bool adWeatherMeasured
Definition Viewscreen.h:402
float rcsThrustOutputZ
Definition Viewscreen.h:373
RiseMath::Vector3 UniverseRelativeVelocityKms
Definition Viewscreen.h:125
float pitchTrimTime
Definition Viewscreen.h:74
float pitchInput
Definition Viewscreen.h:372
Rendering::RenderTexture * m_pddsDIHV[dihvanimateC]
Definition Viewscreen.h:261
void RunBindingFunction(BindingEnum function, bool repeating)
bool cloudFallbackWarningShown
Definition Viewscreen.h:409
float H2Ooffsetu
Definition Viewscreen.h:420
void ApplyCollisionImpulse(const RiseMath::Vector3 &impulseKms)
Rendering::RenderQuery * m_pLightSunVizQuery
Definition Viewscreen.h:350
RiseMath::Vector3 LandingLightImpactVelocity(unsigned lamp, const RiseMath::Vector3 &velocityBody) const
Rendering::RenderTexture * m_pddsDockTexture[docktextureC]
Definition Viewscreen.h:291
RiseMath::Vector3 QuadraticVectorInterpolation(RiseMath::Vector3 *vel0, RiseMath::Vector3 *vel1, RiseMath::Vector3 *vel2, float t) const
void OnDestroyDevice(bool preserveModels=false)
Rendering::RenderToTexture * m_pRenderToSurface
Definition Viewscreen.h:316
float GetAverageSuspensionBumpTravelKm() const
short waterloop
Definition Viewscreen.h:417
Viewscreen(GameClass *)
void Initialize()
DeathType causechain
Definition Viewscreen.h:376
Rendering::RenderBuffer * m_avRainDrops
Definition Viewscreen.h:225
std::array< LandingLights::Light, LandingLights::MaxLights > landingLights
Definition Viewscreen.h:329
Rendering::RenderTexture * m_pddsMarston1
Definition Viewscreen.h:302
void SetHornPressed(bool pressed)
RiseMath::Vector3 rainarray[MAX_RAINDROPS]
Definition Viewscreen.h:393
static RECT WhichRoom(const std::vector< tagRECT > &rooms, float x, float y, short *roomIndex)
Rendering::RenderTexture * m_pddsSinkerX
Definition Viewscreen.h:252
RiseMath::Vector3 gravityacc
Definition Viewscreen.h:112
Rendering::RenderTexture * m_pddsInterlace[2]
Definition Viewscreen.h:278
Sani GetAni(float f_time, unsigned char ani) const
std::unique_ptr< waypoints > ptrWaypoints
Definition Viewscreen.h:437
float fAspect
Definition Viewscreen.h:344
std::vector< std::string > logofiles
Definition Viewscreen.h:308
bool VolumeCloudsEnabled() const
Definition Viewscreen.h:404
void DamageLandingLightsAgainstSphere(const RiseMath::Vector3 &centerBody, float radiusKm, const RiseMath::Vector3 &velocityBody, float seconds)
RiseMath::Vector3 leveler
Definition Viewscreen.h:143
GameClass * gameclass
Definition Viewscreen.h:439
static bool CheckPlotRoads(float f_tempu, float f_tempv)
Rendering::RenderTexture * m_pddsCloudDetailBelow
Definition Viewscreen.h:237
HeadAcceleration::RepositionGuard headAccelerationGuard
Definition Viewscreen.h:62
BiometerDiagnostics::Monitor biometerDiagnostics
Definition Viewscreen.h:122
RiseMath::Matrix matrixLookAdj
Definition Viewscreen.h:346
double cloudprecisionx
Definition Viewscreen.h:371
RiseMath::Vector3 compassnorth
Definition Viewscreen.h:107
Rendering::RenderTexture * m_pddsAtmosphere
Definition Viewscreen.h:288
Rendering::RenderTexture * m_pddsNightVisionArrow
Definition Viewscreen.h:243
ReentryEnvelope::State reentryState
Definition Viewscreen.h:399
bool InventoryItemEffectsEnabled() const
Definition Viewscreen.h:169
float headtilt
Definition Viewscreen.h:61
float rolltilt
Definition Viewscreen.h:447
float m_nightVisionRangeHighKm
Definition Viewscreen.h:356
void SetRainProtection(bool enabled)
std::unique_ptr< propulsion > ptrPropulsion
Definition Viewscreen.h:432
bool m_sunVizPending
Definition Viewscreen.h:351
Rendering::RenderTexture * m_pddsWaterNormal
Definition Viewscreen.h:300
RiseMath::Matrix matrixView
Definition Viewscreen.h:346
Rendering::RenderTexture * m_pddsWorld2a1
Definition Viewscreen.h:234
Rendering::RenderTexture * m_pddsCloudDetailAbove
Definition Viewscreen.h:236
float nightVisionOverexposure
Definition Viewscreen.h:366
RiseMath::Vector3 oldsumofforces
Definition Viewscreen.h:60
bool m_bDeviceSupportsVizQuery
Definition Viewscreen.h:349
HRESULT OnCreateDevice(Rendering::RenderDevice *pd3dDevice)
RiseMath::Matrix matrixLook
Definition Viewscreen.h:346
int curbDiagnosticFramesRemaining
Definition Viewscreen.h:119
RiseMath::Vector3 reentryWindward
Definition Viewscreen.h:400
Rendering::RenderTexture * m_pddsCityTexture[citytextureC]
Definition Viewscreen.h:295
std::unique_ptr< weather > ptrWeather
Definition Viewscreen.h:434
float lampTest
Definition Viewscreen.h:424
Rendering::RenderBuffer * m_avRunningLights
Definition Viewscreen.h:218
size_t cameraOrdinal
Definition Viewscreen.h:139
std::vector< SCamera > cameras
Definition Viewscreen.h:136
unsigned int curbDiagnosticSequence
Definition Viewscreen.h:117
RiseMath::Vector3 posnorml
Definition Viewscreen.h:383
bool lateralmod
Definition Viewscreen.h:379
std::unique_ptr< grid > ptrGrid
Definition Viewscreen.h:426
Rendering::RenderTexture * m_pddsGVCompass
Definition Viewscreen.h:270
unsigned short causearray
Definition Viewscreen.h:377
bool IsRepositionSettling() const
Definition Viewscreen.h:152
ULONGLONG headAccelerationNextAnomaly
Definition Viewscreen.h:64
void SetCrashHornFault(bool enabled)
void SetProjectionMatrices()
Rendering::RenderTexture * m_pddsNightVision
Definition Viewscreen.h:239
Rendering::RenderTexture * m_pddsStarTexture
Definition Viewscreen.h:246
Rendering::RenderTexture * m_pddsElmo[elmoAnimateC]
Definition Viewscreen.h:257
std::array< SuspensionWheelState, 4 > suspensionWheels
Definition Viewscreen.h:116
Rendering::RenderTexture * m_pddsBinocularsCompass
Definition Viewscreen.h:240
float lookhdg
Definition Viewscreen.h:369
void NetworkObjectsProcessing(int t, float fElapsedTime, bool allowOurParent=false)
void ApplyEnvironmentMap()
std::vector< std::string > sofTracking
Definition Viewscreen.h:134
void OnFrameRender2(Rendering::RenderDevice *pd3dDevice, float fElapsedTime)
Definition render.cpp:2734
void LoadVehicleProfile(short t)
Rendering::Light sunlight
Definition Viewscreen.h:328
float counteri
Definition Viewscreen.h:448
static RiseMath::Color HSVtoRGB(float hue, float s, float v)
Converts HSV in [0…1] to RGB in [0…1].
float turbTime
Definition Viewscreen.h:96
Rendering::RenderTexture * m_pddsLetters
Definition Viewscreen.h:286
float currentBPM
Definition Viewscreen.h:121
bool AssertTelemetry(const char *location, short id)
void LogCurbDiagnostic(const char *text)
Rendering::RenderFont * m_pFontHull
Definition Viewscreen.h:132
unsigned char zone
Definition Viewscreen.h:141
Rendering::RenderTexture * m_pddsNightVisionCompass
Definition Viewscreen.h:242
float CalculateAGLd(RiseMath::Vector3 terpos, double terprecisionx, double terprecisiony, double terprecisionz, double proposedx, double proposedy, double proposedz, RiseMath::Vector3 proposed, bool makeleveler)
float verticalincr
Definition Viewscreen.h:387
std::unique_ptr< instruments > ptrInstruments
Definition Viewscreen.h:436
VECTOR2SHORT newdepthpos
Definition Viewscreen.h:76
Rendering::RenderBuffer * m_avSkyRing
Definition Viewscreen.h:227
Rendering::RenderTexture * m_pddsRunwayEdgeLight1
Definition Viewscreen.h:303
Rendering::AdDiagnostics11 adDiagnostics
Definition Viewscreen.h:401
float lowframeTime
Definition Viewscreen.h:52
double terprecisionz
Definition Viewscreen.h:370
Rendering::RenderTexture * m_pddsRoad
Definition Viewscreen.h:304
short dockTexture
Definition Viewscreen.h:421
float rcsThrustOutputX
Definition Viewscreen.h:373
float rollInput
Definition Viewscreen.h:372
CityCampaignLogos cityCampaignLogos
Definition Viewscreen.h:309
float UniverseRelativeSpeedKms
Definition Viewscreen.h:126
Rendering::RenderTexture * m_pddsGVBackground
Definition Viewscreen.h:268
float turbEnergy
Definition Viewscreen.h:98
float verticaltime
Definition Viewscreen.h:378
Rendering::RenderTexture * m_pddsRTSLights[RTStextureC]
Definition Viewscreen.h:294
bool g_bStrapon
Definition Viewscreen.h:102
VECTOR2SHORT CalculateCGC(RiseMath::Vector3 position, char cube) const
RiseMath::Color alphascreen
Definition Viewscreen.h:364
Rendering::RenderSprite * m_spriteVector
Definition Viewscreen.h:325
Rendering::RenderTexture * m_pddsCockpitTexture[cockpittextureC]
Definition Viewscreen.h:275
Rendering::RenderTexture * m_pddsCityLights[citytextureC]
Definition Viewscreen.h:296
short BCLoffsetv
Definition Viewscreen.h:419
unsigned char oldZone
Definition Viewscreen.h:78
LPDIRECTINPUT8 g_pDI
Definition Viewscreen.h:210
void DumpSofTracking()
void UpdateCrashDamage(const RiseMath::Vector3 &frameForces, float seconds)
float CalculateAGL(short u, short v, RiseMath::Vector3 position, bool makeleveler)
Rendering::RenderTexture * m_pddsLandform[landformtextureC]
Definition Viewscreen.h:298
void DamageLandingLights(const RiseMath::Vector3 &surfaceNormalBody, float planeDistanceKm, const RiseMath::Vector3 &impactVelocityBody, const char *cause)
RiseMath::Vector3 cockpitSpecificForceMss
Definition Viewscreen.h:151
unsigned int curbDiagnosticFrame
Definition Viewscreen.h:118
float heartloop
Definition Viewscreen.h:418
static RiseMath::Vector3 CalculateBarycentric(RiseMath::Vector3 *position, RiseMath::Vector3 *gthrust, float *radius)
Rendering::RenderBuffer * m_avBillboardVertices
Definition Viewscreen.h:217
VECTOR2SHORT CalculateWrap(short u, short v, char cube, char *rotate) const
short BCLoffsetu
Definition Viewscreen.h:419
void QueueCloudFallbackWarning() const
Rendering::RenderTexture * m_pddsGVDialSmall
Definition Viewscreen.h:267
std::unique_ptr< buildings > ptrBuildings
Definition Viewscreen.h:428
long FontOffset(char letter) const
Rendering::RenderTexture * m_pddsRTSTexture[RTStextureC]
Definition Viewscreen.h:293
float counterj
Definition Viewscreen.h:448
float insthdgDegrees
Definition Viewscreen.h:369
void OnFrameMove(double fTime, float fElapsedTime)
short oldportassigned
Definition Viewscreen.h:68
Rendering::RenderTexture * m_pddsCockpitLights[cockpittextureC]
Definition Viewscreen.h:276
double cloudprecisionz
Definition Viewscreen.h:371
float rcsThrustOutputY
Definition Viewscreen.h:373
float radperseg
Definition Viewscreen.h:451
void ApplySuspensionImpact(float absorbedVelocityKms)
Rendering::RenderBuffer * m_avScreen
Definition Viewscreen.h:228
RiseMath::Vector3 cloudpos
Definition Viewscreen.h:392
RiseMath::Vector3 sumofforces
Definition Viewscreen.h:108
std::vector< Rendering::RenderTexture * > m_pddsLogos
Definition Viewscreen.h:307
Rendering::RenderTexture * m_pddsGVDirection
Definition Viewscreen.h:271
unsigned int headAccelerationResetSequence
Definition Viewscreen.h:63
float breathTimer
Definition Viewscreen.h:123
Rendering::RenderTexture * m_pddsSunglasses
Definition Viewscreen.h:244
LOCALGRID2 CalculateSRV(short t, short s, VECTOR2SHORT tcp, char cube, SRenderVertex sourcedata)
bool suspensionStateInitialized
Definition Viewscreen.h:115
float suspensionHeaveG
Definition Viewscreen.h:114
short raindrops
Definition Viewscreen.h:394
double terprecisionx
Definition Viewscreen.h:370
CollisionDamage::StructuralEpisode crashDamageEpisode
Definition Viewscreen.h:338
float targetUpdown
Definition Viewscreen.h:445
RiseMath::Vector3 CalculatePlanar(short u, short v)
Rendering::RenderBuffer * m_avCloudGrid
Definition Viewscreen.h:220
void Undock() const
float holidayTimer
Definition Viewscreen.h:56
std::unique_ptr< cockpit > ptrCockpit
Definition Viewscreen.h:435
bool m_nightVisionRangeQueryPending
Definition Viewscreen.h:353
bool cloudFallbackWarningPending
Definition Viewscreen.h:408
float CheckDepthMap(VECTOR2SHORT newdepthpos, short u, short v)
Rendering::RenderSurface * m_pddsDynamicSurface
Definition Viewscreen.h:313
s_polygon_extras2 polyextras2
Definition Viewscreen.h:390
bool leftfoot
Definition Viewscreen.h:65
RiseMath::Vector3 gravityvec
Definition Viewscreen.h:72
void TriggerBCLLightningAt(const RiseMath::Vector3 &ground, const RiseMath::Vector3 &cloud, float distanceKm, int seed, int chainedBolts, bool testStrike=false) const
float rcsThrustRequestX
Definition Viewscreen.h:374
bool hornBindingDown
Definition Viewscreen.h:413
void UpdateLandingLights(double seconds)
Definition framemove.cpp:23
float insttrk
Definition Viewscreen.h:369
RiseMath::Vector3 terpos
Definition Viewscreen.h:368
std::unique_ptr< joystick > ptrJoystick
Definition Viewscreen.h:430
bool verticalmod
Definition Viewscreen.h:379
float rcsThrustRequestZ
Definition Viewscreen.h:374
RiseMath::Vector3 lookvec
Definition Viewscreen.h:363
Rendering::RenderTexture * m_pddsBlastX
Definition Viewscreen.h:253
float onlinePlayersInVicinity
Definition Viewscreen.h:100
WindshieldRainRenderer windshieldRain
Definition Viewscreen.h:395
float radioBlackout
Definition Viewscreen.h:104
SCamera * cockpitCamera
Definition Viewscreen.h:138
float headback
Definition Viewscreen.h:61
Rendering::RenderSurface * m_pddsProjectionSurface
Definition Viewscreen.h:315
RiseMath::Vector3 forwardVector
Definition Viewscreen.h:363
char CalculateCube(RiseMath::Vector3 position) const
VECTOR2SHORT rts
Definition Viewscreen.h:77
Rendering::RenderTexture * m_pddsFirework1[firework1C]
Definition Viewscreen.h:254
std::unique_ptr< FreeTrack > ptrFreeTrack
Definition Viewscreen.h:431
HRESULT OnResetDevice(Rendering::RenderDevice *pd3dDevice, const Rendering::SurfaceDescription *pBackBufferSurfaceDesc)
std::unique_ptr< weapon > ptrWeapon
Definition Viewscreen.h:427
double terprecisiony
Definition Viewscreen.h:370
float targetLeftright
Definition Viewscreen.h:444
float healTimer
Definition Viewscreen.h:54
Rendering::RenderTexture * m_pddsIntersection
Definition Viewscreen.h:305
bool CockpitPropMotionSuppressed() const
Definition Viewscreen.h:150
void CheckLogo(unsigned char array, char *logofile)
float m_fAnimateFrame
Definition Viewscreen.h:55
Rendering::RenderTexture * m_pddsCracked
Definition Viewscreen.h:279
Rendering::RenderTexture * m_pddsCloudBaseMap
Definition Viewscreen.h:235
void OnLostDevice()
Rendering::RenderTexture * m_pddsHolidayTexture
Definition Viewscreen.h:247
float nightVisionOverexposureHold
Definition Viewscreen.h:367
float m_nightVisionRangeKm
Definition Viewscreen.h:358
float lateralincr
Definition Viewscreen.h:386
float counterk
Definition Viewscreen.h:448
ExteriorRainRenderer exteriorRainRenderer
Definition Viewscreen.h:403
Rendering::RenderTexture * m_pddsProjectionTexture
Definition Viewscreen.h:314
Logger * logger
Definition Viewscreen.h:440
float interlace
Definition Viewscreen.h:423
void UpdateNightVisionRangefinder(Rendering::RenderDevice *pd3dDevice) const
Definition render.cpp:2623
CollisionDamage::Episode controlJoltEpisode
Definition Viewscreen.h:339
Rendering::RenderTexture * m_pddsBinocularsArrow
Definition Viewscreen.h:241
Rendering::RenderTexture * m_pddsTransition[transitiontextureC]
Definition Viewscreen.h:299
float frameRateHeartbeat
Definition Viewscreen.h:53
void ClearCollisionEffects()
bool m_bCloudShadow
Definition Viewscreen.h:349
Rendering::RenderTexture * m_pddsSunTexture
Definition Viewscreen.h:245
Rendering::RenderToTexture * m_pRenderToSurfaceNextGen
Definition Viewscreen.h:317
RiseMath::Matrix matrixProj
Definition Viewscreen.h:345
VECTOR2SHORT bump
Definition Viewscreen.h:77
void ComputeSimulatorMotion(unsigned char type)
Rendering::RenderTexture * m_pddsLightsCruiseIcons
Definition Viewscreen.h:272
SCamera * camera
Definition Viewscreen.h:137
bool PrepareHullTextures(Rendering::RenderDevice *pd3dDevice, unsigned budget=2)
Definition render.cpp:2793
float footstep
Definition Viewscreen.h:66
float ProbeBoundSphere(RiseMath::Vector3 *position, const RiseMath::Vector3 *Xsunlight) const
Rendering::RenderTexture * m_pddsAOA[3]
Definition Viewscreen.h:274
Rendering::RenderTexture * m_pddsFirework3[firework3C]
Definition Viewscreen.h:256
float UpdateSuspensionState(float elapsedTime, const RiseMath::Vector3 &vehicleG)
Rendering::RenderFont * m_pFontNamePlate
Definition Viewscreen.h:131
RiseMath::Vector3 structuralImpactImpulse
Definition Viewscreen.h:111
void ResetHeadAccelerationEffects(const char *reason, bool waitForTerrain=false)
Rendering::RenderTexture * m_pddsFuzerX
Definition Viewscreen.h:251
Rendering::ReentryEnvelope11 reentryRenderer
Definition Viewscreen.h:398
std::vector< RECT > rooms
Definition Viewscreen.h:106
float m_nightVisionRangeTestKm
Definition Viewscreen.h:357
Rendering::RenderFont * m_pFont
Definition Viewscreen.h:129
float timeToNextDecrement
Definition Viewscreen.h:57
Rendering::RenderTexture * m_pddsDynamicTexture
Definition Viewscreen.h:312
float m_nightVisionRangeLowKm
Definition Viewscreen.h:355
Rendering::RenderTexture * m_pddsDockLights[docktextureC]
Definition Viewscreen.h:292
void TriggerBCLLightning(int u, int v, float distanceKm, int seed, int chainedBolts) const
s_network_objects playerships[MAX_SCAN]
Definition globals.cpp:112
#define RTStextureC
Definition globals.h:54
#define MAX_RAINDROPS
Definition globals.h:80
#define citytextureC
Definition globals.h:53
#define firework1C
Definition globals.h:60
#define firework3C
Definition globals.h:62
#define landformtextureC
Definition globals.h:47
DeathType
Definition globals.h:149
@ ImNotDeadYet
Definition globals.h:150
#define dihvanimateC
Definition globals.h:63
#define farplaneC
Definition globals.h:27
#define weaponanimateC
Definition globals.h:55
#define skydomeC
Definition globals.h:90
#define firework2C
Definition globals.h:61
#define docktextureC
Definition globals.h:51
#define nearplaneC
Definition globals.h:29
#define cockpittextureC
Definition globals.h:50
#define transitiontextureC
Definition globals.h:48
#define shiptextureC
Definition globals.h:49
#define elmoAnimateC
Definition globals.h:56
#define heartanimateC
Definition globals.h:64
auto ToRadian(T value)
Definition ClientMath.h:13
constexpr float Tau
Definition ClientMath.h:12