diff --git a/Src/Graphics/New3D/Model.h b/Src/Graphics/New3D/Model.h index bdc5cfd..99de389 100644 --- a/Src/Graphics/New3D/Model.h +++ b/Src/Graphics/New3D/Model.h @@ -186,6 +186,7 @@ struct Viewport float spotColor[3]; // color float fogParams[7]; // fog parameters (...) float scrollFog; // a transparency value that determines if fog is blended over the bottom 2D layer + int losPosX, losPosY; // line of sight position int x, y; // viewport coordinates (scaled and in OpenGL format) int width, height; // viewport dimensions (scaled for display surface size) int priority; // priority diff --git a/Src/Graphics/New3D/New3D.cpp b/Src/Graphics/New3D/New3D.cpp index f0bf744..5bd01d9 100644 --- a/Src/Graphics/New3D/New3D.cpp +++ b/Src/Graphics/New3D/New3D.cpp @@ -828,6 +828,10 @@ void CNew3D::RenderViewport(UINT32 addr) vp->spotEllipse[2] *= m_xRatio; vp->spotEllipse[3] *= m_yRatio; + // Line of sight position + vp->losPosX = (int)(((vpnode[0x1c] & 0xFFFF) / 16.0f) + 0.5f); // x position + vp->losPosY = (int)(((vpnode[0x1c] >> 16) / 16.0f) + 0.5f); // y position 0 starts from the top + // Fog vp->fogParams[0] = (float)((vpnode[0x22] >> 16) & 0xFF) * (1.0f / 255.0f); // fog color R vp->fogParams[1] = (float)((vpnode[0x22] >> 8) & 0xFF) * (1.0f / 255.0f); // fog color G diff --git a/Src/Graphics/New3D/New3D.h b/Src/Graphics/New3D/New3D.h index 71ac4a5..f6776ed 100644 --- a/Src/Graphics/New3D/New3D.h +++ b/Src/Graphics/New3D/New3D.h @@ -149,22 +149,22 @@ public: * Parameters: * enable Set clamp mode */ - void SetSunClamp(bool enable); - - /* - * SetSignedShade(bool enable); - * - * Sets the sign-ness of fixed shading value - * - * Parameters: - * enable Fixed shading is expressed as signed value - */ - void SetSignedShade(bool enable); - - /* - * CRender3D(config): - * ~CRender3D(void): - * + void SetSunClamp(bool enable); + + /* + * SetSignedShade(bool enable); + * + * Sets the sign-ness of fixed shading value + * + * Parameters: + * enable Fixed shading is expressed as signed value + */ + void SetSignedShade(bool enable); + + /* + * CRender3D(config): + * ~CRender3D(void): + * * Constructor and destructor. * * Parameters: @@ -210,16 +210,16 @@ private: /* * Data */ - - // Misc - std::string m_gameName; - - // GPU configuration - bool m_sunClamp; - bool m_shadeIsSigned; - - // Stepping - int m_step; + + // Misc + std::string m_gameName; + + // GPU configuration + bool m_sunClamp; + bool m_shadeIsSigned; + + // Stepping + int m_step; int m_offset; // offset to subtract for words 3 and higher of culling nodes float m_vertexFactor; // fixed-point conversion factor for vertices