diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/render_table.cpp | 7 | ||||
-rw-r--r-- | engines/zvision/render_table.h | 8 |
2 files changed, 6 insertions, 9 deletions
diff --git a/engines/zvision/render_table.cpp b/engines/zvision/render_table.cpp index 085908fc68..d1f8258e02 100644 --- a/engines/zvision/render_table.cpp +++ b/engines/zvision/render_table.cpp @@ -47,7 +47,7 @@ void RenderTable::setRenderState(RenderState newState) { switch (newState) { case PANORAMA: _panoramaOptions.fieldOfView = 60; - _panoramaOptions.linearScale = 1; + _panoramaOptions.linearScale = 0.55f; generatePanoramaLookupTable(); break; case TILT: @@ -91,15 +91,12 @@ void RenderTable::mutateImage(uint16 *sourceBuffer, uint16* destBuffer, uint32 i } void RenderTable::generatePanoramaLookupTable() { - float fieldOfView = _panoramaOptions.fieldOfView; - float scale = _panoramaOptions.linearScale; - memset(_internalBuffer, 0, _numRows * _numColumns * sizeof(uint16)); float halfWidth = (float)_numColumns / 2.0f; float halfHeight = (float)_numRows / 2.0f; - float fovRadians = (fieldOfView * M_PI / 180.0f); + float fovRadians = (_panoramaOptions.fieldOfView * M_PI / 180.0f); float halfHeightOverTan = halfHeight / tan(fovRadians); float tanOverHalfHeight = tan(fovRadians) / halfHeight; diff --git a/engines/zvision/render_table.h b/engines/zvision/render_table.h index cb91f885b4..ec405e5dfe 100644 --- a/engines/zvision/render_table.h +++ b/engines/zvision/render_table.h @@ -48,14 +48,14 @@ private: RenderState _renderState; struct { - uint16 fieldOfView; - uint16 linearScale; + float fieldOfView; + float linearScale; } _panoramaOptions; // TODO: See if tilt and panorama need to have separate options struct { - uint16 fieldOfView; - uint16 linearScale; + float fieldOfView; + float linearScale; } _tiltOptions; public: |