aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-06-20 15:34:29 -0400
committerEugene Sandulenko2013-09-06 14:48:14 +0300
commit2412eb23ad7bc0efe143ca19caad8d0d01deb784 (patch)
tree7a4b41e401de5a3d4a966c1789d4d2daf0666e11
parent569b794bfec9b25e1f6a8bb64009840b2cc85d7f (diff)
downloadscummvm-rg350-2412eb23ad7bc0efe143ca19caad8d0d01deb784.tar.gz
scummvm-rg350-2412eb23ad7bc0efe143ca19caad8d0d01deb784.tar.bz2
scummvm-rg350-2412eb23ad7bc0efe143ca19caad8d0d01deb784.zip
FULLPIPE: Further refactoring classes into separate files
-rw-r--r--engines/fullpipe/fullpipe.cpp3
-rw-r--r--engines/fullpipe/gfx.h75
-rw-r--r--engines/fullpipe/module.mk1
-rw-r--r--engines/fullpipe/objects.h84
-rw-r--r--engines/fullpipe/scene.cpp66
-rw-r--r--engines/fullpipe/scene.h64
-rw-r--r--engines/fullpipe/stateloader.cpp34
7 files changed, 209 insertions, 118 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 1aa4f6c8c9..6df26afe44 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -240,7 +240,4 @@ void FullpipeEngine::setObjectState(const char *name, int state) {
var->setSubVarAsInt(name, state);
}
-void FullpipeEngine::accessScene(int sceneId) {
-}
-
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h
new file mode 100644
index 0000000000..7ecd4a5c59
--- /dev/null
+++ b/engines/fullpipe/gfx.h
@@ -0,0 +1,75 @@
+/* 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_GFX_H
+#define FULLPIPE_GFX_H
+
+namespace Fullpipe {
+
+class ShadowsItemArray : public Common::Array<CObject>, public CObject {
+ public:
+ virtual bool load(MfcArchive &file);
+};
+
+class Background {
+ CPtrList list;
+ int stringObj;
+ int x;
+ int y;
+ int16 messageQueueId;
+ int colorMemoryObj;
+ int bigPictureArray1Count;
+ int bigPictureArray2Count;
+ int bigPictureArray;
+};
+
+class Shadows {
+ //CObject obj;
+ int sceneId;
+ int staticAniObjectId;
+ int movementId;
+ ShadowsItemArray items;
+};
+
+class Picture {
+ MemoryObject obj;
+ Common::Rect rect;
+ int convertedBitmap;
+ int x;
+ int y;
+ int field_44;
+ int width;
+ int height;
+ int bitmap;
+ int field_54;
+ int memoryObject2;
+ int alpha;
+ int paletteData;
+};
+
+class BigPicture {
+ Picture pic;
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_GFX_H */
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index e5a79523b2..fde81f1df2 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -6,6 +6,7 @@ MODULE_OBJS = \
inventory.o \
motion.o \
ngiarchive.o \
+ scene.o \
stateloader.o \
utils.o
diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h
index d6f46f7736..c39e0d0425 100644
--- a/engines/fullpipe/objects.h
+++ b/engines/fullpipe/objects.h
@@ -25,29 +25,11 @@
#include "fullpipe/utils.h"
#include "fullpipe/inventory.h"
+#include "fullpipe/gfx.h"
+#include "fullpipe/scene.h"
namespace Fullpipe {
-class SceneTag : public CObject {
- public:
- int _field_4;
- char *_tag;
- int _scene;
- int16 _sceneId;
- int16 _field_12;
-
- public:
- SceneTag();
- ~SceneTag();
-
- virtual bool load(MfcArchive &file);
-};
-
-class SceneTagList : public Common::List<SceneTag>, public CObject {
- public:
- virtual bool load(MfcArchive &file);
-};
-
class GameProject : public CObject {
public:
int _field_4;
@@ -137,45 +119,6 @@ class CInputController {
CInputController();
};
-class ShadowsItemArray : public Common::Array<CObject>, public CObject {
- public:
- virtual bool load(MfcArchive &file);
-};
-
-class Background {
- CPtrList list;
- int stringObj;
- int x;
- int y;
- int16 messageQueueId;
- int colorMemoryObj;
- int bigPictureArray1Count;
- int bigPictureArray2Count;
- int bigPictureArray;
-};
-
-class Shadows {
- //CObject obj;
- int sceneId;
- int staticAniObjectId;
- int movementId;
- ShadowsItemArray items;
-};
-
-class Scene {
- Background bg;
- CPtrList staticANIObjectList1;
- CPtrList staticANIObjectList2;
- CPtrList messageQueueList;
- CPtrList faObjectList;
- Shadows *shadows;
- int soundList;
- int16 sceneId;
- int stringObj;
- int field_BC;
- int libHandle;
-};
-
struct PicAniInfo {
int32 type;
int16 objectId;
@@ -196,8 +139,7 @@ struct PicAniInfo {
bool load(MfcArchive &file);
};
-struct EntranceInfo
-{
+struct EntranceInfo {
int32 sceneId;
int32 field_4;
int32 messageQueueId;
@@ -293,26 +235,6 @@ class CGameVar : public CObject {
};
-class Picture {
- MemoryObject obj;
- Common::Rect rect;
- int convertedBitmap;
- int x;
- int y;
- int field_44;
- int width;
- int height;
- int bitmap;
- int field_54;
- int memoryObject2;
- int alpha;
- int paletteData;
-};
-
-class BigPicture {
- Picture pic;
-};
-
struct PreloadItem {
int preloadId1;
int preloadId2;
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
new file mode 100644
index 0000000000..3b4b3086d8
--- /dev/null
+++ b/engines/fullpipe/scene.cpp
@@ -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.
+ *
+ */
+
+#include "fullpipe/fullpipe.h"
+
+#include "fullpipe/objects.h"
+
+namespace Fullpipe {
+
+void FullpipeEngine::accessScene(int sceneId) {
+}
+
+bool SceneTagList::load(MfcArchive &file) {
+ int numEntries = file.readUint16LE();
+
+ for (int i = 0; i < numEntries; i++) {
+ SceneTag *t = new SceneTag();
+ t->load(file);
+ push_back(*t);
+ }
+
+ return true;
+}
+
+SceneTag::SceneTag() {
+ _field_4 = 0;
+ _scene = 0;
+}
+
+bool SceneTag::load(MfcArchive &file) {
+ _field_4 = 0;
+ _scene = 0;
+
+ _sceneId = file.readUint16LE();
+
+ _tag = file.readPascalString();
+
+ debug(6, "sceneId: %d tag: %s", _sceneId, _tag);
+
+ return true;
+}
+
+SceneTag::~SceneTag() {
+ free(_tag);
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h
new file mode 100644
index 0000000000..ee2ddd982b
--- /dev/null
+++ b/engines/fullpipe/scene.h
@@ -0,0 +1,64 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef FULLPIPE_SCENE_H
+#define FULLPIPE_SCENE_H
+
+namespace Fullpipe {
+
+class SceneTag : public CObject {
+ public:
+ int _field_4;
+ char *_tag;
+ int _scene;
+ int16 _sceneId;
+ int16 _field_12;
+
+ public:
+ SceneTag();
+ ~SceneTag();
+
+ virtual bool load(MfcArchive &file);
+};
+
+class SceneTagList : public Common::List<SceneTag>, public CObject {
+ public:
+ virtual bool load(MfcArchive &file);
+};
+
+class Scene {
+ Background bg;
+ CPtrList staticANIObjectList1;
+ CPtrList staticANIObjectList2;
+ CPtrList messageQueueList;
+ CPtrList faObjectList;
+ Shadows *shadows;
+ int soundList;
+ int16 sceneId;
+ int stringObj;
+ int field_BC;
+ int libHandle;
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_SCENE_H */
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 4e9d929e52..a85e7f3c0c 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -168,40 +168,6 @@ GameProject::~GameProject() {
free(_headerFilename);
}
-bool SceneTagList::load(MfcArchive &file) {
- int numEntries = file.readUint16LE();
-
- for (int i = 0; i < numEntries; i++) {
- SceneTag *t = new SceneTag();
- t->load(file);
- push_back(*t);
- }
-
- return true;
-}
-
-SceneTag::SceneTag() {
- _field_4 = 0;
- _scene = 0;
-}
-
-bool SceneTag::load(MfcArchive &file) {
- _field_4 = 0;
- _scene = 0;
-
- _sceneId = file.readUint16LE();
-
- _tag = file.readPascalString();
-
- debug(6, "sceneId: %d tag: %s", _sceneId, _tag);
-
- return true;
-}
-
-SceneTag::~SceneTag() {
- free(_tag);
-}
-
bool CInteractionController::load(MfcArchive &file) {
return _interactions.load(file);
}