mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 23:25:40 +00:00
Parse out line of sight position. Only known to be used by scud.
This commit is contained in:
parent
99b5b9ba1b
commit
8266eecabb
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue