aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-05-13 11:58:42 +0200
committeruruk2014-05-13 11:58:42 +0200
commite8148cf1deafc0300ea758ab06e7a95d382c0fc6 (patch)
tree8cc1ed684bc5b2bad4f8c679ed9cac1840de7626
parentc108a1830600b3ae45d69b0b48a4747ba4b54819 (diff)
downloadscummvm-rg350-e8148cf1deafc0300ea758ab06e7a95d382c0fc6.tar.gz
scummvm-rg350-e8148cf1deafc0300ea758ab06e7a95d382c0fc6.tar.bz2
scummvm-rg350-e8148cf1deafc0300ea758ab06e7a95d382c0fc6.zip
CGE2: Rework SprExt, stub more functions of Sprite.
-rw-r--r--engines/cge2/vga13h.cpp15
-rw-r--r--engines/cge2/vga13h.h19
2 files changed, 12 insertions, 22 deletions
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp
index ada6642831..79c4861b4a 100644
--- a/engines/cge2/vga13h.cpp
+++ b/engines/cge2/vga13h.cpp
@@ -209,7 +209,7 @@ Sprite *Sprite::expand() {
if (_ext)
return this;
- _ext = new SprExt;
+ _ext = new SprExt(_vm);
assert(_ext != NULL);
if (!*_file)
return this;
@@ -507,9 +507,7 @@ void Sprite::show(uint16 pg) {
}
void Sprite::hide() {
- SprExt *e = _ext;
- if (e->_b0)
- e->_b0->hide(e->_x0, e->_y0);
+ warning("STUB: Sprite::hide()");
}
BitmapPtr Sprite::ghost() {
@@ -519,12 +517,9 @@ BitmapPtr Sprite::ghost() {
BitmapPtr bmp = new Bitmap(_vm, 0, 0, (uint8 *)NULL);
assert(bmp != NULL);
- bmp->_w = e->_b1->_w;
- bmp->_h = e->_b1->_h;
- bmp->_b = new HideDesc[bmp->_h];
- assert(bmp->_b != NULL);
- bmp->_v = (uint8 *) memcpy(bmp->_b, e->_b1->_b, sizeof(HideDesc) * bmp->_h);
- bmp->_map = (e->_y1 << 16) + e->_x1;
+
+ warning("STUB: Sprite::ghost()");
+
return bmp;
}
diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h
index 487df10ba8..d2fb198470 100644
--- a/engines/cge2/vga13h.h
+++ b/engines/cge2/vga13h.h
@@ -60,23 +60,18 @@ struct Seq {
class SprExt {
public:
- int _x0;
- int _y0;
- int _x1;
- int _y1;
+ V2D _p0;
+ V2D _p1;
BitmapPtr _b0;
BitmapPtr _b1;
BitmapPtr *_shpList;
+ int _location;
Seq *_seq;
char *_name;
- /*CommandHandler::Command *_near;
- CommandHandler::Command *_take;*/
- SprExt() :
- _x0(0), _y0(0),
- _x1(0), _y1(0),
- _b0(NULL), _b1(NULL),
- _shpList(NULL), _seq(NULL),
- _name(NULL)/*, _near(NULL), _take(NULL)*/
+ CommandHandler::Command *_actions[kActions];
+ SprExt(CGE2Engine *vm) : _p0(vm, 0, 0), _p1(vm, 0, 0),
+ _b0(NULL), _b1(NULL),_shpList(NULL), _location(0),
+ _seq(NULL), _name(NULL)
{}
};