[Scummvm-cvs-logs] CVS: scummvm/sky hufftext.cpp,NONE,1.1 text.cpp,1.38,1.39 text.h,1.21,1.22

Robert G?ffringmann lavosspawn at users.sourceforge.net
Fri Jul 4 19:22:06 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv10842/sky

Modified Files:
	text.cpp text.h 
Added Files:
	hufftext.cpp 
Log Message:
corrected all huffman trees and moved them out of text.cpp

--- NEW FILE: hufftext.cpp ---
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2002-2003 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/sky/hufftext.cpp,v 1.1 2003/07/05 02:21:19 lavosspawn Exp $
 *
[...1791 lines suppressed...]
	{ 0, 0, '_' },
	{ 228, 229, 0 },
	{ 0, 0, '>' },
	{ 0, 0, (char)150 },
	{ 231, 236, 0 },
	{ 232, 235, 0 },
	{ 233, 234, 0 },
	{ 0, 0, (char)130 },
	{ 0, 0, '%' },
	{ 0, 0, (char)9 },
	{ 237, 240, 0 },
	{ 238, 239, 0 },
	{ 0, 0, (char)156 },
	{ 0, 0, (char)151 },
	{ 241, 242, 0 },
	{ 0, 0, '{' },
	{ 243, 244, 0 },
	{ 0, 0, (char)148 },
	{ 0, 0, '!' },
};

Index: text.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/text.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- text.cpp	4 Jul 2003 23:26:46 -0000	1.38
+++ text.cpp	5 Jul 2003 02:21:19 -0000	1.39
@@ -417,1339 +417,31 @@
 		if (sprData[cnt] >= 241) sprData[cnt] = newCol;
 }
 
-static const HuffTree huffTree_00267[] = {
-	{ 1, 20, 0 },
-	{ 2, 7, 0 },
-	{ 3, 6, 0 },
-	{ 4, 5, 0 },
-	{ 0, 0, (char)0x20 },
-	{ 0, 0, (char)0x65 },
-	{ 0, 0, (char)0x73 },
[...1318 lines suppressed...]
 	case 331:
+		_huffTree = _huffTree_00331;
+		break;
 	case 348:
-		_huffTree = huffTree_00331;
+		_huffTree = _huffTree_00348;
 		break;
 	case 365:
+		_huffTree = _huffTree_00365;
+		break;
 	case 368:
-		_huffTree = huffTree_00368;
+		_huffTree = _huffTree_00368;
 		break;
 	case 372:
-		_huffTree = huffTree_00372;
+		_huffTree = _huffTree_00372;
 		break;
 	default:
 		error("Unknown game version");

Index: text.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/text.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- text.h	27 Jun 2003 02:54:05 -0000	1.21
+++ text.h	5 Jul 2003 02:21:19 -0000	1.22
@@ -63,7 +63,7 @@
 		uint8 *addr;
 		uint32 charHeight;
 		uint32 charSpacing;
-	} _mainCharacterSet, _linkCharacterSet, _controlCharacterSet;	
+	} _mainCharacterSet, _linkCharacterSet, _controlCharacterSet;
 	
 	uint32	_curCharSet;
 	uint8	*_characterSet;
@@ -85,6 +85,15 @@
 	uint32	_dtLastWidth;
 	bool	_dtCentre;	//set for centre text
 	uint32	_lowTextWidth, _mouseOfsX, _mouseOfsY;
+
+	static const HuffTree _huffTree_00267[]; // trees moved to hufftext.cpp
+	static const HuffTree _huffTree_00288[];
+	static const HuffTree _huffTree_00303[];
+	static const HuffTree _huffTree_00331[];
+	static const HuffTree _huffTree_00348[];
+	static const HuffTree _huffTree_00365[];
+	static const HuffTree _huffTree_00368[];
+	static const HuffTree _huffTree_00372[];
 
 public:
 	uint32 _dtLetters;	//no of chars in message





More information about the Scummvm-git-logs mailing list