aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure20
-rw-r--r--engines/fullpipe/behavior.cpp20
-rw-r--r--engines/fullpipe/behavior.h10
-rw-r--r--engines/fullpipe/fullpipe.cpp10
-rw-r--r--engines/fullpipe/fullpipe.h24
-rw-r--r--engines/fullpipe/gameloader.cpp50
-rw-r--r--engines/fullpipe/gameloader.h30
-rw-r--r--engines/fullpipe/gfx.cpp4
-rw-r--r--engines/fullpipe/gfx.h6
-rw-r--r--engines/fullpipe/init.cpp2
-rw-r--r--engines/fullpipe/input.cpp14
-rw-r--r--engines/fullpipe/input.h6
-rw-r--r--engines/fullpipe/interaction.cpp40
-rw-r--r--engines/fullpipe/interaction.h10
-rw-r--r--engines/fullpipe/inventory.cpp50
-rw-r--r--engines/fullpipe/inventory.h8
-rw-r--r--engines/fullpipe/messages.cpp6
-rw-r--r--engines/fullpipe/messages.h4
-rw-r--r--engines/fullpipe/modal.cpp20
-rw-r--r--engines/fullpipe/modal.h12
-rw-r--r--engines/fullpipe/motion.cpp104
-rw-r--r--engines/fullpipe/motion.h68
-rw-r--r--engines/fullpipe/objects.h22
-rw-r--r--engines/fullpipe/scene.cpp26
-rw-r--r--engines/fullpipe/scene.h12
-rw-r--r--engines/fullpipe/scenes.cpp73
-rw-r--r--engines/fullpipe/scenes.h6
-rw-r--r--engines/fullpipe/sound.cpp2
-rw-r--r--engines/fullpipe/stateloader.cpp50
-rw-r--r--engines/fullpipe/statics.cpp16
-rw-r--r--engines/fullpipe/statics.h14
-rw-r--r--engines/fullpipe/utils.cpp92
-rw-r--r--engines/fullpipe/utils.h11
-rw-r--r--engines/sci/engine/script_patches.cpp117
-rw-r--r--engines/tsage/events.cpp5
-rw-r--r--engines/tsage/events.h1
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp207
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.h100
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.cpp242
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.h52
40 files changed, 895 insertions, 671 deletions
diff --git a/configure b/configure
index d4ee1e5a8c..9761544652 100755
--- a/configure
+++ b/configure
@@ -167,7 +167,7 @@ _windres=windres
_stagingpath="staging"
_win32path="c:/scummvm"
_aos4path="Games:ScummVM"
-_staticlibpath=/sw
+_staticlibpath=
_sdlconfig=sdl-config
_freetypeconfig=freetype-config
_sdlpath="$PATH"
@@ -2115,6 +2115,24 @@ case $_host_os in
LDFLAGS="-L${macport_prefix}/lib $LDFLAGS"
CXXFLAGS="-I${macport_prefix}/include $CXXFLAGS"
+
+ if test -z "$_staticlibpath"; then
+ _staticlibpath=${macport_prefix}
+ echo "Set staticlib-prefix to ${_staticlibpath}"
+ fi
+ fi
+ # If _staticlibpath is not set yet try first /sw (fink) then /usr/local
+ # (the macports case is handled above).
+ if test -z "$_staticlibpath"; then
+ if test -d "/sw"; then
+ _staticlibpath=/sw
+ echo "Set staticlib-prefix to ${_staticlibpath}"
+ elif test -d "/usr/local"; then
+ _staticlibpath=/usr/local
+ echo "Set staticlib-prefix to ${_staticlibpath}"
+ else
+ echo "Could not determine prefix for static libraries"
+ fi
fi
;;
dreamcast)
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index 6bfb400c24..1a2b7bb8e2 100644
--- a/engines/fullpipe/behavior.cpp
+++ b/engines/fullpipe/behavior.cpp
@@ -48,17 +48,17 @@ void BehaviorManager::clear() {
_behaviors.clear();
}
-void BehaviorManager::initBehavior(Scene *sc, CGameVar *var) {
+void BehaviorManager::initBehavior(Scene *sc, GameVar *var) {
clear();
_scene = sc;
BehaviorInfo *behinfo;
- CGameVar *behvar = var->getSubVarByName("BEHAVIOR");
+ GameVar *behvar = var->getSubVarByName("BEHAVIOR");
if (!behvar)
return;
- for (CGameVar *subvar = behvar->_subVars; subvar; subvar = subvar->_nextVarObj) {
+ for (GameVar *subvar = behvar->_subVars; subvar; subvar = subvar->_nextVarObj) {
if (!strcmp(subvar->_varName, "AMBIENT")) {
behinfo = new BehaviorInfo;
behinfo->initAmbientBehavior(subvar, sc);
@@ -191,7 +191,7 @@ void BehaviorInfo::clear() {
_bheItems.clear();
}
-void BehaviorInfo::initAmbientBehavior(CGameVar *var, Scene *sc) {
+void BehaviorInfo::initAmbientBehavior(GameVar *var, Scene *sc) {
debug(0, "BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName));
clear();
@@ -215,7 +215,7 @@ void BehaviorInfo::initAmbientBehavior(CGameVar *var, Scene *sc) {
}
}
-void BehaviorInfo::initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject *ani) {
+void BehaviorInfo::initObjectBehavior(GameVar *var, Scene *sc, StaticANIObject *ani) {
debug(0, "BehaviorInfo::initObjectBehavior(%s)", transCyrillic((byte *)var->_varName));
clear();
@@ -227,7 +227,7 @@ void BehaviorInfo::initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject
if (strcmp(var->_value.stringValue, "ROOT"))
break;
- CGameVar *v1 = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("BEHAVIOR")->getSubVarByName(ani->getName());
+ GameVar *v1 = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("BEHAVIOR")->getSubVarByName(ani->getName());
if (v1 == var)
return;
@@ -255,7 +255,7 @@ BehaviorEntry::BehaviorEntry() {
_items = 0;
}
-BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay) {
+BehaviorEntry::BehaviorEntry(GameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay) {
_staticsId = 0;
_itemsCount = 0;
@@ -274,7 +274,7 @@ BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int
_items = (BehaviorEntryInfo**)calloc(_itemsCount, sizeof(BehaviorEntryInfo *));
for (int i = 0; i < _itemsCount; i++) {
- CGameVar *subvar = var->getSubVarByIndex(i);
+ GameVar *subvar = var->getSubVarByIndex(i);
int delay;
_items[i] = new BehaviorEntryInfo(subvar, sc, &delay);
@@ -289,14 +289,14 @@ BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int
}
}
-BehaviorEntryInfo::BehaviorEntryInfo(CGameVar *subvar, Scene *sc, int *delay) {
+BehaviorEntryInfo::BehaviorEntryInfo(GameVar *subvar, Scene *sc, int *delay) {
_messageQueue = 0;
_delay = 0;
_percent = 0;
_flags = 0;
_messageQueue = sc->getMessageQueueByName(subvar->_varName);
- CGameVar *vart = subvar->getSubVarByName("dwDelay");
+ GameVar *vart = subvar->getSubVarByName("dwDelay");
if (vart)
_delay = vart->_value.intValue;
diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h
index d9375d4d01..83a548f486 100644
--- a/engines/fullpipe/behavior.h
+++ b/engines/fullpipe/behavior.h
@@ -31,7 +31,7 @@ struct BehaviorEntryInfo {
uint32 _percent;
int _flags;
- BehaviorEntryInfo(CGameVar *subvar, Scene *sc, int *delay);
+ BehaviorEntryInfo(GameVar *subvar, Scene *sc, int *delay);
};
struct BehaviorEntry {
@@ -41,7 +41,7 @@ struct BehaviorEntry {
BehaviorEntryInfo **_items;
BehaviorEntry();
- BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay);
+ BehaviorEntry(GameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay);
};
struct BehaviorInfo {
@@ -57,8 +57,8 @@ struct BehaviorInfo {
BehaviorInfo() { clear(); }
void clear();
- void initAmbientBehavior(CGameVar *var, Scene *sc);
- void initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject *ani);
+ void initAmbientBehavior(GameVar *var, Scene *sc);
+ void initObjectBehavior(GameVar *var, Scene *sc, StaticANIObject *ani);
};
class BehaviorManager : public CObject {
@@ -72,7 +72,7 @@ class BehaviorManager : public CObject {
void clear();
- void initBehavior(Scene *scene, CGameVar *var);
+ void initBehavior(Scene *scene, GameVar *var);
void updateBehaviors();
void updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry);
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 99de4dc0d4..5e1af1227c 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -236,7 +236,7 @@ void FullpipeEngine::updateEvents() {
_modalObject->update();
} else {
_modalObject->saveload();
- CBaseModalObject *obj = _modalObject->_parentObj;
+ BaseModalObject *obj = _modalObject->_parentObj;
if (obj)
delete _modalObject;
_modalObject = obj;
@@ -360,7 +360,7 @@ void FullpipeEngine::updateScreen() {
_modalObject->update();
} else {
_modalObject->saveload();
- CBaseModalObject *tmp = _modalObject->_parentObj;
+ BaseModalObject *tmp = _modalObject->_parentObj;
delete _modalObject;
@@ -389,7 +389,7 @@ void FullpipeEngine::updateScreen() {
}
int FullpipeEngine::getObjectEnumState(const char *name, const char *state) {
- CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
+ GameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
if (!var) {
var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0);
@@ -406,7 +406,7 @@ int FullpipeEngine::getObjectEnumState(const char *name, const char *state) {
}
int FullpipeEngine::getObjectState(const char *objname) {
- CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
+ GameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
if (var)
return var->getSubVarAsInt(objname);
@@ -415,7 +415,7 @@ int FullpipeEngine::getObjectState(const char *objname) {
}
void FullpipeEngine::setObjectState(const char *name, int state) {
- CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
+ GameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
if (!var) {
var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0);
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 348ac2c9c5..6872dd8356 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -44,11 +44,11 @@ enum FullpipeGameFeatures {
};
class BehaviorManager;
-class CBaseModalObject;
-class CGameLoader;
-class CGameVar;
-class CInputController;
-class CInventory2;
+class BaseModalObject;
+class GameLoader;
+class GameVar;
+class InputController;
+class Inventory2;
struct CursorInfo;
struct EntranceInfo;
class ExCommand;
@@ -98,12 +98,12 @@ public:
Graphics::Surface _backgroundSurface;
- CGameLoader *_gameLoader;
+ GameLoader *_gameLoader;
GameProject *_gameProject;
bool loadGam(const char *fname, int scene = 0);
- CGameVar *getGameLoaderGameVar();
- CInputController *getGameLoaderInputController();
+ GameVar *getGameLoaderGameVar();
+ InputController *getGameLoaderInputController();
int _gameProjectVersion;
int _pictureScale;
@@ -124,7 +124,7 @@ public:
StaticANIObject *_aniMan2;
byte *_globalPalette;
- CInputController *_inputController;
+ InputController *_inputController;
bool _inputDisabled;
int _currentCheat;
@@ -190,14 +190,14 @@ public:
int32 _mapTable[200];
Scene *_inventoryScene;
- CInventory2 *_inventory;
+ Inventory2 *_inventory;
int _currSelectedInventoryItemId;
int32 _updateTicks;
int32 _lastInputTicks;
int32 _lastButtonUpTicks;
- CBaseModalObject *_modalObject;
+ BaseModalObject *_modalObject;
int (*_updateScreenCallback)();
int (*_updateCursorCallback)();
@@ -218,7 +218,7 @@ public:
bool sceneSwitcher(EntranceInfo *entrance);
Scene *accessScene(int sceneId);
- void setSceneMusicParameters(CGameVar *var);
+ void setSceneMusicParameters(GameVar *var);
NGIArchive *_currArchive;
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 2a8f64dac9..f8ede5cff2 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -31,25 +31,25 @@
namespace Fullpipe {
-CInventory2 *getGameLoaderInventory() {
+Inventory2 *getGameLoaderInventory() {
return &g_fullpipe->_gameLoader->_inventory;
}
-CMctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId) {
+MctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId) {
for (uint i = 0; i < g_fullpipe->_gameLoader->_sc2array.size(); i++)
if (g_fullpipe->_gameLoader->_sc2array[i]._sceneId == sceneId)
- return (CMctlCompound *)g_fullpipe->_gameLoader->_sc2array[i]._motionController;
+ return (MctlCompound *)g_fullpipe->_gameLoader->_sc2array[i]._motionController;
return 0;
}
-CInteractionController *getGameLoaderInteractionController() {
+InteractionController *getGameLoaderInteractionController() {
return g_fullpipe->_gameLoader->_interactionController;
}
-CGameLoader::CGameLoader() {
- _interactionController = new CInteractionController();
- _inputController = new CInputController();
+GameLoader::GameLoader() {
+ _interactionController = new InteractionController();
+ _inputController = new InputController();
_gameProject = 0;
_gameName = 0;
@@ -74,15 +74,15 @@ CGameLoader::CGameLoader() {
g_fullpipe->_msgId = 0;
}
-CGameLoader::~CGameLoader() {
+GameLoader::~GameLoader() {
free(_gameName);
delete _gameProject;
delete _interactionController;
delete _inputController;
}
-bool CGameLoader::load(MfcArchive &file) {
- debug(5, "CGameLoader::load()");
+bool GameLoader::load(MfcArchive &file) {
+ debug(5, "GameLoader::load()");
_gameName = file.readPascalString();
debug(6, "_gameName: %s", _gameName);
@@ -124,12 +124,12 @@ bool CGameLoader::load(MfcArchive &file) {
_field_FA = file.readUint16LE();
_field_F8 = file.readUint16LE();
- _gameVar = (CGameVar *)file.readClass();
+ _gameVar = (GameVar *)file.readClass();
return true;
}
-bool CGameLoader::loadScene(int sceneId) {
+bool GameLoader::loadScene(int sceneId) {
SceneTag *st;
int idx = getSceneTagBySceneId(sceneId, &st);
@@ -155,7 +155,7 @@ bool CGameLoader::loadScene(int sceneId) {
return false;
}
-bool CGameLoader::gotoScene(int sceneId, int entranceId) {
+bool GameLoader::gotoScene(int sceneId, int entranceId) {
SceneTag *st;
int sc2idx = getSceneTagBySceneId(sceneId, &st);
@@ -181,7 +181,7 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) {
return false;
}
- CGameVar *sg = _gameVar->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME");
+ GameVar *sg = _gameVar->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME");
if (sg || (sg = _gameVar->getSubVarByName("OBJSTATES")->addSubVarAsInt("SAVEGAME", 0)) != 0)
sg->setSubVarAsInt("Entrance", entranceId);
@@ -234,7 +234,7 @@ bool preloadCallback(const PreloadItem &pre, int flag) {
return true;
}
-bool CGameLoader::preloadScene(int sceneId, int entranceId) {
+bool GameLoader::preloadScene(int sceneId, int entranceId) {
debug(0, "preloadScene(%d, %d), ", sceneId, entranceId);
if (_preloadSceneId != sceneId || _preloadEntranceId != entranceId) {
@@ -289,7 +289,7 @@ bool CGameLoader::preloadScene(int sceneId, int entranceId) {
return true;
}
-bool CGameLoader::unloadScene(int sceneId) {
+bool GameLoader::unloadScene(int sceneId) {
SceneTag *tag;
int sceneTag = getSceneTagBySceneId(sceneId, &tag);
@@ -310,7 +310,7 @@ bool CGameLoader::unloadScene(int sceneId) {
return true;
}
-int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) {
+int GameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) {
if (_sc2array.size() > 0 && _gameProject->_sceneTagList->size() > 0) {
for (uint i = 0; i < _sc2array.size(); i++) {
if (_sc2array[i]._sceneId == sceneId) {
@@ -329,11 +329,11 @@ int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) {
return -1;
}
-void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) {
+void GameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) {
if (picAniInfoCount <= 0)
return;
- debug(0, "CGameLoader::applyPicAniInfos(sc, ptr, %d)", picAniInfoCount);
+ debug(0, "GameLoader::applyPicAniInfos(sc, ptr, %d)", picAniInfoCount);
PictureObject *pict;
StaticANIObject *ani;
@@ -381,11 +381,11 @@ void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAn
}
}
-void CGameLoader::saveScenePicAniInfos(int sceneId) {
- warning("STUB: CGameLoader::saveScenePicAniInfos(%d)", sceneId);
+void GameLoader::saveScenePicAniInfos(int sceneId) {
+ warning("STUB: GameLoader::saveScenePicAniInfos(%d)", sceneId);
}
-void CGameLoader::updateSystems(int counterdiff) {
+void GameLoader::updateSystems(int counterdiff) {
if (g_fullpipe->_currentScene) {
g_fullpipe->_currentScene->update(counterdiff);
@@ -425,7 +425,7 @@ bool Sc2::load(MfcArchive &file) {
_sceneId = file.readUint16LE();
- _motionController = (CMotionController *)file.readClass();
+ _motionController = (MotionController *)file.readClass();
_count1 = file.readUint32LE();
debug(4, "count1: %d", _count1);
@@ -496,14 +496,14 @@ bool PreloadItems::load(MfcArchive &file) {
return true;
}
-CGameVar *FullpipeEngine::getGameLoaderGameVar() {
+GameVar *FullpipeEngine::getGameLoaderGameVar() {
if (_gameLoader)
return _gameLoader->_gameVar;
else
return 0;
}
-CInputController *FullpipeEngine::getGameLoaderInputController() {
+InputController *FullpipeEngine::getGameLoaderInputController() {
if (_gameLoader)
return _gameLoader->_inputController;
else
diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h
index 2f1f57a5e2..4f5462671d 100644
--- a/engines/fullpipe/gameloader.h
+++ b/engines/fullpipe/gameloader.h
@@ -30,17 +30,17 @@
namespace Fullpipe {
class SceneTag;
-class CMctlCompound;
-class CInputController;
-class CInteractionController;
-class CMotionController;
+class MctlCompound;
+class InputController;
+class InteractionController;
+class MotionController;
class Sc2 : public CObject {
public:
int16 _sceneId;
int16 _field_2;
Scene *_scene;
- CMotionController *_motionController;
+ MotionController *_motionController;
int32 *_data1; // FIXME, could be a struct
int _count1;
PicAniInfo **_defPicAniInfos;
@@ -72,10 +72,10 @@ class PreloadItems : public Common::Array<PreloadItem *>, public CObject {
virtual bool load(MfcArchive &file);
};
-class CGameLoader : public CObject {
+class GameLoader : public CObject {
public:
- CGameLoader();
- virtual ~CGameLoader();
+ GameLoader();
+ virtual ~GameLoader();
virtual bool load(MfcArchive &file);
bool loadScene(int sceneId);
@@ -90,9 +90,9 @@ class CGameLoader : public CObject {
void saveScenePicAniInfos(int sceneId);
GameProject *_gameProject;
- CInteractionController *_interactionController;
- CInputController *_inputController;
- CInventory2 _inventory;
+ InteractionController *_interactionController;
+ InputController *_inputController;
+ Inventory2 _inventory;
Sc2Array _sc2array;
void *_sceneSwitcher;
bool (*_preloadCallback)(const PreloadItem &pre, int flag);
@@ -100,7 +100,7 @@ class CGameLoader : public CObject {
int16 _field_F8;
int16 _field_FA;
PreloadItems _preloadItems;
- CGameVar *_gameVar;
+ GameVar *_gameVar;
char *_gameName;
ExCommand _exCommand;
int _updateCounter;
@@ -108,9 +108,9 @@ class CGameLoader : public CObject {
int _preloadEntranceId;
};
-CInventory2 *getGameLoaderInventory();
-CInteractionController *getGameLoaderInteractionController();
-CMctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId);
+Inventory2 *getGameLoaderInventory();
+InteractionController *getGameLoaderInteractionController();
+MctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId);
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 2ab038b74d..2e89bd6003 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -171,7 +171,7 @@ bool PictureObject::load(MfcArchive &file, bool bigPicture) {
_picture->load(file);
- _pictureObject2List = new CPtrList();
+ _pictureObject2List = new PtrList();
int count = file.readUint16LE();
@@ -325,7 +325,7 @@ void GameObject::setOXY(int x, int y) {
_oy = y;
}
-void GameObject::renumPictures(CPtrList *lst) {
+void GameObject::renumPictures(PtrList *lst) {
int *buf = (int *)calloc(lst->size() + 2, sizeof(int));
for (uint i = 0; i < lst->size(); i++) {
diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h
index 82e082d8cb..1f7284a6eb 100644
--- a/engines/fullpipe/gfx.h
+++ b/engines/fullpipe/gfx.h
@@ -137,7 +137,7 @@ class GameObject : public CObject {
virtual bool load(MfcArchive &file);
void setOXY(int x, int y);
- void renumPictures(CPtrList *lst);
+ void renumPictures(PtrList *lst);
void setFlags(int16 flags) { _flags = flags; }
void clearFlags() { _flags = 0; }
const char *getName() { return _objectName; }
@@ -149,7 +149,7 @@ class GameObject : public CObject {
class PictureObject : public GameObject {
public:
Picture *_picture;
- CPtrList *_pictureObject2List;
+ PtrList *_pictureObject2List;
int _ox2;
int _oy2;
@@ -169,7 +169,7 @@ class PictureObject : public GameObject {
class Background : public CObject {
public:
- CPtrList _picObjList;
+ PtrList _picObjList;
char *_bgname;
int _x;
diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp
index c334542247..fb60a4cc57 100644
--- a/engines/fullpipe/init.cpp
+++ b/engines/fullpipe/init.cpp
@@ -123,7 +123,7 @@ void FullpipeEngine::initObjectStates() {
}
void FullpipeEngine::setLevelStates() {
- CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
+ GameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
if (v) {
v->setSubVarAsInt(sO_Level0, 2833);
diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp
index dfd8d32168..4db0ffb49f 100644
--- a/engines/fullpipe/input.cpp
+++ b/engines/fullpipe/input.cpp
@@ -33,7 +33,7 @@
namespace Fullpipe {
-CInputController::CInputController() {
+InputController::InputController() {
g_fullpipe->_inputController = this;
_flag = 0;
@@ -52,13 +52,13 @@ CInputController::CInputController() {
_cursorItemPicture = 0;
}
-CInputController::~CInputController() {
+InputController::~InputController() {
removeMessageHandler(126, -1);
g_fullpipe->_inputController = 0;
}
-void CInputController::setInputDisabled(bool state) {
+void InputController::setInputDisabled(bool state) {
_flag = state;
g_fullpipe->_inputDisabled = state;
}
@@ -67,7 +67,7 @@ void setInputDisabled(bool state) {
g_fullpipe->_inputController->setInputDisabled(state);
}
-void CInputController::addCursor(CursorInfo *cursor) {
+void InputController::addCursor(CursorInfo *cursor) {
CursorInfo *newc = new CursorInfo(cursor);
Common::Point p;
@@ -82,14 +82,14 @@ void CInputController::addCursor(CursorInfo *cursor) {
_cursorsArray.push_back(newc);
}
-void CInputController::setCursorMode(bool enabled) {
+void InputController::setCursorMode(bool enabled) {
if (enabled)
_inputFlags |= 1;
else
_inputFlags &= ~1;
}
-void CInputController::drawCursor(int x, int y) {
+void InputController::drawCursor(int x, int y) {
if (_cursorIndex == -1)
return;
@@ -105,7 +105,7 @@ void CInputController::drawCursor(int x, int y) {
_cursorBounds.top + _cursorsArray[_cursorIndex]->itemPictureOffsY, 0, 0);
}
-void CInputController::setCursor(int cursorId) {
+void InputController::setCursor(int cursorId) {
if (_cursorIndex == -1 || _cursorsArray[_cursorIndex]->pictureId != cursorId) {
_cursorIndex = -1;
diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h
index 4b32e510e3..bfd547ae2f 100644
--- a/engines/fullpipe/input.h
+++ b/engines/fullpipe/input.h
@@ -45,7 +45,7 @@ struct CursorInfo {
typedef Common::Array<CursorInfo *> CursorsArray;
-class CInputController {
+class InputController {
//CObject obj;
int _flag;
int _inputFlags;
@@ -59,8 +59,8 @@ class CInputController {
Picture *_cursorItemPicture;
public:
- CInputController();
- ~CInputController();
+ InputController();
+ ~InputController();
void setInputDisabled(bool state);
void addCursor(CursorInfo *cursor);
diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp
index dcc7e90145..9fd42c15ae 100644
--- a/engines/fullpipe/interaction.cpp
+++ b/engines/fullpipe/interaction.cpp
@@ -39,9 +39,9 @@ bool canInteractAny(GameObject *obj1, GameObject *obj2, int invId) {
if (g_fullpipe->_currentScene)
sceneId = g_fullpipe->_currentScene->_sceneId;
- CInteractionController *intC = getGameLoaderInteractionController();
- for (CObList::iterator i = intC->_interactions.begin(); i != intC->_interactions.end(); ++i) {
- CInteraction *intr = (CInteraction *)*i;
+ InteractionController *intC = getGameLoaderInteractionController();
+ for (ObList::iterator i = intC->_interactions.begin(); i != intC->_interactions.end(); ++i) {
+ Interaction *intr = (Interaction *)*i;
if (intr->_sceneId > 0 && intr->_sceneId != sceneId)
break;
@@ -55,17 +55,17 @@ bool canInteractAny(GameObject *obj1, GameObject *obj2, int invId) {
return false;
}
-bool CInteractionController::load(MfcArchive &file) {
- debug(5, "CInteractionController::load()");
+bool InteractionController::load(MfcArchive &file) {
+ debug(5, "InteractionController::load()");
return _interactions.load(file);
}
int static_compSceneId = 0;
-bool CInteractionController::compareInteractions(const void *p1, const void *p2) {
- const CInteraction *i1 = (const CInteraction *)p1;
- const CInteraction *i2 = (const CInteraction *)p2;
+bool InteractionController::compareInteractions(const void *p1, const void *p2) {
+ const Interaction *i1 = (const Interaction *)p1;
+ const Interaction *i2 = (const Interaction *)p2;
if (i2->_sceneId < i1->_sceneId) {
if (i1->_sceneId != static_compSceneId)
@@ -89,13 +89,13 @@ bool CInteractionController::compareInteractions(const void *p1, const void *p2)
return true;
}
-void CInteractionController::sortInteractions(int sceneId) {
+void InteractionController::sortInteractions(int sceneId) {
static_compSceneId = sceneId;
- Common::sort(_interactions.begin(), _interactions.end(), CInteractionController::compareInteractions);
+ Common::sort(_interactions.begin(), _interactions.end(), InteractionController::compareInteractions);
}
-bool CInteractionController::handleInteraction(StaticANIObject *subj, GameObject *obj, int invId) {
+bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject *obj, int invId) {
if (subj) {
if (!subj->isIdle() || (subj->_flags & 0x100))
return false;
@@ -104,16 +104,16 @@ bool CInteractionController::handleInteraction(StaticANIObject *subj, GameObject
if (!_interactions.size())
return false;
- CInteraction *inter = 0;
- CInteraction *previnter = 0;
+ Interaction *inter = 0;
+ Interaction *previnter = 0;
int dur = 0;
int mindur = 0xFFFF;
MessageQueue *mq;
ExCommand *ex;
- for (CObList::iterator i = _interactions.begin(); i != _interactions.end(); ++i) {
- CInteraction *cinter = (CInteraction *)*i;
+ for (ObList::iterator i = _interactions.begin(); i != _interactions.end(); ++i) {
+ Interaction *cinter = (Interaction *)*i;
if (!cinter->canInteract(subj, obj, invId))
continue;
@@ -394,7 +394,7 @@ LABEL_38:
return true;
}
-CInteraction::CInteraction() {
+Interaction::Interaction() {
_objectId1 = 0;
_objectId2 = 0;
_staticsId1 = 0;
@@ -411,8 +411,8 @@ CInteraction::CInteraction() {
_actionName = 0;
}
-bool CInteraction::load(MfcArchive &file) {
- debug(5, "CInteraction::load()");
+bool Interaction::load(MfcArchive &file) {
+ debug(5, "Interaction::load()");
_objectId1 = file.readUint16LE();
_objectId2 = file.readUint16LE();
@@ -432,7 +432,7 @@ bool CInteraction::load(MfcArchive &file) {
return true;
}
-bool CInteraction::canInteract(GameObject *obj1, GameObject *obj2, int invId) {
+bool Interaction::canInteract(GameObject *obj1, GameObject *obj2, int invId) {
if (_sceneId > 0 && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_sceneId != _sceneId)
return false;
@@ -489,7 +489,7 @@ bool CInteraction::canInteract(GameObject *obj1, GameObject *obj2, int invId) {
return true;
}
-bool CInteraction::isOverlapping(StaticANIObject *subj, GameObject *obj) {
+bool Interaction::isOverlapping(StaticANIObject *subj, GameObject *obj) {
StaticANIObject *ani = (StaticANIObject *)obj;
if (abs(_xOffs + obj->_ox - subj->_ox) <= 1
diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h
index 28a03fb496..f968cca8ee 100644
--- a/engines/fullpipe/interaction.h
+++ b/engines/fullpipe/interaction.h
@@ -35,7 +35,7 @@ int handleObjectInteraction(StaticANIObject *subject, GameObject *object, int in
bool canInteractAny(GameObject *obj1, GameObject *obj2, int invId);
-class CInteraction : public CObject {
+class Interaction : public CObject {
public:
int16 _objectId1;
int16 _objectId2;
@@ -53,15 +53,15 @@ class CInteraction : public CObject {
char *_actionName;
public:
- CInteraction();
+ Interaction();
virtual bool load(MfcArchive &file);
bool canInteract(GameObject *obj1, GameObject *obj2, int invId);
bool isOverlapping(StaticANIObject *subj, GameObject *obj);
};
-class CInteractionController : public CObject {
+class InteractionController : public CObject {
public:
- CObList _interactions;
+ ObList _interactions;
int16 _field_20;
bool _flag24;
@@ -69,7 +69,7 @@ class CInteractionController : public CObject {
static bool compareInteractions(const void *p1, const void *p2);
public:
- CInteractionController() : _field_20(0), _flag24(true) {}
+ InteractionController() : _field_20(0), _flag24(true) {}
virtual bool load(MfcArchive &file);
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index ccedb57ce2..18ef3c4d97 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -30,8 +30,8 @@
namespace Fullpipe {
-bool CInventory::load(MfcArchive &file) {
- debug(5, "CInventory::load()");
+bool Inventory::load(MfcArchive &file) {
+ debug(5, "Inventory::load()");
_sceneId = file.readUint16LE();
int numInvs = file.readUint32LE();
@@ -52,7 +52,7 @@ bool CInventory::load(MfcArchive &file) {
return true;
}
-int CInventory::getInventoryPoolItemIndexById(int itemId) {
+int Inventory::getInventoryPoolItemIndexById(int itemId) {
if (_itemsPool.size() <= 0)
return -1;
@@ -64,7 +64,7 @@ int CInventory::getInventoryPoolItemIndexById(int itemId) {
return 0;
}
-bool CInventory::setItemFlags(int itemId, int flags) {
+bool Inventory::setItemFlags(int itemId, int flags) {
int idx = getInventoryPoolItemIndexById(itemId);
if (idx < 0)
@@ -75,7 +75,7 @@ bool CInventory::setItemFlags(int itemId, int flags) {
return true;
}
-CInventory2::CInventory2() {
+Inventory2::Inventory2() {
_selectedId = -1;
_field_48 = -1;
_scene = 0;
@@ -85,7 +85,7 @@ CInventory2::CInventory2() {
_topOffset = -65;
}
-bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartially
+bool Inventory2::loadPartial(MfcArchive &file) { // Inventory2_SerializePartially
int numInvs = file.readUint32LE();
for (int i = 0; i < numInvs; i++) {
@@ -98,27 +98,27 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia
return true;
}
-void CInventory2::addItem(int itemId, int count) {
+void Inventory2::addItem(int itemId, int count) {
if (getInventoryPoolItemIndexById(itemId) >= 0)
_inventoryItems.push_back(new InventoryItem(itemId, count));
}
-void CInventory2::addItem2(StaticANIObject *obj) {
+void Inventory2::addItem2(StaticANIObject *obj) {
if (getInventoryPoolItemIndexById(obj->_id) >= 0 && getInventoryPoolItemFieldCById(obj->_id) != 2) {
addItem(obj->_id, 1);
obj->hide();
}
}
-void CInventory2::removeItem(int itemId, int count) {
- warning("STUB: CInventory2::removeItem(%d, %d)", itemId, count);
+void Inventory2::removeItem(int itemId, int count) {
+ warning("STUB: Inventory2::removeItem(%d, %d)", itemId, count);
}
-void CInventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) {
+void Inventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) {
warning("STUB: void removeItem2(sc, %d, %d, %d, %d)", itemId, x, y, priority);
}
-int CInventory2::getCountItemsWithId(int itemId) {
+int Inventory2::getCountItemsWithId(int itemId) {
int res = 0;
for (uint i = 0; i < _inventoryItems.size(); i++) {
@@ -129,7 +129,7 @@ int CInventory2::getCountItemsWithId(int itemId) {
return res;
}
-int CInventory2::getInventoryItemIndexById(int itemId) {
+int Inventory2::getInventoryItemIndexById(int itemId) {
for (uint i = 0; i < _inventoryItems.size(); i++) {
if (_inventoryItems[i]->itemId == itemId)
return i;
@@ -138,11 +138,11 @@ int CInventory2::getInventoryItemIndexById(int itemId) {
return -1;
}
-int CInventory2::getInventoryPoolItemIdAtIndex(int itemId) {
+int Inventory2::getInventoryPoolItemIdAtIndex(int itemId) {
return _itemsPool[itemId]->id;
}
-int CInventory2::getInventoryPoolItemFieldCById(int itemId) {
+int Inventory2::getInventoryPoolItemFieldCById(int itemId) {
for (uint i = 0; i < _itemsPool.size(); i++) {
if (_itemsPool[i]->id == itemId)
return _itemsPool[i]->field_C;
@@ -151,7 +151,7 @@ int CInventory2::getInventoryPoolItemFieldCById(int itemId) {
return 0;
}
-int CInventory2::getItemFlags(int itemId) {
+int Inventory2::getItemFlags(int itemId) {
int idx = getInventoryPoolItemIndexById(itemId);
if (idx < 0)
@@ -160,7 +160,7 @@ int CInventory2::getItemFlags(int itemId) {
return _itemsPool[idx]->flags;
}
-void CInventory2::rebuildItemRects() {
+void Inventory2::rebuildItemRects() {
_scene = g_fullpipe->accessScene(_sceneId);
if (!_scene)
@@ -222,7 +222,7 @@ void CInventory2::rebuildItemRects() {
}
}
-void CInventory2::draw() {
+void Inventory2::draw() {
if (!_scene)
return;
@@ -295,7 +295,7 @@ reset:
}
-void CInventory2::slideIn() {
+void Inventory2::slideIn() {
_isInventoryOut = false;
ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0);
@@ -307,7 +307,7 @@ void CInventory2::slideIn() {
ex->postMessage();
}
-void CInventory2::slideOut() {
+void Inventory2::slideOut() {
_isInventoryOut = true;
ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0);
@@ -319,7 +319,7 @@ void CInventory2::slideOut() {
ex->postMessage();
}
-bool CInventory2::handleLeftClick(ExCommand *cmd) {
+bool Inventory2::handleLeftClick(ExCommand *cmd) {
if (!_isInventoryOut)
return false;
@@ -353,7 +353,7 @@ bool CInventory2::handleLeftClick(ExCommand *cmd) {
return res;
}
-int CInventory2::selectItem(int itemId) {
+int Inventory2::selectItem(int itemId) {
if (getInventoryItemIndexById(itemId) < 0)
return -1;
@@ -371,7 +371,7 @@ int CInventory2::selectItem(int itemId) {
return _selectedId;
}
-bool CInventory2::unselectItem(bool flag) {
+bool Inventory2::unselectItem(bool flag) {
if (_selectedId < 0)
return false;
@@ -387,7 +387,7 @@ bool CInventory2::unselectItem(bool flag) {
return true;
}
-int CInventory2::getHoveredItem(Common::Point *point) {
+int Inventory2::getHoveredItem(Common::Point *point) {
int selId = getSelectedItemId();
if (point->y <= 20 && !_isInventoryOut && !_isLocked)
@@ -422,7 +422,7 @@ int CInventory2::getHoveredItem(Common::Point *point) {
}
void FullpipeEngine::getAllInventory() {
- CInventory2 *inv = getGameLoaderInventory();
+ Inventory2 *inv = getGameLoaderInventory();
for (uint i = 0; i < inv->getItemsPoolCount(); ++i ) {
int id = inv->getInventoryPoolItemIdAtIndex(i);
diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h
index 5f1030398c..6d07f069bd 100644
--- a/engines/fullpipe/inventory.h
+++ b/engines/fullpipe/inventory.h
@@ -42,13 +42,13 @@ struct InventoryPoolItem {
typedef Common::Array<InventoryPoolItem *> InventoryPoolItems;
-class CInventory : public CObject {
+class Inventory : public CObject {
protected:
int16 _sceneId;
InventoryPoolItems _itemsPool;
public:
- CInventory() { _sceneId = 0; }
+ Inventory() { _sceneId = 0; }
virtual bool load(MfcArchive &file);
int getInventoryPoolItemIndexById(int itemId);
@@ -83,7 +83,7 @@ struct InventoryIcon {
typedef Common::Array<InventoryIcon *> InventoryIcons;
-class CInventory2 : public CInventory {
+class Inventory2 : public Inventory {
InventoryItems _inventoryItems;
InventoryIcons _inventoryIcons;
int _selectedId;
@@ -95,7 +95,7 @@ class CInventory2 : public CInventory {
BigPicture *_picture;
public:
- CInventory2();
+ Inventory2();
bool loadPartial(MfcArchive &file);
void addItem(int itemId, int count);
void addItem2(StaticANIObject *obj);
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 36fd1399ce..e74aae0ddb 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -169,13 +169,13 @@ Message::Message(int16 parentId, int messageKind, int x, int y, int a6, int a7,
_field_34 = 0;
}
-CObjstateCommand::CObjstateCommand() {
+ObjstateCommand::ObjstateCommand() {
_value = 0;
_objCommandName = 0;
}
-bool CObjstateCommand::load(MfcArchive &file) {
- debug(5, "CObjStateCommand::load()");
+bool ObjstateCommand::load(MfcArchive &file) {
+ debug(5, "ObjStateCommand::load()");
_objtype = kObjTypeObjstateCommand;
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index 7ba9126d46..5ae94b9cef 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -82,14 +82,14 @@ class ExCommand2 : public ExCommand {
int _pointsSize;
};
-class CObjstateCommand : public CObject {
+class ObjstateCommand : public CObject {
public:
ExCommand _cmd;
char *_objCommandName;
int _value;
public:
- CObjstateCommand();
+ ObjstateCommand();
virtual bool load(MfcArchive &file);
};
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 6f1bc0cc1f..26048ced13 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -28,30 +28,30 @@
namespace Fullpipe {
-bool CBaseModalObject::handleMessage(ExCommand *message) {
- warning("STUB: CBaseModalObject::handleMessage()");
+bool BaseModalObject::handleMessage(ExCommand *message) {
+ warning("STUB: BaseModalObject::handleMessage()");
return true;
}
-bool CBaseModalObject::init(int counterdiff) {
- warning("STUB: CBaseModalObject::init(%d)", counterdiff);
+bool BaseModalObject::init(int counterdiff) {
+ warning("STUB: BaseModalObject::init(%d)", counterdiff);
return true;
}
-bool CBaseModalObject::update() {
- warning("STUB: CBaseModalObject::update()");
+bool BaseModalObject::update() {
+ warning("STUB: BaseModalObject::update()");
return true;
}
-void CBaseModalObject::saveload() {
- warning("STUB: CBaseModalObject::saveload()");
+void BaseModalObject::saveload() {
+ warning("STUB: BaseModalObject::saveload()");
}
-CModalIntro::CModalIntro() {
+ModalIntro::ModalIntro() {
_field_8 = 0;
_countDown = 0;
_needRedraw = 0;
@@ -68,7 +68,7 @@ CModalIntro::CModalIntro() {
_sfxVolume = g_fullpipe->_sfxVolume;
}
-bool CModalIntro::handleMessage(ExCommand *message) {
+bool ModalIntro::handleMessage(ExCommand *message) {
if (message->_messageKind != 17)
return false;
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 73236e8e5b..7d98427e20 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -25,14 +25,14 @@
namespace Fullpipe {
-class CBaseModalObject {
+class BaseModalObject {
public:
- CBaseModalObject *_parentObj;
+ BaseModalObject *_parentObj;
public:
- CBaseModalObject() : _parentObj(0) {}
- virtual ~CBaseModalObject() {}
+ BaseModalObject() : _parentObj(0) {}
+ virtual ~BaseModalObject() {}
virtual bool handleMessage(ExCommand *message);
virtual bool init(int counterdiff);
@@ -41,7 +41,7 @@ class CBaseModalObject {
void saveload();
};
-class CModalIntro : public CBaseModalObject {
+class ModalIntro : public BaseModalObject {
int _field_8;
int _introFlags;
int _countDown;
@@ -49,7 +49,7 @@ class CModalIntro : public CBaseModalObject {
int _sfxVolume;
public:
- CModalIntro();
+ ModalIntro();
virtual bool handleMessage(ExCommand *message);
};
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 514dde5185..022eef87be 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -28,34 +28,35 @@
#include "fullpipe/objects.h"
#include "fullpipe/motion.h"
+#include "fullpipe/messages.h"
namespace Fullpipe {
-bool CMotionController::load(MfcArchive &file) {
+bool MotionController::load(MfcArchive &file) {
// Is originally empty file.readClass();
- debug(5, "CMotionController::load()");
+ debug(5, "MotionController::load()");
return true;
}
-bool CMctlCompound::load(MfcArchive &file) {
- debug(5, "CMctlCompound::load()");
+bool MctlCompound::load(MfcArchive &file) {
+ debug(5, "MctlCompound::load()");
int count = file.readUint32LE();
- debug(6, "CMctlCompound::count = %d", count);
+ debug(6, "MctlCompound::count = %d", count);
for (int i = 0; i < count; i++) {
debug(6, "CompoundArray[%d]", i);
- CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass();
+ MctlCompoundArrayItem *obj = (MctlCompoundArrayItem *)file.readClass();
int count1 = file.readUint32LE();
debug(6, "ConnectionPoint::count: %d", count1);
for (int j = 0; j < count1; j++) {
debug(6, "ConnectionPoint[%d]", j);
- CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass();
+ MctlConnectionPoint *obj1 = (MctlConnectionPoint *)file.readClass();
obj->_connectionPoints.push_back(*obj1);
}
@@ -64,7 +65,7 @@ bool CMctlCompound::load(MfcArchive &file) {
obj->_field_24 = file.readUint32LE();
debug(6, "graphReact");
- obj->_movGraphReactObj = (CMovGraphReact *)file.readClass();
+ obj->_movGraphReactObj = (MovGraphReact *)file.readClass();
_motionControllers.push_back(*obj);
}
@@ -72,49 +73,53 @@ bool CMctlCompound::load(MfcArchive &file) {
return true;
}
-void CMctlCompound::addObject(StaticANIObject *obj) {
- warning("STUB: CMctlCompound::addObject()");
+void MctlCompound::addObject(StaticANIObject *obj) {
+ warning("STUB: MctlCompound::addObject()");
}
-void CMctlCompound::initMovGraph2() {
- warning("STUB: CMctlCompound::initMovGraph2()");
+void MctlCompound::initMovGraph2() {
+ warning("STUB: MctlCompound::initMovGraph2()");
}
-MessageQueue *CMctlCompound::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
- warning("STUB: CMctlCompound::method34()");
+MessageQueue *MctlCompound::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
+ warning("STUB: MctlCompound::method34()");
return 0;
}
-MessageQueue *CMctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
- warning("STUB: CMctlCompound::method4C()");
+MessageQueue *MctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
+ warning("STUB: MctlCompound::method4C()");
return 0;
}
-bool CMctlCompoundArray::load(MfcArchive &file) {
- debug(5, "CMctlCompoundArray::load()");
+bool MctlCompoundArray::load(MfcArchive &file) {
+ debug(5, "MctlCompoundArray::load()");
int count = file.readUint32LE();
- debug(0, "CMctlCompoundArray::count = %d", count);
+ debug(0, "MctlCompoundArray::count = %d", count);
assert(0);
return true;
}
-CMovGraph::CMovGraph() {
- warning("STUB: CMovGraph::CMovGraph()");
+int MovGraph_messageHandler(ExCommand *cmd);
+
+MovGraph::MovGraph() {
+ warning("STUB: MovGraph::MovGraph()");
_itemsCount = 0;
_items = 0;
- //_callback1 = CMovGraphCallback1; // TODO
+ //_callback1 = MovGraphCallback1; // TODO
_field_44 = 0;
- // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129);
+ insertMessageHandler(MovGraph_messageHandler, getMessageHandlersCount() - 1, 129);
+
+ _objtype = kObjTypeMovGraph;
}
-bool CMovGraph::load(MfcArchive &file) {
- debug(5, "CMovGraph::load()");
+bool MovGraph::load(MfcArchive &file) {
+ debug(5, "MovGraph::load()");
_links.load(file);
_nodes.load(file);
@@ -122,11 +127,24 @@ bool CMovGraph::load(MfcArchive &file) {
return true;
}
-void CMovGraph::addObject(StaticANIObject *obj) {
- warning("STUB: CMovGraph::addObject()");
+void MovGraph::addObject(StaticANIObject *obj) {
+ warning("STUB: MovGraph::addObject()");
+}
+
+double MovGraph::calcDistance(Common::Point *point, MovGraphLink *link, int flag) {
+ warning("STUB: MovGraph::calcDistance()");
+
+ return 0;
}
-CMovGraphLink::CMovGraphLink() {
+MovGraphNode *MovGraph::calcOffset(int ox, int oy) {
+ warning("STUB: MovGraph::calcOffset()");
+
+ return 0;
+}
+
+
+MovGraphLink::MovGraphLink() {
_distance = 0;
_angle = 0;
_flags = 0x10000000;
@@ -138,8 +156,8 @@ CMovGraphLink::CMovGraphLink() {
_name = 0;
}
-bool CMovGraphLink::load(MfcArchive &file) {
- debug(5, "CMovGraphLink::load()");
+bool MovGraphLink::load(MfcArchive &file) {
+ debug(5, "MovGraphLink::load()");
_dwordArray1.load(file);
_dwordArray2.load(file);
@@ -147,23 +165,23 @@ bool CMovGraphLink::load(MfcArchive &file) {
_flags = file.readUint32LE();
debug(8, "GraphNode1");
- _movGraphNode1 = (CMovGraphNode *)file.readClass();
+ _movGraphNode1 = (MovGraphNode *)file.readClass();
debug(8, "GraphNode2");
- _movGraphNode2 = (CMovGraphNode *)file.readClass();
+ _movGraphNode2 = (MovGraphNode *)file.readClass();
_distance = file.readDouble();
_angle = file.readDouble();
debug(8, "distance: %g, angle: %g", _distance, _angle);
- _movGraphReact = (CMovGraphReact *)file.readClass();
+ _movGraphReact = (MovGraphReact *)file.readClass();
_name = file.readPascalString();
return true;
}
-bool CMovGraphNode::load(MfcArchive &file) {
- debug(5, "CMovGraphNode::load()");
+bool MovGraphNode::load(MfcArchive &file) {
+ debug(5, "MovGraphNode::load()");
_field_14 = file.readUint32LE();
_x = file.readUint32LE();
@@ -173,7 +191,7 @@ bool CMovGraphNode::load(MfcArchive &file) {
return true;
}
-CReactParallel::CReactParallel() {
+ReactParallel::ReactParallel() {
_x1 = 0;
_x2 = 0;
_dy = 0;
@@ -183,8 +201,8 @@ CReactParallel::CReactParallel() {
_y2 = 0;
}
-bool CReactParallel::load(MfcArchive &file) {
- debug(5, "CReactParallel::load()");
+bool ReactParallel::load(MfcArchive &file) {
+ debug(5, "ReactParallel::load()");
_x1 = file.readUint32LE();
_y1 = file.readUint32LE();
@@ -198,7 +216,7 @@ bool CReactParallel::load(MfcArchive &file) {
return true;
}
-void CReactParallel::createRegion() {
+void ReactParallel::createRegion() {
_points = (Common::Point **)malloc(sizeof(Common::Point *) * 4);
for (int i = 0; i < 4; i++)
@@ -223,15 +241,15 @@ void CReactParallel::createRegion() {
// GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2);
}
-CReactPolygonal::CReactPolygonal() {
+ReactPolygonal::ReactPolygonal() {
_field_C = 0;
_points = 0;
_pointCount = 0;
_field_10 = 0;
}
-bool CReactPolygonal::load(MfcArchive &file) {
- debug(5, "CReactPolygonal::load()");
+bool ReactPolygonal::load(MfcArchive &file) {
+ debug(5, "ReactPolygonal::load()");
_field_C = file.readUint32LE();
_field_10 = file.readUint32LE();
@@ -254,7 +272,7 @@ bool CReactPolygonal::load(MfcArchive &file) {
return true;
}
-void CReactPolygonal::createRegion() {
+void ReactPolygonal::createRegion() {
if (_points) {
// GdiObject::Attach(_rgn, CreatePolygonRgn(_points, _pointCount, 2);
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 85a52918f0..e692c01726 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -29,13 +29,13 @@ int startWalkTo(int objId, int objKey, int x, int y, int a5);
int doSomeAnimation(int objId, int objKey, int a3);
int doSomeAnimation2(int objId, int objKey);
-class CMotionController : public CObject {
+class MotionController : public CObject {
public:
int _field_4;
bool _isEnabled;
public:
- CMotionController() : _isEnabled(true) {}
+ MotionController() : _isEnabled(true) {}
virtual bool load(MfcArchive &file);
void setEnabled() { _isEnabled = true; }
@@ -45,18 +45,18 @@ class CMotionController : public CObject {
virtual void freeItems() {}
};
-class CMctlCompoundArray : public Common::Array<CObject>, public CObject {
+class MctlCompoundArray : public Common::Array<CObject>, public CObject {
public:
virtual bool load(MfcArchive &file);
};
-class CMctlConnectionPointsArray : public Common::Array<CObject>, public CObject {
+class MctlConnectionPointsArray : public Common::Array<CObject>, public CObject {
public:
virtual bool load(MfcArchive &file);
};
-class CMctlCompound : public CMotionController {
- CMctlCompoundArray _motionControllers;
+class MctlCompound : public MotionController {
+ MctlCompoundArray _motionControllers;
public:
virtual bool load(MfcArchive &file);
@@ -76,7 +76,8 @@ class Unk2 : public CObject {
Unk2() : _items(0), _count(0) {}
};
-class CMovGraphNode : public CObject {
+class MovGraphNode : public CObject {
+ public:
int _x;
int _y;
int _distance;
@@ -84,30 +85,30 @@ class CMovGraphNode : public CObject {
int _field_14;
public:
- CMovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {}
+ MovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {}
virtual bool load(MfcArchive &file);
};
-class CMovGraphReact : public CObject {
+class MovGraphReact : public CObject {
// Empty
};
-class CMctlCompoundArrayItem : public CObject {
- friend class CMctlCompound;
+class MctlCompoundArrayItem : public CObject {
+ friend class MctlCompound;
protected:
- CMotionController *_motionControllerObj;
- CMovGraphReact *_movGraphReactObj;
- CMctlConnectionPointsArray _connectionPoints;
+ MotionController *_motionControllerObj;
+ MovGraphReact *_movGraphReactObj;
+ MctlConnectionPointsArray _connectionPoints;
int _field_20;
int _field_24;
int _field_28;
public:
- CMctlCompoundArrayItem() : _movGraphReactObj(0) {}
+ MctlCompoundArrayItem() : _movGraphReactObj(0) {}
};
-class CReactParallel : public CMovGraphReact {
+class ReactParallel : public MovGraphReact {
//CRgn _rgn;
int _x1;
int _y1;
@@ -118,12 +119,12 @@ class CReactParallel : public CMovGraphReact {
Common::Point **_points;
public:
- CReactParallel();
+ ReactParallel();
virtual bool load(MfcArchive &file);
void createRegion();
};
-class CReactPolygonal : public CMovGraphReact {
+class ReactPolygonal : public MovGraphReact {
//CRgn _rgn;
int _field_C;
int _field_10;
@@ -131,32 +132,34 @@ class CReactPolygonal : public CMovGraphReact {
Common::Point **_points;
public:
- CReactPolygonal();
+ ReactPolygonal();
virtual bool load(MfcArchive &file);
void createRegion();
};
-class CMovGraphLink : public CObject {
- CMovGraphNode *_movGraphNode1;
- CMovGraphNode *_movGraphNode2;
- CDWordArray _dwordArray1;
- CDWordArray _dwordArray2;
+class MovGraphLink : public CObject {
+ public:
+ MovGraphNode *_movGraphNode1;
+ MovGraphNode *_movGraphNode2;
+ DWordArray _dwordArray1;
+ DWordArray _dwordArray2;
int _flags;
int _field_38;
int _field_3C;
double _distance;
double _angle;
- CMovGraphReact *_movGraphReact;
+ MovGraphReact *_movGraphReact;
char *_name;
public:
- CMovGraphLink();
+ MovGraphLink();
virtual bool load(MfcArchive &file);
};
-class CMovGraph : public CMotionController {
- CObList _nodes;
- CObList _links;
+class MovGraph : public MotionController {
+ public:
+ ObList _nodes;
+ ObList _links;
int _field_44;
int _items;
int _itemsCount;
@@ -164,13 +167,16 @@ class CMovGraph : public CMotionController {
Unk2 _unk2;
public:
- CMovGraph();
+ MovGraph();
virtual bool load(MfcArchive &file);
virtual void addObject(StaticANIObject *obj);
+
+ double calcDistance(Common::Point *point, MovGraphLink *link, int flag);
+ MovGraphNode *calcOffset(int ox, int oy);
};
-class CMctlConnectionPoint : public CObject {
+class MctlConnectionPoint : public CObject {
int _connectionX;
int _connectionY;
int _field_C;
diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h
index 9e7c7531a7..a12851e63b 100644
--- a/engines/fullpipe/objects.h
+++ b/engines/fullpipe/objects.h
@@ -69,27 +69,27 @@ union VarValue {
char *stringValue;
};
-class CGameVar : public CObject {
+class GameVar : public CObject {
public:
- CGameVar *_nextVarObj;
- CGameVar *_prevVarObj;
- CGameVar *_parentVarObj;
- CGameVar *_subVars;
- CGameVar *_field_14;
+ GameVar *_nextVarObj;
+ GameVar *_prevVarObj;
+ GameVar *_parentVarObj;
+ GameVar *_subVars;
+ GameVar *_field_14;
char *_varName;
VarValue _value;
int _varType;
public:
- CGameVar();
+ GameVar();
virtual bool load(MfcArchive &file);
- CGameVar *getSubVarByName(const char *name);
+ GameVar *getSubVarByName(const char *name);
bool setSubVarAsInt(const char *name, int value);
int getSubVarAsInt(const char *name);
- CGameVar *addSubVarAsInt(const char *name, int value);
- bool addSubVar(CGameVar *subvar);
+ GameVar *addSubVarAsInt(const char *name, int value);
+ bool addSubVar(GameVar *subvar);
int getSubVarsCount();
- CGameVar *getSubVarByIndex(int idx);
+ GameVar *getSubVarByIndex(int idx);
};
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 6ac062fb37..0ea724fbed 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -259,7 +259,7 @@ void Scene::init() {
if (_staticANIObjectList2.size() != _staticANIObjectList1.size()) {
_staticANIObjectList2.clear();
- for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s)
+ for (PtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s)
_staticANIObjectList2.push_back(*s);
}
}
@@ -273,7 +273,7 @@ StaticANIObject *Scene::getAniMan() {
}
StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) {
- for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) {
+ for (PtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) {
StaticANIObject *o = (StaticANIObject *)*s;
if (o->_id == obj && (a3 == -1 || o->_okeyCode == a3))
return o;
@@ -371,16 +371,16 @@ MessageQueue *Scene::getMessageQueueByName(char *name) {
return 0;
}
-void Scene::preloadMovements(CGameVar *var) {
- CGameVar *preload = var->getSubVarByName("PRELOAD");
+void Scene::preloadMovements(GameVar *var) {
+ GameVar *preload = var->getSubVarByName("PRELOAD");
if (!preload)
return;
- for (CGameVar *i = preload->_subVars; i; i = i->_nextVarObj) {
+ for (GameVar *i = preload->_subVars; i; i = i->_nextVarObj) {
StaticANIObject *ani = getStaticANIObject1ByName(i->_varName, -1);
if (ani) {
- CGameVar *subVars = i->_subVars;
+ GameVar *subVars = i->_subVars;
if (subVars) {
for (;subVars; subVars = subVars->_nextVarObj) {
@@ -397,7 +397,7 @@ void Scene::preloadMovements(CGameVar *var) {
}
void Scene::initObjectCursors(const char *varname) {
- CGameVar *cursorsVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(varname)->getSubVarByName("CURSORS");
+ GameVar *cursorsVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(varname)->getSubVarByName("CURSORS");
if (!cursorsVar || !cursorsVar->_subVars)
return;
@@ -405,7 +405,7 @@ void Scene::initObjectCursors(const char *varname) {
int maxId = 0;
int minId = 0xffff;
- for (CGameVar *sub = cursorsVar->_subVars; sub; sub = sub->_nextVarObj) {
+ for (GameVar *sub = cursorsVar->_subVars; sub; sub = sub->_nextVarObj) {
GameObject *obj = getPictureObjectByName(sub->_varName, -1);
if (obj || (obj = getStaticANIObject1ByName(sub->_varName, -1)) != 0) {
@@ -421,7 +421,7 @@ void Scene::initObjectCursors(const char *varname) {
g_fullpipe->_objectIdCursors.resize(maxId - minId + 1);
- for (CGameVar *sub = cursorsVar->_subVars; sub; sub = sub->_nextVarObj) {
+ for (GameVar *sub = cursorsVar->_subVars; sub; sub = sub->_nextVarObj) {
GameObject *obj = getPictureObjectByName(sub->_varName, -1);
if (!obj)
@@ -441,7 +441,7 @@ bool Scene::compareObjPriority(const void *p1, const void *p2) {
return false;
}
-void Scene::objectList_sortByPriority(CPtrList &list) {
+void Scene::objectList_sortByPriority(PtrList &list) {
Common::sort(list.begin(), list.end(), Scene::compareObjPriority);
}
@@ -453,12 +453,12 @@ void Scene::draw() {
objectList_sortByPriority(_staticANIObjectList2);
- for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) {
+ for (PtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) {
((StaticANIObject *)*s)->draw2();
}
int priority = -1;
- for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) {
+ for (PtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) {
drawContent(((StaticANIObject *)*s)->_priority, priority, false);
((StaticANIObject *)*s)->draw();
@@ -526,7 +526,7 @@ int Scene::getPictureObjectIdAtPos(int x, int y) {
void Scene::update(int counterdiff) {
debug(0, "Scene::update(%d)", counterdiff);
- for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s)
+ for (PtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s)
((StaticANIObject *)*s)->update(counterdiff);
}
diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h
index c1c8d47ba8..7fe3b9363d 100644
--- a/engines/fullpipe/scene.h
+++ b/engines/fullpipe/scene.h
@@ -31,10 +31,10 @@ class MessageQueue;
class Scene : public Background {
public:
- CPtrList _staticANIObjectList1;
- CPtrList _staticANIObjectList2;
- CPtrList _messageQueueList;
- CPtrList _faObjectList;
+ PtrList _staticANIObjectList1;
+ PtrList _staticANIObjectList2;
+ PtrList _messageQueueList;
+ PtrList _faObjectList;
Shadows *_shadows;
SoundList *_soundList;
int16 _sceneId;
@@ -69,7 +69,7 @@ class Scene : public Background {
PictureObject *getPictureObjectById(int objId, int flags);
PictureObject *getPictureObjectByName(const char *name, int keyCode);
void deletePictureObject(PictureObject *obj);
- void preloadMovements(CGameVar *var);
+ void preloadMovements(GameVar *var);
StaticANIObject *getStaticANIObjectAtPos(int x, int y);
PictureObject *getPictureObjectAtPos(int x, int y);
@@ -79,7 +79,7 @@ class Scene : public Background {
private:
static bool compareObjPriority(const void *p1, const void *p2);
- void objectList_sortByPriority(CPtrList &list);
+ void objectList_sortByPriority(PtrList &list);
};
class SceneTag : public CObject {
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index c9cdc0a3d8..d66291d9fc 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -75,7 +75,7 @@ Vars::Vars() {
}
bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
- CGameVar *sceneVar;
+ GameVar *sceneVar;
Common::Point sceneDim;
Scene *scene = accessScene(entrance->_sceneId);
@@ -139,7 +139,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
if (_aniMan) {
_aniMan2 = _aniMan;
- CMctlCompound *cmp = getSc2MctlCompoundBySceneId(entrance->_sceneId);
+ MctlCompound *cmp = getSc2MctlCompoundBySceneId(entrance->_sceneId);
cmp->initMovGraph2();
cmp->addObject(_aniMan);
cmp->setEnabled();
@@ -151,7 +151,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
scene->setPictureObjectsFlag4();
- for (CPtrList::iterator s = scene->_staticANIObjectList1.begin(); s != scene->_staticANIObjectList1.end(); ++s) {
+ for (PtrList::iterator s = scene->_staticANIObjectList1.begin(); s != scene->_staticANIObjectList1.end(); ++s) {
StaticANIObject *o = (StaticANIObject *)*s;
o->setFlags(o->_flags & 0xFE7F);
}
@@ -657,7 +657,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
}
void setElevatorButton(const char *name, int state) {
- CGameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
+ GameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
if (var)
var->setSubVarAsInt(name, state);
@@ -1076,7 +1076,7 @@ int global_messageHandler3(ExCommand *cmd) {
return doSomeAnimation2(cmd->_parentId, cmd->_keyCode);
case 63:
if (cmd->_objtype == kObjTypeObjstateCommand) {
- CObjstateCommand *c = (CObjstateCommand *)cmd;
+ ObjstateCommand *c = (ObjstateCommand *)cmd;
result = 1;
g_fullpipe->setObjectState(c->_objCommandName, c->_value);
}
@@ -1313,6 +1313,63 @@ int global_messageHandler4(ExCommand *cmd) {
return 1;
}
+int MovGraph_messageHandler(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return 0;
+
+ if (cmd->_messageNum != 33)
+ return 0;
+
+ StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1);
+
+ if (!getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId))
+ return 0;
+
+ if (getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->_objtype != kObjTypeMovGraph || !ani)
+ return 0;
+
+ MovGraph *gr = (MovGraph *)getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId);
+
+ MovGraphLink *link = 0;
+ double mindistance = 1.0e10;
+ Common::Point point;
+
+ for (ObList::iterator i = gr->_links.begin(); i != gr->_links.end(); ++i) {
+ point.x = ani->_ox;
+ point.y = ani->_oy;
+
+ double dst = gr->calcDistance(&point, (MovGraphLink *)(*i), 0);
+ if (dst >= 0.0 && dst < mindistance) {
+ mindistance = dst;
+ link = (MovGraphLink *)(*i);
+ }
+ }
+
+ int top;
+
+ if (link) {
+ MovGraphNode *node = link->_movGraphNode1;
+
+ double sq = (ani->_oy - node->_y) * (ani->_oy - node->_y) + (ani->_ox - node->_x) * (ani->_ox - node->_x);
+ int off = (node->_field_14 >> 16) & 0xFF;
+ double off2 = (link->_movGraphNode2->_field_14 >> 8) & 0xff - off;
+
+ top = off + (int)(sqrt(sq) * off2 / link->_distance);
+ } else {
+ top = (gr->calcOffset(ani->_ox, ani->_oy)->_field_14 >> 8) & 0xff;
+ }
+
+ if (ani->_movement) {
+ ani->_movement->_currDynamicPhase->_rect->top = 255 - top;
+ return 0;
+ }
+
+ if (ani->_statics)
+ ani->_statics->_rect->top = 255 - top;
+
+ return 0;
+}
+
int defaultUpdateCursor() {
g_fullpipe->updateCursorsCommon();
@@ -1326,7 +1383,7 @@ int sceneIntro_updateCursor() {
}
void FullpipeEngine::setSwallowedEggsState() {
- CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs);
+ GameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs);
g_vars->swallowedEgg1 = v->getSubVarByName(sO_Egg1);
g_vars->swallowedEgg2 = v->getSubVarByName(sO_Egg2);
@@ -1349,7 +1406,7 @@ void sceneIntro_initScene(Scene *sc) {
if (g_fullpipe->_recordEvents || g_fullpipe->_inputArFlag)
g_vars->sceneIntro_skipIntro = false;
- g_fullpipe->_modalObject = new CModalIntro;
+ g_fullpipe->_modalObject = new ModalIntro;
}
int sceneHandlerIntro(ExCommand *cmd) {
@@ -1359,7 +1416,7 @@ int sceneHandlerIntro(ExCommand *cmd) {
}
void scene01_fixEntrance() {
- CGameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME");
+ GameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME");
if (var->getSubVarAsInt("Entrance") == TrubaLeft)
var->setSubVarAsInt("Entrance", TrubaRight);
}
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index be42838920..5597612aa6 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -31,9 +31,9 @@ class Vars {
public:
Vars();
- CGameVar *swallowedEgg1;
- CGameVar *swallowedEgg2;
- CGameVar *swallowedEgg3;
+ GameVar *swallowedEgg1;
+ GameVar *swallowedEgg2;
+ GameVar *swallowedEgg3;
StaticANIObject *sceneIntro_aniin1man;
bool sceneIntro_needSleep;
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index 821049cd0f..6da848a621 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -111,7 +111,7 @@ void Sound::setPanAndVolumeByStaticAni() {
debug(3, "STUB Sound::setPanAndVolumeByStaticAni()");
}
-void FullpipeEngine::setSceneMusicParameters(CGameVar *var) {
+void FullpipeEngine::setSceneMusicParameters(GameVar *var) {
warning("STUB: FullpipeEngine::setSceneMusicParameters()");
}
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 4c58d564dd..747015e9a1 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -37,7 +37,7 @@
namespace Fullpipe {
bool FullpipeEngine::loadGam(const char *fname, int scene) {
- _gameLoader = new CGameLoader();
+ _gameLoader = new GameLoader();
if (!_gameLoader->loadFile(fname))
return false;
@@ -54,7 +54,7 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) {
_inventory->rebuildItemRects();
- for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) {
+ for (PtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) {
((MemoryObject *)((PictureObject *)*p)->_picture)->load();
}
@@ -145,7 +145,7 @@ GameProject::~GameProject() {
free(_headerFilename);
}
-CGameVar::CGameVar() {
+GameVar::GameVar() {
_subVars = 0;
_parentVarObj = 0;
_nextVarObj = 0;
@@ -156,7 +156,7 @@ CGameVar::CGameVar() {
_varName = 0;
}
-bool CGameVar::load(MfcArchive &file) {
+bool GameVar::load(MfcArchive &file) {
_varName = file.readPascalString();
_varType = file.readUint32LE();
@@ -184,18 +184,18 @@ bool CGameVar::load(MfcArchive &file) {
}
file.incLevel();
- _parentVarObj = (CGameVar *)file.readClass();
- _prevVarObj = (CGameVar *)file.readClass();
- _nextVarObj = (CGameVar *)file.readClass();
- _field_14 = (CGameVar *)file.readClass();
- _subVars = (CGameVar *)file.readClass();
+ _parentVarObj = (GameVar *)file.readClass();
+ _prevVarObj = (GameVar *)file.readClass();
+ _nextVarObj = (GameVar *)file.readClass();
+ _field_14 = (GameVar *)file.readClass();
+ _subVars = (GameVar *)file.readClass();
file.decLevel();
return true;
}
-CGameVar *CGameVar::getSubVarByName(const char *name) {
- CGameVar *sv = 0;
+GameVar *GameVar::getSubVarByName(const char *name) {
+ GameVar *sv = 0;
if (_subVars != 0) {
sv = _subVars;
@@ -205,8 +205,8 @@ CGameVar *CGameVar::getSubVarByName(const char *name) {
return sv;
}
-bool CGameVar::setSubVarAsInt(const char *name, int value) {
- CGameVar *var = getSubVarByName(name);
+bool GameVar::setSubVarAsInt(const char *name, int value) {
+ GameVar *var = getSubVarByName(name);
if (var) {
if (var->_varType == 0) {
@@ -217,7 +217,7 @@ bool CGameVar::setSubVarAsInt(const char *name, int value) {
return false;
}
- var = new CGameVar();
+ var = new GameVar();
var->_varType = 0;
var->_value.intValue = value;
var->_varName = (char *)calloc(strlen(name) + 1, 1);
@@ -226,8 +226,8 @@ bool CGameVar::setSubVarAsInt(const char *name, int value) {
return addSubVar(var);
}
-int CGameVar::getSubVarAsInt(const char *name) {
- CGameVar *var = getSubVarByName(name);
+int GameVar::getSubVarAsInt(const char *name) {
+ GameVar *var = getSubVarByName(name);
if (var)
return var->_value.intValue;
@@ -235,11 +235,11 @@ int CGameVar::getSubVarAsInt(const char *name) {
return 0;
}
-CGameVar *CGameVar::addSubVarAsInt(const char *name, int value) {
+GameVar *GameVar::addSubVarAsInt(const char *name, int value) {
if (getSubVarByName(name)) {
return 0;
} else {
- CGameVar *var = new CGameVar();
+ GameVar *var = new GameVar();
var->_varType = 0;
var->_value.intValue = value;
@@ -251,11 +251,11 @@ CGameVar *CGameVar::addSubVarAsInt(const char *name, int value) {
}
}
-bool CGameVar::addSubVar(CGameVar *subvar) {
- CGameVar *var = _subVars;
+bool GameVar::addSubVar(GameVar *subvar) {
+ GameVar *var = _subVars;
if (var) {
- for (CGameVar *i = var->_nextVarObj; i; i = i->_nextVarObj)
+ for (GameVar *i = var->_nextVarObj; i; i = i->_nextVarObj)
var = i;
var->_nextVarObj = subvar;
@@ -273,9 +273,9 @@ bool CGameVar::addSubVar(CGameVar *subvar) {
return false;
}
-int CGameVar::getSubVarsCount() {
+int GameVar::getSubVarsCount() {
int res;
- CGameVar *sub = _subVars;
+ GameVar *sub = _subVars;
for (res = 0; sub; res++)
sub = sub->_nextVarObj;
@@ -283,8 +283,8 @@ int CGameVar::getSubVarsCount() {
return res;
}
-CGameVar *CGameVar::getSubVarByIndex(int idx) {
- CGameVar *sub = _subVars;
+GameVar *GameVar::getSubVarByIndex(int idx) {
+ GameVar *sub = _subVars;
while (idx--) {
sub = sub->_nextVarObj;
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index ac80e809c1..343d5e92dc 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -33,7 +33,7 @@
namespace Fullpipe {
-CStepArray::CStepArray() {
+StepArray::StepArray() {
_points = 0;
_maxPointIndex = 0;
_currPointIndex = 0;
@@ -41,7 +41,7 @@ CStepArray::CStepArray() {
_isEos = 0;
}
-CStepArray::~CStepArray() {
+StepArray::~StepArray() {
if (_pointsCount) {
for (int i = 0; i < _pointsCount; i++)
delete _points[i];
@@ -52,7 +52,7 @@ CStepArray::~CStepArray() {
}
}
-void CStepArray::clear() {
+void StepArray::clear() {
_currPointIndex = 0;
_maxPointIndex = 0;
_isEos = 0;
@@ -63,7 +63,7 @@ void CStepArray::clear() {
}
}
-Common::Point *CStepArray::getCurrPoint(Common::Point *point) {
+Common::Point *StepArray::getCurrPoint(Common::Point *point) {
if (_isEos || _points == 0) {
point->x = 0;
point->y = 0;
@@ -73,7 +73,7 @@ Common::Point *CStepArray::getCurrPoint(Common::Point *point) {
return point;
}
-bool CStepArray::gotoNextPoint() {
+bool StepArray::gotoNextPoint() {
if (_currPointIndex < _maxPointIndex) {
_currPointIndex++;
return true;
@@ -547,7 +547,7 @@ void StaticANIObject::draw2() {
}
MovTable *StaticANIObject::countMovements() {
- CGameVar *preloadSubVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("PRELOAD");
+ GameVar *preloadSubVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("PRELOAD");
if (!preloadSubVar || preloadSubVar->getSubVarsCount() == 0)
return 0;
@@ -561,7 +561,7 @@ MovTable *StaticANIObject::countMovements() {
GameObject *obj = (GameObject *)_movements[i];
movTable->movs[i] = 2;
- for (CGameVar *sub = preloadSubVar->_subVars; sub; sub = sub->_nextVarObj) {
+ for (GameVar *sub = preloadSubVar->_subVars; sub; sub = sub->_nextVarObj) {
if (scumm_stricmp(obj->getName(), sub->_varName) == 0) {
movTable->movs[i] = 1;
break;
@@ -573,7 +573,7 @@ MovTable *StaticANIObject::countMovements() {
}
void StaticANIObject::setSpeed(int speed) {
- CGameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("SpeedUp");
+ GameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("SpeedUp");
if (!var)
return;
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index 03d87c8e32..1767a5720e 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -29,7 +29,7 @@ namespace Fullpipe {
class ExCommand;
-class CStepArray : public CObject {
+class StepArray : public CObject {
int _currPointIndex;
Common::Point **_points;
int _maxPointIndex;
@@ -37,8 +37,8 @@ class CStepArray : public CObject {
int _isEos;
public:
- CStepArray();
- ~CStepArray();
+ StepArray();
+ ~StepArray();
void clear();
int getCurrPointIndex() { return _currPointIndex; }
@@ -118,7 +118,7 @@ class Movement : public GameObject {
int _field_50;
int _counterMax;
int _counter;
- CPtrList _dynamicPhases;
+ PtrList _dynamicPhases;
int _field_78;
Common::Point **_framePosOffsets;
Movement *_currMovement;
@@ -172,9 +172,9 @@ class StaticANIObject : public GameObject {
int _initialCounter;
int _callback1;
void (*_callback2)(int *);
- CPtrList _movements;
- CPtrList _staticsList;
- CStepArray _stepArray;
+ PtrList _movements;
+ PtrList _staticsList;
+ StepArray _stepArray;
int16 _field_96;
int _messageQueueId;
int _messageNum;
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index ee73aeaa64..3304a93667 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -44,14 +44,14 @@ bool CObject::loadFile(const char *fname) {
return load(archive);
}
-bool CObList::load(MfcArchive &file) {
- debug(5, "CObList::load()");
+bool ObList::load(MfcArchive &file) {
+ debug(5, "ObList::load()");
int count = file.readCount();
- debug(9, "CObList::count: %d:", count);
+ debug(9, "ObList::count: %d:", count);
for (int i = 0; i < count; i++) {
- debug(9, "CObList::[%d]", i);
+ debug(9, "ObList::[%d]", i);
CObject *t = file.readClass();
push_back(t);
@@ -60,8 +60,8 @@ bool CObList::load(MfcArchive &file) {
return true;
}
-bool CObArray::load(MfcArchive &file) {
- debug(5, "CObArray::load()");
+bool ObArray::load(MfcArchive &file) {
+ debug(5, "ObArray::load()");
int count = file.readCount();
resize(count);
@@ -75,11 +75,11 @@ bool CObArray::load(MfcArchive &file) {
return true;
}
-bool CDWordArray::load(MfcArchive &file) {
- debug(5, "CWordArray::load()");
+bool DWordArray::load(MfcArchive &file) {
+ debug(5, "DWordArray::load()");
int count = file.readCount();
- debug(9, "CDWordArray::count: %d", count);
+ debug(9, "DWordArray::count: %d", count);
resize(count);
@@ -262,34 +262,34 @@ double MfcArchive::readDouble() {
enum {
kNullObject,
- kCInteraction,
+ kInteraction,
kMessageQueue,
kExCommand,
- kCObjstateCommand,
- kCGameVar,
- kCMctlCompound,
- kCMovGraph,
- kCMovGraphLink,
- kCMovGraphNode,
- kCReactParallel,
- kCReactPolygonal
+ kObjstateCommand,
+ kGameVar,
+ kMctlCompound,
+ kMovGraph,
+ kMovGraphLink,
+ kMovGraphNode,
+ kReactParallel,
+ kReactPolygonal
};
const struct {
const char *name;
int id;
} classMap[] = {
- { "CInteraction", kCInteraction },
+ { "CInteraction", kInteraction },
{ "MessageQueue", kMessageQueue },
{ "ExCommand", kExCommand },
- { "CObjstateCommand", kCObjstateCommand },
- { "CGameVar", kCGameVar },
- { "CMctlCompound", kCMctlCompound },
- { "CMovGraph", kCMovGraph },
- { "CMovGraphLink", kCMovGraphLink },
- { "CMovGraphNode", kCMovGraphNode },
- { "CReactParallel", kCReactParallel },
- { "CReactPolygonal", kCReactPolygonal },
+ { "CObjstateCommand", kObjstateCommand },
+ { "CGameVar", kGameVar },
+ { "CMctlCompound", kMctlCompound },
+ { "CMovGraph", kMovGraph },
+ { "CMovGraphLink", kMovGraphLink },
+ { "CMovGraphNode", kMovGraphNode },
+ { "CReactParallel", kReactParallel },
+ { "CReactPolygonal", kReactPolygonal },
{ 0, 0 }
};
@@ -306,28 +306,28 @@ static CObject *createObject(int objectId) {
switch (objectId) {
case kNullObject:
return 0;
- case kCInteraction:
- return new CInteraction();
+ case kInteraction:
+ return new Interaction();
case kMessageQueue:
return new MessageQueue();
case kExCommand:
return new ExCommand();
- case kCObjstateCommand:
- return new CObjstateCommand();
- case kCGameVar:
- return new CGameVar();
- case kCMctlCompound:
- return new CMctlCompound();
- case kCMovGraph:
- return new CMovGraph();
- case kCMovGraphLink:
- return new CMovGraphLink();
- case kCMovGraphNode:
- return new CMovGraphNode();
- case kCReactParallel:
- return new CReactParallel();
- case kCReactPolygonal:
- return new CReactPolygonal();
+ case kObjstateCommand:
+ return new ObjstateCommand();
+ case kGameVar:
+ return new GameVar();
+ case kMctlCompound:
+ return new MctlCompound();
+ case kMovGraph:
+ return new MovGraph();
+ case kMovGraphLink:
+ return new MovGraphLink();
+ case kMovGraphNode:
+ return new MovGraphNode();
+ case kReactParallel:
+ return new ReactParallel();
+ case kReactPolygonal:
+ return new ReactPolygonal();
default:
error("Unknown objectId: %d", objectId);
}
@@ -396,6 +396,8 @@ CObject *MfcArchive::parseClass(bool *isCopyReturned) {
if (_objectMap.size() < obTag) {
error("Object index too big: %d at 0x%08x", obTag, pos() - 2);
}
+ debug(7, "parseClass::obTag <%s>", lookupObjectId(_objectIdMap[obTag]));
+
res = _objectMap[obTag];
*isCopyReturned = true;
diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h
index 76a1ae944c..64631f4215 100644
--- a/engines/fullpipe/utils.h
+++ b/engines/fullpipe/utils.h
@@ -68,7 +68,8 @@ enum ObjType {
kObjTypeDefault,
kObjTypeObjstateCommand,
kObjTypeStaticANIObject,
- kObjTypePictureObject
+ kObjTypePictureObject,
+ kObjTypeMovGraph
};
class CObject {
@@ -82,7 +83,7 @@ class CObject {
bool loadFile(const char *fname);
};
-class CObList : public Common::List<CObject *>, public CObject {
+class ObList : public Common::List<CObject *>, public CObject {
public:
virtual bool load(MfcArchive &file);
};
@@ -134,17 +135,17 @@ class MemoryObject2 : public MemoryObject {
void copyData(byte *src, int dataSize);
};
-class CObArray : public Common::Array<CObject>, public CObject {
+class ObArray : public Common::Array<CObject>, public CObject {
public:
virtual bool load(MfcArchive &file);
};
-class CDWordArray : public Common::Array<int32>, public CObject {
+class DWordArray : public Common::Array<int32>, public CObject {
public:
virtual bool load(MfcArchive &file);
};
-typedef Common::Array<void *> CPtrList;
+typedef Common::Array<void *> PtrList;
char *genFileName(int superId, int sceneId, const char *ext);
byte *transCyrillic(byte *s);
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 6dbdd2baf5..5f461aab3f 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -742,6 +742,48 @@ const SciScriptSignature longbowSignatures[] = {
};
// ===========================================================================
+// Leisure Suit Larry 2
+// On the plane, Larry is able to wear the parachute. This grants 4 points.
+// In early versions of LSL2, it was possible to get "unlimited" points by
+// simply wearing it multiple times.
+// They fixed it in later versions by remembering, if the parachute was already
+// used before.
+// But instead of adding it properly, it seems they hacked the script / forgot
+// to replace script 0 as well, which holds information about how many global
+// variables are allocated at the start of the game.
+// The script tries to read an out-of-bounds global variable, which somewhat
+// "worked" in SSCI, but ScummVM/SCI doesn't allow that.
+// That's why those points weren't granted here at all.
+// We patch the script to use global 90, which seems to be unused in the whole game.
+// Responsible method: rm63Script::handleEvent
+// Fixes bug #3614419
+const byte larry2SignatureWearParachutePoints[] = {
+ 16,
+ 0x35, 0x01, // ldi 01
+ 0xa1, 0x8e, // sag 8e
+ 0x80, 0xe0, 0x01, // lag 1e0
+ 0x18, // not
+ 0x30, 0x0f, 0x00, // bnt [don't give points]
+ 0x35, 0x01, // ldi 01
+ 0xa0, 0xe0, 0x01, // sag 1e0
+ 0
+};
+
+const uint16 larry2PatchWearParachutePoints[] = {
+ PATCH_ADDTOOFFSET | +4,
+ 0x80, 0x5a, 0x00, // lag 5a (global 90)
+ PATCH_ADDTOOFFSET | +6,
+ 0xa0, 0x5a, 0x00, // sag 5a (global 90)
+ PATCH_END
+};
+
+// script, description, magic DWORD, adjust
+const SciScriptSignature larry2Signatures[] = {
+ { 63, "plane: no points for wearing plane", 1, PATCH_MAGICDWORD(0x8e, 0x80, 0xe0, 0x01), -3, larry2SignatureWearParachutePoints, larry2PatchWearParachutePoints },
+ SCI_SIGNATUREENTRY_TERMINATOR
+};
+
+// ===========================================================================
// this is called on every death dialog. Problem is at least the german
// version of lsl6 gets title text that is far too long for the
// available temp space resulting in temp space corruption
@@ -868,6 +910,68 @@ const SciScriptSignature mothergoose256Signatures[] = {
};
// ===========================================================================
+// Police Quest 1 VGA
+// When at the police station, you can put or get your gun from your locker.
+// The script, that handles this, is buggy. It disposes the gun as soon as
+// you click, but then waits 2 seconds before it also closes the locker.
+// Problem is that it's possible to click again, which then results in a
+// disposed object getting accessed. This happened to work by pure luck in
+// SSCI.
+// This patch changes the code, so that the gun is actually given away
+// when the 2 seconds have passed and the locker got closed.
+// Responsible method: putGun::changeState (script 341)
+// Fixes bug #3036933 / #3303802
+const byte pq1vgaSignaturePutGunInLockerBug[] = {
+ 5,
+ 0x35, 0x00, // ldi 00
+ 0x1a, // eq?
+ 0x31, 0x25, // bnt [next state check]
+ +22, 29, // [skip 22 bytes]
+ 0x38, 0x5f, 0x01, // pushi 15fh
+ 0x78, // push1
+ 0x76, // push0
+ 0x81, 0x00, // lag 00
+ 0x4a, 0x06, // send 06 - ego::put(0)
+ 0x35, 0x02, // ldi 02
+ 0x65, 0x1c, // aTop 1c (set timer to 2 seconds)
+ 0x33, 0x0e, // jmp [end of method]
+ 0x3c, // dup --- next state check target
+ 0x35, 0x01, // ldi 01
+ 0x1a, // eq?
+ 0x31, 0x08, // bnt [end of method]
+ 0x39, 0x6f, // pushi 6fh
+ 0x76, // push0
+ 0x72, 0x88, 0x00, // lofsa 0088
+ 0x4a, 0x04, // send 04 - locker::dispose
+ 0
+};
+
+const uint16 pq1vgaPatchPutGunInLockerBug[] = {
+ PATCH_ADDTOOFFSET | +3,
+ 0x31, 0x1c, // bnt [next state check]
+ PATCH_ADDTOOFFSET | +22,
+ 0x35, 0x02, // ldi 02
+ 0x65, 0x1c, // aTop 1c (set timer to 2 seconds)
+ 0x33, 0x17, // jmp [end of method]
+ 0x3c, // dup --- next state check target
+ 0x35, 0x01, // ldi 01
+ 0x1a, // eq?
+ 0x31, 0x11, // bnt [end of method]
+ 0x38, 0x5f, 0x01, // pushi 15fh
+ 0x78, // push1
+ 0x76, // push0
+ 0x81, 0x00, // lag 00
+ 0x4a, 0x06, // send 06 - ego::put(0)
+ PATCH_END
+};
+
+// script, description, magic DWORD, adjust
+const SciScriptSignature pq1vgaSignatures[] = {
+ { 341, "put gun in locker bug", 1, PATCH_MAGICDWORD(0x38, 0x5f, 0x01, 0x78), -27, pq1vgaSignaturePutGunInLockerBug, pq1vgaPatchPutGunInLockerBug },
+ SCI_SIGNATUREENTRY_TERMINATOR
+};
+
+// ===========================================================================
// script 215 of qfg1vga pointBox::doit actually processes button-presses
// during fighting with monsters. It strangely also calls kGetEvent. Because
// the main User::doit also calls kGetEvent it's pure luck, where the event
@@ -996,9 +1100,10 @@ const uint16 qfg1vgaPatchMoveToCastleGate[] = {
};
// Typo in the original Sierra scripts
-// Looking at a cheetaur resulted in a text about a Saurus Rex
-// Code is in smallMonster::doVerb. It treats both monster
-// types the same. We fix this. Fixes bug #3604943.
+// Looking at a cheetaur resulted in a text about a Saurus Rex
+// The code treats both monster types the same.
+// Responsible method: smallMonster::doVerb
+// Fixes bug #3604943.
const byte qfg1vgaSignatureCheetaurDescription[] = {
16,
0x34, 0xb8, 0x01, // ldi 01b8
@@ -1444,12 +1549,18 @@ void Script::matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uin
case GID_LONGBOW:
signatureTable = longbowSignatures;
break;
+ case GID_LSL2:
+ signatureTable = larry2Signatures;
+ break;
case GID_LSL6:
signatureTable = larry6Signatures;
break;
case GID_MOTHERGOOSE256:
signatureTable = mothergoose256Signatures;
break;
+ case GID_PQ1:
+ signatureTable = pq1vgaSignatures;
+ break;
case GID_QFG1VGA:
signatureTable = qfg1vgaSignatures;
break;
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index ac6ce0bf8e..d2d8464763 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -271,6 +271,11 @@ void EventsClass::setCursor(CursorType cursorType) {
_currentCursor = cursorType;
cursor = g_resourceManager->getSubResource(5, 1, cursorType - R2CURSORS_START, &size);
break;
+
+ case R2_CURSOR_ROPE:
+ _currentCursor = cursorType;
+ cursor = g_resourceManager->getSubResource(5, 4, 1, &size);
+ break;
}
// Decode the cursor
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index a1e9da3477..9ef4813e47 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -108,6 +108,7 @@ enum CursorType {
EXITCURSOR_NE = 0x800D, EXITCURSOR_SE = 0x800E, EXITCURSOR_SW = 0x800F, EXITCURSOR_NW = 0x8010,
SHADECURSOR_UP = 0x8011, SHADECURSOR_DOWN = 0x8012, SHADECURSOR_HAND = 0x8013,
R2_CURSOR_20 = 0x8014, R2_CURSOR_21 = 0x8015, R2_CURSOR_22 = 0x8016, R2_CURSOR_23 = 0x8017,
+ R2_CURSOR_ROPE = 0x8025,
// Cursors
CURSOR_WALK = 0x100, CURSOR_LOOK = 0x200, CURSOR_700 = 700, CURSOR_USE = 0x400, CURSOR_TALK = 0x800,
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 9c50d810fc..a607ebe6a4 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -376,6 +376,10 @@ void SceneExt::remove() {
_sceneAreas.clear();
Scene::remove();
R2_GLOBALS._uiElements._active = true;
+
+ if (R2_GLOBALS._events.getCursor() >= EXITCURSOR_N &&
+ R2_GLOBALS._events.getCursor() <= SHADECURSOR_DOWN)
+ R2_GLOBALS._events.setCursor(CURSOR_WALK);
}
void SceneExt::process(Event &event) {
@@ -778,116 +782,115 @@ bool DisplayObject::performAction(int action) {
Ringworld2InvObjectList::Ringworld2InvObjectList():
_none(1, 1),
- _inv1(1, 2),
- _inv2(1, 3),
+ _optoDisk(1, 2),
+ _reader(1, 3),
_negatorGun(1, 4),
_steppingDisks(1, 5),
- _inv5(1, 6),
- _inv6(1, 7),
- _inv7(1, 8),
- _inv8(1, 9),
- _inv9(1, 10),
- _inv10(1, 11),
- _inv11(1, 12),
- _inv12(1, 13),
- _inv13(1, 14),
- _inv14(1, 15),
- _inv15(1, 16),
- _inv16(1, 17),
- _inv17(2, 2),
- _inv18(2, 3),
- _inv19(2, 4),
- _inv20(2, 5),
- _inv21(2, 5),
- _inv22(2, 6),
- _inv23(2, 7),
- _inv24(2, 8),
- _inv25(2, 9),
- _inv26(2, 10),
- _inv27(2, 11),
- _inv28(2, 12),
- _inv29(2, 13),
- _inv30(2, 14),
- _inv31(2, 15),
- _inv32(2, 16),
- _inv33(3, 2),
- _inv34(3, 3),
- _inv35(3, 4),
- _inv36(3, 5),
- _inv37(3, 6),
- _inv38(3, 7),
- _inv39(1, 10),
- _inv40(3, 8),
- _inv41(3, 9),
- _inv42(3, 10),
- _inv43(3, 11),
- _inv44(3, 12),
- _inv45(3, 13),
- _inv46(3, 17),
- _inv47(3, 14),
- _inv48(3, 14),
- _inv49(3, 15),
- _inv50(3, 15),
- _inv51(3, 17),
- _inv52(4, 2) {
+ _attractorUnit(1, 6),
+ _sensorProbe(1, 7),
+ _sonicStunner(1, 8),
+ _cableHarness(1, 9),
+ _comScanner(1, 10),
+ _spentPowerCapsule(1, 11), // 10
+ _chargedPowerCapsule(1, 12),
+ _aerosol(1, 13),
+ _remoteControl(1, 14),
+ _opticalFibre(1, 15),
+ _clamp(1, 16),
+ _attractorHarness(1, 17),
+ _fuelCell(2, 2),
+ _gyroscope(2, 3),
+ _airbag(2, 4),
+ _rebreatherTank(2, 5), // 20
+ _reserveTank(2, 5),
+ _guidanceModule(2, 6),
+ _thrusterValve(2, 7),
+ _balloonBackpack(2, 8),
+ _radarMechanism(2, 9),
+ _joystick(2, 10),
+ _ignitor(2, 11),
+ _diagnosticsDisplay(2, 12),
+ _glassDome(2, 13),
+ _wickLamp(2, 14), // 30
+ _scrithKey(2, 15),
+ _tannerMask(2, 16),
+ _pureGrainAlcohol(3, 2),
+ _blueSapphire(3, 3),
+ _ancientScrolls(3, 4),
+ _flute(3, 5),
+ _gunpowder(3, 6),
+ _unused(3, 7),
+ _comScanner2(1, 10),
+ _superconductorWire(3, 8), // 40
+ _pillow(3, 9),
+ _foodTray(3, 10),
+ _laserHacksaw(3, 11),
+ _photonStunner(3, 12),
+ _battery(3, 13),
+ _soakedFaceMask(2, 17),
+ _lightBulb(3, 14),
+ _alcoholLamp1(2, 14),
+ _alcoholLamp2(3, 15),
+ _alocholLamp3(3, 15), // 50
+ _brokenDisplay(3, 17),
+ _toolbox(4, 2) {
// Add the items to the list
_itemList.push_back(&_none);
- _itemList.push_back(&_inv1);
- _itemList.push_back(&_inv2);
+ _itemList.push_back(&_optoDisk);
+ _itemList.push_back(&_reader);
_itemList.push_back(&_negatorGun);
_itemList.push_back(&_steppingDisks);
- _itemList.push_back(&_inv5);
- _itemList.push_back(&_inv6);
- _itemList.push_back(&_inv7);
- _itemList.push_back(&_inv8);
- _itemList.push_back(&_inv9);
- _itemList.push_back(&_inv10);
- _itemList.push_back(&_inv11);
- _itemList.push_back(&_inv12);
- _itemList.push_back(&_inv13);
- _itemList.push_back(&_inv14);
- _itemList.push_back(&_inv15);
- _itemList.push_back(&_inv16);
- _itemList.push_back(&_inv17);
- _itemList.push_back(&_inv18);
- _itemList.push_back(&_inv19);
- _itemList.push_back(&_inv20);
- _itemList.push_back(&_inv21);
- _itemList.push_back(&_inv22);
- _itemList.push_back(&_inv23);
- _itemList.push_back(&_inv24);
- _itemList.push_back(&_inv25);
- _itemList.push_back(&_inv26);
- _itemList.push_back(&_inv27);
- _itemList.push_back(&_inv28);
- _itemList.push_back(&_inv29);
- _itemList.push_back(&_inv30);
- _itemList.push_back(&_inv31);
- _itemList.push_back(&_inv32);
- _itemList.push_back(&_inv33);
- _itemList.push_back(&_inv34);
- _itemList.push_back(&_inv35);
- _itemList.push_back(&_inv36);
- _itemList.push_back(&_inv37);
- _itemList.push_back(&_inv38);
- _itemList.push_back(&_inv39);
- _itemList.push_back(&_inv40);
- _itemList.push_back(&_inv41);
- _itemList.push_back(&_inv42);
- _itemList.push_back(&_inv43);
- _itemList.push_back(&_inv44);
- _itemList.push_back(&_inv45);
- _itemList.push_back(&_inv46);
- _itemList.push_back(&_inv47);
- _itemList.push_back(&_inv48);
- _itemList.push_back(&_inv49);
- _itemList.push_back(&_inv50);
- _itemList.push_back(&_inv51);
- _itemList.push_back(&_inv52);
+ _itemList.push_back(&_attractorUnit);
+ _itemList.push_back(&_sensorProbe);
+ _itemList.push_back(&_sonicStunner);
+ _itemList.push_back(&_cableHarness);
+ _itemList.push_back(&_comScanner);
+ _itemList.push_back(&_spentPowerCapsule); // 10
+ _itemList.push_back(&_chargedPowerCapsule);
+ _itemList.push_back(&_aerosol);
+ _itemList.push_back(&_remoteControl);
+ _itemList.push_back(&_opticalFibre);
+ _itemList.push_back(&_clamp);
+ _itemList.push_back(&_attractorHarness);
+ _itemList.push_back(&_fuelCell);
+ _itemList.push_back(&_gyroscope);
+ _itemList.push_back(&_airbag);
+ _itemList.push_back(&_rebreatherTank); // 20
+ _itemList.push_back(&_reserveTank);
+ _itemList.push_back(&_guidanceModule);
+ _itemList.push_back(&_thrusterValve);
+ _itemList.push_back(&_balloonBackpack);
+ _itemList.push_back(&_radarMechanism);
+ _itemList.push_back(&_joystick);
+ _itemList.push_back(&_ignitor);
+ _itemList.push_back(&_diagnosticsDisplay);
+ _itemList.push_back(&_glassDome);
+ _itemList.push_back(&_wickLamp); // 30
+ _itemList.push_back(&_scrithKey);
+ _itemList.push_back(&_tannerMask);
+ _itemList.push_back(&_pureGrainAlcohol);
+ _itemList.push_back(&_blueSapphire);
+ _itemList.push_back(&_ancientScrolls);
+ _itemList.push_back(&_flute);
+ _itemList.push_back(&_gunpowder);
+ _itemList.push_back(&_unused);
+ _itemList.push_back(&_comScanner2);
+ _itemList.push_back(&_superconductorWire); // 40
+ _itemList.push_back(&_pillow);
+ _itemList.push_back(&_foodTray);
+ _itemList.push_back(&_laserHacksaw);
+ _itemList.push_back(&_photonStunner);
+ _itemList.push_back(&_battery);
+ _itemList.push_back(&_soakedFaceMask);
+ _itemList.push_back(&_lightBulb);
+ _itemList.push_back(&_alcoholLamp1);
+ _itemList.push_back(&_alcoholLamp2);
+ _itemList.push_back(&_alocholLamp3); // 50
+ _itemList.push_back(&_brokenDisplay);
+ _itemList.push_back(&_toolbox);
_selectedItem = NULL;
-
}
void Ringworld2InvObjectList::reset() {
@@ -1061,7 +1064,7 @@ bool Ringworld2InvObjectList::SelectItem(int objectNumber) {
currentItem == R2_PURE_GRAIN_ALCOHOL) {
R2_INVENTORY.setObjectScene(R2_TANNER_MASK, 0);
R2_INVENTORY.setObjectScene(R2_PURE_GRAIN_ALCOHOL, 0);
- R2_INVENTORY.setObjectScene(R2_SOAKED_FACEMASK, 1);
+ R2_INVENTORY.setObjectScene(R2_SOAKED_FACEMASK, R2_SEEKER);
} else {
selectDefault(objectNumber);
}
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index c7e36fc5f0..b3d501935b 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -163,58 +163,58 @@ private:
static void selectDefault(int obectNumber);
public:
InvObject _none;
- InvObject _inv1;
- InvObject _inv2;
+ InvObject _optoDisk;
+ InvObject _reader;
InvObject _negatorGun;
InvObject _steppingDisks;
- InvObject _inv5;
- InvObject _inv6;
- InvObject _inv7;
- InvObject _inv8;
- InvObject _inv9;
- InvObject _inv10;
- InvObject _inv11;
- InvObject _inv12;
- InvObject _inv13;
- InvObject _inv14;
- InvObject _inv15;
- InvObject _inv16;
- InvObject _inv17;
- InvObject _inv18;
- InvObject _inv19;
- InvObject _inv20;
- InvObject _inv21;
- InvObject _inv22;
- InvObject _inv23;
- InvObject _inv24;
- InvObject _inv25;
- InvObject _inv26;
- InvObject _inv27;
- InvObject _inv28;
- InvObject _inv29;
- InvObject _inv30;
- InvObject _inv31;
- InvObject _inv32;
- InvObject _inv33;
- InvObject _inv34;
- InvObject _inv35;
- InvObject _inv36;
- InvObject _inv37;
- InvObject _inv38;
- InvObject _inv39;
- InvObject _inv40;
- InvObject _inv41;
- InvObject _inv42;
- InvObject _inv43;
- InvObject _inv44;
- InvObject _inv45;
- InvObject _inv46;
- InvObject _inv47;
- InvObject _inv48;
- InvObject _inv49;
- InvObject _inv50;
- InvObject _inv51;
- InvObject _inv52;
+ InvObject _attractorUnit;
+ InvObject _sensorProbe;
+ InvObject _sonicStunner;
+ InvObject _cableHarness;
+ InvObject _comScanner;
+ InvObject _spentPowerCapsule; // 10
+ InvObject _chargedPowerCapsule;
+ InvObject _aerosol;
+ InvObject _remoteControl;
+ InvObject _opticalFibre;
+ InvObject _clamp;
+ InvObject _attractorHarness;
+ InvObject _fuelCell;
+ InvObject _gyroscope;
+ InvObject _airbag;
+ InvObject _rebreatherTank; // 20
+ InvObject _reserveTank;
+ InvObject _guidanceModule;
+ InvObject _thrusterValve;
+ InvObject _balloonBackpack;
+ InvObject _radarMechanism;
+ InvObject _joystick;
+ InvObject _ignitor;
+ InvObject _diagnosticsDisplay;
+ InvObject _glassDome;
+ InvObject _wickLamp; // 30
+ InvObject _scrithKey;
+ InvObject _tannerMask;
+ InvObject _pureGrainAlcohol;
+ InvObject _blueSapphire;
+ InvObject _ancientScrolls;
+ InvObject _flute;
+ InvObject _gunpowder;
+ InvObject _unused;
+ InvObject _comScanner2;
+ InvObject _superconductorWire; // 40
+ InvObject _pillow;
+ InvObject _foodTray;
+ InvObject _laserHacksaw;
+ InvObject _photonStunner;
+ InvObject _battery;
+ InvObject _soakedFaceMask;
+ InvObject _lightBulb;
+ InvObject _alcoholLamp1;
+ InvObject _alcoholLamp2;
+ InvObject _alocholLamp3; // 50
+ InvObject _brokenDisplay;
+ InvObject _toolbox;
Ringworld2InvObjectList();
void reset();
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index a8fc6eae49..cc50de0cf5 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -349,9 +349,9 @@ void Scene2000::initExits() {
break;
case 23:
_northExit._enabled = true;
- _northExit._bounds.set(108, 83, 128, 184);
+ _northExit._bounds.set(108, 83, 184, 125);
_northExit.setDest(Common::Point(135, 129));
- _northExit._cursorNum = CURSOR_INVALID;
+ _northExit._cursorNum = EXITCURSOR_NE;
loadScene(2275);
R2_GLOBALS._walkRegions.load(2000);
if (!_exitingFlag)
@@ -1280,20 +1280,20 @@ void Scene2400::signal() {
}
/*--------------------------------------------------------------------------
- * Scene 2425 - Spill Mountains:
+ * Scene 2425 - Spill Mountains: The Hall Of Records
*
*--------------------------------------------------------------------------*/
-bool Scene2425::Item1::startAction(CursorType action, Event &event) {
+bool Scene2425::RopeDest1::startAction(CursorType action, Event &event) {
Scene2425 *scene = (Scene2425 *)R2_GLOBALS._sceneManager._scene;
- if ((action == R2_GUNPOWDER) && (!R2_GLOBALS.getFlag(84))) {
+ if ((action == R2_CURSOR_ROPE) && (!R2_GLOBALS.getFlag(84))) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2426;
- scene->setAction(&scene->_sequenceManager, scene, 2426, &R2_GLOBALS._player, &scene->_actor1, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2426, &R2_GLOBALS._player, &scene->_rope, NULL);
R2_GLOBALS.setFlag(84);
return true;
- } else if (action == R2_GUNPOWDER) {
+ } else if (action == R2_CURSOR_ROPE) {
R2_GLOBALS._events.setCursor(CURSOR_USE);
R2_GLOBALS._player.enableControl(CURSOR_USE);
return NamedHotspot::startAction(CURSOR_USE, event);
@@ -1301,16 +1301,16 @@ bool Scene2425::Item1::startAction(CursorType action, Event &event) {
return NamedHotspot::startAction(action, event);
}
-bool Scene2425::Item2::startAction(CursorType action, Event &event) {
+bool Scene2425::RopeDest2::startAction(CursorType action, Event &event) {
Scene2425 *scene = (Scene2425 *)R2_GLOBALS._sceneManager._scene;
- if ((action == R2_GUNPOWDER) && (R2_GLOBALS.getFlag(84))) {
+ if ((action == R2_CURSOR_ROPE) && (R2_GLOBALS.getFlag(84))) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2427;
- scene->setAction(&scene->_sequenceManager, scene, 2427, &R2_GLOBALS._player, &scene->_actor1, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2427, &R2_GLOBALS._player, &scene->_rope, NULL);
R2_GLOBALS.clearFlag(84);
return true;
- } else if (action == R2_GUNPOWDER) {
+ } else if (action == R2_CURSOR_ROPE) {
R2_GLOBALS._events.setCursor(CURSOR_USE);
R2_GLOBALS._player.enableControl(CURSOR_USE);
return NamedHotspot::startAction(CURSOR_USE, event);
@@ -1318,27 +1318,27 @@ bool Scene2425::Item2::startAction(CursorType action, Event &event) {
return NamedHotspot::startAction(action, event);
}
-bool Scene2425::Item3::startAction(CursorType action, Event &event) {
+bool Scene2425::Crevasse::startAction(CursorType action, Event &event) {
Scene2425 *scene = (Scene2425 *)R2_GLOBALS._sceneManager._scene;
- if (action != R2_GUNPOWDER)
+ if (action != R2_CURSOR_ROPE)
return NamedHotspot::startAction(action, event);
else {
R2_GLOBALS._player.disableControl();
if (R2_GLOBALS.getFlag(84)) {
scene->_sceneMode = 20;
- scene->setAction(&scene->_sequenceManager, scene, 2427, &R2_GLOBALS._player, &scene->_actor1, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2427, &R2_GLOBALS._player, &scene->_rope, NULL);
R2_GLOBALS.clearFlag(84);
} else {
scene->_sceneMode = 2425;
- scene->setAction(&scene->_sequenceManager, scene, 2425, &R2_GLOBALS._player, &scene->_actor1, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2425, &R2_GLOBALS._player, &scene->_rope, NULL);
}
return true;
}
}
bool Scene2425::Item4::startAction(CursorType action, Event &event) {
- if (action != R2_GUNPOWDER)
+ if (action != R2_CURSOR_ROPE)
return NamedHotspot::startAction(action, event);
else {
R2_GLOBALS._events.setCursor(CURSOR_USE);
@@ -1347,22 +1347,22 @@ bool Scene2425::Item4::startAction(CursorType action, Event &event) {
}
}
-bool Scene2425::Actor1::startAction(CursorType action, Event &event) {
- if (action == R2_STEPPING_DISKS) {
+bool Scene2425::Rope::startAction(CursorType action, Event &event) {
+ if (action == CURSOR_USE) {
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
- R2_GLOBALS._events.setCursor(R2_GUNPOWDER);
+ R2_GLOBALS._events.setCursor(R2_CURSOR_ROPE);
return true;
} else {
return SceneActor::startAction(action, event);
}
- } else if (R2_GLOBALS._events.getCursor() == R2_GUNPOWDER)
+ } else if (R2_GLOBALS._events.getCursor() == R2_CURSOR_ROPE)
return false;
else
return SceneActor::startAction(action, event);
}
-bool Scene2425::Actor2::startAction(CursorType action, Event &event) {
- if (action != R2_GUNPOWDER)
+bool Scene2425::Pictographs::startAction(CursorType action, Event &event) {
+ if (action != R2_CURSOR_ROPE)
return SceneActor::startAction(action, event);
else {
R2_GLOBALS._events.setCursor(CURSOR_USE);
@@ -1407,39 +1407,39 @@ void Scene2425::postInit(SceneObjectList *OwnerList) {
}
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
- _actor2.postInit();
+ _pictographs1.postInit();
if (R2_GLOBALS._player._characterIndex == 1) {
- _actor2.setup(20, 5, 1);
- _actor2.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
+ _pictographs1.setup(20, 5, 1);
+ _pictographs1.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
} else {
- _actor2.setup(2008, 5, 1);
- _actor2.setDetails(9001, 0, 5, 3, 1, (SceneItem *)NULL);
+ _pictographs1.setup(2008, 5, 1);
+ _pictographs1.setDetails(9001, 0, 5, 3, 1, (SceneItem *)NULL);
}
- _actor2.setPosition(Common::Point(250, 185));
+ _pictographs1.setPosition(Common::Point(250, 185));
}
- _actor1.postInit();
+ _rope.postInit();
if (R2_GLOBALS._sceneManager._previousScene == 2455)
- _actor1.setup(2426, 1, 1);
+ _rope.setup(2426, 1, 1);
else
- _actor1.setup(2426, 1, 2);
+ _rope.setup(2426, 1, 2);
- _actor1.setPosition(Common::Point(290, 9));
- _actor1.fixPriority(20);
- _actor1.setDetails(2455, 12, -1, -1, 1, (SceneItem *)NULL);
- _item1.setDetails(Rect(225, 52, 248, 65), 2425, -1, -1, -1, 1, NULL);
- _item2.setDetails(Rect(292, 81, 316, 94), 2425, -1, -1, -1, 1, NULL);
+ _rope.setPosition(Common::Point(290, 9));
+ _rope.fixPriority(20);
+ _rope.setDetails(2455, 12, -1, -1, 1, (SceneItem *)NULL);
+ _ropeDest1.setDetails(Rect(225, 52, 248, 65), 2425, -1, -1, -1, 1, NULL);
+ _ropeDest2.setDetails(Rect(292, 81, 316, 94), 2425, -1, -1, -1, 1, NULL);
// CHECKME: SceneActor using a SceneItem function??
-// _actor3.setDetails(11, 2425, 3, -1, 6);
- _actor3._sceneRegionId = 11;
- _actor3._resNum = 2425;
- _actor3._lookLineNum = 3;
- _actor3._talkLineNum = -1;
- _actor3._useLineNum = 6;
- g_globals->_sceneItems.push_back(&_actor3);
-
- _item3.setDetails(12, 2425, 7, -1, 9);
+// _pictographs2.setDetails(11, 2425, 3, -1, 6);
+ _pictographs2._sceneRegionId = 11;
+ _pictographs2._resNum = 2425;
+ _pictographs2._lookLineNum = 3;
+ _pictographs2._talkLineNum = -1;
+ _pictographs2._useLineNum = 6;
+ g_globals->_sceneItems.push_back(&_pictographs2);
+
+ _crevasse.setDetails(12, 2425, 7, -1, 9);
_item4.setDetails(Rect(0, 0, 320, 200), 2425, 0, -1, -1, 1, NULL);
R2_GLOBALS._player.disableControl();
@@ -1460,7 +1460,7 @@ void Scene2425::postInit(SceneObjectList *OwnerList) {
break;
case 2455:
_sceneMode = 2428;
- setAction(&_sequenceManager, this, 2428, &R2_GLOBALS._player, &_actor1, NULL);
+ setAction(&_sequenceManager, this, 2428, &R2_GLOBALS._player, &_rope, NULL);
break;
default:
R2_GLOBALS._player.setPosition(Common::Point(280, 150));
@@ -1483,7 +1483,7 @@ void Scene2425::signal() {
break;
case 20:
_sceneMode = 2425;
- setAction(&_sequenceManager, this, 2425, &R2_GLOBALS._player, &_actor1, NULL);
+ setAction(&_sequenceManager, this, 2425, &R2_GLOBALS._player, &_rope, NULL);
break;
case 2425:
g_globals->_sceneManager.changeScene(2455);
@@ -2223,18 +2223,18 @@ void Scene2450::signal() {
*
*--------------------------------------------------------------------------*/
-bool Scene2455::Actor1::startAction(CursorType action, Event &event) {
+bool Scene2455::Lamp::startAction(CursorType action, Event &event) {
Scene2455 *scene = (Scene2455 *)R2_GLOBALS._sceneManager._scene;
if (action == R2_GLASS_DOME) {
if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) == 2455) || (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) == 2455)) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2458;
- scene->_actor2._lookLineNum = 9;
- scene->_actor1.remove();
- scene->_actor3.postInit();
- scene->_actor3.setDetails(2455, 16, 1, -1, 2, (SceneItem *)NULL);
- scene->setAction(&scene->_sequenceManager, scene, 2458, &R2_GLOBALS._player, &scene->_actor2, &scene->_actor3, NULL);
+ scene->_pool._lookLineNum = 9;
+ scene->_lamp.remove();
+ scene->_scrithKey.postInit();
+ scene->_scrithKey.setDetails(2455, 16, 1, -1, 2, (SceneItem *)NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2458, &R2_GLOBALS._player, &scene->_pool, &scene->_scrithKey, NULL);
return true;
}
}
@@ -2242,31 +2242,31 @@ bool Scene2455::Actor1::startAction(CursorType action, Event &event) {
return SceneActor::startAction(action, event);
}
-bool Scene2455::Actor2::startAction(CursorType action, Event &event) {
+bool Scene2455::Pool::startAction(CursorType action, Event &event) {
Scene2455 *scene = (Scene2455 *)R2_GLOBALS._sceneManager._scene;
switch (action) {
case R2_ALCOHOL_LAMP_2:
if (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) != 2455) {
R2_GLOBALS._player.disableControl();
- scene->_actor1.postInit();
- scene->_actor1.setup(2456, 3, 3);
- scene->_actor1.setPosition(Common::Point(162, 165));
- scene->_actor1.setDetails(2455, 15, 1, -1, 2, (SceneItem *)NULL);
+ scene->_lamp.postInit();
+ scene->_lamp.setup(2456, 3, 3);
+ scene->_lamp.setPosition(Common::Point(162, 165));
+ scene->_lamp.setDetails(2455, 15, 1, -1, 2, (SceneItem *)NULL);
scene->_sceneMode = 11;
- scene->setAction(&scene->_sequenceManager, scene, 2457, &R2_GLOBALS._player, &scene->_actor2, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2457, &R2_GLOBALS._player, &scene->_pool, NULL);
return true;
}
break;
case R2_ALCOHOL_LAMP_3:
if (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) != 2455) {
R2_GLOBALS._player.disableControl();
- scene->_actor1.postInit();
- scene->_actor1.setup(2456, 3, 3);
- scene->_actor1.setPosition(Common::Point(162, 165));
- scene->_actor1.setDetails(2455, 15, 1, -1, 2, (SceneItem *)NULL);
+ scene->_lamp.postInit();
+ scene->_lamp.setup(2456, 3, 3);
+ scene->_lamp.setPosition(Common::Point(162, 165));
+ scene->_lamp.setDetails(2455, 15, 1, -1, 2, (SceneItem *)NULL);
scene->_sceneMode = 12;
- scene->setAction(&scene->_sequenceManager, scene, 2457, &R2_GLOBALS._player, &scene->_actor2, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2457, &R2_GLOBALS._player, &scene->_pool, NULL);
return true;
}
break;
@@ -2277,13 +2277,13 @@ bool Scene2455::Actor2::startAction(CursorType action, Event &event) {
return SceneActor::startAction(action, event);
}
-bool Scene2455::Actor3::startAction(CursorType action, Event &event) {
+bool Scene2455::ScrithKey::startAction(CursorType action, Event &event) {
Scene2455 *scene = (Scene2455 *)R2_GLOBALS._sceneManager._scene;
if (action == CURSOR_USE) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2459;
- scene->setAction(&scene->_sequenceManager, scene, 2459, &R2_GLOBALS._player, &scene->_actor3, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2459, &R2_GLOBALS._player, &scene->_scrithKey, NULL);
return true;
}
@@ -2313,37 +2313,36 @@ void Scene2455::postInit(SceneObjectList *OwnerList) {
_exit1.setDetails(Rect(0, 0, 320, 15), EXITCURSOR_N, 2425);
if (R2_INVENTORY.getObjectScene(R2_GLASS_DOME) == 2455) {
- if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) == 2455) || (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) == 2455)) {
- _actor1.postInit();
- _actor1.setup(2456, 3, 3);
- _actor1.setPosition(Common::Point(162, 165));
- _actor1.setDetails(2455, 15, 1, -1, 1, (SceneItem *)NULL);
- }
- } else {
- _actor3.postInit();
- _actor3.setup(2456, 3, 1);
- _actor3.setPosition(Common::Point(176, 165));
- _actor3.setDetails(2455, 16, 1, -1, 1, (SceneItem *)NULL);
- }
-
- _actor2.postInit();
+ _scrithKey.postInit();
+ _scrithKey.setup(2456, 3, 1);
+ _scrithKey.setPosition(Common::Point(176, 165));
+ _scrithKey.setDetails(2455, 16, 1, -1, 1, (SceneItem *)NULL);
+ } else if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) == 2455) ||
+ (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) == 2455)) {
+ _lamp.postInit();
+ _lamp.setup(2456, 3, 3);
+ _lamp.setPosition(Common::Point(162, 165));
+ _lamp.setDetails(2455, 15, 1, -1, 1, (SceneItem *)NULL);
+ }
+
+ _pool.postInit();
if (R2_INVENTORY.getObjectScene(R2_GLASS_DOME) == 2455) {
- _actor2.setup(2456, 3, 2);
- _actor2.setDetails(2455, 9, 1, -1, 1, (SceneItem *)NULL);
+ _pool.setup(2456, 3, 2);
+ _pool.setDetails(2455, 9, 1, -1, 1, (SceneItem *)NULL);
} else {
if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) != 2455) && (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) != 2455))
- _actor2.setup(2455, 1, 1);
+ _pool.setup(2455, 1, 1);
else
- _actor2.setup(2456, 1, 1);
- _actor2.setDetails(2455, 3, 1, -1, 1, (SceneItem *)NULL);
+ _pool.setup(2456, 1, 1);
+ _pool.setDetails(2455, 3, 1, -1, 1, (SceneItem *)NULL);
}
- _actor2.setPosition(Common::Point(162, 165));
- _actor2.fixPriority(20);
+ _pool.setPosition(Common::Point(162, 165));
+ _pool.fixPriority(20);
if (R2_INVENTORY.getObjectScene(R2_GLASS_DOME) != 2455)
- _actor2.animate(ANIM_MODE_2, NULL);
+ _pool.animate(ANIM_MODE_2, NULL);
R2_GLOBALS._player.postInit();
- _item1.setDetails(Rect(0, 0, 320, 200), 2455, 0, 1, -1, 1, NULL);
+ _background.setDetails(Rect(0, 0, 320, 200), 2455, 0, 1, -1, 1, NULL);
R2_GLOBALS._player.disableControl();
if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2425) {
@@ -2386,7 +2385,7 @@ void Scene2455::signal() {
R2_GLOBALS._player._canWalk = false;
break;
case 2459:
- _actor3.remove();
+ _scrithKey.remove();
R2_INVENTORY.setObjectScene(R2_SCRITH_KEY, 2);
R2_GLOBALS._player.enableControl(CURSOR_USE);
R2_GLOBALS._player._canWalk = false;
@@ -2507,6 +2506,7 @@ void Scene2500::signal() {
* Scene 2525 - Furnace room
*
*--------------------------------------------------------------------------*/
+
bool Scene2525::Item5::startAction(CursorType action, Event &event) {
Scene2525 *scene = (Scene2525 *)R2_GLOBALS._sceneManager._scene;
@@ -2520,7 +2520,7 @@ bool Scene2525::Item5::startAction(CursorType action, Event &event) {
return SceneItem::startAction(action, event);
}
-bool Scene2525::Actor3::startAction(CursorType action, Event &event) {
+bool Scene2525::GlassDome::startAction(CursorType action, Event &event) {
Scene2525 *scene = (Scene2525 *)R2_GLOBALS._sceneManager._scene;
if (action != CURSOR_USE)
@@ -2529,7 +2529,7 @@ bool Scene2525::Actor3::startAction(CursorType action, Event &event) {
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2525;
- scene->setAction(&scene->_sequenceManager, scene, 2525, &R2_GLOBALS._player, &scene->_actor3, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2525, &R2_GLOBALS._player, &scene->_glassDome, NULL);
} else {
SceneItem::display(2530, 33, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999);
}
@@ -2558,11 +2558,11 @@ void Scene2525::postInit(SceneObjectList *OwnerList) {
_exit1.setDetails(Rect(86, 155, 228, 168), EXITCURSOR_S, 2000);
if (R2_INVENTORY.getObjectScene(R2_GLASS_DOME) == 2525) {
- _actor3.postInit();
- _actor3.setup(2435, 1, 2);
- _actor3.setPosition(Common::Point(78, 155));
- _actor3.fixPriority(155);
- _actor3.setDetails(2525, 27, -1, -1, 1, (SceneItem *)NULL);
+ _glassDome.postInit();
+ _glassDome.setup(2435, 1, 2);
+ _glassDome.setPosition(Common::Point(78, 155));
+ _glassDome.fixPriority(155);
+ _glassDome.setDetails(2525, 27, -1, -1, 1, (SceneItem *)NULL);
}
_actor2.postInit();
@@ -2629,7 +2629,7 @@ void Scene2525::signal() {
g_globals->_sceneManager.changeScene(2000);
break;
case 2525:
- _actor3.remove();
+ _glassDome.remove();
R2_INVENTORY.setObjectScene(R2_GLASS_DOME, 2);
R2_GLOBALS._player.enableControl();
break;
@@ -2647,7 +2647,8 @@ void Scene2525::signal() {
* Scene 2530 - Spill Mountains: Well
*
*--------------------------------------------------------------------------*/
-bool Scene2530::Actor2::startAction(CursorType action, Event &event) {
+
+bool Scene2530::Flask::startAction(CursorType action, Event &event) {
Scene2530 *scene = (Scene2530 *)R2_GLOBALS._sceneManager._scene;
if (action != CURSOR_USE)
@@ -2656,7 +2657,7 @@ bool Scene2530::Actor2::startAction(CursorType action, Event &event) {
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2530;
- scene->setAction(&scene->_sequenceManager, scene, 2530, &R2_GLOBALS._player, &scene->_actor2, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2530, &R2_GLOBALS._player, &scene->_flask, NULL);
} else {
SceneItem::display(2530, 33, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999);
}
@@ -2664,29 +2665,29 @@ bool Scene2530::Actor2::startAction(CursorType action, Event &event) {
return true;
}
-bool Scene2530::Actor3::startAction(CursorType action, Event &event) {
+bool Scene2530::Crank::startAction(CursorType action, Event &event) {
Scene2530 *scene = (Scene2530 *)R2_GLOBALS._sceneManager._scene;
if (action != CURSOR_USE)
return SceneActor::startAction(action, event);
- if (R2_GLOBALS._player._characterIndex == 1) {
+ if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
if (R2_GLOBALS.getFlag(73))
SceneItem::display(2530, 35, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999);
else {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2532;
- scene->setAction(&scene->_sequenceManager, scene, 2532, &R2_GLOBALS._player, &scene->_actor3, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2532, &R2_GLOBALS._player, &scene->_crank, NULL);
}
} else {
if (R2_GLOBALS.getFlag(73)) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2533;
- scene->setAction(&scene->_sequenceManager, scene, 2533, &R2_GLOBALS._player, &scene->_actor3, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2533, &R2_GLOBALS._player, &scene->_crank, NULL);
} else {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2531;
- scene->setAction(&scene->_sequenceManager, scene, 2531, &R2_GLOBALS._player, &scene->_actor3, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 2531, &R2_GLOBALS._player, &scene->_crank, NULL);
}
}
@@ -2714,22 +2715,22 @@ void Scene2530::postInit(SceneObjectList *OwnerList) {
_exit1.setDest(Common::Point(108, 160));
if (R2_INVENTORY.getObjectScene(R2_PURE_GRAIN_ALCOHOL) == 2530) {
- _actor2.postInit();
- _actor2.setup(2435, 1, 3);
- _actor2.setPosition(Common::Point(299, 80));
- _actor2.fixPriority(80);
- _actor2.setDetails(2530, 28, -1, -1, 1, (SceneItem *)NULL);
+ _flask.postInit();
+ _flask.setup(2435, 1, 3);
+ _flask.setPosition(Common::Point(299, 80));
+ _flask.fixPriority(80);
+ _flask.setDetails(2530, 28, -1, -1, 1, (SceneItem *)NULL);
}
- _actor3.postInit();
+ _crank.postInit();
if (R2_GLOBALS.getFlag(73)) {
- _actor3.setup(2531, 4, 2);
- _actor3.setPosition(Common::Point(154, 130));
+ _crank.setup(2531, 4, 2);
+ _crank.setPosition(Common::Point(154, 130));
} else {
- _actor3.setup(2531, 4, 1);
- _actor3.setPosition(Common::Point(173, 131));
+ _crank.setup(2531, 4, 1);
+ _crank.setPosition(Common::Point(173, 131));
}
- _actor3.setDetails(2530, 22, -1, -1, 1, (SceneItem *)NULL);
+ _crank.setDetails(2530, 22, -1, -1, 1, (SceneItem *)NULL);
R2_GLOBALS._player.postInit();
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
@@ -2758,8 +2759,8 @@ void Scene2530::postInit(SceneObjectList *OwnerList) {
_item2.setDetails(Rect(108, 90, 135, 205), 2530, 22, -1, -1, 1, NULL);
_item5.setDetails(Rect(115, 112, 206, 130), 2530, 25, -1, 27, 1, NULL);
- _item3.setDetails(Rect(256, 64, 311, 85), 2530, 31, -1, 33, 1, NULL);
- _item1.setDetails(Rect(0, 0, 320, 200), 2530, 0, 1, -1, 1, NULL);
+ _shelf.setDetails(Rect(256, 64, 311, 85), 2530, 31, -1, 33, 1, NULL);
+ _background.setDetails(Rect(0, 0, 320, 200), 2530, 0, 1, -1, 1, NULL);
R2_GLOBALS._player.disableControl();
@@ -2782,7 +2783,8 @@ void Scene2530::signal() {
break;
case 2530:
R2_INVENTORY.setObjectScene(R2_PURE_GRAIN_ALCOHOL, 2);
- _actor2.remove();
+ _flask.remove();
+ R2_GLOBALS._player.enableControl();
break;
case 2531:
// No break on purpose
@@ -2945,7 +2947,7 @@ void Scene2535::signal() {
g_globals->_sceneManager.changeScene(2000);
break;
case 2535:
- R2_INVENTORY.setObjectScene(R2_TANNER_MASK, 2);
+ R2_INVENTORY.setObjectScene(R2_TANNER_MASK, R2_SEEKER);
_tannerMask.remove();
R2_GLOBALS._player.enableControl();
break;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h
index 90dd97a5e4..f90126b5a1 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.h
@@ -141,15 +141,15 @@ public:
};
class Scene2425 : public SceneExt {
- class Item1 : public NamedHotspot {
+ class RopeDest1 : public NamedHotspot {
public:
virtual bool startAction(CursorType action, Event &event);
};
- class Item2 : public NamedHotspot {
+ class RopeDest2 : public NamedHotspot {
public:
virtual bool startAction(CursorType action, Event &event);
};
- class Item3 : public NamedHotspot {
+ class Crevasse : public NamedHotspot {
public:
virtual bool startAction(CursorType action, Event &event);
};
@@ -158,11 +158,11 @@ class Scene2425 : public SceneExt {
virtual bool startAction(CursorType action, Event &event);
};
- class Actor1 : public SceneActor {
+ class Rope : public SceneActor {
public:
bool startAction(CursorType action, Event &event);
};
- class Actor2 : public SceneActor {
+ class Pictographs : public SceneActor {
public:
bool startAction(CursorType action, Event &event);
};
@@ -172,13 +172,13 @@ class Scene2425 : public SceneExt {
virtual void changeScene();
};
public:
- Item1 _item1;
- Item2 _item2;
- Item3 _item3;
+ RopeDest1 _ropeDest1;
+ RopeDest2 _ropeDest2;
+ Crevasse _crevasse;
Item4 _item4;
- Actor1 _actor1;
- Actor2 _actor2;
- Actor2 _actor3;
+ Rope _rope;
+ Pictographs _pictographs1;
+ Pictographs _pictographs2;
Exit1 _exit1;
SequenceManager _sequenceManager;
@@ -333,15 +333,15 @@ public:
};
class Scene2455 : public SceneExt {
- class Actor1 : public SceneActor {
+ class Lamp : public SceneActor {
public:
bool startAction(CursorType action, Event &event);
};
- class Actor2 : public SceneActor {
+ class Pool : public SceneActor {
public:
bool startAction(CursorType action, Event &event);
};
- class Actor3 : public SceneActor {
+ class ScrithKey : public SceneActor {
public:
bool startAction(CursorType action, Event &event);
};
@@ -351,10 +351,10 @@ class Scene2455 : public SceneExt {
virtual void changeScene();
};
public:
- NamedHotspot _item1;
- Actor1 _actor1;
- Actor2 _actor2;
- Actor3 _actor3;
+ NamedHotspot _background;
+ Lamp _lamp;
+ Pool _pool;
+ ScrithKey _scrithKey;
Exit1 _exit1;
SequenceManager _sequenceManager;
@@ -390,7 +390,7 @@ class Scene2525 : public SceneExt {
virtual bool startAction(CursorType action, Event &event);
};
- class Actor3 : public SceneActor {
+ class GlassDome : public SceneActor {
public:
bool startAction(CursorType action, Event &event);
};
@@ -407,7 +407,7 @@ public:
Item5 _item5;
SceneActor _actor1;
SceneActor _actor2;
- Actor3 _actor3;
+ GlassDome _glassDome;
Exit1 _exit1;
SequenceManager _sequenceManager;
@@ -417,11 +417,11 @@ public:
};
class Scene2530 : public SceneExt {
- class Actor2 : public SceneActor {
+ class Flask : public SceneActor {
public:
bool startAction(CursorType action, Event &event);
};
- class Actor3 : public SceneActor {
+ class Crank : public SceneActor {
public:
bool startAction(CursorType action, Event &event);
};
@@ -431,14 +431,14 @@ class Scene2530 : public SceneExt {
virtual void changeScene();
};
public:
- NamedHotspot _item1;
+ NamedHotspot _background;
NamedHotspot _item2;
- NamedHotspot _item3;
+ NamedHotspot _shelf;
NamedHotspot _item4;
NamedHotspot _item5;
SceneActor _actor1;
- Actor2 _actor2;
- Actor3 _actor3;
+ Flask _flask;
+ Crank _crank;
Exit1 _exit1;
SequenceManager _sequenceManager;