aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-16 00:00:18 -0400
committerPaul Gilbert2014-03-16 00:00:18 -0400
commitdfcef632eacc27b4e035e3796550dced425e836d (patch)
treedd523d7354885e38348441c97465cfc0663d9183 /engines/mads
parent2fb9edc4ee80c99b5a56a66cf52c614939748bd9 (diff)
downloadscummvm-rg350-dfcef632eacc27b4e035e3796550dced425e836d.tar.gz
scummvm-rg350-dfcef632eacc27b4e035e3796550dced425e836d.tar.bz2
scummvm-rg350-dfcef632eacc27b4e035e3796550dced425e836d.zip
MADS: Hooked up the in-progress scene 103
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/game.cpp1
-rw-r--r--engines/mads/nebular/game_nebular.cpp5
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp15
-rw-r--r--engines/mads/nebular/nebular_scenes1.h2
-rw-r--r--engines/mads/palette.cpp3
5 files changed, 19 insertions, 7 deletions
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index ad3ea5e85d..a4f3b24542 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -82,6 +82,7 @@ void Game::run() {
_statusFlag = 0;
break;
default:
+ _scene._nextSceneId = 103;
break;
}
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 8948689622..1476620f9d 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -40,20 +40,21 @@ GameNebular::GameNebular(MADSEngine *vm): Game(vm) {
}
int GameNebular::checkCopyProtection() {
+ /*
// DEBUG: Flag copy protection failure
_globals[5] = -1;
if (!ConfMan.getBool("copy_protection"))
return true;
- /* DEBUG: Disabled for now
+ * DEBUG: Disabled for now
CopyProtectionDialog *dlg = new CopyProtectionDialog(_vm, false);
dlg->show();
delete dlg;
*/
// DEBUG: Return that copy protection failed
- return 1;
+ return 0;
}
void GameNebular::initialiseGlobals() {
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index 6644d957ed..21592b07bf 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -28,6 +28,7 @@
#include "mads/scene.h"
#include "mads/nebular/game_nebular.h"
#include "mads/nebular/nebular_scenes.h"
+#include "mads/nebular/nebular_scenes1.h"
#include "mads/nebular/nebular_scenes8.h"
namespace MADS {
@@ -43,10 +44,18 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
scene.addActiveVocab(NOUN_SPLASH);
scene.addActiveVocab(NOUN_ALCOHOL);
- // TODO: Implement all the game scenes
- assert(scene._nextSceneId == 804);
+ switch (scene._nextSceneId) {
+ // Scene group #1
+ case 103:
+ return new Scene103(vm);
- return new Scene804(vm);
+ // Scene group #8
+ case 804:
+ return new Scene804(vm);
+
+ default:
+ error("Invalid scene %d called", scene._nextSceneId);
+ }
}
/*------------------------------------------------------------------------*/
diff --git a/engines/mads/nebular/nebular_scenes1.h b/engines/mads/nebular/nebular_scenes1.h
index 6077e1e797..0af34dfff5 100644
--- a/engines/mads/nebular/nebular_scenes1.h
+++ b/engines/mads/nebular/nebular_scenes1.h
@@ -32,7 +32,7 @@ namespace MADS {
namespace Nebular {
-class Scene1xx : protected NebularScene {
+class Scene1xx : public NebularScene {
protected:
/**
* Plays an appropriate sound when entering a scene
diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp
index d7301bb369..ba63dd3145 100644
--- a/engines/mads/palette.cpp
+++ b/engines/mads/palette.cpp
@@ -237,7 +237,8 @@ int PaletteUsage::process(Common::Array<RGB6> &palette, uint flags) {
int PaletteUsage::rgbMerge(RGB6 &palEntry) {
- return palEntry.r * 38 + palEntry.g * 76 + palEntry.b * 14;
+ return ((palEntry.r + 1) / 4 - 1) * 38 + ((palEntry.g + 1) / 4 - 1) * 76 +
+ ((palEntry.b + 1) / 4 - 1) * 14;
}
void PaletteUsage::prioritizeFromList(int lst[3]) {