aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/neverhood/diskplayerscene.cpp3
-rw-r--r--engines/neverhood/module1100.cpp2
-rw-r--r--engines/neverhood/module1200.cpp14
-rw-r--r--engines/neverhood/module1200.h1
-rw-r--r--engines/neverhood/module1300.cpp2
-rw-r--r--engines/neverhood/module1400.cpp10
-rw-r--r--engines/neverhood/module1500.cpp3
-rw-r--r--engines/neverhood/module1600.cpp6
-rw-r--r--engines/neverhood/module1900.cpp3
-rw-r--r--engines/neverhood/module2200.cpp8
-rw-r--r--engines/neverhood/module2400.cpp2
-rw-r--r--engines/neverhood/module2500.cpp5
-rw-r--r--engines/neverhood/module2700.cpp4
-rw-r--r--engines/neverhood/module2800.cpp47
-rw-r--r--engines/neverhood/module3000.cpp8
-rw-r--r--engines/neverhood/navigationscene.cpp1
-rw-r--r--engines/neverhood/palette.cpp4
-rw-r--r--engines/neverhood/palette.h1
18 files changed, 15 insertions, 109 deletions
diff --git a/engines/neverhood/diskplayerscene.cpp b/engines/neverhood/diskplayerscene.cpp
index ac51ea1550..d69182b57e 100644
--- a/engines/neverhood/diskplayerscene.cpp
+++ b/engines/neverhood/diskplayerscene.cpp
@@ -379,7 +379,6 @@ DiskplayerScene::DiskplayerScene(NeverhoodEngine *vm, Module *parentModule, int
addEntity(_diskSmackerPlayer);
addSurface(_diskSmackerPlayer->getSurface());
_diskSmackerPlayer->setDrawPos(154, 86);
- // TODO _diskSmackerPlayer->gotoFrame(0);
_vm->_screen->setSmackerDecoder(_diskSmackerPlayer->getSmackerDecoder());
_palette->usePalette();
@@ -469,7 +468,6 @@ uint32 DiskplayerScene::handleMessage(int messageNum, const MessageParam &param,
if (!_inputDisabled) {
switch (messageNum) {
case 0x0001:
- // TODO: Debug/Cheat
if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
sendMessage(_parentModule, 0x1009, 0);
} else if (!_dropKey &&
@@ -488,7 +486,6 @@ uint32 DiskplayerScene::handleMessage(int messageNum, const MessageParam &param,
}
}
break;
- // case 0x000D: TODO: Debug/Cheat
case 0x2000:
tuneIn();
break;
diff --git a/engines/neverhood/module1100.cpp b/engines/neverhood/module1100.cpp
index 333515538a..e46ed262ec 100644
--- a/engines/neverhood/module1100.cpp
+++ b/engines/neverhood/module1100.cpp
@@ -476,7 +476,6 @@ uint32 Scene1105::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO Debug stuff
if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
if (!_flag2 && _backgroundIndex == 0) {
if (_flag1) {
@@ -489,7 +488,6 @@ uint32 Scene1105::handleMessage(int messageNum, const MessageParam &param, Entit
}
}
break;
- // TODO Debug stuff
case 0x2001:
showMouse(false);
_backgroundIndex = 24;
diff --git a/engines/neverhood/module1200.cpp b/engines/neverhood/module1200.cpp
index d106a85aea..fecb66a3b6 100644
--- a/engines/neverhood/module1200.cpp
+++ b/engines/neverhood/module1200.cpp
@@ -1137,7 +1137,8 @@ void Scene1202::update() {
_clickedIndex = 0;
SetMessageHandler(&Scene1202::hmSolved);
setGlobalVar(V_TNT_DUMMY_BUILT, 1);
- doPaletteEffect();
+ _palette->copyToBasePalette(_paletteData);
+ _palette->startFadeToPalette(24);
playSound(3);
_soundFlag = true;
} else if (_clickedIndex >= 0 && _counter == 0) {
@@ -1163,17 +1164,10 @@ uint32 Scene1202::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO: Debug/Cheat stuff
if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !_soundFlag) {
leaveScene(0);
}
break;
- case 0x000D:
- if (param.asInteger() == 0x14210006) {
- // TODO: Debug/Cheat stuff
- messageResult = 1;
- }
- break;
case 0x2000:
_clickedIndex = (int)param.asInteger();
break;
@@ -1209,8 +1203,4 @@ bool Scene1202::isSolved() {
getSubVar(VA_TNT_POSITIONS, 12) == 12 && getSubVar(VA_TNT_POSITIONS, 15) == 15;
}
-void Scene1202::doPaletteEffect() {
- // TODO
-}
-
} // End of namespace Neverhood
diff --git a/engines/neverhood/module1200.h b/engines/neverhood/module1200.h
index 7d4e224a38..a0e9c9f902 100644
--- a/engines/neverhood/module1200.h
+++ b/engines/neverhood/module1200.h
@@ -209,7 +209,6 @@ protected:
uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
uint32 hmSolved(int messageNum, const MessageParam &param, Entity *sender);
bool isSolved();
- void doPaletteEffect();
};
} // End of namespace Neverhood
diff --git a/engines/neverhood/module1300.cpp b/engines/neverhood/module1300.cpp
index 978eb03cc8..c81cbaa144 100644
--- a/engines/neverhood/module1300.cpp
+++ b/engines/neverhood/module1300.cpp
@@ -1329,7 +1329,6 @@ uint32 Scene1307::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO Debug stuff
if (!_isPuzzleSolved) {
if (param.asPoint().x > 20 && param.asPoint().x < 620) {
if (_asCurrKey && !_isInsertingKey) {
@@ -1363,7 +1362,6 @@ uint32 Scene1307::handleMessage(int messageNum, const MessageParam &param, Entit
}
}
break;
- // TODO Debug stuff
case 0x2002:
// Check if all keys are in the correct keyholes
if (getSubVar(VA_IS_KEY_INSERTED, 0) && getSubVar(VA_CURR_KEY_SLOT_NUMBERS, 0) == getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 0) &&
diff --git a/engines/neverhood/module1400.cpp b/engines/neverhood/module1400.cpp
index b5489a39f9..82ac01d783 100644
--- a/engines/neverhood/module1400.cpp
+++ b/engines/neverhood/module1400.cpp
@@ -1278,7 +1278,6 @@ uint32 Scene1407::handleMessage(int messageNum, const MessageParam &param, Entit
switch (messageNum) {
case 0x0001:
if (_puzzleSolvedCountdown == 0) {
- // TODO: Debug/Cheat stuff
if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
// Exit scene
leaveScene(0);
@@ -1295,9 +1294,6 @@ uint32 Scene1407::handleMessage(int messageNum, const MessageParam &param, Entit
}
}
break;
- case 0x000D:
- // TODO: Debug/Cheat stuff
- break;
case 0x2000:
// The mouse got the cheese (nomnom)
setGlobalVar(V_MOUSE_PUZZLE_SOLVED, 1);
@@ -1542,7 +1538,7 @@ AsScene1405Tile::AsScene1405Tile(NeverhoodEngine *vm, Scene1405 *parentScene, ui
: AnimatedSprite(vm, 1100), _parentScene(parentScene), _tileIndex(tileIndex), _countdown(0), _isShowing(false) {
loadSound(0, 0x05308101);
- // TODO _soundResource.setPan
+ setSoundPan(0, (tileIndex % 8 * 4 + 4) * 25 / 8);
_x = kAsScene1405TileItemPositions[_tileIndex].x;
_y = kAsScene1405TileItemPositions[_tileIndex].y;
createSurface1(0x844B805C, 1100);
@@ -1653,14 +1649,10 @@ uint32 Scene1405::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO: Debug/Cheat stuff
if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
leaveScene(0);
}
break;
- case 0x000D:
- // TODO: Debug/Cheat stuff
- break;
case 0x2000:
if (_selectFirstTile) {
_firstTileIndex = param.asInteger();
diff --git a/engines/neverhood/module1500.cpp b/engines/neverhood/module1500.cpp
index a46b8fc716..b62ff01494 100644
--- a/engines/neverhood/module1500.cpp
+++ b/engines/neverhood/module1500.cpp
@@ -106,9 +106,6 @@ void Scene1501::update() {
Scene::update();
- // TODO: Since these countdowns are used a lot, maybe these can be wrapped in a class/struct
- // so the code gets a little cleaner.
-
if (_countdown1 != 0) {
_countdown1--;
if (_countdown1 == 0) {
diff --git a/engines/neverhood/module1600.cpp b/engines/neverhood/module1600.cpp
index b6df7061c2..568f957943 100644
--- a/engines/neverhood/module1600.cpp
+++ b/engines/neverhood/module1600.cpp
@@ -1064,10 +1064,6 @@ void AsCommonCarConnector::update() {
Scene1608::Scene1608(NeverhoodEngine *vm, Module *parentModule, int which)
: Scene(vm, parentModule, true), _asCar(NULL), _countdown1(0) {
- /* TODO: Find out which of the message/update handlers are used for
- the upper/lower floors and rename them accordingly.
- */
-
setGlobalVar(V_CAR_DELTA_X, 1);
_surfaceFlag = true;
@@ -1434,11 +1430,9 @@ uint32 Scene1609::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO: Debug stuff
if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
leaveScene(0);
break;
- // TODO: Debug stuff
case 0x2000:
if (!_isSolved) {
if (_changeCurrentSymbol)
diff --git a/engines/neverhood/module1900.cpp b/engines/neverhood/module1900.cpp
index d90074c2cf..9db150338a 100644
--- a/engines/neverhood/module1900.cpp
+++ b/engines/neverhood/module1900.cpp
@@ -390,7 +390,6 @@ void AsScene1907Symbol::fallOff(int newPositionIndex, int fallOffDelay) {
void AsScene1907Symbol::stFallOffHitGround() {
playSound(1);
sendMessage(_parentScene, 0x1022, 1000 + _newPositionIndex);
- // TODO: Meh...
Entity::_priority = 1000 - _newPositionIndex;
_vm->_collisionMan->removeSprite(this);
_vm->_collisionMan->addSprite(this);
@@ -632,13 +631,11 @@ uint32 Scene1907::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO DEBUG stuff
if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) &&
!_hasPlugInFailed && _moveDownCountdown == 0 && _moveUpCountdown == 0 && _countdown3 == 0) {
leaveScene(0);
}
break;
- // TODO Debug stuff
case 0x2000:
if (getGlobalVar(V_STAIRS_DOWN)) {
playSound(0);
diff --git a/engines/neverhood/module2200.cpp b/engines/neverhood/module2200.cpp
index 20a8559aae..1b07890156 100644
--- a/engines/neverhood/module2200.cpp
+++ b/engines/neverhood/module2200.cpp
@@ -967,14 +967,10 @@ uint32 Scene2202::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO Debug stuff
if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
leaveScene(0);
}
break;
- case 0x000D:
- // TODO Debug stuff
- break;
case 0x2000:
_movingTileIndex = (int16)param.asInteger();
_ssMovingTile = (Sprite*)sender;
@@ -1127,8 +1123,6 @@ Scene2203::Scene2203(NeverhoodEngine *vm, Module *parentModule, int which)
setHitRects(0x004B8320);
- //DEBUG setGlobalVar(V_KEY3_LOCATION, 1);//###//TODO CHECK IF Below...
-
if (getGlobalVar(V_KEY3_LOCATION) == 1) {
_asKey = insertSprite<AsCommonKey>(this, 2, 1100, 282, 432);
_vm->_collisionMan->addSprite(_asKey);
@@ -2391,7 +2385,6 @@ void Scene2208::drawRow(int16 rowIndex) {
_background->getSurface()->copyFrom(_backgroundSurface->getSurface(), 0, y, sourceRect, true);
if (rowIndex < (int)_strings.size()) {
const char *text = _strings[rowIndex];
- // TODO/CHECKME: Use temporary string up to '{' character (see above)
_fontSurface->drawString(_background->getSurface(), 95, y, (const byte*)text);
}
}
@@ -2667,7 +2660,6 @@ Scene2247::~Scene2247() {
uint32 Scene2247::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
- // TODO: Debug stuff
case 0x100D:
if (param.asInteger() == 0x800C6694) {
readClickedColumn();
diff --git a/engines/neverhood/module2400.cpp b/engines/neverhood/module2400.cpp
index d29330f9ca..c75e85b2bf 100644
--- a/engines/neverhood/module2400.cpp
+++ b/engines/neverhood/module2400.cpp
@@ -487,8 +487,6 @@ void Scene2401::update() {
uint32 Scene2401::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
- // case 0x0001: TODO DEBUG
- // case 0x000D: TODO DEBUG
case 0x100D:
if (param.asInteger() == 0x402064D8)
sendEntityMessage(_klayman, 0x1014, _ssButton);
diff --git a/engines/neverhood/module2500.cpp b/engines/neverhood/module2500.cpp
index 0a14fb65a3..c9bffe527e 100644
--- a/engines/neverhood/module2500.cpp
+++ b/engines/neverhood/module2500.cpp
@@ -92,7 +92,9 @@ void Module2500::createScene(int sceneNum, int which) {
createScene2704(which, 0x004B01B8, 220);
break;
case 2:
- setGlobalVar(V_WORLDS_JOINED, 1);// TODO DEBUG! Join the tracks.
+ //DEBUG>>>Join the tracks.
+ setGlobalVar(V_WORLDS_JOINED, 1);
+ //DEBUG<<<
_vm->gameState().which = which;
if (getGlobalVar(V_WORLDS_JOINED))
createScene2704(which, 0x004B01E0, 150);
@@ -213,7 +215,6 @@ uint32 Module2500::handleMessage(int messageNum, const MessageParam &param, Enti
}
void Module2500::createScene2704(int which, uint32 sceneInfoId, int16 value, const uint32 *staticSprites, const NRect *clipRect) {
- // TODO Move to module class?
_childObject = new Scene2704(_vm, this, which, sceneInfoId, value, staticSprites, clipRect);
}
diff --git a/engines/neverhood/module2700.cpp b/engines/neverhood/module2700.cpp
index 19bf9be6cb..9bac035a38 100644
--- a/engines/neverhood/module2700.cpp
+++ b/engines/neverhood/module2700.cpp
@@ -411,8 +411,6 @@ void Module2700::updateScene() {
createScene(19, 3);
break;
case 21:
- // TODO? GameState_sub_469C50(&field_52, 0);
- // TODO MusicMan_stopAll (if field_52 above = 1)
_vm->_soundMan->deleteMusic(_musicFileHash);
_vm->_soundMan->startMusic(0x04020210, 0, 2);
_vm->_soundMan->deleteSoundGroup(0x42212411);
@@ -460,8 +458,6 @@ void Module2700::updateScene() {
_vm->_soundMan->stopMusic(0x04020210, 0, 1);
_vm->gameModule()->initScene2801Vars();
_musicFileHash = getGlobalVar(V_GOOD_RADIO_MUSIC_NAME);
- // TODO? GameState_sub_469C50(&field_52, 0);
- // TODO MusicMan_create(); // Why?
_vm->_soundMan->addMusic(0x42212411, _musicFileHash);
_vm->_soundMan->startMusic(_musicFileHash, 0, 2/*TODO ??? */);
_vm->_soundMan->addSound(0x42212411, 0x44014282);
diff --git a/engines/neverhood/module2800.cpp b/engines/neverhood/module2800.cpp
index b6f56945a0..a1a93bd1de 100644
--- a/engines/neverhood/module2800.cpp
+++ b/engines/neverhood/module2800.cpp
@@ -487,7 +487,6 @@ Scene2801::~Scene2801() {
uint32 Scene2801::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
- // TODO: case 0x000D:
case 0x4826:
if (sender == _asTape) {
sendEntityMessage(_klayman, 0x1014, _asTape);
@@ -1862,14 +1861,10 @@ uint32 Scene2804::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO DEBUG
if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
leaveScene(0);
}
break;
- case 0x000D:
- // TODO DEBUG
- break;
case 0x2000:
_isWorking = true;
sendMessage(_asCoil, 0x2002, 0);
@@ -2377,53 +2372,23 @@ uint32 AsScene2808TestTube::handleMessage(int messageNum, const MessageParam &pa
void AsScene2808TestTube::fill() {
- if ((int)_fillLevel >= _testTubeSetNum * 3 + 3)
+ if ((int)_fillLevel < _testTubeSetNum * 3 + 3)
return;
- // TODO Remove the two switches
-
if (_testTubeSetNum == 0) {
- switch (_fillLevel) {
- case 0:
- playSound(0);
- break;
- case 1:
- playSound(1);
- break;
- case 2:
- playSound(2);
- break;
- }
+ playSound(_fillLevel);
setVisible(true);
startAnimation(kClass490FileHashes[_testTubeIndex], kClass490FrameIndices1[_fillLevel], kClass490FrameIndices1[_fillLevel + 1]);
_newStickFrameIndex = kClass490FrameIndices1[_fillLevel + 1];
} else {
- switch (_fillLevel) {
- case 0:
- playSound(3);
- break;
- case 1:
- playSound(4);
- break;
- case 2:
- playSound(5);
- break;
- case 3:
- playSound(6);
- break;
- case 4:
- playSound(7);
- break;
- case 5:
- playSound(8);
- break;
- }
+ playSound(3 + _fillLevel);
setVisible(true);
startAnimation(kClass490FileHashes[_testTubeIndex], kClass490FrameIndices2[_fillLevel], kClass490FrameIndices2[_fillLevel + 1]);
_newStickFrameIndex = kClass490FrameIndices2[_fillLevel + 1];
}
_ssDispenser->startCountdown(_fillLevel);
_fillLevel++;
+
}
void AsScene2808TestTube::flush() {
@@ -2599,14 +2564,10 @@ uint32 Scene2808::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO DEBUG Stuff
if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !isAnyTestTubeFilled()) {
leaveScene(1);
}
break;
- case 0x000D:
- // TODO DEBUG Stuff
- break;
case 0x2000:
if (!_isFlowing)
_asTestTubes[param.asInteger()]->fill();
diff --git a/engines/neverhood/module3000.cpp b/engines/neverhood/module3000.cpp
index 242a00e012..6d394a859f 100644
--- a/engines/neverhood/module3000.cpp
+++ b/engines/neverhood/module3000.cpp
@@ -937,15 +937,11 @@ uint32 Scene3009::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO: Debug stuff
if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !getGlobalVar(V_CANNON_RAISED)) {
setGlobalVar(V_CANNON_TARGET_STATUS, 0);
leaveScene(0);
}
break;
- case 0x000D:
- // TODO: Debug stuff
- break;
case 0x2000:
if (!getGlobalVar(V_CANNON_RAISED)) {
if (!getGlobalVar(V_WALL_BROKEN)) {
@@ -1347,7 +1343,6 @@ uint32 Scene3010::handleMessage(int messageNum, const MessageParam &param, Entit
Scene::handleMessage(messageNum, param, sender);
switch (messageNum) {
case 0x0001:
- // TODO: Debug stuff
if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && _countdown == 0 && !_checkUnlocked) {
if (!_boltUnlocking[0] && !_boltUnlocking[1] && !_boltUnlocking[2]) {
showMouse(false);
@@ -1365,9 +1360,6 @@ uint32 Scene3010::handleMessage(int messageNum, const MessageParam &param, Entit
}
}
break;
- case 0x000D:
- // TODO: Debug stuff
- break;
case 0x2000:
if (!_boltUnlocked[param.asInteger()] && !_checkUnlocked && _countdown == 0) {
_asDeadBolts[param.asInteger()]->unlock(false);
diff --git a/engines/neverhood/navigationscene.cpp b/engines/neverhood/navigationscene.cpp
index bf3de5d812..96d33c0ffd 100644
--- a/engines/neverhood/navigationscene.cpp
+++ b/engines/neverhood/navigationscene.cpp
@@ -140,7 +140,6 @@ void NavigationScene::createMouseCursor() {
}
mouseCursorFileHash = navigationItem.mouseCursorFileHash;
- // TODO: Check the resource...
if (mouseCursorFileHash == 0)
mouseCursorFileHash = 0x63A40028;
diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp
index 16ef31d569..d4b9b67f53 100644
--- a/engines/neverhood/palette.cpp
+++ b/engines/neverhood/palette.cpp
@@ -161,6 +161,10 @@ void Palette::fillBaseBlack(int index, int count) {
}
}
+void Palette::copyToBasePalette(byte *palette) {
+ memcpy(_basePalette, palette, 256 * 4);
+}
+
void Palette::update() {
debug(2, "Palette::update() _status = %d", _status);
if (_status == 1) {
diff --git a/engines/neverhood/palette.h b/engines/neverhood/palette.h
index 4b0747bd73..c83207caae 100644
--- a/engines/neverhood/palette.h
+++ b/engines/neverhood/palette.h
@@ -51,6 +51,7 @@ public:
void startFadeToPalette(int counter);
void fillBaseWhite(int index, int count);
void fillBaseBlack(int index, int count);
+ void copyToBasePalette(byte *palette);
protected:
int _status;
byte *_palette;