FULLPIPE: Initial stubs for input system

This commit is contained in:
Eugene Sandulenko 2013-07-22 18:46:03 +03:00
parent 82b596a31e
commit 7aa2377bf7
11 changed files with 141 additions and 45 deletions

View File

@ -58,6 +58,9 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_soundEnabled = true;
_flgSoundList = true;
_inputController = 0;
_inputDisabled = false;
_needQuit = false;
_aniMan = 0;

View File

@ -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;

View File

@ -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) {

View File

@ -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;
CInteractionController *_interactionController;
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;
CInteractionController *_interactionController;
CInputController *_inputController;
CInventory2 _inventory;
Sc2Array _sc2array;
void *_sceneSwitcher;
void *_preloadCallback;
void *_readSavegameCallback;
int16 _field_F8;
int16 _field_FA;
PreloadItems _preloadItems;
CGameVar *_gameVar;
char *_gameName;
ExCommand _exCommand;
int _updateCounter;

View File

@ -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

53
engines/fullpipe/input.h Normal file
View File

@ -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 */

View File

@ -5,6 +5,7 @@ MODULE_OBJS = \
fullpipe.o \
gameloader.o \
gfx.o \
input.o \
inventory.o \
messagequeue.o \
motion.o \

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -173,10 +173,6 @@ void CInteractionController::sortInteractions(int sceneId) {
warning("STUB: CInteractionController::sortInteractions(%d)", sceneId);
}
CInputController::CInputController() {
// TODO
}
CInteraction::CInteraction() {
_objectId1 = 0;
_objectId2 = 0;