aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/render_table.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/render_table.cpp')
-rw-r--r--engines/zvision/render_table.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/zvision/render_table.cpp b/engines/zvision/render_table.cpp
index b6598c12b2..2a111ce659 100644
--- a/engines/zvision/render_table.cpp
+++ b/engines/zvision/render_table.cpp
@@ -60,6 +60,16 @@ void RenderTable::setRenderState(RenderState newState) {
}
}
+const Common::Point RenderTable::convertWarpedPointToFlatCoords(const Common::Point &point) {
+ uint32 index = point.y * _numColumns + point.x;
+
+ Common::Point newPoint(point);
+ newPoint.x += _internalBuffer[index].x;
+ newPoint.y += _internalBuffer[index].y;
+
+ return newPoint;
+}
+
uint16 mixTwoRGB(uint16 colorOne, uint16 colorTwo, float percentColorOne) {
assert(percentColorOne < 1.0f);
@@ -157,7 +167,14 @@ void RenderTable::generatePanoramaLookupTable() {
}
void RenderTable::generateTiltLookupTable() {
+ for (uint x = 0; x < _numColumns; x++) {
+ for (uint y = 0; y < _numRows; y++) {
+ uint32 index = y * _numColumns + x;
+ _internalBuffer[index].x = 0;
+ _internalBuffer[index].y = 0;
+ }
+ }
}
void RenderTable::setPanoramaFoV(float fov) {