aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/chewy/chewy.cpp12
-rw-r--r--engines/chewy/chewy.h2
-rw-r--r--engines/chewy/module.mk1
-rw-r--r--engines/chewy/scene.cpp59
-rw-r--r--engines/chewy/scene.h45
5 files changed, 113 insertions, 6 deletions
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 1172728695..75243ccfd0 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -35,6 +35,7 @@
#include "chewy/events.h"
#include "chewy/graphics.h"
#include "chewy/resource.h"
+#include "chewy/scene.h"
#include "chewy/sound.h"
#include "chewy/text.h"
@@ -61,6 +62,7 @@ ChewyEngine::~ChewyEngine() {
delete _text;
delete _sound;
delete _cursor;
+ delete _scene;
delete _graphics;
delete _console;
}
@@ -69,6 +71,7 @@ void ChewyEngine::initialize() {
_console = new Console(this);
_cursor = new Cursor(this);
_graphics = new Graphics(this);
+ _scene = new Scene(this);
_sound = new Sound(_mixer);
_text = new Text();
_events = new Events(this, _graphics, _console);
@@ -91,12 +94,8 @@ Common::Error ChewyEngine::run() {
}*/
//_graphics->playVideo(0);
- _graphics->drawImage("episode1.tgp", 0);
- _graphics->drawSprite("det1.taf", 0, 200, 100);
- _graphics->loadFont("6x8.tff");
- _graphics->drawText("This is a test", 200, 80);
- _cursor->showCursor();
- _cursor->setCursor(0);
+
+ _scene->change(0);
//_sound->playSpeech(1);
//_sound->playSound(1);
//_sound->playMusic(2);
@@ -113,6 +112,7 @@ Common::Error ChewyEngine::run() {
if (_videoNum >= 0) {
_graphics->playVideo(_videoNum);
+ _scene->draw();
_videoNum = -1;
}
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 64ec3a4dce..6ebeff833e 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -41,6 +41,7 @@ class Console;
class Cursor;
class Events;
class Graphics;
+class Scene;
class Sound;
class Text;
@@ -61,6 +62,7 @@ public:
Graphics *_graphics;
Cursor *_cursor;
+ Scene *_scene;
Sound *_sound;
Text *_text;
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index e13a69abbb..5752e28adf 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -8,6 +8,7 @@ MODULE_OBJS = \
events.o \
graphics.o \
resource.o \
+ scene.o \
sound.o \
text.o \
video/cfo_decoder.o
diff --git a/engines/chewy/scene.cpp b/engines/chewy/scene.cpp
new file mode 100644
index 0000000000..03e4332f85
--- /dev/null
+++ b/engines/chewy/scene.cpp
@@ -0,0 +1,59 @@
+/* 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 "common/system.h"
+#include "common/events.h"
+#include "graphics/cursorman.h"
+#include "graphics/palette.h"
+#include "graphics/surface.h"
+
+#include "chewy/cursor.h"
+#include "chewy/graphics.h"
+#include "chewy/scene.h"
+#include "chewy/resource.h"
+#include "chewy/text.h"
+#include "chewy/video/cfo_decoder.h"
+
+namespace Chewy {
+
+Scene::Scene(ChewyEngine *vm) : _vm(vm) {
+}
+
+Scene::~Scene() {
+}
+
+void Scene::change(uint scene) {
+ _curScene = scene;
+ _vm->_cursor->setCursor(0);
+ _vm->_cursor->showCursor();
+
+ draw();
+}
+
+void Scene::draw() {
+ _vm->_graphics->drawImage("episode1.tgp", _curScene);
+ _vm->_graphics->drawSprite("det1.taf", 0, 200, 100);
+ _vm->_graphics->loadFont("6x8.tff");
+ _vm->_graphics->drawText("This is a test", 200, 80);
+}
+
+} // End of namespace Chewy
diff --git a/engines/chewy/scene.h b/engines/chewy/scene.h
new file mode 100644
index 0000000000..37601d057b
--- /dev/null
+++ b/engines/chewy/scene.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 CHEWY_SCENE_H
+#define CHEWY_SCENE_H
+
+#include "chewy/chewy.h"
+
+namespace Chewy {
+
+class Scene {
+public:
+ Scene(ChewyEngine *vm);
+ virtual ~Scene();
+
+ void change(uint scene);
+ void draw();
+
+private:
+ ChewyEngine *_vm;
+ uint _curScene;
+};
+
+} // End of namespace Chewy
+
+#endif