diff options
author | Vladimir Menshakov | 2010-01-02 20:44:47 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2010-01-02 20:44:47 +0000 |
commit | 2b083c491d4dd3980fe85b3f5d34ec526fedc162 (patch) | |
tree | 166e39e28254b84f9552c8e5e4ed6a3441aff7a7 /engines/teenagent | |
parent | 13a242838fc9ad8c25fd6e250b0931d8564460a4 (diff) | |
download | scummvm-rg350-2b083c491d4dd3980fe85b3f5d34ec526fedc162.tar.gz scummvm-rg350-2b083c491d4dd3980fe85b3f5d34ec526fedc162.tar.bz2 scummvm-rg350-2b083c491d4dd3980fe85b3f5d34ec526fedc162.zip |
added fadeout tables
svn-id: r46898
Diffstat (limited to 'engines/teenagent')
-rw-r--r-- | engines/teenagent/objects.cpp | 5 | ||||
-rw-r--r-- | engines/teenagent/objects.h | 7 | ||||
-rw-r--r-- | engines/teenagent/scene.cpp | 11 | ||||
-rw-r--r-- | engines/teenagent/scene.h | 1 |
4 files changed, 24 insertions, 0 deletions
diff --git a/engines/teenagent/objects.cpp b/engines/teenagent/objects.cpp index fc4bec245a..87635ae44b 100644 --- a/engines/teenagent/objects.cpp +++ b/engines/teenagent/objects.cpp @@ -172,5 +172,10 @@ void Walkbox::save() const { rect.save(); } +void FadeType::load(byte *src) { + rect.load(src); + src += 8; + value = *src; +} } // End of namespace TeenAgent diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h index dedcd7cc02..c4bca3331b 100644 --- a/engines/teenagent/objects.h +++ b/engines/teenagent/objects.h @@ -215,6 +215,13 @@ protected: byte * _base; }; +struct FadeType { + Rect rect; + byte value; + + void load(byte *src); +}; + //\todo move it to util.h? template<typename T> inline T SIGN (T x) { return (x > 0)? 1: ((x < 0)? -1: 0); } diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index 7a640abd2b..49c12e1ee5 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -221,6 +221,7 @@ void Scene::loadObjectData() { //loading objects & walkboxes objects.resize(42); walkboxes.resize(42); + fades.resize(42); for (byte i = 0; i < 42; ++i) { Common::Array<Object> &scene_objects = objects[i]; @@ -248,6 +249,16 @@ void Scene::loadObjectData() { //walkbox[i]->dump(); scene_walkboxes.push_back(w); } + + byte *fade_table = res->dseg.ptr(res->dseg.get_word(0x663e + i * 2)); + Common::Array<FadeType> &scene_fades = fades[i]; + while(READ_LE_UINT16(fade_table) != 0xffff) { + FadeType fade; + fade.load(fade_table); + fade_table += 9; + scene_fades.push_back(fade); + } + debug(0, "scene[%u] has %u fadeboxes", i + 1, scene_fades.size()); } } diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h index 51c1fc4ffd..9e48ad6351 100644 --- a/engines/teenagent/scene.h +++ b/engines/teenagent/scene.h @@ -201,6 +201,7 @@ private: Common::Array<Common::Array<Object> > objects; Common::Array<Common::Array<Walkbox> > walkboxes; + Common::Array<Common::Array<FadeType> > fades; Common::String message; Common::Point message_pos; |