From 6a8ee95dbabbdd0355284d4dce1db0df9b1b361b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 29 Aug 2016 22:28:25 -0400 Subject: TITANIC: Properly initialize data array in CSurfaceFader --- engines/titanic/star_control/surface_fader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') 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() { -- cgit v1.2.3