aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-29 22:28:25 -0400
committerPaul Gilbert2016-08-29 22:28:25 -0400
commit6a8ee95dbabbdd0355284d4dce1db0df9b1b361b (patch)
treefc1f2e3dfacf028a442d9f537fc3313de5d74fc6 /engines
parentc41845e6aec5fce0326ddabbed176e40b83204ab (diff)
downloadscummvm-rg350-6a8ee95dbabbdd0355284d4dce1db0df9b1b361b.tar.gz
scummvm-rg350-6a8ee95dbabbdd0355284d4dce1db0df9b1b361b.tar.bz2
scummvm-rg350-6a8ee95dbabbdd0355284d4dce1db0df9b1b361b.zip
TITANIC: Properly initialize data array in CSurfaceFader
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/star_control/surface_fader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/titanic/star_control/surface_fader.cpp b/engines/titanic/star_control/surface_fader.cpp
index 089ad51717..0ee03673a4 100644
--- a/engines/titanic/star_control/surface_fader.cpp
+++ b/engines/titanic/star_control/surface_fader.cpp
@@ -29,9 +29,9 @@ namespace Titanic {
CSurfaceFader::CSurfaceFader() : CSurfaceFaderBase() {
_dataP = new byte[_count];
- for (int idx = 0; idx < _count; ++idx) {
- // TODO: Setup data bytes
- }
+ for (int idx = 0; idx < _count; ++idx)
+ _dataP[idx] = (byte)(pow((double)idx / (double)_count, 1.299999952316284)
+ * (double)_count + 0.5);
}
CSurfaceFader::~CSurfaceFader() {