42 static const std::string noCreative;
43 for (
unsigned slot = 0; slot <
MAX_SCAN; ++slot)
47 const std::string& creative = vehicle.active && ordinal >= 0 && size_t(ordinal) <
logofiles.size() ?
logofiles[ordinal] : noCreative;
50 identityTiming.
Stop();
60 raindrops != 0 ?
"rain post-effect unsupported" :
62 itemEffect ?
"inventory visual effect unsupported" :
72 RiseMath::Matrix matrixTemp, matrixWorld, matrixLookAtHorizon, matrixLookAtSkydome, matrixLookAtLocal;
93 -
playerships[0].
position,{strikeInverseView._41,strikeInverseView._42,strikeInverseView._43},
125 if ((
static_cast<int>(fTime) % 2) == 1)
139 const bool ready = countdown.
Ready(now);
165 if (FAILED(hudResult))
239#pragma region Outside
243 result.x = 0.0f; result.y = 0.0f; result.z = -1.0f;
256 result.x = 0.0f; result.y = 0.0f; result.z = -1.0f;
290 pd3dDevice->
SetLight(0, &templight);
298#pragma region Upper Cloud Layer Stencil
309 vtx2->
x = 0.0f; vtx2->
y = 0.0f; vtx2->
z = -bury;
314 vtx2->
x = cosf(
radperseg *
static_cast<float>(s)) * inner;
315 vtx2->
y = sinf(
radperseg *
static_cast<float>(s)) * inner;
320 vtx2->
x = inner; vtx2->
y = 0.0f; vtx2->
z = -bury;
323 matrixWorld = matrixLookAtSkydome;
382#pragma region Buildings and Terrain
396 const RiseMath::Vector3 terrainEye(-matrixTemp._41, -matrixTemp._42, -matrixTemp._43);
469 unsigned char old_pri_landform = 255, old_pri_transition = 255;
470 unsigned char old_sec_landform = 255, old_sec_transition = 255;
471 unsigned char old_ter_landform = 255;
482 if (
drawlist[r].pri_landform == 255)
485 if (!
drawlist[r].bounds.IntersectsFrustum(mWorldViewProj))
488 if (old_pri_landform !=
drawlist[r].pri_landform)
501 if (
drawlist[r].sec_landform == 255)
508 if (old_pri_transition !=
drawlist[r].pri_transition)
515 if (old_sec_landform !=
drawlist[r].sec_landform)
530 if (old_sec_transition !=
drawlist[r].sec_transition)
537 if (old_ter_landform !=
drawlist[r].ter_landform)
552 old_sec_transition = old_ter_landform = 255;
557 old_pri_transition = old_sec_landform = 255;
583 features.x = features.w = 0.0f;
584 features.y = features.z = 0.0f;
632 if (
drawlist[r].sec_landform == 255)
664 terrainTiming.
Stop();
682#pragma region BCL Cloud Bases
690 DWORD fogEnd = *
reinterpret_cast<const DWORD*
>(&renderVisibility);
697 pd3dDevice->
SetLight(0, &templight);
764#pragma region RTS Grid
823 pd3dDevice->
SetLight(0, &templight);
836 bool cloudVolumeDrawn =
false;
837 bool deferredSkyRing =
false;
839 float deferredSkyRingScale = 1;
840 const auto drawCloudVolume = [&]() {
857 std::vector<CloudVolumeRenderer::Headlight> cloudLights;
866 cloudLights.push_back({ planetOrigin + light.origin, light.direction, light.color, light.profile.rangeKm, light.up, light.profile, light.extinctionPerKm });
868 const size_t ownLights = cloudLights.size();
869 for (
int ship = 1; ship <
MAX_SCAN; ++ship)
873 if (!vehicle.active || !vehicle.visible || vehicle.isSimulator ||
874 !vehicle.headlight || !vehicle.logolight || vehicle.cloaking <= 0 ||
875 vehicle.VB < 0 || vehicle.VB >=
maxpolyC)
continue;
878 const auto offset = -vehicle.
position - planetCamera;
883 for (
unsigned i = 0; i < model.landingLightCount; ++i)
887 cloudLights.push_back({ planetOrigin + light.origin, light.direction,
888 light.color * vehicle.cloaking, light.profile.rangeKm, light.up, light.profile, light.extinctionPerKm });
891 std::stable_sort(cloudLights.begin() + ownLights, cloudLights.end(), [&](
const auto& a,
const auto& b) {
892 const auto da = a.position - planetCamera, db = b.position - planetCamera;
893 return RiseMath::Vec3LengthSq(&da) < RiseMath::Vec3LengthSq(&db);
901 cloudVolumeDrawn =
true;
902 if (FAILED(cloudResult))
918#pragma region Upper cloud layer
945 if (renderpolygons > 2250)
946 renderpolygons = 2250;
963#pragma region Radiosity
976 else if (radio <= -1.0f)
979 f_temp = acosf(radio);
983 radiosity.x = result.x; radiosity.y = result.y; radiosity.z = -result.z;
1006 if (
f_ACL < 1000.0f)
1007 tempcolor.
a = 1.0f - (
f_ACL - 500.0f) / 500.0f;
1018 temp4.w = tempcolor.
a;
1081#pragma region Iomere
1138 pd3dDevice->
SetLight(0, &iomereSunlight);
1158#pragma region Static Stars
1209 starVision = {starGain, starGain, starGain, starGain > 1.f ? 1.f : 0.f};
1231#pragma region Yonmara
1308#pragma region Skyring
1323 const float lower = -upper;
1330 result.z = lower - bury;
1331 vtx3->
x = result.x; vtx3->
y = result.y; vtx3->
z = result.z;
1339 else if (f_temp >= -0.3f && f_temp < 0.0f)
1340 bright = (f_temp + 0.3f) / 0.3f;
1355 vtx3->
tu =
static_cast<float>(s); vtx3->
tv = 1.0f;
1360 result.z = upper - bury;
1361 vtx3->
x = result.x; vtx3->
y = result.y; vtx3->
z = result.z;
1363 vtx3->
tu =
static_cast<float>(s); vtx3->
tv = 0.0f;
1366 result.x = inner; result.y = 0.0f; result.z = lower - bury;
1367 vtx3->
x = result.x; vtx3->
y = result.y; vtx3->
z = result.z;
1369 vtx3->
tu =
static_cast<float>(s); vtx3->
tv = 1.0f;
1372 result.x = outer; result.y = 0.0f; result.z = upper - bury;
1373 vtx3->
x = result.x; vtx3->
y = result.y; vtx3->
z = result.z;
1375 vtx3->
tu =
static_cast<float>(s); vtx3->
tv = 0.0f;
1380 matrixWorld = matrixLookAtSkydome;
1384 float skyRingScale = 1.f;
1389 skyRingScale = f_temp;
1405 deferredSkyRing =
true;
1406 skyRingWorld = matrixWorld;
1407 deferredSkyRingScale = skyRingScale;
1474 if (deferredSkyRing)
1507 : std::vector<ReentryEnvelope::Sphere>{};
1517 cockpitView=orientation*mount;
1522 if (part.visible && part.type==5)
1524 part.matWorld*
matrixView*inverseCockpitView);
1531 {exterior._41,exterior._42,exterior._43});
1532 float transmission=1.f;
1687 matrixTemp = matrixWorld;
1690 matrixTemp._41 = -result.x;
1691 matrixTemp._42 = -result.y;
1692 matrixTemp._43 = -result.z;
1699 limit = (float)
fireworks[t].texture / 16.0f;
1704 limit = (float)
fireworks[t].texture / 16.0f;
1709 limit = (float)
fireworks[t].texture / 16.0f;
1740 if (weaponarray[t].active)
1742 for (s = 0; s < smoketrailC; s++)
1745 if (weaponarray[t].smoketrail[s].animate < smoketrailC)
1747 matrixTemp = matrixWorld;
1748 result.x = (float)(weaponarray[t].precisionx -
playerships[0].precisionx) - weaponarray[t].smoketrail[s].offset.x;
1749 result.y = (float)(weaponarray[t].precisiony -
playerships[0].precisiony) - weaponarray[t].smoketrail[s].offset.y;
1750 result.z = (float)(weaponarray[t].precisionz -
playerships[0].precisionz) - weaponarray[t].smoketrail[s].offset.z;
1751 matrixTemp._41 = -result.x;
1752 matrixTemp._42 = -result.y;
1753 matrixTemp._43 = -result.z;
1768 pd3dDevice->
SetTexture(0, m_pddsSmoke[weaponarray[t].smoketrail[s].animate]);
1834 if (alphascreen.a > 0.0f)
1836 pd3dDevice->SetFVF(RISE_FVF_SCREEN);
1838 pd3dDevice->SetTextureStageState(0, Rendering::TextureState::ALPHAOP, Rendering::TextureOperation::SELECTARG1);
1839 pd3dDevice->SetTextureStageState(0, Rendering::TextureState::ALPHAARG1, Rendering::TextureArgument::TFACTOR);
1840 pd3dDevice->SetTextureStageState(0, Rendering::TextureState::COLOROP, Rendering::TextureOperation::SELECTARG1);
1841 pd3dDevice->SetTextureStageState(0, Rendering::TextureState::COLORARG1, Rendering::TextureArgument::TFACTOR);
1843 pd3dDevice->SetRenderState(Rendering::RenderState::TEXTUREFACTOR, alphascreen);
1845 pd3dDevice->SetRenderState(Rendering::RenderState::SRCBLEND, Rendering::Blend::SRCALPHA);
1846 pd3dDevice->SetRenderState(Rendering::RenderState::DESTBLEND, Rendering::Blend::INVSRCALPHA);
1847 pd3dDevice->SetRenderState(Rendering::RenderState::ALPHABLENDENABLE, true);
1849 pd3dDevice->SetRenderState(Rendering::RenderState::ZFUNC, Rendering::Compare::ALWAYS);
1850 //pd3dDevice->SetRenderState( Rendering::RenderState::STENCILREF, 4); // 0 is default
1851 pd3dDevice->SetRenderState(Rendering::RenderState::STENCILFUNC, Rendering::Compare::ALWAYS); // was always before cockpit
1852 pd3dDevice->SetRenderState(Rendering::RenderState::STENCILPASS, Rendering::StencilOperation::KEEP); // with 2
1855 RiseScreenVertex* vtxs;
1856 // tempcolor=Rendering::ColorARGB( (int)(betascreen.a*255.0f), (int)(betascreen.r*255.0f), (int)(betascreen.g*255.0f), (int)(betascreen.b*255.0f) );
1857 // Lock the vertex buffer
1858 V(m_avScreen->Lock(0, 0, reinterpret_cast<void**>(&vtxs), Rendering::LockFlags::DISCARD));
1860 vtxs->x = static_cast<float>(pp->Width); vtxs->y = 0.0f; vtxs->z = 1.0f; vtxs->w = 2.0f;
1863 vtxs->x = 0.0f; vtxs->y = 0.0f; vtxs->z = 1.0f; vtxs->w = 2.0f;
1866 vtxs->x = static_cast<float>(pp->Width); vtxs->y = static_cast<float>(pp->Height); vtxs->z = 1.0f; vtxs->w = 2.0f;
1869 vtxs->x = 0.0f; vtxs->y = static_cast<float>(pp->Height); vtxs->z = 1.0f; vtxs->w = 2.0f;
1872 V(m_avScreen->Unlock());
1875 pd3dDevice->SetStreamSource(0, m_avScreen, 0, sizeof RiseScreenVertex);
1876 pd3dDevice->DrawPrimitive(Rendering::Primitive::TriangleStrip, 0, 2);
1879 pd3dDevice->SetRenderState(Rendering::RenderState::ALPHABLENDENABLE, false);
1880 pd3dDevice->SetFVF(RISE_FVF_VERTEX);
1881 pd3dDevice->SetTextureStageState(0, Rendering::TextureState::COLOROP, Rendering::TextureOperation::MODULATE);
1882 pd3dDevice->SetTextureStageState(0, Rendering::TextureState::COLORARG1, Rendering::TextureArgument::TEXTURE);
1884 // pd3dDevice->SetRenderState( Rendering::RenderState::ZFUNC, Rendering::Compare::ALWAYS ); // corrected after 2nd half of condition
1885 // pd3dDevice->SetRenderState( Rendering::RenderState::STENCILFUNC, Rendering::Compare::ALWAYS ); // this is how we want it after 2nd
1904 readloc.top = readloc.left = 0;
1905 readloc.right = 1135;
1906 readloc.bottom = 388;
1956#pragma region Windshield1
1970 if (clouduv.x > 0.0f)
1978 if (rand() % 2 == 0)
1981 feature.x = 1066.0f / 2048.0f; feature.y = 491.0f / 1024.0f;
1982 feature.z = 1326.0f / 2048.0f; feature.w = 746.0f / 1024.0f;
1987 feature.x = 716.0f / 2048.0f; feature.y = 491.0f / 1024.0f;
1988 feature.z = 982.0f / 2048.0f; feature.w = 746.0f / 1024.0f;
1993 if (rand() % 2 == 0)
1996 feature.x = 48.0f / 1024.0f; feature.y = 311.0f / 1024.0f;
1997 feature.z = 208.0f / 1024.0f; feature.w = 471.0f / 1024.0f;
2002 feature.x = 411.0f / 1024.0f; feature.y = 311.0f / 1024.0f;
2003 feature.z = 571.0f / 1024.0f; feature.w = 471.0f / 1024.0f;
2008 if (rand() % 2 == 0)
2011 feature.x = 1348.0f / 2048.0f; feature.y = 423.0f / 1024.0f;
2012 feature.z = 1568.0f / 2048.0f; feature.w = 642.0f / 1024.0f;
2017 feature.x = 504.0f / 2048.0f; feature.y = 423.0f / 1024.0f;
2018 feature.z = 723.0f / 2048.0f; feature.w = 642.0f / 1024.0f;
2023 if (rand() % 2 == 0)
2026 feature.x = 1048.0f / 2048.0f; feature.y = 434.5f / 1024.0f;
2027 feature.z = 1303.0f / 2048.0f; feature.w = 689.5f / 1024.0f;
2032 feature.x = 745.0f / 2048.0f; feature.y = 434.5f / 1024.0f;
2033 feature.z = 1000.0f / 2048.0f; feature.w = 689.5f / 1024.0f;
2038 if (rand() % 2 == 0)
2041 feature.x = 1066.0f / 2048.0f; feature.y = 491.0f / 1024.0f;
2042 feature.z = 1326.0f / 2048.0f; feature.w = 746.0f / 1024.0f;
2047 feature.x = 746.0f / 2048.0f; feature.y = 491.0f / 1024.0f;
2048 feature.z = 1012.0f / 2048.0f; feature.w = 746.0f / 1024.0f;
2063 DWORD overlayDepthWrites = TRUE;
2096 if (clouduv.x == 1.0f)
2116#pragma region Windshield2
2150 radiosity.x = result.x; radiosity.y = result.y; radiosity.z = result.z;
2152 radiosity.w = 1.0f - radiosity.w;
2166 ambient.x = scattered.r;
2167 ambient.y = scattered.g;
2168 ambient.z = scattered.b;
2181 ambient.x += cabinLight.x * (1.0f - ambient.x);
2182 ambient.y += cabinLight.y * (1.0f - ambient.y);
2183 ambient.z += cabinLight.z * (1.0f - ambient.z);
2201 ambient.x += cabinLight.x * (1.0f - ambient.x);
2202 ambient.y += cabinLight.y * (1.0f - ambient.y);
2203 ambient.z += cabinLight.z * (1.0f - ambient.z);
2306 matrixWorld = matrixWorld * matrixTemp;
2308 matrixWorld = matrixWorld * matrixTemp;
2320 matrixWorld = matrixWorld * matrixTemp;
2325 matrixWorld = matrixWorld * matrixTemp;
2332 matrixWorld = matrixWorld * matrixTemp;
2335 matrixWorld = matrixWorld * matrixTemp;
2339 matrixWorld = matrixWorld * matrixTemp;
2389#pragma region Inventory View Overlay
2399 vtxs->
x =
static_cast<float>(pp->
Width); vtxs->
y = 0.0f; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2400 vtxs->
tu = 1.0f; vtxs->
tv = 0.0f;
2402 vtxs->
x = 0.0f; vtxs->
y = 0.0f; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2403 vtxs->
tu = 0.0f; vtxs->
tv = 0.0f;
2405 vtxs->
x =
static_cast<float>(pp->
Width); vtxs->
y =
static_cast<float>(pp->
Height); vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2406 vtxs->
tu = 1.0f; vtxs->
tv = 1.0f;
2408 vtxs->
x = 0.0f; vtxs->
y =
static_cast<float>(pp->
Height); vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2409 vtxs->
tu = 0.0f; vtxs->
tv = 1.0f;
2440 vtxs->
x =
static_cast<float>(pp->
Width); vtxs->
y = 0.0f; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2441 vtxs->
tu = 1.0f; vtxs->
tv = 0.0f;
2443 vtxs->
x = -1.0f; vtxs->
y = 0.0f; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2444 vtxs->
tu = 0.0f; vtxs->
tv = 0.0f;
2446 vtxs->
x =
static_cast<float>(pp->
Width); vtxs->
y =
static_cast<float>(pp->
Height); vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2447 vtxs->
tu = 1.0f; vtxs->
tv = 1.0f;
2449 vtxs->
x = -1.0f; vtxs->
y =
static_cast<float>(pp->
Height); vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2450 vtxs->
tu = 0.0f; vtxs->
tv = 1.0f;
2453 const float stripOffset =
lookhdg / 360.0f + 0.05f;
2454 vtxs->
x =
static_cast<float>(pp->
Width) * 0.7f; vtxs->
y =
static_cast<float>(pp->
Height) * 0.021f; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2455 vtxs->
tu = 0.78f + stripOffset; vtxs->
tv = 0.0f;
2457 vtxs->
x =
static_cast<float>(pp->
Width) * 0.3f; vtxs->
y =
static_cast<float>(pp->
Height) * 0.021f; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2458 vtxs->
tu = 0.0f + stripOffset; vtxs->
tv = 0.0f;
2460 vtxs->
x =
static_cast<float>(pp->
Width) * 0.7f; vtxs->
y =
static_cast<float>(pp->
Height) * 0.061f; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2461 vtxs->
tu = 0.78f + stripOffset; vtxs->
tv = 1.0f;
2463 vtxs->
x =
static_cast<float>(pp->
Width) * 0.3f; vtxs->
y =
static_cast<float>(pp->
Height) * 0.061f; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2464 vtxs->
tu = 0.0f + stripOffset; vtxs->
tv = 1.0f;
2467 const float arrowOffset = (
lookAzimuthDegrees / 90.0f * 244.0f + 511.0f) *
static_cast<float>(pp->
Height) / 1024.0f;
2468 const float arrowHeight =
static_cast<float>(pp->
Height) / 1024.0f * 32.0f;
2469 vtxs->
x =
static_cast<float>(pp->
Width) * 0.029f; vtxs->
y = arrowOffset; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2470 vtxs->
tu = 0.9f; vtxs->
tv = 0.0f;
2472 vtxs->
x =
static_cast<float>(pp->
Width) * 0.019f; vtxs->
y = arrowOffset; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2473 vtxs->
tu = 0.0f; vtxs->
tv = 0.0f;
2475 vtxs->
x =
static_cast<float>(pp->
Width) * 0.029f; vtxs->
y = arrowOffset + arrowHeight; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2476 vtxs->
tu = 0.9f; vtxs->
tv = 1.0f;
2478 vtxs->
x =
static_cast<float>(pp->
Width) * 0.019f; vtxs->
y = arrowOffset + arrowHeight; vtxs->
z = 0.0f; vtxs->
w = 1.0f;
2479 vtxs->
tu = 0.0f; vtxs->
tv = 1.0f;
2501 DWORD oldTextureFactor = 0;
2503 const unsigned char flashAlpha =
static_cast<unsigned char>(
2525 if (usingNightVision)
2529 sprintf_s(rangeText,
sizeof(rangeText),
"RNG ---");
2538 readloc.top =
static_cast<LONG
>(
static_cast<float>(pp->
Height) * 0.55f);
2539 readloc.right =
static_cast<LONG
>(pp->
Width);
2540 readloc.bottom = readloc.top + 32;
2581 vtxs->
x =
static_cast<float>(pp->
Width); vtxs->
y = 0.0f; vtxs->
z = 1.0f; vtxs->
w = 2.0f;
2584 vtxs->
x = 0.0f; vtxs->
y = 0.0f; vtxs->
z = 1.0f; vtxs->
w = 2.0f;
2587 vtxs->
x =
static_cast<float>(pp->
Width); vtxs->
y = (float)pp->
Height; vtxs->
z = 1.0f; vtxs->
w = 2.0f;
2590 vtxs->
x = 0.0f; vtxs->
y = (float)pp->
Height; vtxs->
z = 1.0f; vtxs->
w = 2.0f;
2641 DWORD discardedPixels = 0;
2655 DWORD visiblePixels = 0;
2657 if (result == S_FALSE)
2668 if (visiblePixels > 0)
2700 const RangePoint point = { projectedPoint.x, projectedPoint.y, projectedPoint.z, 1.0f };
2702 DWORD oldColorWrite = 0, oldZWrite = 0, oldStencilEnable = 0;
2703 DWORD oldZEnable = 0, oldZFunc = 0, oldLighting = 0, oldFvf = 0;
2710 pd3dDevice->
GetFVF(&oldFvf);
2725 pd3dDevice->
SetFVF(oldFvf);
2741#pragma region Instrumentation
2796 unsigned created = 0;
2797 bool pending =
false;
2800 for (
short t = 0; t <
MAX_SCAN; t++)
2814 if (created >= budget) { pending =
true;
continue; }
2830 sprintf_s(
msg,
sizeof msg,
"m_pddsHullDynamicTexture[%i]", t);
2840 sprintf_s(
msg,
sizeof msg,
"m_pddsHullDynamicTexture[%i]", t);
2855 sprintf_s(
msg,
sizeof msg,
"m_pddsHullDynamicTexture[%i]", t);
2875 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].hullname);
2888 sprintf_s(hulltext,
sizeof(hulltext),
"USV");
2889 const short hulltextLen =
static_cast<short>(strlen(hulltext));
2890 arcwidth =
static_cast<float>(hulltextLen) * 6.4f;
2891 arcpos = -arcwidth * 0.5f;
2892 for (
short s = 0; s < hulltextLen; s++)
2903 readloc.right = readloc.left + 23;
2905 readloc.bottom = 12;
2915 strcpy_s(hulltext,
sizeof(hulltext),
playerships[t].hullname);
2916 const short hulltextLen2 =
static_cast<short>(strlen(hulltext));
2917 arcwidth =
static_cast<float>(hulltextLen2) * 6.4f;
2918 arcpos = -arcwidth * 0.5f;
2919 for (
short s = 0; s < hulltextLen2; s++)
2928 readloc.right = readloc.left + 23;
2930 readloc.bottom = 12;
2937 short lastspace = -1;
2940 const short hullnameLen =
static_cast<short>(strlen(
playerships[t].hullname));
2941 for (
short s = 0; s < hullnameLen; s++)
2950 if (lastspace != -1)
2953 strcpy_s(hulltext,
sizeof(hulltext),
playerships[t].hullname);
2954 hulltext[lastspace] = 0;
2956 const short hulltextLen3 =
static_cast<short>(strlen(hulltext));
2957 arcwidth =
static_cast<float>(hulltextLen3) * 6.4f;
2958 arcpos = -arcwidth * 0.5f;
2959 for (
short s = 0; s < hulltextLen3; s++)
2968 readloc.right = readloc.left + 23;
2970 readloc.bottom = 12;
2979 const short nameLen =
static_cast<short>(strlen(
playerships[t].hullname));
2981 for (s = lastspace; s < nameLen; s++)
2982 hulltext[s - lastspace] =
playerships[t].hullname[s];
2983 hulltext[s - lastspace] = 0;
2985 arcwidth =
static_cast<float>(hulltextLen3) * 6.4f;
2986 arcpos = -arcwidth * 0.5f;
2987 for (
short s = 0; s < hulltextLen3; s++)
2996 readloc.right = readloc.left + 23;
2998 readloc.bottom = 12;
3007 sprintf_s(hulltext,
sizeof(hulltext),
"IVR-%s",
playerships[t].IVR);
3008 const short hulltextLen4 =
static_cast<short>(strlen(hulltext));
3009 arcwidth =
static_cast<float>(hulltextLen4) * 3.2f;
3010 arcpos = -arcwidth * 0.5f;
3011 for (
short s = 0; s < hulltextLen4; s++)
3022 readloc.right = readloc.left + 23;
3024 readloc.bottom = 12;
3044 readloc.bottom = 35;
3049 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].hullname);
3054 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].IVR);
3060 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].hullname);
3071 sprintf_s(hulltext,
sizeof(hulltext),
"USV %s",
playerships[t].hullname);
3072 _strlwr_s(hulltext,
sizeof(hulltext));
3073 int count =
static_cast<int>(strlen(hulltext));
3075 readloc.right = 181;
3077 readloc.bottom = 127;
3080 readloc.right = 181;
3082 readloc.bottom = 127;
3086 sprintf_s(hulltext,
sizeof(hulltext),
"IVR-%s",
playerships[t].IVR);
3087 _strlwr_s(hulltext,
sizeof(hulltext));
3088 int count =
static_cast<int>(strlen(hulltext));
3090 readloc.right = 177;
3092 readloc.bottom = 127;
3095 readloc.right = 177;
3097 readloc.bottom = 127;
3102 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].hullname);
3113 sprintf_s(hulltext,
sizeof(hulltext),
"%s",
playerships[t].hullname);
3114 _strlwr_s(hulltext,
sizeof(hulltext));
3116 readloc.right = 156;
3118 readloc.bottom = 30;
3121 readloc.right = 156;
3123 readloc.bottom = 100;
3127 sprintf_s(hulltext,
sizeof(hulltext),
"IVR %s",
playerships[t].IVR);
3128 _strlwr_s(hulltext,
sizeof(hulltext));
3130 readloc.right = 156;
3132 readloc.bottom = 54;
3137 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].IVR);
3149 readloc.bottom = 14;
3154 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].IVR);
3164 readloc.right = 160;
3166 readloc.bottom = 28;
3171 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].IVR);
3181 readloc.right = 133;
3183 readloc.bottom = 118;
3188 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].IVR);
3199 readloc.right = 255;
3201 readloc.bottom = 53;
3206 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].IVR);
3215 sprintf_s(hulltext,
sizeof(hulltext),
"IVR %s",
playerships[t].IVR);
3216 _strlwr_s(hulltext,
sizeof(hulltext));
3218 readloc.right = 255;
3220 readloc.bottom = 127;
3225 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 creating m_pddsHullDynamicTexture slot %i (IVR-%s): %s", t,
playerships[t].IVR,
playerships[t].hullname);
3235 char topline[99], botline[99];
3237 const short toplineLen =
static_cast<short>(strlen(topline));
3238 for (
short s = 0; s < toplineLen; s++)
3240 if (topline[s] ==
' ')
3242 strcpy_s(botline, 99, &topline[s + 1]);
3246 if (topline[s] == 0)
3254 center.x = 23.0f * 0.5f;
3255 center.y = 12.0f * 0.5f;
3257 for (
short s = 0; s < toplineLen; s++)
3260 readloc.right = readloc.left + 23;
3262 readloc.bottom = 12;
3264 letterpos.x = 128.0f - 10.0f - toplineLen * 11.0f + s * 11.0f;
3273 letterpos.x = 61.0f + s * 11.0f;
3274 letterpos.y = 45.5f;
3283 const short botlineLen =
static_cast<short>(strlen(botline));
3284 for (
short s = 0; s < botlineLen; s++)
3287 readloc.right = readloc.left + 23;
3289 readloc.bottom = 12;
3291 letterpos.x = 128.0f - 7.0f - botlineLen * 4.2f + s * 4.2f;
3292 letterpos.y = 26.5f;
3302 letterpos.x = 63.0f + s * 4.2f;
3303 letterpos.y = 66.5f;
3330 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 m_pddsHullDynamicTexture finished!");
3336 sprintf_s(
msg,
sizeof(
msg),
"Render::OnFrameRender2 released m_pddsHullDynamicTexture slot %i!", t);
3339 sprintf_s(
msg,
sizeof(
msg),
"m_pddsHullDynamicTexture[%i]", t);
#define SAFE_RELEASE(value)
SCRIPT_CONTROL SCRIPT_STATE const void int
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
SCRIPT_CONTROL SCRIPT_STATE const void DWORD
constexpr auto Clamp(T1 val, T2 min, T3 max)
const RiseMath::Vector3 centerC
bool HasAnimatedArtwork() const
HRESULT RenderRain(Rendering::RenderDevice *device, const RiseMath::Matrix &world, UINT drops)
void SetLocalLightning(const RiseMath::Vector3 &position, const RiseMath::Color &color, float radius)
static constexpr unsigned MaxHeadlights
void SetHeadlights(const std::vector< Headlight > &lights)
Rendering::CloudRenderer11 * Effect()
HRESULT RenderSkyRing(Rendering::RenderDevice *device, Rendering::RenderTexture *atmosphere, Rendering::RenderBuffer *vertices, const RiseMath::Matrix &world, UINT segments, float physicalScale=1)
HRESULT Render(Rendering::RenderDevice *device, const RiseMath::Matrix &view, const RiseMath::Matrix &projection, const RiseMath::Vector3 &eye, const CloudVolume::Parameters ¶meters, const RiseMath::Vector3 &sunlight, const RiseMath::Color &light, const RiseMath::Color &ambient, const RiseMath::Color &airglow=RiseMath::Color(.125f,.375f,.25f, 1), const RiseMath::Vector4 &horizon=RiseMath::Vector4(0, 0, 0, 0), const RiseMath::Vector4 &atmosphere=RiseMath::Vector4(0, 0, 0, 0), const RiseMath::Vector4 &nightVisionGain=RiseMath::Vector4(1, 1, 1, 0))
const std::string & InitializationStatus() const
HRESULT Render(Rendering::RenderDevice *device, Rendering::CloudRenderer11 *clouds=nullptr)
HRESULT InitializeGameHud()
std::unique_ptr< Bus > bus
std::unique_ptr< HMI > GUI
void AddTrackedResource(const char *name, Rendering::ResourcePool pool=Rendering::ResourcePool::Managed)
void UpdateTrackedResource(const char *name, int status)
std::unique_ptr< Displays > displays
std::unique_ptr< Viewscreen > viewscreen
std::unique_ptr< Graphics > graphics
Rendering::RenderMaterial * g_pEffect
RejoinCountdown rejoinCountdown
SPlayerData player[MAX_ONLINEPLAYERS]
std::wstring strings[L_ENUMERATION]
void Log(const char *msg, Level level=Info, int errorCode=0)
void AddToCallStack(const char *msg)
void SendTraceFile(bool waitForDelivery=true) const
bool Ready(double now) const
void SetAnimatedInventory(bool value)
void SyncPlacement(unsigned slot, uint64_t entity, const std::string &creative)
void WetGlassResult(HRESULT result)
void BeginFrame(RenderDevice &device, double now, bool eligible, const char *blocker=nullptr)
void RegisterOverlayDraw(RenderDevice &device, Geometry11 &geometry, unsigned first, unsigned count, unsigned material)
ID3D11RenderTargetView * CloudOpacityTarget() const
ID3D11RenderTargetView * WetGlassExclusionTarget() const
HRESULT CaptureScene(RenderDevice &device)
void SetAdOpacityTarget(ID3D11RenderTargetView *target)
void SetFogDensity(float value)
ID3D11RenderTargetView * SceneTarget() const
const SceneDepth11 & Depth() const
const D3D11_VIEWPORT & Viewport() const
void Scene(int vehicle, double altitude, bool above, bool outside, int dock, int rain)
void CloudScene(bool volume, float base, float top, float density)
void FlightMotion(double verticalSpeedMps, bool valid)
static FrameProfiler11 & Get()
HRESULT CompositeAfterimage(ID3D11DeviceContext *context, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport)
void BeginAfterimage(double now, bool enabled, float ambient, uint64_t viewer)
HRESULT Render(ID3D11DeviceContext *context, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport, const Matrix &view, const Matrix &projection, Vector observerOrigin, Vector ground, Vector cloud, uint32_t seed, const RiseMath::Color &color, float pulse, float visibilityKm, CloudRenderer11 *atmosphere=nullptr, float growth=1.f)
bool AfterimageActive() const
HRESULT Render(ID3D11DeviceContext *context, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport, const DirectX::XMFLOAT4X4 &view, const DirectX::XMFLOAT4X4 &projection, const ReentryEnvelope::Mesh &mesh, float strength, float time, float transmission, float visibilityKm)
HRESULT Lock(UINT offset, UINT bytes, void **output, DWORD flags)
HRESULT DrawPrimitive(Primitive type, UINT first, UINT count)
HRESULT GetFVF(DWORD *value) const
HRESULT SetIndices(RenderBuffer *buffer)
HRESULT GetViewport(Viewport *value) const
HRESULT SetStreamSource(UINT stream, RenderBuffer *buffer, UINT offset, UINT stride)
HRESULT LightEnable(DWORD index, BOOL enabled)
HRESULT GetRenderState(DWORD state, DWORD *value) const
HRESULT SetLight(DWORD index, const Light *value)
ID3D11DeviceContext * Context()
HRESULT SetRenderState(DWORD state, DWORD value)
HRESULT SetFVF(DWORD value)
HRESULT SetTransform(DWORD slot, const RiseMath::Matrix *value)
HRESULT DrawPrimitiveUP(Primitive type, UINT count, const void *vertices, UINT stride)
HRESULT Clear(DWORD count, const RECT *rectangles, DWORD flags, PackedColor color, float depth, DWORD stencil)
HRESULT SetTextureStageState(DWORD stage, DWORD state, DWORD value)
HRESULT SetTexture(DWORD stage, RenderTexture *texture)
HRESULT DrawIndexedPrimitive(Primitive type, INT baseVertex, UINT minimum, UINT vertices, UINT startIndex, UINT count)
HRESULT SetSamplerState(DWORD sampler, DWORD state, DWORD value)
INT DrawTextW(RenderSprite *sprite, const wchar_t *text, INT count, RECT *rectangle, DWORD flags, PackedColor color)
INT DrawTextA(RenderSprite *sprite, const char *text, INT count, RECT *rectangle, DWORD flags, PackedColor color)
HRESULT SetVector(const char *name, const RiseMath::Vector4 *value)
HRESULT SetIntArray(const char *name, const int *value, UINT count)
HRESULT Begin(UINT *count, DWORD flags)
HRESULT BeginPass(UINT pass)
HRESULT SetTexture(const char *name, RenderTexture *value)
HRESULT SetMatrix(const char *name, const RiseMath::Matrix *value)
HRESULT Issue(DWORD flags)
HRESULT GetData(void *destination, DWORD bytes, DWORD flags)
HRESULT Begin(DWORD flags)
HRESULT SetTransform(const RiseMath::Matrix *value)
HRESULT Draw(RenderTexture *image, const RECT *rectangle, const RiseMath::Vector3 *center, const RiseMath::Vector3 *position, PackedColor color)
HRESULT EndScene(DWORD filter)
HRESULT BeginScene(RenderSurface *surface, const Viewport *viewport)
virtual void SetVisible(bool bVisible)
virtual void SetEnabled(bool bEnabled)
RiseStatic * GetStatic(int ID)
RiseButton * GetButton(int ID)
HRESULT SetText(LPCWSTR strText)
RiseMath::Vector3 position
Rendering::RenderFont * m_pFontLicense
Rendering::RenderQuery * m_pNightVisionRangeQuery
Rendering::ProceduralLightning11 proceduralLightning
RiseMath::Vector3 position
void EnableLandingLights() const
Rendering::RenderTexture * m_pddsHullDynamicTexture[MAX_SCAN]
Rendering::RenderBuffer * m_avInstrument
Rendering::RenderTexture * m_pddsFirework2[firework2C]
std::unique_ptr< renderer > ptrRenderer
RiseMath::Matrix matrixProjSim
Rendering::RenderBuffer * m_avStaticStars
void OnFrameRender(Rendering::RenderDevice *pd3dDevice, double fTime) const
Rendering::RenderBuffer * m_avSkyDome
unsigned activeLandingLightCount
CloudVolumeRenderer cloudVolume
Rendering::RenderToTexture * m_pHullRender2Surface
Rendering::RenderTexture * m_pddsBinoculars
RiseMath::Matrix matrixProjCock
bool m_nightVisionRangefinderActive
Rendering::RenderBuffer * m_avLocalGrid
Rendering::RenderBuffer * m_aiCloudGrid
Rendering::RenderQuery * m_pLightSunVizQuery
Rendering::RenderToTexture * m_pRenderToSurface
Rendering::RenderBuffer * m_avRainDrops
std::array< LandingLights::Light, LandingLights::MaxLights > landingLights
Rendering::RenderTexture * m_pddsMarston1
std::vector< std::string > logofiles
bool VolumeCloudsEnabled() const
Rendering::RenderTexture * m_pddsCloudDetailBelow
RiseMath::Matrix matrixLookAdj
Rendering::RenderTexture * m_pddsAtmosphere
Rendering::RenderTexture * m_pddsNightVisionArrow
ReentryEnvelope::State reentryState
bool InventoryItemEffectsEnabled() const
float m_nightVisionRangeHighKm
std::unique_ptr< propulsion > ptrPropulsion
Rendering::RenderTexture * m_pddsWaterNormal
RiseMath::Matrix matrixView
Rendering::RenderTexture * m_pddsWorld2a1
Rendering::RenderTexture * m_pddsCloudDetailAbove
float nightVisionOverexposure
bool m_bDeviceSupportsVizQuery
RiseMath::Matrix matrixLook
RiseMath::Vector3 reentryWindward
std::unique_ptr< weather > ptrWeather
RiseMath::Vector3 posnorml
Rendering::RenderTexture * m_pddsNightVision
Rendering::RenderTexture * m_pddsStarTexture
Rendering::RenderTexture * m_pddsElmo[elmoAnimateC]
Rendering::RenderTexture * m_pddsBinocularsCompass
void OnFrameRender2(Rendering::RenderDevice *pd3dDevice, float fElapsedTime)
Rendering::Light sunlight
Rendering::RenderTexture * m_pddsLetters
Rendering::RenderFont * m_pFontHull
Rendering::RenderTexture * m_pddsNightVisionCompass
std::unique_ptr< instruments > ptrInstruments
Rendering::RenderBuffer * m_avSkyRing
Rendering::RenderTexture * m_pddsRunwayEdgeLight1
Rendering::AdDiagnostics11 adDiagnostics
Rendering::RenderTexture * m_pddsRoad
CityCampaignLogos cityCampaignLogos
RiseMath::Color alphascreen
Rendering::RenderSprite * m_spriteVector
Rendering::RenderTexture * m_pddsCockpitTexture[cockpittextureC]
Rendering::RenderTexture * m_pddsLandform[landformtextureC]
Rendering::RenderBuffer * m_avBillboardVertices
void QueueCloudFallbackWarning() const
std::unique_ptr< buildings > ptrBuildings
long FontOffset(char letter) const
Rendering::RenderBuffer * m_avScreen
Rendering::RenderTexture * m_pddsSunglasses
Rendering::RenderBuffer * m_avCloudGrid
std::unique_ptr< cockpit > ptrCockpit
bool m_nightVisionRangeQueryPending
Rendering::RenderSurface * m_pddsDynamicSurface
s_polygon_extras2 polyextras2
WindshieldRainRenderer windshieldRain
Rendering::RenderSurface * m_pddsProjectionSurface
RiseMath::Vector3 forwardVector
Rendering::RenderTexture * m_pddsFirework1[firework1C]
std::unique_ptr< weapon > ptrWeapon
Rendering::RenderTexture * m_pddsIntersection
Rendering::RenderTexture * m_pddsCracked
Rendering::RenderTexture * m_pddsCloudBaseMap
Rendering::RenderTexture * m_pddsHolidayTexture
float m_nightVisionRangeKm
ExteriorRainRenderer exteriorRainRenderer
void UpdateNightVisionRangefinder(Rendering::RenderDevice *pd3dDevice) const
Rendering::RenderTexture * m_pddsBinocularsArrow
Rendering::RenderTexture * m_pddsTransition[transitiontextureC]
Rendering::RenderTexture * m_pddsSunTexture
Rendering::RenderToTexture * m_pRenderToSurfaceNextGen
RiseMath::Matrix matrixProj
bool PrepareHullTextures(Rendering::RenderDevice *pd3dDevice, unsigned budget=2)
Rendering::RenderTexture * m_pddsFirework3[firework3C]
Rendering::ReentryEnvelope11 reentryRenderer
float m_nightVisionRangeTestKm
Rendering::RenderFont * m_pFont
Rendering::RenderTexture * m_pddsDynamicTexture
float m_nightVisionRangeLowKm
HRESULT Render(Rendering::RenderDevice *device, Rendering::RenderMaterial *material, const std::vector< RiseMath::Matrix > &world, const RiseMath::Matrix &viewProjection, float opacity=1, DepthLayout layout=DepthLayout::Unified, float cockpitLight=0, ID3D11RenderTargetView *adExclusion=nullptr)
void SetGlassCondition(int condition)
static HRESULT DrawCockpitGlass(Rendering::RenderDevice *device, Draw draw)
void RenderRocks(Rendering::RenderDevice *pd3dDevice) const
void Render(Rendering::RenderDevice *pd3dDevice, double *fTime, bool drawTransparancy) const
void RenderRts(Rendering::RenderDevice *pd3dDevice, float lightFromStreet) const
void RenderCurbs(Rendering::RenderDevice *pd3dDevice, float lightFromStreet) const
void Render(Rendering::RenderDevice *pd3dDevice, const LocalLightning::Frame &strike={}) const
void Draw(float fElapsedTime, Rendering::RenderDevice *pd3dDevice) const
void SetSceneShipLights(const GeometryBounds &bounds, const RiseMath::Matrix &world)
void ClearSceneShipLights()
void PrepareShipSurfaceLights()
void RenderShips(Rendering::RenderDevice *pd3dDevice, const RiseMath::Vector3 *Xsunlight, ThrustConeRender::Pass pass=ThrustConeRender::Pass::All, bool attenuateThrust=false)
void RenderLights(Rendering::RenderDevice *pd3dDevice, const double *fTime)
void RenderDocks(Rendering::RenderDevice *pd3dDevice, const RiseMath::Vector3 *Xsunlight)
void Render(Rendering::RenderDevice *pd3dDevice, RiseMath::Matrix *matrixLookAtLocal)
RiseMath::Color dwFogFactorZenith
float alphascreenOverride
float GetRenderVisibilityKm() const
RiseMath::Color solarHorizon
RiseMath::Color dwFogColorZenith
bool IsSpatialFogRendering() const
RiseMath::Vector4 TerrainSnowTint(int u, int v) const
RiseMath::Color cockpitAmbient
float cloudHorizonDistance
NightVisionGain::Response cockpitVision
RiseMath::Color sunAppearance
RiseMath::Color betascreen
void PrepareRainCurtains(bool exteriorView)
RiseMath::Vector4 nightVisionCloudGain
RiseMath::Color colorhorizon
CloudVolume::Parameters cloudParameters
float GetCloudCeilingMslKm() const
RiseMath::Color dwFogColorHorizon
float GetVisibilityKm() const
float lightningAfterimageAmbient
FIREWORKS fireworks[fireworksC]
s_network_objects playerships[MAX_SCAN]
s_universe_object allobjects[maxstarC]
BATCHINDEX2 drawlist[drawlistC]
unsigned char cloudBaseObjC
LIGHTNINGBELOW lightningbelow
s_polygon_object polyobjects[maxpolyC]
LOCALGRID2 gridarray[64][64]
#define RISE_FVF_INSTRUMENT
#define RISE_FVF_NONORMAL
#define RISE_FVF_LOCALGRID
#define RISE_FVF_RAINDROP
#define RISE_FVF_STATICSTARS
constexpr float SolarCoreScale
float AtmosphericHazeDistanceKm(float nominalTop)
float BackgroundZenithWeight(float altitude, const Parameters ¶ms)
float Transmittance(Point from, Point to, const Parameters ¶ms, uint32_t seed=DefaultSeed)
float ScreenOpacity(bool volumeEnabled, float cloudOpacity, float overrideOpacity)
CloudVolume::Point LocalLight(CloudVolume::Point light, const NightVisionGain::Response &vision)
Light Configure(Light light, unsigned char type, const RiseMath::Matrix &modelBase)
Light Transform(const Light &source, const RiseMath::Matrix &modelToWorld)
Frame Build(const RiseMath::Vector3 &ground, const RiseMath::Vector3 &top, const RiseMath::Vector3 &origin, const RiseMath::Vector3 &camera, const RiseMath::Color &color, float brightness, float visibilityKm, bool enabled, bool separateFog=false)
float Gain(const NightVisionGain::Response &vision)
Mesh Attached(std::vector< Sphere > hull, Vector3 windward, const RiseMath::Matrix &worldToBody, Vector3 origin)
void AppendPart(std::vector< Sphere > &hull, const Component &part, const std::vector< uint8_t > &bytes, size_t stride, const RiseMath::Matrix &world)
std::vector< Sphere > ExteriorHull(const Component *parts, size_t count, const std::vector< uint8_t > &bytes, size_t stride)
constexpr uint32_t INVSRCALPHA
constexpr uint32_t INVDESTCOLOR
constexpr uint32_t SRCCOLOR
constexpr uint32_t INVSRCCOLOR
constexpr uint32_t SRCALPHA
constexpr uint32_t DESTCOLOR
constexpr uint32_t RENDERTARGET
constexpr uint32_t TARGET
constexpr uint32_t ZBUFFER
constexpr uint32_t STENCIL
constexpr uint32_t GREATER
constexpr uint32_t GREATEREQUAL
constexpr uint32_t ALWAYS
constexpr uint32_t LESSEQUAL
constexpr uint32_t LINEAR
constexpr uint32_t DIRECTIONAL
constexpr uint32_t DISCARD
constexpr uint32_t COLORWRITEENABLE
constexpr uint32_t FOGEND
constexpr uint32_t SRCBLEND
constexpr uint32_t STENCILFUNC
constexpr uint32_t CULLMODE
constexpr uint32_t STENCILREF
constexpr uint32_t ALPHABLENDENABLE
constexpr uint32_t STENCILENABLE
constexpr uint32_t STENCILPASS
constexpr uint32_t FOGENABLE
constexpr uint32_t POINTSIZE
constexpr uint32_t DESTBLEND
constexpr uint32_t TEXTUREFACTOR
constexpr uint32_t LIGHTING
constexpr uint32_t ZWRITEENABLE
constexpr uint32_t ZENABLE
constexpr uint32_t FOGCOLOR
constexpr uint32_t MIPFILTER
constexpr uint32_t MAGFILTER
constexpr uint32_t MINFILTER
constexpr DWORD AlphaBlend
constexpr uint32_t REPLACE
constexpr uint32_t TFACTOR
constexpr uint32_t DIFFUSE
constexpr uint32_t TEXTURE
constexpr uint32_t SPECULAR
constexpr uint32_t CURRENT
constexpr uint32_t DISABLE
constexpr uint32_t MODULATE2X
constexpr uint32_t SELECTARG1
constexpr uint32_t ADDSMOOTH
constexpr uint32_t MODULATE
constexpr uint32_t SELECTARG2
constexpr uint32_t BLENDFACTORALPHA
constexpr uint32_t COLOROP
constexpr uint32_t COLORARG1
constexpr uint32_t ALPHAARG2
constexpr uint32_t ALPHAARG1
constexpr uint32_t ALPHAOP
constexpr uint32_t COLORARG2
constexpr uint32_t TEXTURETRANSFORMFLAGS
constexpr uint32_t COUNT2
constexpr uint32_t DISABLE
double ClientAbsoluteTime()
const wchar_t * ErrorString(HRESULT code)
constexpr PackedColor ColorARGB(unsigned a, unsigned r, unsigned g, unsigned b)
const SurfaceDescription * ClientBackBufferDescription()
HRESULT CreateTexture(RenderDevice *owner, UINT width, UINT height, UINT levels, DWORD usage, ImageFormat format, ResourcePool pool, RenderTexture **result)
float Vec3Length(const Vector3 *a)
constexpr auto Min(A first, B second)
Matrix * MatrixLookAtRH(Matrix *out, const Vector3 *eye, const Vector3 *at, const Vector3 *up)
Vector3 * Vec3Add(Vector3 *out, const Vector3 *a, const Vector3 *b)
Matrix * MatrixRotationX(Matrix *out, float value)
Vector3 * Vec3Project(Vector3 *out, const Vector3 *value, const Viewport *viewport, const Matrix *projection, const Matrix *view, const Matrix *world)
Matrix * MatrixMultiply(Matrix *out, const Matrix *a, const Matrix *b)
Color * ColorLerp(Color *out, const Color *a, const Color *b, float t)
Matrix * MatrixRotationQuaternion(Matrix *out, const Quaternion *q)
float Vec3LengthSq(const Vector3 *a)
Vector3 * Vec3Subtract(Vector3 *out, const Vector3 *a, const Vector3 *b)
Vector3 * Vec3TransformNormal(Vector3 *out, const Vector3 *a, const Matrix *m)
Matrix * MatrixRotationY(Matrix *out, float value)
Matrix * MatrixRotationYawPitchRoll(Matrix *out, float yaw, float pitch, float roll)
Matrix * MatrixInverse(Matrix *out, float *determinant, const Matrix *a)
Matrix * MatrixIdentity(Matrix *out)
Matrix * MatrixRotationAxis(Matrix *out, const Vector3 *axis, float angle)
float Vec3Dot(const Vector3 *a, const Vector3 *b)
Matrix * MatrixScaling(Matrix *out, float x, float y, float z)
Vector3 * Vec3Normalize(Vector3 *out, const Vector3 *a)
Vector3 * Vec3Scale(Vector3 *out, const Vector3 *a, float scale)
Matrix * MatrixRotationZ(Matrix *out, float value)
constexpr auto Max(A first, B second)
Matrix * MatrixTranslation(Matrix *out, float x, float y, float z)
HRESULT Draw(Rendering::RenderDevice *device, Rendering::RenderTexture *texture, Rendering::RenderBuffer *vertices, const RiseMath::Matrix &world, UINT segments, Rendering::RenderMaterial *volumeEffect=nullptr, float physicalScale=1)
constexpr unsigned Segments
bool Defer(bool volumeClouds, bool simulator)
constexpr bool AcrossCloudDeck(float observerMslKm, float targetMslKm, float topMslKm=10.f)
float AltitudeRainFactor(float altitudeKm)
unsigned char pri_landform
unsigned char sec_transition
unsigned char pri_transition
unsigned char sec_landform
unsigned short startindex
unsigned char ter_landform
RiseMath::Vector3 position
RiseMath::Vector3 position
std::array< Segment, LightningTiming::MaxChainedBolts+1 > segments
DirectX::XMFLOAT4 nightVisionSurface
RiseMath::Vector3 Direction
int inventoryItemInUseSubType
unsigned short components
int inventoryItemInUseType
s_mesh_component * componentarray
RiseMath::Vector3 position
RiseMath::Vector3 nominalxyz
RiseMath::Matrix matWorld
RiseMath::Vector3 nominalypr
RiseMath::Vector3 hingeCG
RiseMath::Vector3 hingeaxis
RiseMath::Vector3 extendby
RiseMath::Vector3 position
RiseMath::Matrix matrixExterior
RiseMath::Matrix matrixWorld
Rendering::RenderBuffer * VB
RiseMath::Matrix matrixWorld