From 2f9c2a937029abc0a9a4988b223b2832b433d6cb Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 9 Nov 2013 15:05:56 +0100 Subject: TSAGE: R2R - Add some CHECKMEs, remove some deadcode (CID 1004056) --- engines/tsage/ringworld2/ringworld2_scenes1.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'engines/tsage/ringworld2/ringworld2_scenes1.cpp') diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index 298bff0d80..4bc82c7059 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -6018,7 +6018,7 @@ void Scene1337::subCF31D() { count = rndVal; break; } - + // CHECKME: inside the check on rndVal? rndVal--; if (rndVal < 0) rndVal = 3; @@ -6042,9 +6042,10 @@ void Scene1337::subCF31D() { int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3); for (int j = 0; j <= 3; j++) { + //CHECKME: tmpVal or rndVal? if (tmpVal != 1) { for (int k = 0; k <= 7; k++) { - // 'k' is not used in that loop. + // CHECKME: 'k' is not used in that loop. // It looks suspicious. if ((_arrunkObj1337[tmpVal]._arr3[0]._field34 == 0) && (subC32B1(tmpVal, _arrunkObj1337[1]._arr1[i]._field34))) { count = tmpVal; @@ -6068,12 +6069,9 @@ void Scene1337::subCF31D() { } } - if (found) { - if (count == -1) - return; - + if (found) subC3456(&_arrunkObj1337[1]._arr1[i], &_arrunkObj1337[count]._arr3[0]); - } else { + else { int j; for (j = 0; j <= 3; j++) { if (subC27F9(_arrunkObj1337[1]._arr1[j]._field34) != -1) { @@ -6103,14 +6101,10 @@ void Scene1337::subCF31D() { } } - if (found) { - if (count == -1) - return; - + if (found) subC3456(&_arrunkObj1337[1]._arr1[j], &_arrunkObj1337[count]._arr3[0]); - } else { + else subC2835(1); - } } } -- cgit v1.2.3