diff options
author | richiesams | 2013-07-28 21:38:53 -0500 |
---|---|---|
committer | richiesams | 2013-08-04 13:32:43 -0500 |
commit | 4acdf5b7d51869bfb697e345a9a90f487d8fafc0 (patch) | |
tree | 3375e53a72038f11e9ff13b4250efdacb83d964a /engines/zvision | |
parent | a23970bbc68865ccffa4c2e0849ffe244d48d5f1 (diff) | |
download | scummvm-rg350-4acdf5b7d51869bfb697e345a9a90f487d8fafc0.tar.gz scummvm-rg350-4acdf5b7d51869bfb697e345a9a90f487d8fafc0.tar.bz2 scummvm-rg350-4acdf5b7d51869bfb697e345a9a90f487d8fafc0.zip |
ZVISION: Convert panoramaOptions and tiltOptions to floats
Diffstat (limited to 'engines/zvision')
-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: |