Skip to content

Commit

Permalink
FULLPIPE: Finished stubbing SceneSwitcher. Added Behavior Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Sep 6, 2013
1 parent 22eedf5 commit f54055d
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 1 deletion.
39 changes: 39 additions & 0 deletions engines/fullpipe/behavior.cpp
@@ -0,0 +1,39 @@
/* 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/behavior.h"

namespace Fullpipe {

BehaviorManager::BehaviorManager() {
_scene = 0;
_isActive = 1;
}

void BehaviorManager::initBehavior(Scene *scene, CGameVar *var) {
warning("STUB: initBehavior()");
}

} // End of namespace Fullpipe
66 changes: 66 additions & 0 deletions engines/fullpipe/behavior.h
@@ -0,0 +1,66 @@
/* 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_BEHAVIOR_H
#define FULLPIPE_BEHAVIOR_H

namespace Fullpipe {

class BehaviorManager : public CObject {
CObArray _behaviors;
Scene *_scene;
bool _isActive;

public:
BehaviorManager();

void initBehavior(Scene *scene, CGameVar *var);
};

struct BehaviorEntryInfo {
int _messageQueue;
int _delay;
int _percent;
int _flags;
};

struct BehaviorEntry {
int _staticsId;
int _itemsCount;
int _flags;
BehaviorEntryInfo *_items;
};

struct BehaviorInfo {
StaticANIObject *_ani;
int _staticsId;
int _counter;
int _counterMax;
int _flags;
int _subIndex;
int _itemsCount;
BehaviorEntryInfo *_items;
};

} // End of namespace Fullpipe

#endif /* FULLPIPE_BEHAVIOR_H */
4 changes: 4 additions & 0 deletions engines/fullpipe/fullpipe.cpp
Expand Up @@ -32,6 +32,7 @@
#include "fullpipe/objects.h"
#include "fullpipe/gameloader.h"
#include "fullpipe/messagequeue.h"
#include "fullpipe/behavior.h"

namespace Fullpipe {

Expand Down Expand Up @@ -74,6 +75,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_updateScreenCallback = 0;
_updateCursorCallback = 0;

_behaviorManager = 0;

_cursorId = 0;

g_fullpipe = this;
Expand All @@ -86,6 +89,7 @@ FullpipeEngine::~FullpipeEngine() {

void FullpipeEngine::initialize() {
_globalMessageQueueList = new GlobalMessageQueueList;
_behaviorManager = new BehaviorManager;
}

Common::Error FullpipeEngine::run() {
Expand Down
4 changes: 4 additions & 0 deletions engines/fullpipe/fullpipe.h
Expand Up @@ -43,6 +43,7 @@ namespace Fullpipe {
enum FullpipeGameFeatures {
};

class BehaviorManager;
class CGameLoader;
class CGameVar;
class CInputController;
Expand Down Expand Up @@ -113,6 +114,8 @@ class FullpipeEngine : public ::Engine {
GlobalMessageQueueList *_globalMessageQueueList;
MessageHandler *_messageHandlers;

BehaviorManager *_behaviorManager;

bool _needQuit;

void initObjectStates();
Expand All @@ -136,6 +139,7 @@ class FullpipeEngine : public ::Engine {

bool sceneSwitcher(EntranceInfo *entrance);
Scene *accessScene(int sceneId);
void setSceneMusicParameters(CGameVar *var);

NGIArchive *_currArchive;

Expand Down
1 change: 1 addition & 0 deletions engines/fullpipe/module.mk
@@ -1,6 +1,7 @@
MODULE := engines/fullpipe

MODULE_OBJS = \
behavior.o \
detection.o \
fullpipe.o \
gameloader.o \
Expand Down
10 changes: 9 additions & 1 deletion engines/fullpipe/scenes.cpp
Expand Up @@ -32,13 +32,15 @@
#include "fullpipe/motion.h"
#include "fullpipe/input.h"
#include "fullpipe/messagequeue.h"
#include "fullpipe/behavior.h"

#include "fullpipe/gameobj.h"

namespace Fullpipe {

int sceneIntro_updateCursor();
void sceneIntro_initScene(Scene *sc);
int sceneHandlerIntro(ExCommand *cmd);

bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
CGameVar *sceneVar;
Expand Down Expand Up @@ -631,7 +633,7 @@ int sceneIntro_updateCursor() {
void sceneIntro_initScene(Scene *sc) {
g_fullpipe->_gameLoader->loadScene(SC_INTRO2);

warning("STUB: FullpipeEngine::sceneIntro_initScene()");
warning("STUB: sceneIntro_initScene()");

#if 0
sceneIntro_aniin1man = sc->_getStaticANIObject1ById(ANI_IN1MAN, -1);
Expand All @@ -647,4 +649,10 @@ void sceneIntro_initScene(Scene *sc) {
#endif
}

int sceneHandlerIntro(ExCommand *cmd) {
warning("STUB: sceneHandlerIntro()");

return 0;
}

} // End of namespace Fullpipe
4 changes: 4 additions & 0 deletions engines/fullpipe/sound.cpp
Expand Up @@ -106,4 +106,8 @@ void Sound::updateVolume() {
warning("STUB Sound::updateVolume()");
}

void FullpipeEngine::setSceneMusicParameters(CGameVar *var) {
warning("STUB: FullpipeEngine::setSceneMusicParameters()");
}

} // End of namespace Fullpipe

0 comments on commit f54055d

Please sign in to comment.