diff --git a/Src/Graphics/New3D/Model.h b/Src/Graphics/New3D/Model.h index 1770cea..874667d 100644 --- a/Src/Graphics/New3D/Model.h +++ b/Src/Graphics/New3D/Model.h @@ -96,6 +96,7 @@ struct Viewport float spotRange[2]; // Z range float spotColor[3]; // color float fogParams[5]; // fog parameters (...) + float scrollFog; // a transparency value that determines if fog is blended over the bottom 2D layer int x, y; // viewport coordinates (scaled and in OpenGL format) int width, height; // viewport dimensions (scaled for display surface size) int priority; diff --git a/Src/Graphics/New3D/New3D.cpp b/Src/Graphics/New3D/New3D.cpp index b4cff02..f17d0bb 100644 --- a/Src/Graphics/New3D/New3D.cpp +++ b/Src/Graphics/New3D/New3D.cpp @@ -735,6 +735,8 @@ void CNew3D::RenderViewport(UINT32 addr) vp->fogParams[3] = std::abs(*(float *)&vpnode[0x23]); // fog density - ocean hunter uses negative values, but looks the same vp->fogParams[4] = (float)(INT16)(vpnode[0x25] & 0xFFFF)*(1.0f / 255.0f); // fog start + vp->scrollFog = (float)(vpnode[0x20] & 0xFF) * (1.0f / 255.0f); // scroll fog + { //test fog paramaters float lightFogColour[3]; @@ -756,11 +758,8 @@ void CNew3D::RenderViewport(UINT32 addr) } // Unknown light/fog parameters - float scrollFog = (float)(vpnode[0x20] & 0xFF) * (1.0f / 255.0f); // scroll fog float scrollAtt = (float)(vpnode[0x24] & 0xFF) * (1.0f / 255.0f); // scroll attenuation - printf("scroll fog scroll %f attentioatn %f ---- %f %f %f %f\n", scrollFog, scrollAtt, vp->fogParams[0], vp->fogParams[1], vp->fogParams[2], vp->fogParams[3], vp->fogParams[4]); - // Clear texture offsets before proceeding m_nodeAttribs.Reset();