diff options
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/module.mk | 1 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 90 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.h | 64 | ||||
-rw-r--r-- | engines/mads/player.cpp | 2 | ||||
-rw-r--r-- | engines/mads/player.h | 2 |
5 files changed, 157 insertions, 2 deletions
diff --git a/engines/mads/module.mk b/engines/mads/module.mk index 74376dc149..c2e269e8c1 100644 --- a/engines/mads/module.mk +++ b/engines/mads/module.mk @@ -7,6 +7,7 @@ MODULE_OBJS := \ nebular/sound_nebular.o \ nebular/nebular_scenes.o \ nebular/nebular_scenes1.o \ + nebular/nebular_scenes2.o \ nebular/nebular_scenes8.o \ action.o \ animation.o \ diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp new file mode 100644 index 0000000000..062ea93487 --- /dev/null +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -0,0 +1,90 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/scummsys.h" +#include "mads/mads.h" +#include "mads/scene.h" +#include "mads/nebular/nebular_scenes.h" +#include "mads/nebular/nebular_scenes2.h" + +namespace MADS { + +namespace Nebular { + +void Scene2xx::setAAName() { + int idx = (_scene->_nextSceneId == 216) ? 4 : 2; + _game._aaName = Resources::formatAAName(idx); +} + +void Scene2xx::setPlayerSpritesPrefix() { + _vm->_sound->command(5); + Common::String oldName = _game._player._spritesPrefix; + + switch(_scene->_nextSceneId) { + case 213: + case 216: + _game._player._spritesPrefix = ""; + break; + default: + if (_globals[0] == SEX_MALE) { + _game._player._spritesPrefix = "ROX"; + } else { + _game._player._spritesPrefix = "RXM"; + } + break; + } + + if (_scene->_nextSceneId > 212) + _game._player._unk4 = 0; + else + _game._player._unk4 = -1; + + if (oldName == _game._player._spritesPrefix) + _game._player._spritesChanged = true; + + if ((_scene->_nextSceneId == 203 || _scene->_nextSceneId == 204) && _globals[34]) + _game._v3 = 0; + + _vm->_palette->setEntry(16, 10, 63, 63); + _vm->_palette->setEntry(17, 10, 45, 45); +} + +void Scene201::setup() { +} + +void Scene201::enter() { +} + +void Scene201::step() { +} + +void Scene201::preActions() { +} + +void Scene201::actions() { +} + +void Scene201::postActions() { +} + +} // End of namespace Nebular +} // End of namespace MADS diff --git a/engines/mads/nebular/nebular_scenes2.h b/engines/mads/nebular/nebular_scenes2.h new file mode 100644 index 0000000000..32da9ea79a --- /dev/null +++ b/engines/mads/nebular/nebular_scenes2.h @@ -0,0 +1,64 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef MADS_NEBULAR_SCENES2_H +#define MADS_NEBULAR_SCENES2_H + +#include "common/scummsys.h" +#include "mads/game.h" +#include "mads/scene.h" +#include "mads/nebular/nebular_scenes.h" + +namespace MADS { + +namespace Nebular { + +class Scene2xx : public NebularScene { +protected: + /** + * Plays an appropriate sound when entering a scene + */ + void setAAName(); + + /** + * Updates the prefix used for getting player sprites for the scene + */ + void setPlayerSpritesPrefix(); +public: + Scene2xx(MADSEngine *vm) : NebularScene(vm) {} +}; + +class Scene201: public Scene2xx { +public: + Scene201(MADSEngine *vm) : Scene2xx(vm) {} + virtual void setup(); + virtual void enter(); + virtual void step(); + virtual void preActions(); + virtual void actions(); + virtual void postActions(); +}; + +} // End of namespace Nebular +} // End of namespace MADS + +#endif /* MADS_NEBULAR_SCENES2_H */ diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index ef2ce9f27c..73b8ce06ba 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -39,7 +39,7 @@ Player::Player(MADSEngine *vm): _vm(vm) { _special = 0; _ticksAmount = 0; _priorTimer = 0; - _unk3 = 0; + _unk3 = _unk4 = 0; _forceRefresh = false; } diff --git a/engines/mads/player.h b/engines/mads/player.h index 896b8d5b16..92e28896c4 100644 --- a/engines/mads/player.h +++ b/engines/mads/player.h @@ -63,7 +63,7 @@ public: int _special; int _ticksAmount; uint32 _priorTimer; - int _unk3; + int _unk3, _unk4; bool _forceRefresh; Common::String _spritesPrefix; public: |