aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-26 00:14:47 +0300
committerEugene Sandulenko2013-09-06 14:51:06 +0300
commitb18f08d93bc1e7f681a830413b0e57fad61faff3 (patch)
tree87515374c5b1ea377d0e79096bf656fc4ff5d8f3 /engines
parent7f332e1f208344f88d1cfd1899743eb7dd5403de (diff)
downloadscummvm-rg350-b18f08d93bc1e7f681a830413b0e57fad61faff3.tar.gz
scummvm-rg350-b18f08d93bc1e7f681a830413b0e57fad61faff3.tar.bz2
scummvm-rg350-b18f08d93bc1e7f681a830413b0e57fad61faff3.zip
FULLPIPE: Started Statics drawing
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/fullpipe.cpp7
-rw-r--r--engines/fullpipe/gfx.cpp17
-rw-r--r--engines/fullpipe/gfx.h12
-rw-r--r--engines/fullpipe/scene.cpp3
-rw-r--r--engines/fullpipe/scene.h2
-rw-r--r--engines/fullpipe/scenes.cpp4
-rw-r--r--engines/fullpipe/statics.cpp40
-rw-r--r--engines/fullpipe/statics.h9
8 files changed, 79 insertions, 15 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index ce310c9f2c..f1c0aac7f8 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -107,8 +107,11 @@ Common::Error FullpipeEngine::run() {
EntranceInfo ent;
- ent._sceneId = 3896;
- //ent._sceneId = 2072;
+ if (ConfMan.hasKey("boot_param"))
+ ent._sceneId = ConfMan.getInt("boot_param");
+ else
+ ent._sceneId = 3896;
+
sceneSwitcher(&ent);
_currentScene->draw();
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 79de4ef5ae..a4dec6969e 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -24,6 +24,8 @@
#include "fullpipe/objects.h"
#include "fullpipe/gfx.h"
+#include "fullpipe/statics.h"
+#include "fullpipe/scene.h"
#include "common/memstream.h"
@@ -700,5 +702,20 @@ bool Shadows::load(MfcArchive &file) {
return true;
}
+void Shadows::init() {
+ Scene *scene = g_fullpipe->accessScene(_sceneId);
+
+ StaticANIObject *st;
+ Movement *mov;
+
+ if (scene && (st = scene->getStaticANIObject1ById(_staticAniObjectId, -1)) != 0
+ && ((mov = st->getMovementById(_movementId)) != 0))
+ initMovement(mov);
+}
+
+void Shadows::initMovement(Movement *mov) {
+ warning("STUB: Shadows::initMovement()");
+}
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h
index 5848e57536..8a14177dc0 100644
--- a/engines/fullpipe/gfx.h
+++ b/engines/fullpipe/gfx.h
@@ -27,6 +27,9 @@ class Common::ReadStream;
namespace Fullpipe {
+class DynamicPhase;
+class Movement;
+
class ShadowsItemArray : public CObArray {
// empty
};
@@ -158,6 +161,15 @@ class Shadows : public CObject {
public:
Shadows();
virtual bool load(MfcArchive &file);
+ void init();
+
+ void initMovement(Movement *mov);
+};
+
+struct ShadowsItem {
+ int width;
+ int height;
+ DynamicPhase *dynPhase;
};
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index f9b4c0b8ef..93c56daadf 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -106,6 +106,9 @@ void SceneTag::loadScene() {
_scene->load(archive);
+ if (_scene->_shadows)
+ _scene->_shadows->init();
+
delete file;
g_fullpipe->_currArchive = 0;
diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h
index e054403a89..d51d113b5e 100644
--- a/engines/fullpipe/scene.h
+++ b/engines/fullpipe/scene.h
@@ -29,8 +29,8 @@ namespace Fullpipe {
class Scene : public Background {
friend class FullpipeEngine;
+ friend class SceneTag;
- protected:
CPtrList _staticANIObjectList1;
CPtrList _staticANIObjectList2;
CPtrList _messageQueueList;
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 9359709b19..c12c0a0c7f 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -101,8 +101,8 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
_currentScene = scene;
scene->addStaticANIObject(_aniMan, 1);
_scene2 = scene;
- _aniMan->_movementObj = 0;
- _aniMan->_staticsObj = _aniMan->getStaticsById(ST_MAN_EMPTY);
+ _aniMan->_movement = 0;
+ _aniMan->_statics = _aniMan->getStaticsById(ST_MAN_EMPTY);
_aniMan->setOXY(0, 0);
if (_aniMan) {
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index b84703eee3..0f5b861efa 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -69,8 +69,8 @@ StaticANIObject::StaticANIObject() {
_messageQueueId = 0;
_animExFlag = 0;
_counter = 0;
- _movementObj = 0;
- _staticsObj = 0;
+ _movement = 0;
+ _statics = 0;
_flags = 0;
_callback1 = 0;
_callback2 = 0;
@@ -130,8 +130,8 @@ void StaticANIObject::setOXY(int x, int y) {
_ox = x;
_oy = y;
- if (_movementObj)
- _movementObj->setOXY(x, y);
+ if (_movement)
+ _movement->setOXY(x, y);
}
void StaticANIObject::clearFlags() {
@@ -139,8 +139,8 @@ void StaticANIObject::clearFlags() {
deleteFromGlobalMessageQueue();
_messageQueueId = 0;
- _movementObj = 0;
- _staticsObj = 0;
+ _movement = 0;
+ _statics = 0;
_animExFlag = 0;
_counter = 0;
_messageNum = 0;
@@ -195,6 +195,11 @@ Movement *StaticANIObject::getMovementByName(char *name) {
return 0;
}
+void Movement::draw(bool flipFlag, int angle) {
+ warning("STUB: Movement::draw(%d, %d)", flipFlag, angle);
+}
+
+
void StaticANIObject::loadMovementsPixelData() {
for (uint i = 0; i < _movements.size(); i++)
((Movement *)_movements[i])->loadPixelData();
@@ -211,7 +216,19 @@ void StaticANIObject::draw() {
}
void StaticANIObject::draw2() {
- warning("STUB: StaticANIObject::draw2()");
+ debug(0, "StatciANIObject::draw2()");
+
+ if ((_flags & 4) && (_flags & 0x10)) {
+ if (_movement) {
+ _movement->draw(1, 0);
+ } else {
+ Common::Point point;
+
+ _statics->getSomeXY(point);
+
+ _statics->draw(_ox - point.x, _oy - point.y, 1, 0);
+ }
+ }
}
Statics::Statics() {
@@ -227,7 +244,7 @@ bool Statics::load(MfcArchive &file) {
_staticsId = file.readUint16LE();
_staticsName = file.readPascalString();
- debug(7, "statics: <%s>", transCyrillic((byte *)_staticsName));
+ debug(7, "statics: <%s> id: %d (%x)", transCyrillic((byte *)_staticsName), _staticsId, _staticsId);
_picture = new Picture();
_picture->load(file);
@@ -235,6 +252,13 @@ bool Statics::load(MfcArchive &file) {
return true;
}
+Common::Point *Statics::getSomeXY(Common::Point &p) {
+ p.x = _someX;
+ p.y = _someY;
+
+ return &p;
+}
+
Movement::Movement() {
_lastFrameSpecialFlag = 0;
_flipFlag = 0;
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index 04a4863517..0ae5e6111a 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -56,6 +56,7 @@ class StaticPhase : public Picture {
class DynamicPhase : public StaticPhase {
friend class Movement;
+ friend class Statics;
int _someX;
int _someY;
@@ -82,6 +83,8 @@ class Statics : public DynamicPhase {
Statics();
virtual bool load(MfcArchive &file);
Statics *getStaticsById(int itemId);
+
+ Common::Point *getSomeXY(Common::Point &p);
};
class StaticANIObject;
@@ -122,14 +125,16 @@ class Movement : public GameObject {
void updateCurrDynamicPhase();
void loadPixelData();
+
+ void draw(bool flipFlag, int angle);
};
class StaticANIObject : public GameObject {
friend class FullpipeEngine;
protected:
- Movement *_movementObj;
- Statics *_staticsObj;
+ Movement *_movement;
+ Statics *_statics;
int _shadowsOn;
int16 _field_30;
int16 _field_32;