diff options
author | Marisa-Chan | 2014-10-10 16:48:28 +0700 |
---|---|---|
committer | Marisa-Chan | 2014-10-10 16:48:28 +0700 |
commit | 7c9d8f22de461528ac5e3fbe9c1c69dcdaa1a908 (patch) | |
tree | 9723757de220276173169bc950c4ace22ce90b40 /engines/zvision/graphics/render_table.cpp | |
parent | 002b8e692a9488ac91e043df2fe7dce34d52a771 (diff) | |
download | scummvm-rg350-7c9d8f22de461528ac5e3fbe9c1c69dcdaa1a908.tar.gz scummvm-rg350-7c9d8f22de461528ac5e3fbe9c1c69dcdaa1a908.tar.bz2 scummvm-rg350-7c9d8f22de461528ac5e3fbe9c1c69dcdaa1a908.zip |
ZVISION: Implement dynamic tilt up/down border
Diffstat (limited to 'engines/zvision/graphics/render_table.cpp')
-rw-r--r-- | engines/zvision/graphics/render_table.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/zvision/graphics/render_table.cpp b/engines/zvision/graphics/render_table.cpp index 2fc21b7566..9bf40d3745 100644 --- a/engines/zvision/graphics/render_table.cpp +++ b/engines/zvision/graphics/render_table.cpp @@ -199,6 +199,7 @@ void RenderTable::generateTiltLookupTable() { float fovInRadians = (_tiltOptions.fieldOfView * M_PI / 180.0f); float cylinderRadius = halfWidth / tan(fovInRadians); + _tiltOptions.gap = cylinderRadius * atan2(halfHeight / cylinderRadius, 1.0) * _tiltOptions.linearScale; for (uint y = 0; y < _numRows; ++y) { @@ -259,4 +260,8 @@ void RenderTable::setTiltReverse(bool reverse) { _tiltOptions.reverse = reverse; } +float RenderTable::getTiltGap() { + return _tiltOptions.gap; +} + } // End of namespace ZVision |