aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohndoe1232011-09-19 08:00:56 +0000
committerWillem Jan Palenstijn2013-05-08 20:39:39 +0200
commitd24907d1bb1650093e4ff7f0d008ce87350226b6 (patch)
tree1e3a5673b24e8aae701def413966e6c6d0d5c047
parent67fe73352b5de401b184a54195beba2438da5b8d (diff)
downloadscummvm-rg350-d24907d1bb1650093e4ff7f0d008ce87350226b6.tar.gz
scummvm-rg350-d24907d1bb1650093e4ff7f0d008ce87350226b6.tar.bz2
scummvm-rg350-d24907d1bb1650093e4ff7f0d008ce87350226b6.zip
NEVERHOOD: Rename Palette2::addPalette to addBasePalette to prepare the merge of the Palette/Palette2 classes
-rw-r--r--engines/neverhood/gamemodule.cpp6
-rw-r--r--engines/neverhood/module1000.cpp8
-rw-r--r--engines/neverhood/module1500.cpp2
-rw-r--r--engines/neverhood/module1700.cpp6
-rw-r--r--engines/neverhood/module2200.cpp16
-rw-r--r--engines/neverhood/module3000.cpp4
-rw-r--r--engines/neverhood/palette.cpp4
-rw-r--r--engines/neverhood/palette.h2
8 files changed, 24 insertions, 24 deletions
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp
index 1c76027ddf..103d53df95 100644
--- a/engines/neverhood/gamemodule.cpp
+++ b/engines/neverhood/gamemodule.cpp
@@ -276,11 +276,11 @@ void GameModule::startup() {
_vm->gameState().sceneNum = 0;
createModule2000(-1);
#endif
-#if 0
- _vm->gameState().sceneNum = 2;
+#if 1
+ _vm->gameState().sceneNum = 4;
createModule2200(-1);
#endif
-#if 1
+#if 0
_vm->gameState().sceneNum = 0;
createModule1000(-1);
#endif
diff --git a/engines/neverhood/module1000.cpp b/engines/neverhood/module1000.cpp
index 22bc5cc108..77620b89ff 100644
--- a/engines/neverhood/module1000.cpp
+++ b/engines/neverhood/module1000.cpp
@@ -1694,10 +1694,10 @@ Scene1004::Scene1004(NeverhoodEngine *vm, Module *parentModule, int which)
if (getGlobalVar(0x0D0A14D10)) {
palette2 = new Palette2(_vm, 0xA30BA329);
- palette2->addPalette(0xA30BA329, 0, 256, 0);
+ palette2->addBasePalette(0xA30BA329, 0, 256, 0);
} else {
palette2 = new Palette2(_vm, 0x50C03005);
- palette2->addPalette(0x50C03005, 0, 256, 0);
+ palette2->addBasePalette(0x50C03005, 0, 256, 0);
}
_palette = palette2;
_palette->usePalette();
@@ -1770,13 +1770,13 @@ void Scene1004::updatePaletteArea() {
if (_klayman->getY() < 150) {
if (_paletteAreaStatus != 0) {
_paletteAreaStatus = 0;
- ((Palette2*)_palette)->addPalette(0x406B0D10, 0, 64, 0);
+ ((Palette2*)_palette)->addBasePalette(0x406B0D10, 0, 64, 0);
((Palette2*)_palette)->startFadeToPalette(12);
}
} else {
if (_paletteAreaStatus != 1) {
_paletteAreaStatus = 1;
- ((Palette2*)_palette)->addPalette(0x24332243, 0, 64, 0);
+ ((Palette2*)_palette)->addBasePalette(0x24332243, 0, 64, 0);
((Palette2*)_palette)->startFadeToPalette(12);
}
}
diff --git a/engines/neverhood/module1500.cpp b/engines/neverhood/module1500.cpp
index b942d8b836..5735f24a46 100644
--- a/engines/neverhood/module1500.cpp
+++ b/engines/neverhood/module1500.cpp
@@ -119,7 +119,7 @@ Scene1501::Scene1501(NeverhoodEngine *vm, Module *parentModule, uint32 backgroun
palette2->usePalette();
_palette = palette2;
addEntity(_palette);
- palette2->addPalette(backgroundFileHash, 0, 256, 0);
+ palette2->addBasePalette(backgroundFileHash, 0, 256, 0);
palette2->startFadeToPalette(12);
/*
diff --git a/engines/neverhood/module1700.cpp b/engines/neverhood/module1700.cpp
index 0aea8d1f24..baa37d015a 100644
--- a/engines/neverhood/module1700.cpp
+++ b/engines/neverhood/module1700.cpp
@@ -226,7 +226,7 @@ Scene1705::Scene1705(NeverhoodEngine *vm, Module *parentModule, int which)
setBackground(0x03118226);
palette2 = new Palette2(_vm, 0x03118226);
- palette2->addPalette(0x91D3A391, 0, 64, 0);
+ palette2->addBasePalette(0x91D3A391, 0, 64, 0);
palette2->copyBasePalette(0, 256, 0);
palette2->usePalette();
_palette = palette2;
@@ -297,11 +297,11 @@ Scene1705::Scene1705(NeverhoodEngine *vm, Module *parentModule, int which)
void Scene1705::update() {
Scene::update();
if (_klayman->getX() < 224 && _paletteArea != 0) {
- ((Palette2*)_palette)->addPalette(0xF2210C15, 0, 64, 0);
+ ((Palette2*)_palette)->addBasePalette(0xF2210C15, 0, 64, 0);
((Palette2*)_palette)->startFadeToPalette(12);
_paletteArea = 0;
} else if (_klayman->getX() >= 224 && _paletteArea == 0) {
- ((Palette2*)_palette)->addPalette(0x91D3A391, 0, 64, 0);
+ ((Palette2*)_palette)->addBasePalette(0x91D3A391, 0, 64, 0);
((Palette2*)_palette)->startFadeToPalette(12);
_paletteArea = 1;
}
diff --git a/engines/neverhood/module2200.cpp b/engines/neverhood/module2200.cpp
index c8eca785b3..b637a39a05 100644
--- a/engines/neverhood/module2200.cpp
+++ b/engines/neverhood/module2200.cpp
@@ -1536,7 +1536,7 @@ Scene2205::Scene2205(NeverhoodEngine *vm, Module *parentModule, int which)
addSprite(_ssLightSwitch);
}
- palette2->addPalette(0xD00A028D, 0, 256, 0);
+ palette2->addBasePalette(0xD00A028D, 0, 256, 0);
_ssDoorFrame = addSprite(new SsScene2205DoorFrame(_vm));
@@ -1598,11 +1598,11 @@ void Scene2205::update() {
if (!getGlobalVar(0x4D080E54)) {
if (_isKlaymanInLight && _klayman->getX() > 85) {
- ((Palette2*)_palette)->addPalette(0x68033B1C, 0, 65, 0);
+ ((Palette2*)_palette)->addBasePalette(0x68033B1C, 0, 65, 0);
((Palette2*)_palette)->startFadeToPalette(12);
_isKlaymanInLight = false;
} else if (!_isKlaymanInLight && _klayman->getX() <= 85) {
- ((Palette2*)_palette)->addPalette(0xD00A028D, 0, 65, 0);
+ ((Palette2*)_palette)->addBasePalette(0xD00A028D, 0, 65, 0);
((Palette2*)_palette)->startFadeToPalette(12);
_isKlaymanInLight = true;
}
@@ -1822,7 +1822,7 @@ Scene2206::Scene2206(NeverhoodEngine *vm, Module *parentModule, int which)
_palette->usePalette();
addEntity(palette2);
- palette2->addPalette(fileHash, 0, 256, 0);
+ palette2->addBasePalette(fileHash, 0, 256, 0);
if (!getGlobalVar(0x4D080E54)) {
_palette->addPalette(0x0263D144, 0, 65, 0);
@@ -1904,7 +1904,7 @@ uint32 Scene2206::handleMessage(int messageNum, const MessageParam &param, Entit
void Scene2206::sub481950() {
if (getGlobalVar(0x4D080E54)) {
- ((Palette2*)_palette)->addPalette(0x41983216, 0, 65, 0);
+ ((Palette2*)_palette)->addBasePalette(0x41983216, 0, 65, 0);
((Palette2*)_palette)->startFadeToPalette(12);
}
setSurfacePriority(_sprite1->getSurface(), 100);
@@ -1919,7 +1919,7 @@ void Scene2206::sub481950() {
void Scene2206::sub4819D0() {
if (!getGlobalVar(0x4D080E54)) {
- ((Palette2*)_palette)->addPalette(0xB103B604, 0, 65, 0);
+ ((Palette2*)_palette)->addBasePalette(0xB103B604, 0, 65, 0);
((Palette2*)_palette)->startFadeToPalette(12);
}
setSurfacePriority(_sprite1->getSurface(), 1100);
@@ -2767,11 +2767,11 @@ Scene2242::~Scene2242() {
void Scene2242::update() {
if (!getGlobalVar(0x4D080E54)) {
if (_isKlaymanInLight && _klayman->getX() < 440) {
- ((Palette2*)_palette)->addPalette(0x68033B1C, 0, 65, 0);
+ ((Palette2*)_palette)->addBasePalette(0x68033B1C, 0, 65, 0);
((Palette2*)_palette)->startFadeToPalette(12);
_isKlaymanInLight = false;
} else if (!_isKlaymanInLight && _klayman->getX() >= 440) {
- ((Palette2*)_palette)->addPalette(0x25848E24, 0, 65, 0);
+ ((Palette2*)_palette)->addBasePalette(0x25848E24, 0, 65, 0);
((Palette2*)_palette)->startFadeToPalette(12);
_isKlaymanInLight = true;
}
diff --git a/engines/neverhood/module3000.cpp b/engines/neverhood/module3000.cpp
index cfcacaf693..7c4ed1a464 100644
--- a/engines/neverhood/module3000.cpp
+++ b/engines/neverhood/module3000.cpp
@@ -1762,13 +1762,13 @@ uint32 Scene3011::handleMessage(int messageNum, const MessageParam &param, Entit
void Scene3011::fadeIn() {
Palette2 *palette2 = (Palette2*)_palette;
- palette2->addPalette(0x92124A04, 0, 256, 0);
+ palette2->addBasePalette(0x92124A04, 0, 256, 0);
palette2->startFadeToPalette(24);
}
void Scene3011::fadeOut() {
Palette2 *palette2 = (Palette2*)_palette;
- palette2->addPalette(0xA4070114, 0, 256, 0);
+ palette2->addBasePalette(0xA4070114, 0, 256, 0);
palette2->startFadeToPalette(24);
}
diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp
index bd1d6b2c8d..a060a41870 100644
--- a/engines/neverhood/palette.cpp
+++ b/engines/neverhood/palette.cpp
@@ -70,7 +70,7 @@ void Palette::usePalette() {
}
void Palette::addPalette(const char *filename, int toIndex, int count, int fromIndex) {
- // TODO: addPalette(calcHash(filename), toIndex, count, fromIndex);
+ addPalette(calcHash(filename), toIndex, count, fromIndex);
}
void Palette::addPalette(uint32 fileHash, int toIndex, int count, int fromIndex) {
@@ -179,7 +179,7 @@ void Palette2::copyBasePalette(int toIndex, int count, int fromIndex) {
memcpy(_basePalette + toIndex * 4, _palette + fromIndex * 4, count * 4);
}
-void Palette2::addPalette(uint32 fileHash, int toIndex, int count, int fromIndex) {
+void Palette2::addBasePalette(uint32 fileHash, int toIndex, int count, int fromIndex) {
PaletteResource paletteResource(_vm);
if (toIndex + count > 256)
count = 256 - toIndex;
diff --git a/engines/neverhood/palette.h b/engines/neverhood/palette.h
index 01f63e8e7e..9d2a7bc1f6 100644
--- a/engines/neverhood/palette.h
+++ b/engines/neverhood/palette.h
@@ -62,7 +62,7 @@ public:
Palette2(NeverhoodEngine *vm, uint32 fileHash);
virtual ~Palette2();
void copyBasePalette(int toIndex, int count, int fromIndex);
- void addPalette(uint32 fileHash, int toIndex, int count, int fromIndex);
+ void addBasePalette(uint32 fileHash, int toIndex, int count, int fromIndex);
void startFadeToPalette(int counter);
public:
byte *_basePalette;