aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-05-15 11:20:13 +0200
committeruruk2014-05-15 11:20:13 +0200
commit4e7bcb5f36c6abd07413323573670b140523f9b0 (patch)
tree258e06e281d8e8ccaef37319fd690a6fcf016323
parent99c15216c71f5f75632a7e38573a2387be39fed9 (diff)
downloadscummvm-rg350-4e7bcb5f36c6abd07413323573670b140523f9b0.tar.gz
scummvm-rg350-4e7bcb5f36c6abd07413323573670b140523f9b0.tar.bz2
scummvm-rg350-4e7bcb5f36c6abd07413323573670b140523f9b0.zip
CGE2: Fix ShowTitle().
Now it REALLY puts the picture to the middle of the screen.
-rw-r--r--engines/cge2/cge2.cpp9
-rw-r--r--engines/cge2/vga13h.cpp8
2 files changed, 11 insertions, 6 deletions
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
index 85e8e889aa..8d7f58fb44 100644
--- a/engines/cge2/cge2.cpp
+++ b/engines/cge2/cge2.cpp
@@ -141,16 +141,17 @@ bool CGE2Engine::showTitle(const char *name) {
LB[1] = NULL;
_bitmapPalette = NULL;
- Sprite D(this, LB, 2);
+ Sprite D(this, LB, 1);
D._flags._kill = true;
- // D._flags._bDel = true;
warning("STUB: Sprite::showTitle() - Flags changed compared to CGE1's Sprite type.");
- D.center();
+ D.gotoxyz(kScrWidth >> 1, -(kPanHeight >> 1));
+ _vga->sunset();
+
D.show(2);
- _vga->sunset();
_vga->copyPage(1, 2);
_vga->copyPage(0, 1);
+
_vga->sunrise(_vga->_sysPal);
_vga->update();
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp
index 054769e93e..6fc22384aa 100644
--- a/engines/cge2/vga13h.cpp
+++ b/engines/cge2/vga13h.cpp
@@ -125,7 +125,7 @@ void Sprite::setShapeList(BitmapPtr *shp, int cnt) {
if (p->_w > _siz.x)
_siz.x = p->_w;
if (p->_h > _siz.y)
- _siz.y = p->_w;
+ _siz.y = p->_h;
}
expand();
_ext->_shpList = shp;
@@ -497,7 +497,7 @@ void Sprite::show() {
void Sprite::show(uint16 pg) {
Graphics::Surface *a = _vm->_vga->_page[1];
- _vm->_vga->_page[1] = _vm->_vga->_page[pg & 3];
+ _vm->_vga->_page[1] = _vm->_vga->_page[pg];
shp()->show(_pos2D.x, _pos2D.y);
_vm->_vga->_page[1] = a;
}
@@ -950,6 +950,10 @@ void Bitmap::xShow(int16 x, int16 y) {
void Bitmap::show(int16 x, int16 y) {
+ V2D pos(_vm, x, y);
+ xLatPos(pos);
+ x = pos.x;
+ y = pos.y;
const byte *srcP = (const byte *)_v;
byte *destEndP = (byte *)_vm->_vga->_page[1]->getBasePtr(0, kScrHeight);