aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorjohndoe1232014-03-24 11:21:44 +0100
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit28cb39eb2b48d8c6e80e35ef6e26e02cc209fc0f (patch)
tree4c41f02644815113d5f15de74b7964c28d29d49b /engines
parenta6a4a3dc1cb346afc1f7b0491158d8b00ac063c5 (diff)
downloadscummvm-rg350-28cb39eb2b48d8c6e80e35ef6e26e02cc209fc0f.tar.gz
scummvm-rg350-28cb39eb2b48d8c6e80e35ef6e26e02cc209fc0f.tar.bz2
scummvm-rg350-28cb39eb2b48d8c6e80e35ef6e26e02cc209fc0f.zip
ILLUSIONS: Start with BBDOU special code
Diffstat (limited to 'engines')
-rw-r--r--engines/illusions/bbdou/bbdou_cursor.cpp39
-rw-r--r--engines/illusions/bbdou/bbdou_cursor.h43
-rw-r--r--engines/illusions/bbdou/bbdou_specialcode.cpp45
-rw-r--r--engines/illusions/bbdou/bbdou_specialcode.h45
-rw-r--r--engines/illusions/illusions.cpp2
-rw-r--r--engines/illusions/illusions.h2
-rw-r--r--engines/illusions/module.mk3
-rw-r--r--engines/illusions/scriptopcodes.cpp1
-rw-r--r--engines/illusions/specialcode.cpp53
-rw-r--r--engines/illusions/specialcode.h57
10 files changed, 290 insertions, 0 deletions
diff --git a/engines/illusions/bbdou/bbdou_cursor.cpp b/engines/illusions/bbdou/bbdou_cursor.cpp
new file mode 100644
index 0000000000..9c0bcc8170
--- /dev/null
+++ b/engines/illusions/bbdou/bbdou_cursor.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 "illusions/illusions.h"
+#include "illusions/bbdou/bbdou_cursor.h"
+#include "illusions/actor.h"
+
+namespace Illusions {
+
+BbdouCursor::BbdouCursor(IllusionsEngine *vm)
+ : _vm(vm) {
+}
+
+BbdouCursor::~BbdouCursor() {
+}
+
+void BbdouCursor::init() {
+}
+
+} // End of namespace Illusions
diff --git a/engines/illusions/bbdou/bbdou_cursor.h b/engines/illusions/bbdou/bbdou_cursor.h
new file mode 100644
index 0000000000..df3ed82f1a
--- /dev/null
+++ b/engines/illusions/bbdou/bbdou_cursor.h
@@ -0,0 +1,43 @@
+/* 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 ILLUSIONS_BBDOU_BBDOU_CURSOR_H
+#define ILLUSIONS_BBDOU_BBDOU_CURSOR_H
+
+#include "illusions/specialcode.h"
+
+namespace Illusions {
+
+class IllusionsEngine;
+
+class BbdouCursor {
+public:
+ BbdouCursor(IllusionsEngine *vm);
+ ~BbdouCursor();
+ void init();
+protected:
+ IllusionsEngine *_vm;
+};
+
+} // End of namespace Illusions
+
+#endif // ILLUSIONS_BBDOU_BBDOU_CURSOR_H
diff --git a/engines/illusions/bbdou/bbdou_specialcode.cpp b/engines/illusions/bbdou/bbdou_specialcode.cpp
new file mode 100644
index 0000000000..028fdb54a8
--- /dev/null
+++ b/engines/illusions/bbdou/bbdou_specialcode.cpp
@@ -0,0 +1,45 @@
+/* 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 "illusions/illusions.h"
+#include "illusions/bbdou/bbdou_specialcode.h"
+#include "illusions/bbdou/bbdou_cursor.h"
+#include "illusions/scriptopcodes.h"
+
+namespace Illusions {
+
+// BbdouSpecialCode
+
+BbdouSpecialCode::BbdouSpecialCode(IllusionsEngine *vm)
+ : SpecialCode(vm) {
+}
+
+BbdouSpecialCode::~BbdouSpecialCode() {
+}
+
+void BbdouSpecialCode::init() {
+}
+
+void BbdouSpecialCode::run(uint32 specialCodeId, OpCall &opCall) {
+}
+
+} // End of namespace Illusions
diff --git a/engines/illusions/bbdou/bbdou_specialcode.h b/engines/illusions/bbdou/bbdou_specialcode.h
new file mode 100644
index 0000000000..98aef581be
--- /dev/null
+++ b/engines/illusions/bbdou/bbdou_specialcode.h
@@ -0,0 +1,45 @@
+/* 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 ILLUSIONS_BBDOU_BBDOU_SPECIALCODE_H
+#define ILLUSIONS_BBDOU_BBDOU_SPECIALCODE_H
+
+#include "illusions/specialcode.h"
+
+namespace Illusions {
+
+class IllusionsEngine;
+class BbdouCursor;
+
+class BbdouSpecialCode : public SpecialCode {
+public:
+ BbdouSpecialCode(IllusionsEngine *vm);
+ virtual ~BbdouSpecialCode();
+ virtual void init();
+ virtual void run(uint32 specialCodeId, OpCall &opCall);
+public:
+ BbdouCursor *_cursor;
+};
+
+} // End of namespace Illusions
+
+#endif // ILLUSIONS_BBDOU_BBDOU_SPECIALCODE_H
diff --git a/engines/illusions/illusions.cpp b/engines/illusions/illusions.cpp
index 45c587dd55..a59c568c8b 100644
--- a/engines/illusions/illusions.cpp
+++ b/engines/illusions/illusions.cpp
@@ -35,6 +35,7 @@
#include "illusions/scriptresource.h"
#include "illusions/scriptman.h"
#include "illusions/soundresource.h"
+#include "illusions/specialcode.h"
#include "illusions/talkresource.h"
#include "illusions/thread.h"
#include "illusions/time.h"
@@ -95,6 +96,7 @@ Common::Error IllusionsEngine::run() {
_resSys->addResourceLoader(0x00100000, new ActorResourceLoader(this));
_resSys->addResourceLoader(0x00110000, new BackgroundResourceLoader(this));
_resSys->addResourceLoader(0x00120000, new FontResourceLoader(this));
+ _resSys->addResourceLoader(0x00170000, new SpecialCodeLoader(this));
_screen = new Screen(this);
_input = new Input();
diff --git a/engines/illusions/illusions.h b/engines/illusions/illusions.h
index 1b44a0721c..e0f27b0abb 100644
--- a/engines/illusions/illusions.h
+++ b/engines/illusions/illusions.h
@@ -64,6 +64,7 @@ class Screen;
class ScriptResource;
class ScriptMan;
class Sequence;
+class SpecialCode;
class TalkItems;
class FramesList;
@@ -95,6 +96,7 @@ public:
Controls *_controls;
Cursor *_cursor;
TalkItems *_talkItems;
+ SpecialCode *_specialCode;
int _resGetCtr;
uint32 _resGetTime;
diff --git a/engines/illusions/module.mk b/engines/illusions/module.mk
index 49a6e2a1a0..77f089ad03 100644
--- a/engines/illusions/module.mk
+++ b/engines/illusions/module.mk
@@ -5,6 +5,8 @@ MODULE_OBJS := \
actor.o \
actorresource.o \
backgroundresource.o \
+ bbdou/bbdou_cursor.o \
+ bbdou/bbdou_specialcode.o \
camera.o \
cursor.o \
detection.o \
@@ -22,6 +24,7 @@ MODULE_OBJS := \
scriptthread.o \
sequenceopcodes.o \
soundresource.o \
+ specialcode.o \
spritedecompressqueue.o \
spritedrawqueue.o \
talkresource.o \
diff --git a/engines/illusions/scriptopcodes.cpp b/engines/illusions/scriptopcodes.cpp
index 8d19fbfc11..a191effb17 100644
--- a/engines/illusions/scriptopcodes.cpp
+++ b/engines/illusions/scriptopcodes.cpp
@@ -551,6 +551,7 @@ void ScriptOpcodes::opStackDup(ScriptThread *scriptThread, OpCall &opCall) {
void ScriptOpcodes::opLoadSpecialCodeModule(ScriptThread *scriptThread, OpCall &opCall) {
ARG_SKIP(2);
ARG_UINT32(specialCodeModuleId);
+ _vm->_resSys->loadResource(specialCodeModuleId, 0, 0);
// TODO _vm->loadSpecialCodeModule(specialCodeModuleId);
}
diff --git a/engines/illusions/specialcode.cpp b/engines/illusions/specialcode.cpp
new file mode 100644
index 0000000000..7ac49a2dfe
--- /dev/null
+++ b/engines/illusions/specialcode.cpp
@@ -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.
+ *
+ */
+
+#include "illusions/illusions.h"
+#include "illusions/specialcode.h"
+#include "illusions/bbdou/bbdou_specialcode.h"
+
+namespace Illusions {
+
+// SpecialCodeLoader
+
+void SpecialCodeLoader::load(Resource *resource) {
+ debug("SpecialCodeLoader::load() Loading special code %08X...", resource->_resId);
+ // TODO
+ _vm->_specialCode = new BbdouSpecialCode(_vm);
+ _vm->_specialCode->init();
+}
+
+void SpecialCodeLoader::unload(Resource *resource) {
+ debug("SpecialCodeLoader::unload() Unloading special code %08X...", resource->_resId);
+ // TODO
+ delete _vm->_specialCode;
+ _vm->_specialCode = 0;
+}
+
+void SpecialCodeLoader::buildFilename(Resource *resource) {
+ resource->_filename = Common::String::format("%08X.dll", resource->_resId);
+}
+
+bool SpecialCodeLoader::isFlag(int flag) {
+ return false;
+}
+
+} // End of namespace Illusions
diff --git a/engines/illusions/specialcode.h b/engines/illusions/specialcode.h
new file mode 100644
index 0000000000..e3ecc8d7c1
--- /dev/null
+++ b/engines/illusions/specialcode.h
@@ -0,0 +1,57 @@
+/* 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 ILLUSIONS_SPECIALCODE_H
+#define ILLUSIONS_SPECIALCODE_H
+
+#include "illusions/resourcesystem.h"
+
+namespace Illusions {
+
+class IllusionsEngine;
+struct OpCall;
+
+class SpecialCodeLoader : public BaseResourceLoader {
+public:
+ SpecialCodeLoader(IllusionsEngine *vm) : _vm(vm) {}
+ virtual ~SpecialCodeLoader() {}
+ virtual void load(Resource *resource);
+ virtual void unload(Resource *resource);
+ virtual void buildFilename(Resource *resource);
+ virtual bool isFlag(int flag);
+protected:
+ IllusionsEngine *_vm;
+};
+
+class SpecialCode {
+public:
+ SpecialCode(IllusionsEngine *vm) : _vm(vm) {}
+ virtual ~SpecialCode() {}
+ virtual void init() = 0;
+ virtual void run(uint32 specialCodeId, OpCall &opCall) = 0;
+protected:
+ IllusionsEngine *_vm;
+};
+
+} // End of namespace Illusions
+
+#endif // ILLUSIONS_SPECIALCODE_H