aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-22 18:46:03 +0300
committerEugene Sandulenko2013-09-06 14:51:04 +0300
commit7aa2377bf7986b77e145adb1350f99013ab35380 (patch)
tree5e19984f8a32ab96621715ea93fa307533ba496a /engines
parent82b596a31e42bf21cec2a31a3a68c07c1936355d (diff)
downloadscummvm-rg350-7aa2377bf7986b77e145adb1350f99013ab35380.tar.gz
scummvm-rg350-7aa2377bf7986b77e145adb1350f99013ab35380.tar.bz2
scummvm-rg350-7aa2377bf7986b77e145adb1350f99013ab35380.zip
FULLPIPE: Initial stubs for input system
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/fullpipe.cpp3
-rw-r--r--engines/fullpipe/fullpipe.h4
-rw-r--r--engines/fullpipe/gameloader.cpp6
-rw-r--r--engines/fullpipe/gameloader.h20
-rw-r--r--engines/fullpipe/input.cpp58
-rw-r--r--engines/fullpipe/input.h53
-rw-r--r--engines/fullpipe/module.mk1
-rw-r--r--engines/fullpipe/motion.cpp8
-rw-r--r--engines/fullpipe/objects.h24
-rw-r--r--engines/fullpipe/scenes.cpp3
-rw-r--r--engines/fullpipe/stateloader.cpp4
11 files changed, 140 insertions, 44 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 436eabaec6..2123d0887b 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -58,6 +58,9 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_soundEnabled = true;
_flgSoundList = true;
+ _inputController = 0;
+ _inputDisabled = false;
+
_needQuit = false;
_aniMan = 0;
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 5050e1c2e6..468d6ca1ec 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -45,6 +45,7 @@ enum FullpipeGameFeatures {
class CGameLoader;
class CGameVar;
+class CInputController;
class CInventory2;
class EntranceInfo;
class GameProject;
@@ -100,6 +101,9 @@ public:
StaticANIObject *_aniMan;
StaticANIObject *_aniMan2;
+ CInputController *_inputController;
+ bool _inputDisabled;
+
SoundList *_currSoundList1[11];
int _currSoundListCount;
bool _soundEnabled;
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index abb709825d..c7b547d845 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -24,6 +24,7 @@
#include "fullpipe/gameloader.h"
#include "fullpipe/scene.h"
+#include "fullpipe/input.h"
namespace Fullpipe {
@@ -45,6 +46,7 @@ CInteractionController *getGameLoaderInteractionController() {
CGameLoader::CGameLoader() {
_interactionController = new CInteractionController();
+ _inputController = new CInputController();
_gameProject = 0;
//_gameName = "untitled";
@@ -68,11 +70,15 @@ CGameLoader::CGameLoader() {
//dword_478480 = 0;
//g_objectId2 = 0;
//g_id = 0;
+
+ warning("STUB: CGameLoader::CGameLoader()");
}
CGameLoader::~CGameLoader() {
free(_gameName);
delete _gameProject;
+ delete _interactionController;
+ delete _inputController;
}
bool CGameLoader::load(MfcArchive &file) {
diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h
index 13b100c230..ce933cb000 100644
--- a/engines/fullpipe/gameloader.h
+++ b/engines/fullpipe/gameloader.h
@@ -30,6 +30,7 @@ namespace Fullpipe {
class SceneTag;
class CMctlCompound;
+class CInputController;
class CGameLoader : public CObject {
public:
@@ -42,29 +43,18 @@ class CGameLoader : public CObject {
int getSceneTagBySceneId(int num, SceneTag **st);
void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount);
- CGameVar *_gameVar;
- CInventory2 _inventory;
+ GameProject *_gameProject;
CInteractionController *_interactionController;
+ CInputController *_inputController;
+ CInventory2 _inventory;
Sc2Array _sc2array;
-
- private:
- GameProject *_gameProject;
- int _field_C;
- int _field_10;
- int _field_14;
- int _field_18;
- int _field_1C;
- int _field_20;
- int _field_24;
- int _field_28;
- int _field_2C;
- CInputController _inputController;
void *_sceneSwitcher;
void *_preloadCallback;
void *_readSavegameCallback;
int16 _field_F8;
int16 _field_FA;
PreloadItems _preloadItems;
+ CGameVar *_gameVar;
char *_gameName;
ExCommand _exCommand;
int _updateCounter;
diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp
new file mode 100644
index 0000000000..68efacf74b
--- /dev/null
+++ b/engines/fullpipe/input.cpp
@@ -0,0 +1,58 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "fullpipe/fullpipe.h"
+
+#include "fullpipe/objects.h"
+#include "fullpipe/input.h"
+
+namespace Fullpipe {
+
+CInputController::CInputController() {
+ g_fullpipe->_inputController = this;
+
+ _flag = 0;
+ _cursorHandle = 0;
+ _hCursor = 0;
+ _field_14 = 0;
+ _cursorId = 0;
+ _cursorIndex = -1;
+ _flags = 1;
+
+ _cursorBounds.left = 0;
+ _cursorBounds.top = 0;
+ _cursorBounds.right = 0;
+ _cursorBounds.bottom = 0;
+
+ _cursorItemPicture = 0;
+}
+
+void CInputController::setInputDisabled(bool state) {
+ _flag = state;
+ g_fullpipe->_inputDisabled = state;
+}
+
+void setInputDisabled(bool state) {
+ g_fullpipe->_inputController->setInputDisabled(state);
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h
new file mode 100644
index 0000000000..a9106b7b01
--- /dev/null
+++ b/engines/fullpipe/input.h
@@ -0,0 +1,53 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef FULLPIPE_INPUT_H
+#define FULLPIPE_INPUT_H
+
+namespace Fullpipe {
+
+void setInputDisabled(bool state);
+
+class CInputControllerItemArray : public CObArray {
+};
+
+class CInputController {
+ //CObject obj;
+ int _flag;
+ int _flags;
+ int _cursorHandle;
+ int _hCursor;
+ int _field_14;
+ int _cursorId;
+ int _cursorIndex;
+ CInputControllerItemArray _cursorsArray;
+ Common::Rect _cursorBounds;
+ int _cursorItemPicture;
+
+ public:
+ CInputController();
+ void setInputDisabled(bool state);
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_INPUT_H */
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index cced876a25..62d9aa3f1c 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -5,6 +5,7 @@ MODULE_OBJS = \
fullpipe.o \
gameloader.o \
gfx.o \
+ input.o \
inventory.o \
messagequeue.o \
motion.o \
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 097ef34209..6defc93eaa 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -72,6 +72,10 @@ bool CMctlCompound::load(MfcArchive &file) {
return true;
}
+void CMctlCompound::addObject(StaticANIObject *obj) {
+ warning("STUB: CMctlCompound::addObject()");
+}
+
bool CMctlCompoundArray::load(MfcArchive &file) {
debug(5, "CMctlCompoundArray::load()");
@@ -101,6 +105,10 @@ bool CMovGraph::load(MfcArchive &file) {
return true;
}
+void CMovGraph::addObject(StaticANIObject *obj) {
+ warning("STUB: CMovGraph::addObject()");
+}
+
CMovGraphLink::CMovGraphLink() {
_distance = 0;
_angle = 0;
diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h
index 48bb5838e6..65113a9bcf 100644
--- a/engines/fullpipe/objects.h
+++ b/engines/fullpipe/objects.h
@@ -81,30 +81,6 @@ class CInteractionController : public CObject {
void sortInteractions(int sceneId);
};
-class CInputControllerItemArray {
- CObArray objs;
-};
-
-class CInputController {
- //CObject obj;
- int _flag;
- int _flags;
- int _cursorHandle;
- int _hCursor;
- int _field_14;
- int _cursorId;
- int _cursorIndex;
- CInputControllerItemArray _cursorsArray;
- int _cursorDrawX;
- int _cursorDrawY;
- int _cursorDrawWidth;
- int _cursorDrawHeight;
- int _cursorItemPicture;
-
- public:
- CInputController();
-};
-
struct PicAniInfo {
int32 type;
int16 objectId;
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index d0d0fabeab..03017f65cd 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -30,6 +30,7 @@
#include "fullpipe/gameloader.h"
#include "fullpipe/sound.h"
#include "fullpipe/motion.h"
+#include "fullpipe/input.h"
#include "fullpipe/gameobj.h"
@@ -105,7 +106,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
cmp->addObject(_aniMan);
cmp->setEnabled();
getGameLoaderInteractionController()->enableFlag24();
- input_setInputDisabled(0);
+ setInputDisabled(0);
} else {
_aniMan2 = 0;
}
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index c383a054e7..875b469509 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -173,10 +173,6 @@ void CInteractionController::sortInteractions(int sceneId) {
warning("STUB: CInteractionController::sortInteractions(%d)", sceneId);
}
-CInputController::CInputController() {
- // TODO
-}
-
CInteraction::CInteraction() {
_objectId1 = 0;
_objectId2 = 0;