aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/neverhood/module2800.cpp9
-rw-r--r--engines/neverhood/palette.cpp6
-rw-r--r--engines/neverhood/resource.cpp2
3 files changed, 9 insertions, 8 deletions
diff --git a/engines/neverhood/module2800.cpp b/engines/neverhood/module2800.cpp
index eded442676..6643d5a50e 100644
--- a/engines/neverhood/module2800.cpp
+++ b/engines/neverhood/module2800.cpp
@@ -123,6 +123,8 @@ void Module2800::updateScene() {
Scene2801::Scene2801(NeverhoodEngine *vm, Module *parentModule, int which)
: Scene(vm, parentModule, true) {
+ // TODO Weird palette glitches in the mouse cursor and sprite, check this later
+
// TODO _vm->gameModule()->initScene2801Vars();
_surfaceFlag = true;
@@ -143,11 +145,10 @@ Scene2801::Scene2801(NeverhoodEngine *vm, Module *parentModule, int which)
if (getGlobalVar(0xC0418A02)) {
insertKlayman<KmScene2801>(312, 432);
_klayman->setDoDeltaX(1);
- setMessageList(0x004B6C10);
} else {
insertKlayman<KmScene2801>(194, 432);
- setMessageList(0x004B6C10);
}
+ setMessageList(0x004B6C10);
} else {
insertKlayman<KmScene2801>(0, 432);
setMessageList(0x004B6BB0);
@@ -188,6 +189,8 @@ Scene2801::Scene2801(NeverhoodEngine *vm, Module *parentModule, int which)
_asTape = insertSprite<AsScene1201Tape>(this, 8, 1100, 302, 437, 0x9148A011);
_vm->_collisionMan->addSprite(_asTape);
}
+
+ addEntity(_palette);
if (which == 1) {
_palette->addPalette(0xB103B604, 0, 65, 0);
@@ -196,7 +199,7 @@ Scene2801::Scene2801(NeverhoodEngine *vm, Module *parentModule, int which)
_palette->addPalette(_paletteHash, 0, 65, 0);
_palette->addBasePalette(_paletteHash, 0, 65, 0);
}
-
+
}
Scene2801::~Scene2801() {
diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp
index 481e0e5058..936ca39ac6 100644
--- a/engines/neverhood/palette.cpp
+++ b/engines/neverhood/palette.cpp
@@ -143,9 +143,8 @@ void Palette::update() {
debug(2, "Palette::update() _status = %d", _status);
if (_status == 1) {
if (_palCounter > 1) {
- for (int i = 0; i < 256; i++) {
+ for (int i = 0; i < 256; i++)
fadeColor(_palette + i * 4, _fadeToR, _fadeToG, _fadeToB);
- }
_vm->_screen->testPalette(_palette);
_palCounter--;
} else {
@@ -154,9 +153,8 @@ void Palette::update() {
}
} else if (_status == 2) {
if (_palCounter > 1) {
- for (int i = 0; i < 256; i++) {
+ for (int i = 0; i < 256; i++)
fadeColor(_palette + i * 4, _basePalette[i * 4 + 0], _basePalette[i * 4 + 1], _basePalette[i * 4 + 2]);
- }
_vm->_screen->testPalette(_palette);
_palCounter--;
} else {
diff --git a/engines/neverhood/resource.cpp b/engines/neverhood/resource.cpp
index 9678031554..65f98a8599 100644
--- a/engines/neverhood/resource.cpp
+++ b/engines/neverhood/resource.cpp
@@ -119,7 +119,7 @@ bool PaletteResource::load(uint32 fileHash) {
case 3:
// _palette already points to the correct data
break;
- default:
+ default:
_vm->_res->unuseResource(_resourceHandle);
_resourceHandle = -1;
break;