aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2010-03-26 20:45:32 +0000
committerPaul Gilbert2010-03-26 20:45:32 +0000
commit73787f05f009868ddf6c1f8e1a7d61b6a38c07d9 (patch)
tree076284dd7d475f5345b570355ccc70e55e123190 /engines
parent5d85ad075981cbc3426c881542d6a4f4a89f22dd (diff)
downloadscummvm-rg350-73787f05f009868ddf6c1f8e1a7d61b6a38c07d9.tar.gz
scummvm-rg350-73787f05f009868ddf6c1f8e1a7d61b6a38c07d9.tar.bz2
scummvm-rg350-73787f05f009868ddf6c1f8e1a7d61b6a38c07d9.zip
Bugfixes to the graphics display of dialogs
svn-id: r48405
Diffstat (limited to 'engines')
-rw-r--r--engines/m4/graphics.cpp2
-rw-r--r--engines/m4/mads_menus.cpp11
-rw-r--r--engines/m4/mads_views.cpp6
-rw-r--r--engines/m4/sprite.h8
4 files changed, 11 insertions, 16 deletions
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index c650e0abac..97e93bca29 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -772,7 +772,7 @@ void Palette::setEntry(uint index, uint8 r, uint8 g, uint8 b) {
c.r = r;
c.g = g;
c.b = b;
- c.u = 0;
+ c.u = 255;
g_system->setPalette((const byte *)&c, index, 1);
}
diff --git a/engines/m4/mads_menus.cpp b/engines/m4/mads_menus.cpp
index bcfeb55dd7..fee6b36759 100644
--- a/engines/m4/mads_menus.cpp
+++ b/engines/m4/mads_menus.cpp
@@ -685,8 +685,8 @@ void RexDialogView::onRefresh(RectList *rects, M4Surface *destSurface) {
// Draw the framed base area
fillRect(this->bounds(), _madsVm->_palette->BLACK);
setColour(2);
- hLine(0, width(), 0);
- hLine(0, width(), height() - 1);
+ hLine(0, width(), MADS_Y_OFFSET - 2);
+ hLine(0, width(), MADS_Y_OFFSET + MADS_SURFACE_HEIGHT + 2);
// Add in the loaded background vertically centred
_backgroundSurface->copyTo(this, 0, (height() - MADS_SURFACE_HEIGHT) / 2);
@@ -881,11 +881,6 @@ RexGameMenuDialog::RexGameMenuDialog(): RexDialogView() {
setFrame(1, 2);
initVars();
- // TODO: Replace with proper palette setting
- uint32 c = 0xffffff;
- for (int i = 9; i <= 15; ++i)
- _vm->_palette->setPalette((const byte *)&c, i, 1);
-
_vm->_font->setFont(FONT_CONVERSATION_MADS);
addLines();
setClickableLines();
@@ -893,7 +888,7 @@ RexGameMenuDialog::RexGameMenuDialog(): RexDialogView() {
void RexGameMenuDialog::addLines() {
// Add the title
- int top = MADS_Y_OFFSET - ((((_vm->_font->getHeight() + 2) * 6) >> 1) - 78);
+ int top = MADS_Y_OFFSET - 2 - ((((_vm->_font->getHeight() + 2) * 6) >> 1) - 78);
addQuote(_vm->_font, ALIGN_CENTER, 0, top, 10);
diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp
index 66968527da..423784384c 100644
--- a/engines/m4/mads_views.cpp
+++ b/engines/m4/mads_views.cpp
@@ -99,7 +99,7 @@ void MadsSpriteSlots::draw(View *view) {
// Minimalised drawing
assert(slot.spriteListIndex < (int)_sprites.size());
M4Sprite *spr = spriteSet.getFrame(slot.frameNumber - 1);
- spr->draw(view, slot.scale, slot.depth, slot.xp, MADS_Y_OFFSET + slot.yp);
+ spr->draw1(view, slot.scale, slot.depth, slot.xp, MADS_Y_OFFSET + slot.yp);
} else {
int xp, yp;
M4Sprite *spr = spriteSet.getFrame(slot.frameNumber - 1);
@@ -159,8 +159,8 @@ int MadsTextDisplay::add(int xp, int yp, uint fontColour, int charSpacing, const
void MadsTextDisplay::draw(View *view) {
for (uint idx = 0; idx < _entries.size(); ++idx) {
if (_entries[idx].active && (_entries[idx].expire >= 0)) {
- _entries[idx].font->setColours(_entries[idx].colour1, 0xFF,
- (_entries[idx].colour2 == 0) ? _entries[idx].colour1 : _entries[idx].colour2);
+ _entries[idx].font->setColours(_entries[idx].colour1,
+ (_entries[idx].colour2 == 0) ? _entries[idx].colour1 : _entries[idx].colour2, 0xff);
_entries[idx].font->writeString(view, _entries[idx].msg,
_entries[idx].bounds.left, _entries[idx].bounds.top, _entries[idx].bounds.width(),
_entries[idx].spacing);
diff --git a/engines/m4/sprite.h b/engines/m4/sprite.h
index ee985c958b..022f3bbc4f 100644
--- a/engines/m4/sprite.h
+++ b/engines/m4/sprite.h
@@ -115,17 +115,17 @@ public:
void loadDeltaRle(Common::SeekableReadStream* rleData, int destX, int destY);
void loadMadsSprite(Common::SeekableReadStream* source);
- void draw(M4Surface *destSurface, int scale, int depth, int xp, int yp) {
+ void draw1(M4Surface *destSurface, int scale, int depth, int xp, int yp) {
// TODO: Properly implement drawing
- copyTo(destSurface, xp, yp);
+ copyTo(destSurface, xp, yp, 0);
}
void draw2(M4Surface *destSurface, int depth, int xp, int yp) {
// TODO: Properly implement drawing
- copyTo(destSurface, xp, yp);
+ copyTo(destSurface, xp, yp, 0);
}
void draw3(M4Surface *destSurface, int xp, int yp) {
// TODO: Properly implement drawing
- copyTo(destSurface, xp, yp);
+ copyTo(destSurface, xp, yp, 0);
}
byte getTransparentColor() const;
protected: