[Scummvm-cvs-logs] CVS: scummvm/scumm verbs.h,NONE,1.1 dialogs.cpp,1.27,1.28 gfx.cpp,1.67,1.68 resource.cpp,1.26,1.27 saveload.cpp,1.21,1.22 script_v1.cpp,1.31,1.32 script_v2.cpp,1.52,1.53 scumm.h,1.64,1.65 scummvm.cpp,1.79,1.80 string.cpp,1.49,1.50 verbs.cpp,1.5,1.6

Max Horn fingolfin at users.sourceforge.net
Fri Nov 29 07:15:05 CET 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv14992

Modified Files:
	dialogs.cpp gfx.cpp resource.cpp saveload.cpp script_v1.cpp 
	script_v2.cpp scumm.h scummvm.cpp string.cpp verbs.cpp 
Added Files:
	verbs.h 
Log Message:
cleanup

--- NEW FILE: verbs.h ---
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2002 The ScummVM project
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Header: /cvsroot/scummvm/scummvm/scumm/verbs.h,v 1.1 2002/11/29 15:13:49 fingolfin Exp $
 */

#ifndef VERBS_H
#define VERBS_H

#include "scummsys.h"

struct VerbSlot {
	int16 x, y;
	int16 right, bottom;
	int16 oldleft, oldtop, oldright, oldbottom;
	uint8 verbid;
	uint8 color, hicolor, dimcolor, bkcolor, type;
	uint8 charset_nr, curmode;
	uint8 saveid;
	uint8 key;
	bool center;
	uint8 field_1B;
	uint16 imgindex;
};

#endif

Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- dialogs.cpp	22 Nov 2002 14:02:53 -0000	1.27
+++ dialogs.cpp	29 Nov 2002 15:13:18 -0000	1.28
@@ -24,6 +24,7 @@
 #include "sound/mididrv.h"
 #include "scumm.h"
 #include "imuse.h"
+#include "verbs.h"
 
 #include "gui/newgui.h"
 #include "gui/ListWidget.h"

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- gfx.cpp	29 Nov 2002 14:22:31 -0000	1.67
+++ gfx.cpp	29 Nov 2002 15:13:20 -0000	1.68
@@ -1756,8 +1756,6 @@
 
 void Scumm::restoreCharsetBg()
 {
-	_bkColor = 0;
-
 	if (gdi._mask_left != -1) {
 		restoreBG(gdi._mask_left, gdi._mask_top, gdi._mask_right, gdi._mask_bottom);
 		charset._hasMask = false;
@@ -1770,7 +1768,7 @@
 	charset._ypos2 = _string[0].ypos;
 }
 
-void Scumm::restoreBG(int left, int top, int right, int bottom)
+void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor)
 {
 	VirtScreen *vs;
 	int topline, height, width;
@@ -1832,7 +1830,7 @@
 		}
 	} else {
 		while (height--) {
-			memset(backbuff, _bkColor, width);
+			memset(backbuff, backColor, width);
 			backbuff += _realWidth;
 		}
 	}

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- resource.cpp	28 Nov 2002 23:49:48 -0000	1.26
+++ resource.cpp	29 Nov 2002 15:13:23 -0000	1.27
@@ -23,6 +23,7 @@
 #include "stdafx.h"
 #include "scumm.h"
 #include "resource.h"
+#include "verbs.h"
 #include "scumm/sound.h"
 
 #include <stdio.h>

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- saveload.cpp	10 Nov 2002 17:17:11 -0000	1.21
+++ saveload.cpp	29 Nov 2002 15:13:27 -0000	1.22
@@ -29,6 +29,7 @@
 #include "config-file.h"
 #include "resource.h"
 #include "saveload.h"
+#include "verbs.h"
 
 struct SaveGameHeader {
 	uint32 type;

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v1.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- script_v1.cpp	28 Nov 2002 22:11:43 -0000	1.31
+++ script_v1.cpp	29 Nov 2002 15:13:30 -0000	1.32
@@ -23,6 +23,7 @@
 #include "stdafx.h"
 #include "scumm.h"
 #include "actor.h"
+#include "verbs.h"
 #include "scumm/sound.h"
 
 #define OPCODE(x)	{ &Scumm::x, #x }

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- script_v2.cpp	21 Nov 2002 14:55:33 -0000	1.52
+++ script_v2.cpp	29 Nov 2002 15:13:32 -0000	1.53
@@ -24,6 +24,7 @@
 #include "stdafx.h"
 #include "scumm.h"
 #include "actor.h"
+#include "verbs.h"
 #include "smush/player.h"
 #include "smush/scumm_renderer.h"
 

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- scumm.h	26 Nov 2002 12:42:40 -0000	1.64
+++ scumm.h	29 Nov 2002 15:13:34 -0000	1.65
@@ -72,19 +72,7 @@
 	uint32 size;
 };
 
-struct VerbSlot {
-	int16 x, y;
-	int16 right, bottom;
-	int16 oldleft, oldtop, oldright, oldbottom;
-	uint8 verbid;
-	uint8 color, hicolor, dimcolor, bkcolor, type;
-	uint8 charset_nr, curmode;
-	uint8 saveid;
-	uint8 key;
-	bool center;
-	uint8 field_1B;
-	uint16 imgindex;
-};
+struct VerbSlot;
 
 class ObjectData {
 public:
@@ -733,7 +721,7 @@
 	void drawRoomObject(int i, int arg);
 	void drawBox(int x, int y, int x2, int y2, int color);
 
-	void restoreBG(int left, int top, int right, int bottom);
+	void restoreBG(int left, int top, int right, int bottom, byte backColor = 0);
 	void redrawBGStrip(int start, int num);	
 	void redrawBGAreas();	
 	
@@ -850,7 +838,6 @@
 
 	byte _proc_special_palette[256];
 	int _palDirtyMin, _palDirtyMax;
-	byte _bkColor;
 	uint16 _lastXstart;
 
 	byte _haveMsg;

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- scummvm.cpp	25 Nov 2002 09:43:22 -0000	1.79
+++ scummvm.cpp	29 Nov 2002 15:13:37 -0000	1.80
@@ -22,21 +22,22 @@
 
 #include "stdafx.h"
 #include "scumm.h"
-#include "sound/mixer.h"
-#include "sound/mididrv.h"
-#include "scumm/sound.h"
-#include "scumm/imuse.h"
-#include "scumm/bundle.h"
 #include "actor.h"
+#include "bundle.h"
 #include "debug.h"
 #include "dialogs.h"
-#include "gameDetector.h"
-#include "gui/newgui.h"
-#include "gui/message.h"
+#include "imuse.h"
 #include "object.h"
 #include "resource.h"
+#include "sound.h"
 #include "string.h"
+#include "verbs.h"
+#include "common/gameDetector.h"
 #include "common/config-file.h"
+#include "gui/newgui.h"
+#include "gui/message.h"
+#include "sound/mixer.h"
+#include "sound/mididrv.h"
 
 #ifdef _WIN32_WCE
 extern void drawError(char*);

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- string.cpp	27 Nov 2002 14:45:58 -0000	1.49
+++ string.cpp	29 Nov 2002 15:13:42 -0000	1.50
@@ -24,6 +24,7 @@
 #include "scumm.h"
 #include "actor.h"
 #include "dialogs.h"
+#include "verbs.h"
 #include "scumm/sound.h"
 
 int CharsetRenderer::getStringWidth(int arg, byte *text, int pos)
@@ -42,9 +43,7 @@
 			break;
 		if (chr == '@')
 			continue;
-		if (chr == 254)
-			chr = 255;
-		if (chr == 255) {
+		if (chr == 254 || chr == 255) {
 			chr = text[pos++];
 			if (chr == 3)	// 'WAIT'
 				break;
@@ -252,7 +251,6 @@
 	charset._center = _string[0].center;
 	charset._right = _string[0].right;
 	charset._color = _charsetColor;
-	_bkColor = 0;
 
 	if (!(_features & GF_OLD256))	// FIXME
 		for (i = 0; i < 4; i++)
@@ -485,7 +483,6 @@
 	charset._curId = 3;
 	charset._center = false;
 	charset._color = 15;
-	_bkColor = 0;
 	// FIXME: _talkdelay = 1 - display description, not correct ego actor talking,
 	// 0 - no display, correct ego actor talking
 	_talkDelay = 0;
@@ -540,7 +537,6 @@
 		charset._xpos2 = 0;
 
 	charset._disableOffsX = charset._firstChar = true;
-	_bkColor = 0;
 	_talkDelay = 1;
 
 	restoreCharsetBg();
@@ -584,7 +580,6 @@
 	charset._center = _string[a].center;
 	charset._right = _string[a].right;
 	charset._color = _string[a].color;
-	_bkColor = 0;
 	charset._disableOffsX = charset._firstChar = true;
 
 	if (!(_features & GF_OLD256)) {

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- verbs.cpp	27 Oct 2002 09:41:33 -0000	1.5
+++ verbs.cpp	29 Nov 2002 15:13:46 -0000	1.6
@@ -24,6 +24,7 @@
 #include "scumm.h"
 #include "object.h"
 #include "resource.h"
+#include "verbs.h"
 
 void Scumm::redrawVerbs()
 {
@@ -81,6 +82,8 @@
 	if (_verbMouseOver == verb)
 		return;
 
+printf("verbMouseOver: verb = %d, type = %d\n", verb, _verbs[verb].type);
+
 	if (_verbs[_verbMouseOver].type != 1) {
 		drawVerb(_verbMouseOver, 0);
 		_verbMouseOver = verb;
@@ -179,8 +182,7 @@
 	vs = &_verbs[verb];
 
 	if (vs->oldleft != -1) {
-		_bkColor = vs->bkcolor;
-		restoreBG(vs->oldleft, vs->oldtop, vs->oldright, vs->oldbottom);
+		restoreBG(vs->oldleft, vs->oldtop, vs->oldright, vs->oldbottom, vs->bkcolor);
 		vs->oldleft = -1;
 	}
 }





More information about the Scummvm-git-logs mailing list