10 #include "../Common/server.h" 17 #define csC 8.0f // For lower cloud layer texture span times 2km 18 #define farplaneC 384.0f//559.20f //5592.0f 8388.6f // Limitation of floating point for w 19 #define cutplaneC 256.0f//221.7f//370.0f //3954.1f 4150.0f // sqrtf(8388.6f^2/3) 20 #define nearplaneC 0.001f // ground out left window of MuVER is a good test 21 #define cockplanenearC 0.0001f // t-handles in cockpit are easy test of this 22 #define cockplanefarC 0.1f // far walls of sim bay are a good test at 0.025 23 #define maxpolyC 26 // meshes 24 #define maxstarC 10 // universe objects including docks now at end 26 #define cityscaleC 0.0039f 27 #define shipdockscaleC 0.00034822f 28 #define INTERIOR_SCALE 0.000006570188679f // km per unit 31 #define Kg2Lbs 2.2046226218f 32 #define ZeroCelsiusToKelvin 273.15f 33 #define trimlimiterC 0.26179938779914943653855361527329f // in radians, 15� stop 34 #define MaxAcceleration 327.67f // G force max an occupant can have from containing ship 36 #define landformtextureC 32 37 #define transitiontextureC 31 // 1-31 38 #define shiptextureC 208 39 #define cockpittextureC 30 // E-series 40 #define docktextureC 68 41 #define runninglightsC 125 // 1 for lightsph, 9 for E-10, 15 for P-13, 8 for A-4, 8 for C-2, 10 for Muver, 15 for DIHV, 6 for steerhead, 16 for Phantom, 11 for Stratomaster, 5 for Mammoth, 12 for new Steerhead 42 #define citytextureC 175 43 #define RTStextureC 74 44 #define weaponanimateC 16 45 #define elmoAnimateC 4 47 #define smoketrailC 128 49 #define firework1C 128 52 #define dihvanimateC 64 53 #define heartanimateC 29 54 #define buildingVBC 64 55 #define drawlistC 3205 56 #define visiblevertC 36528 // 98304 is absolute worst case, 7168 was best case with triangle fan, 30720 is my guess 57 #define cockpitvertC 13812 // new control tower 7293 // apartment is 13812! 58 #define dockvertC 2994 // max vertices for any dock (Cutter's is 2994) 59 #define cloudindicesC 19230 61 #define maxcompareC 2147483648 // for strobes, etc 62 #define maxcomparebitC 32 // long storage format 67 #define weaponfuzerreadyC 0.85f//2.85f 68 #define weaponsinkerreadyC 1.15f//2.85f 69 #define weaponlongarmreadyC 2.85f//2.85f 70 #define MAX_RAINDROPS 8192 71 #define ACLlightningC 8 73 #define MAX_ANI 15 // matched with Makeship 74 #define MAX_STEPS 10 // matched with Makeship 76 #define mu 97386.86f // nothing to do with braking, this is for orbital parameters 77 #define skydomeC 194 // sides that make up the skyring 79 #define rhoOver2SlugsCuFt2 0.003085346f // for aerodynamics, Earth number is 0.0011885 ... Vieneo is 2.596x 80 #define bulkElasticModulusDryAirGPa 142000.0f // for Mach and TAT calculations, based on Earth air composition!! 81 #define adiabaticIndex 1.4f // for Mach and TAT calculations, based on Earth air composition!! 82 #define gasConstantm2s2K 286.0f // for Mach and TAT calculations, based on Earth air composition!! 84 #define ScaleHeightC 6.923432133f // for density calculation based on altitude 85 #define SeaLevelPressureMb 2630.4f 86 #define MbPerFoot 0.03378431f // @ref https://sciencing.com/how-6183062-calculate-cabin-differential-pressure.html 88 #define radiusC 2939.6f 89 #define gravityC 0.01127f // km/s/s 90 #define gForceKmSSC 0.00980665f 91 #define oneOvergForceKmSSC 101.971621f 92 #define cloudTopsMslC 10.0f // this is actually the tops in MSL 93 #define cloudBufferMslC 9.5f // to keep them from going up down up down if they are hanging out at 10km 94 #define cloudTopsRadiusC 2949.6f // 10 km 95 #define aftersdC 52.5f // kilometers between UCL and 63km 101 #define D3DFVF_VERTEX ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 ) 102 #define D3DFVF_VERTEX2 ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX2 ) 103 #define D3DFVF_SKYDOME ( D3DFVF_XYZ | D3DFVF_DIFFUSE ) 104 #define D3DFVF_RAINDROP ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE ) 105 #define D3DFVF_SKYRING ( D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1 ) 106 #define D3DFVF_STATICSTARS ( D3DFVF_XYZ | D3DFVF_PSIZE | D3DFVF_DIFFUSE ) 107 #define D3DFVF_NOPSIZE ( D3DFVF_XYZ | D3DFVF_DIFFUSE ) 108 #define D3DFVF_NONORMAL ( D3DFVF_XYZ | D3DFVF_TEX1 ) 109 #define D3DFVF_SCREEN ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE ) 110 #define D3DFVF_INSTRUMENT ( D3DFVF_XYZRHW | D3DFVF_TEX1 ) 111 #define D3DFVF_INSTCOLOR ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE ) // assay grid, weather radar 112 #define D3DFVF_LOCALGRID ( D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1) // cloud base 113 #define D3DFVF_LOCALGRID2 ( D3DFVF_XYZ | D3DFVF_DIFFUSE| D3DFVF_SPECULAR | D3DFVF_TEX1) // terrain 118 extern const D3DXVECTOR3
centerC;
158 extern unsigned short treesC;
159 extern D3DXVECTOR3 treelist[16384];
160 extern float treedist[16384];
161 extern D3DXVECTOR3 treepos[16384];
204 #pragma region Used for strides in streams 304 return type == PlotType::UserEstate ||
type == PlotType::UserMining ||
type == PlotType::UserFarming ||
type == PlotType::UserTownship ||
305 type == PlotType::UserAirfield;
316 return type == PlotType::DeoisFinancial ||
type == PlotType::DeoisIndustrial ||
type == PlotType::DeoisCityCenter ||
317 type == PlotType::DeoisTransit ||
type == PlotType::DeoisPort;
322 return type == PlotType::O4Ruin1 ||
type == PlotType::O4Ruin2 ||
type == PlotType::O4Ruin3 ||
type == PlotType::O4Ruin4;
366 LPDIRECT3DVERTEXBUFFER9
VB =
nullptr;
375 unsigned char animate;
396 SSmokeTrail smoketrail[smoketrailC];
397 unsigned char smokestep;
398 D3DXVECTOR3 barycentric, smokeprog;
444 LPDIRECT3DVERTEXBUFFER9
VB =
nullptr;
445 LPDIRECT3DVERTEXBUFFER9
RTSVB =
nullptr;
452 PlotType
type = PlotType::NotZoned;
523 unsigned long compare[PlotType::PlotTypeEnum];
524 float speed[PlotType::PlotTypeEnum],
timer[PlotType::PlotTypeEnum];
std::vector< SShockWave > shockwaves
float timer[PlotType::PlotTypeEnum]
s_mesh_component * rtscomponentarray
int inventoryItemInUseType
s_mesh_component * componentarray
BUILDZONE buildzone[buildingVBC]
int intentoryItemInUseVehicleId
D3DXQUATERNION orientation
unsigned short temptarget
unsigned short rtscomponents
short scanDisplayVesselLimit
std::vector< int > flapSettings
D3DXQUATERNION orientation
unsigned short startindex
float tireRotationRadians
float i48CriticalEngineYawArmM
float i12WingAreaOneSideSqFt
float colonistsforbuilding
unsigned char cargoloadtype
float d16HTailWithElevatorSqFt
unsigned char playerWeightKg
bool IsUserColony() const
unsigned char ter_landform
const D3DXVECTOR3 meridian
std::vector< unsigned char > personalInventory
float machAngleDragScalar
std::vector< s_light_effect > effects
D3DXMATRIX matrixInvOrientation
LPDIRECT3DVERTEXBUFFER9 VB
D3DXQUATERNION orientleft
unsigned char pri_landform
s_mesh_component * componentarray
unsigned char sec_landform
std::vector< s_light_effect > effects
float d15TotalWingAreaSqFt
unsigned char pri_transition
float d17VTailWithRudderSqFt
float engineCriticalAltitude
s_universe_object allobjects[maxstarC]
const D3DXVECTOR3 northpoleC
s_mesh_component * componentarray
unsigned char sec_transition
s_mesh_component * componentarray
LIGHTNINGBELOW lightningbelow
const D3DXVECTOR3 eastpole
s_polygon_object polyobjects[maxpolyC]
unsigned char sec_landform
float engineEfficiencyAtSeaLevelScalar
unsigned long compare[PlotType::PlotTypeEnum]
unsigned char sec_transition
float exteriorInsulationHeatTransferCoefficient
https://en.wikipedia.org/wiki/List_of_thermal_conductivities
float dockingOrientationZ
unsigned short components
LOCALGRID2 gridarray[64][64]
float l48AverageEnginePitchArmM
const D3DXVECTOR3 centerC
s_network_objects playerships[MAX_SCAN]
FIREWORKS fireworks[fireworksC]
float tireCircumferenceKm
unsigned char ter_landform
unsigned char runwayLights
D3DXVECTOR3 insidearray[63][63][3]
unsigned char pri_landform
D3DXVECTOR3 dockInterface
bool weatherRadarEquipped
float currentFuelFlowPoundsPerSecond
unsigned short components
LPDIRECT3DVERTEXBUFFER9 VB
unsigned char pri_transition
LPDIRECT3DVERTEXBUFFER9 RTSVB
unsigned short components
D3DXQUATERNION orientiter
LIGHTNINGABOVE lightningabove[ACLlightningC]
float speed[PlotType::PlotTypeEnum]
float f20FrontBackDragCoeff
std::vector< unsigned char > vehicleInventory
unsigned char WPtargetselgrp
Sani aniarray[MAX_ANI][10]
Ssorter sortme[buildingVBC]
unsigned short components
BATCHINDEX2 drawlist[drawlistC]