[Scummvm-cvs-logs] SF.net SVN: scummvm:[48405] scummvm/trunk/engines/m4

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Fri Mar 26 21:45:32 CET 2010


Revision: 48405
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48405&view=rev
Author:   dreammaster
Date:     2010-03-26 20:45:32 +0000 (Fri, 26 Mar 2010)

Log Message:
-----------
Bugfixes to the graphics display of dialogs

Modified Paths:
--------------
    scummvm/trunk/engines/m4/graphics.cpp
    scummvm/trunk/engines/m4/mads_menus.cpp
    scummvm/trunk/engines/m4/mads_views.cpp
    scummvm/trunk/engines/m4/sprite.h

Modified: scummvm/trunk/engines/m4/graphics.cpp
===================================================================
--- scummvm/trunk/engines/m4/graphics.cpp	2010-03-26 10:21:08 UTC (rev 48404)
+++ scummvm/trunk/engines/m4/graphics.cpp	2010-03-26 20:45:32 UTC (rev 48405)
@@ -772,7 +772,7 @@
 	c.r = r;
 	c.g = g;
 	c.b = b;
-	c.u = 0;
+	c.u = 255;
 	g_system->setPalette((const byte *)&c, index, 1);
 }
 

Modified: scummvm/trunk/engines/m4/mads_menus.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_menus.cpp	2010-03-26 10:21:08 UTC (rev 48404)
+++ scummvm/trunk/engines/m4/mads_menus.cpp	2010-03-26 20:45:32 UTC (rev 48405)
@@ -685,8 +685,8 @@
 	// 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 @@
 	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 @@
 
 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);
 

Modified: scummvm/trunk/engines/m4/mads_views.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_views.cpp	2010-03-26 10:21:08 UTC (rev 48404)
+++ scummvm/trunk/engines/m4/mads_views.cpp	2010-03-26 20:45:32 UTC (rev 48405)
@@ -99,7 +99,7 @@
 			// 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 @@
 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);

Modified: scummvm/trunk/engines/m4/sprite.h
===================================================================
--- scummvm/trunk/engines/m4/sprite.h	2010-03-26 10:21:08 UTC (rev 48404)
+++ scummvm/trunk/engines/m4/sprite.h	2010-03-26 20:45:32 UTC (rev 48405)
@@ -115,17 +115,17 @@
 	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:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list