aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/gfxbase.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-07-03 10:31:25 +0000
committerNicola Mettifogo2008-07-03 10:31:25 +0000
commit59e672ef40e4c227c27022ec764f8b811b375220 (patch)
tree8a200cb1813a620467e71ad7e18cc6f393af347a /engines/parallaction/gfxbase.cpp
parentde09845319f43f6bad3582af5d570de43c7f9632 (diff)
downloadscummvm-rg350-59e672ef40e4c227c27022ec764f8b811b375220.tar.gz
scummvm-rg350-59e672ef40e4c227c27022ec764f8b811b375220.tar.bz2
scummvm-rg350-59e672ef40e4c227c27022ec764f8b811b375220.zip
Changed balloons to use GfxObj as well. Next step is to integrate balloons for BRA.
svn-id: r32883
Diffstat (limited to 'engines/parallaction/gfxbase.cpp')
-rw-r--r--engines/parallaction/gfxbase.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index 383f5d549c..8d7041305d 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -86,12 +86,14 @@ void GfxObj::clearFlags(uint32 flags) {
}
GfxObj* Gfx::loadAnim(const char *name) {
- GfxObj *obj = _disk->loadFrames(name);
+ Frames* frames = _disk->loadFrames(name);
+ assert(frames);
+
+ GfxObj *obj = new GfxObj(kGfxObjTypeAnim, frames, name);
assert(obj);
// animation Z is not set here, but controlled by game scripts and user interaction.
// it is always >=0 and <screen height
- obj->type = kGfxObjTypeAnim;
obj->transparentKey = 0;
_gfxobjList.push_back(obj);
return obj;
@@ -110,11 +112,13 @@ GfxObj* Gfx::loadGet(const char *name) {
}
GfxObj* Gfx::loadDoor(const char *name) {
- GfxObj *obj = _disk->loadFrames(name);
+ Frames *frames = _disk->loadFrames(name);
+ assert(frames);
+
+ GfxObj *obj = new GfxObj(kGfxObjTypeDoor, frames, name);
assert(obj);
obj->z = kGfxObjDoorZ; // this preset Z value ensures that doors are drawn first
- obj->type = kGfxObjTypeDoor;
obj->transparentKey = 0;
_gfxobjList.push_back(obj);
return obj;