aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorStrangerke2014-03-16 18:10:22 +0100
committerStrangerke2014-03-16 18:10:22 +0100
commit9ffaf672ff0f2d05c55db3a69af1f1cf873f4f1b (patch)
tree64838e0ac3c129ca3ec52d5685d4a65f70b54d10 /engines/mads
parent136b64db83a36f0c6ac00d52b11afba497d7c212 (diff)
downloadscummvm-rg350-9ffaf672ff0f2d05c55db3a69af1f1cf873f4f1b.tar.gz
scummvm-rg350-9ffaf672ff0f2d05c55db3a69af1f1cf873f4f1b.tar.bz2
scummvm-rg350-9ffaf672ff0f2d05c55db3a69af1f1cf873f4f1b.zip
MADS: Move setPlayerSpritesPrefix() to Scene1xx
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp29
-rw-r--r--engines/mads/nebular/nebular_scenes.h5
-rw-r--r--engines/mads/nebular/nebular_scenes1.cpp30
-rw-r--r--engines/mads/nebular/nebular_scenes1.h4
4 files changed, 33 insertions, 35 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index 085eee1bbb..6b922a45ed 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -70,35 +70,6 @@ Common::String NebularScene::formAnimName(char sepChar, int suffixNum) {
EXT_NONE, "");
}
-void NebularScene::setPlayerSpritesPrefix() {
- _vm->_sound->command(5);
- Common::String oldName = _game._player._spritesPrefix;
- if (_scene->_nextSceneId <= 103 || _scene->_nextSceneId == 111) {
- if (_globals[0] == SEX_FEMALE) {
- _game._player._spritesPrefix = "ROX";
- } else {
- _game._player._spritesPrefix = "RXM";
- _globals[0] = SEX_MALE;
- }
- } else if (_scene->_nextSceneId <= 110) {
- _game._player._spritesPrefix = "RXSW";
- _globals[0] = SEX_UNKNOWN;
- } else if (_scene->_nextSceneId == 112) {
- _game._player._spritesPrefix = "";
- }
-
- if (oldName == _game._player._spritesPrefix)
- _game._player._spritesChanged = true;
- if (_scene->_nextSceneId == 105 || (_scene->_nextSceneId == 109 && _globals[15])) {
- _game._player._spritesChanged = true;
- _game._v3 = 0;
- }
-
- _game._player._unk3 = 0;
- _vm->_palette->setEntry(16, 10, 63, 63);
- _vm->_palette->setEntry(17, 10, 45, 45);
-}
-
/*------------------------------------------------------------------------*/
void SceneInfoNebular::loadCodes(MSurface &depthSurface) {
diff --git a/engines/mads/nebular/nebular_scenes.h b/engines/mads/nebular/nebular_scenes.h
index c1dbcb8b26..5b7dd6a726 100644
--- a/engines/mads/nebular/nebular_scenes.h
+++ b/engines/mads/nebular/nebular_scenes.h
@@ -105,11 +105,6 @@ protected:
Common::String formAnimName(char sepChar, int suffixNum);
/**
- * Updates the prefix used for getting player sprites for the scene
- */
- void setPlayerSpritesPrefix();
-
- /**
* Plays appropriate sound for entering varous rooms
*/
void lowRoomsEntrySound();
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index 3d36b19c13..65787af655 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -35,7 +35,6 @@ void Scene1xx::setAAName() {
_game._aaName = Resources::formatAAName(idx);
}
-
void Scene1xx::sceneEntrySound() {
if (_vm->_musicFlag) {
switch (_scene->_nextSceneId) {
@@ -69,6 +68,35 @@ void Scene1xx::sceneEntrySound() {
}
}
+void Scene1xx::setPlayerSpritesPrefix() {
+ _vm->_sound->command(5);
+ Common::String oldName = _game._player._spritesPrefix;
+ if (_scene->_nextSceneId <= 103 || _scene->_nextSceneId == 111) {
+ if (_globals[0] == SEX_FEMALE) {
+ _game._player._spritesPrefix = "ROX";
+ } else {
+ _game._player._spritesPrefix = "RXM";
+ _globals[0] = SEX_MALE;
+ }
+ } else if (_scene->_nextSceneId <= 110) {
+ _game._player._spritesPrefix = "RXSW";
+ _globals[0] = SEX_UNKNOWN;
+ } else if (_scene->_nextSceneId == 112) {
+ _game._player._spritesPrefix = "";
+ }
+
+ if (oldName == _game._player._spritesPrefix)
+ _game._player._spritesChanged = true;
+ if (_scene->_nextSceneId == 105 || (_scene->_nextSceneId == 109 && _globals[15])) {
+ _game._player._spritesChanged = true;
+ _game._v3 = 0;
+ }
+
+ _game._player._unk3 = 0;
+ _vm->_palette->setEntry(16, 10, 63, 63);
+ _vm->_palette->setEntry(17, 10, 45, 45);
+}
+
/*------------------------------------------------------------------------*/
void Scene101::setup() {
diff --git a/engines/mads/nebular/nebular_scenes1.h b/engines/mads/nebular/nebular_scenes1.h
index 93de7c86e7..56c70b1bf8 100644
--- a/engines/mads/nebular/nebular_scenes1.h
+++ b/engines/mads/nebular/nebular_scenes1.h
@@ -44,6 +44,10 @@ protected:
*/
void setAAName();
+ /**
+ * Updates the prefix used for getting player sprites for the scene
+ */
+ void setPlayerSpritesPrefix();
public:
Scene1xx(MADSEngine *vm) : NebularScene(vm) {}
};