[Scummvm-cvs-logs] SF.net SVN: scummvm:[39211] scummvm/trunk/engines/sci

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Mar 8 09:15:57 CET 2009


Revision: 39211
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39211&view=rev
Author:   fingolfin
Date:     2009-03-08 08:15:56 +0000 (Sun, 08 Mar 2009)

Log Message:
-----------
SCI: Added new header gfx/font.h and removed some dead code

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/font.cpp
    scummvm/trunk/engines/sci/gfx/gfx_options.h
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.h
    scummvm/trunk/engines/sci/gfx/gfx_resource.h
    scummvm/trunk/engines/sci/gfx/gfx_system.h
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/operations.h
    scummvm/trunk/engines/sci/gfx/resmgr.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_font.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
    scummvm/trunk/engines/sci/gfx/sci_widgets.cpp
    scummvm/trunk/engines/sci/sci.cpp
    scummvm/trunk/engines/sci/scicore/vocab.cpp

Added Paths:
-----------
    scummvm/trunk/engines/sci/gfx/font.h

Modified: scummvm/trunk/engines/sci/gfx/font.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/font.cpp	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/font.cpp	2009-03-08 08:15:56 UTC (rev 39211)
@@ -27,114 +27,25 @@
 #include "sci/gfx/gfx_system.h"
 #include "sci/gfx/gfx_resource.h"
 #include "sci/gfx/gfx_tools.h"
+#include "sci/gfx/font.h"
 
 namespace Sci {
 
 int font_counter = 0;
 
 void gfxr_free_font(gfx_bitmap_font_t *font) {
-	if (font->widths)
-		free(font->widths);
+	free(font->widths);
+	free(font->data);
 
-	if (font->data)
-		free(font->data);
-
 	--font_counter;
 
 	free(font);
 }
 
-void scale_char(byte *dest, byte *src, int width, int height, int newwidth, int xfact, int yfact) {
-	int x, y;
-
-	for (y = 0; y < height; y++) {
-		int yc;
-		byte *bdest = dest;
-		byte *bsrc = src;
-
-		for (x = 0; x < width; x++) {
-			int xbitc;
-			int bits = 0;
-			int value = 0;
-
-			for (xbitc = 128; xbitc; xbitc >>= 1) {
-				int xc;
-
-				for (xc = 0; xc < xfact; xc++) {
-					if (*bsrc & xbitc)
-						value |= 1;
-					value <<= 1;
-
-					if (++bits == 8) {
-						*bdest++ = value;
-						bits = value = 0;
-					}
-				}
-			}
-			bsrc++;
-		}
-
-		src += width;
-		for (yc = 1; yc < yfact; yc++) {
-			memcpy(dest + newwidth, dest, newwidth);
-			dest += newwidth;
-		}
-		dest += newwidth;
-	}
-}
-
-gfx_bitmap_font_t *gfxr_scale_font_unfiltered(gfx_bitmap_font_t *orig_font, gfx_mode_t *mode) {
-	gfx_bitmap_font_t *font = (gfx_bitmap_font_t *)sci_malloc(sizeof(gfx_bitmap_font_t));
-	int height = orig_font->height * mode->yfact;
-	int width = 0;
-	int byte_width;
-	int i;
-
-	font->chars_nr = orig_font->chars_nr;
-	for (i = 0; i < font->chars_nr; i++)
-		if (orig_font->widths[i] > width)
-			width = orig_font->widths[i];
-
-	width *= mode->xfact;
-	byte_width = (width + 7) >> 3;
-	if (byte_width == 3)
-		byte_width = 4;
-	if (byte_width > 4)
-		byte_width = (byte_width + 3) & ~3;
-
-	font->row_size = byte_width;
-	font->height = height;
-	font->line_height = orig_font->line_height * mode->yfact;
-
-	font->widths = (int*)sci_malloc(sizeof(int) * orig_font->chars_nr);
-	font->char_size = byte_width * height;
-	font->data = (byte*)sci_malloc(font->chars_nr * font->char_size);
-
-	for (i = 0; i < font->chars_nr; i++) {
-		font->widths[i] = orig_font->widths[i] * mode->xfact;
-		scale_char(font->data + font->char_size * i, orig_font->data + orig_font->char_size * i,
-		           orig_font->row_size, orig_font->height, font->row_size, mode->xfact, mode->yfact);
-	}
-
-	return font;
-}
-
-gfx_bitmap_font_t *gfxr_scale_font(gfx_bitmap_font_t *orig_font, gfx_mode_t *mode, gfxr_font_scale_filter_t filter) {
-	GFXWARN("This function hasn't been tested yet!\n");
-
-	switch (filter) {
-
-	case GFXR_FONT_SCALE_FILTER_NONE:
-		return gfxr_scale_font_unfiltered(orig_font, mode);
-
-	default:
-		GFXERROR("Invalid font filter mode %d!\n", filter);
-		return NULL;
-	}
-}
-
-text_fragment_t *gfxr_font_calculate_size(gfx_bitmap_font_t *font, int max_width, const char *text, int *width, int *height,
+text_fragment_t *gfxr_font_calculate_size(gfx_bitmap_font_t *font, int max_width,
+	const char *text, int *width, int *height,
 	int *lines, int *line_height_p, int *last_offset_p, int flags) {
+
 	int est_char_width = font->widths[(font->chars_nr > 'M')? 'M' : font->chars_nr - 1];
 	// 'M' is typically among the widest chars
 	int fragments_nr;

Added: scummvm/trunk/engines/sci/gfx/font.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/font.h	                        (rev 0)
+++ scummvm/trunk/engines/sci/gfx/font.h	2009-03-08 08:15:56 UTC (rev 39211)
@@ -0,0 +1,130 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCI_GFX_FONT_H
+#define SCI_GFX_FONT_H
+
+#include "common/scummsys.h"
+
+
+namespace Sci {
+
+struct text_fragment_t {
+	const char *offset;
+	int length;
+};
+
+
+struct gfx_bitmap_font_t { /* gfx_bitmap_font_t: Bitmap font information */
+	int ID; /* Unique resource ID */
+
+	int chars_nr; /* Numer of available characters */
+
+	int *widths; /* chars_nr character widths, in pixels */
+
+	int row_size; /* Byte size of each pixel row. For unscaled fonts, this is
+		      ** always 1, 2, or 4. Otherwise, it's a multiple of 4.
+		      */
+
+	int line_height; /* Height of each text line (usually identical to height) */
+	int height; /* Height for all characters, in pixel rows */
+	int char_size; /* Amount of memory occupied by one character in data */
+
+	byte *data; /* Font data, consisting of 'chars_nr' entries of 'height' rows
+		    ** of 'row_size' bytes. For each character ch, its first byte
+		    ** (the topmost row) is located at (data + (charsize * ch)), and
+		    ** its pixel width is widths[ch], provided that (ch < chars_nr).
+		    */
+
+};
+
+/*******************/
+/* Font operations */
+/*******************/
+
+/* SCI0, SCI01 and SCI1 all use the same font format. */
+
+/* SQ3 uses a somewhat different scheme for calculating text sizes: it counts
+** whitespace while calculating the text size.  */
+#define GFXR_FONT_FLAG_COUNT_WHITESPACE (1<<0)
+/* Don't give newline characters special semantics */
+#define GFXR_FONT_FLAG_NO_NEWLINES (1<<1)
+/* Interpret CR LF sequences as a single newline, rather than two of them */
+#define GFXR_FONT_FLAG_EAT_TRAILING_LF (1<<2)
+
+
+gfx_bitmap_font_t *gfxr_read_font(int id, byte *resource, int size);
+/* Geneartes a bitmap font data structure from a resource
+** Parameters: (int) id: Resource ID of the resulting font
+**             (byte *) resource: Pointer to the resource data
+**             (int) size: Size of the resource block
+** Returns   : (gfx_bitmap_font_t *) The resulting font structure, or
+**                                   NULL on error
+*/
+
+void gfxr_free_font(gfx_bitmap_font_t *font);
+/* Frees a previously allocated font structure
+** Parameters: (gfx_bitmap_font_t *) font: The font to free
+** Returns   : (void)
+*/
+
+text_fragment_t *gfxr_font_calculate_size(gfx_bitmap_font_t *font, int max_width, const char *text,
+	int *width, int *height, int *lines, int *line_height, int *last_offset, int flags);
+/* Calculates the size that would be occupied by drawing a specified text
+** Parameters: (gfx_bitmap_font_t *) font: The font to calculate with
+**             (int) max_width: Maximum pixel width allowed for the output
+**             (const char *) text: The text to calculate for
+**             (int) flags: Any text formatting flags
+** Returns   : (text_fragment *) a newly allocated array of text_fragments,
+**                               containing the start and size of each string
+**                               segment
+**             (int) *width: The resulting width
+**             (int) *height: The resulting height
+**             (int) *lines: Number of lines used
+**             (int) *line_height: Pixel height of a single line of text
+**             (int) *last_offset: Pixel offset after the last drawn line
+** This function assumes 320x200 mode.
+*/
+
+gfx_pixmap_t *gfxr_draw_font(gfx_bitmap_font_t *font, const char *text, int characters,
+	gfx_pixmap_color_t *fg0, gfx_pixmap_color_t *fg1, gfx_pixmap_color_t *bg);
+/* Draws text in a specific font to a pixmap
+** Parameters: (gfx_bitmap_font_t *) font: The font to use for drawing
+**             (char *) text: The start of the text to draw
+**             (int) characters: The number of characters to draw
+**             (gfx_pixmap_color_t *) fg0: The first foreground color
+**             (gfx_pixmap_color_t *) fg1: The second foreground color
+**             (gfx_pixmap_color_t *) bg: The background color
+** Returns   : (gfx_pixmap_t *) The result pixmap, or NULL on error
+** The results are written to the pixmap's index buffer. Contents of the
+** foreground and background fields are copied into a newly allocated font
+** structure, so that the pixmap may be translated directly.
+** If any of the colors is null, it will be assumed to be transparent.
+** In color index mode, the specified colors have to be preallocated.
+*/
+
+} // End of namespace Sci
+
+#endif // SCI_GFX_FONT_H


Property changes on: scummvm/trunk/engines/sci/gfx/font.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/trunk/engines/sci/gfx/gfx_options.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_options.h	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/gfx_options.h	2009-03-08 08:15:56 UTC (rev 39211)
@@ -49,9 +49,6 @@
 
 	int buffer_pics_nr; /* Number of unused pics to buffer */
 
-	int correct_rendering; /* Whether to render slow, but correct (rather than
-				** fast and almost correct) */
-
 	/* SCI0 pic resource options */
 	int pic0_unscaled; /* Don't draw scaled SCI0 pics */
 
@@ -65,7 +62,6 @@
 	gfx_xlate_filter_t view_xlate_filter;
 	gfx_xlate_filter_t pic_xlate_filter; /* Only relevant if (pic0_unscaled) */
 	gfx_xlate_filter_t text_xlate_filter;
-	gfxr_font_scale_filter_t fixed_font_xlate_filter; /* Scale filter for systems that provide font support which isn't scaled */
 
 	gfx_res_fullconf_t res_conf; /* Resource customisation: Per-resource palettes etc. */
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.h	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.h	2009-03-08 08:15:56 UTC (rev 39211)
@@ -35,6 +35,8 @@
 
 namespace Sci {
 
+struct gfx_bitmap_font_t;
+
 enum gfx_resource_type_t {
 	GFX_RESOURCE_TYPE_VIEW = 0,
 	GFX_RESOURCE_TYPE_PIC,

Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.h	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.h	2009-03-08 08:15:56 UTC (rev 39211)
@@ -123,16 +123,6 @@
 };
 
 
-enum gfxr_font_scale_filter_t {
-	GFXR_FONT_SCALE_FILTER_NONE
-};
-
-
-struct text_fragment_t {
-	const char *offset;
-	int length;
-};
-
 /* unscaled color index mode: Used in addition to a scaled mode
 ** to render the pic resource twice. See gfxr_remove_artifacts_pic0().
 */
@@ -167,79 +157,8 @@
 */
 
 
-/*******************/
-/* Font operations */
-/*******************/
-/* SCI0, SCI01 and SCI1 all use the same font format. */
 
-/* SQ3 uses a somewhat different scheme for calculating text sizes: it counts
-** whitespace while calculating the text size.  */
-#define GFXR_FONT_FLAG_COUNT_WHITESPACE (1<<0)
-/* Don't give newline characters special semantics */
-#define GFXR_FONT_FLAG_NO_NEWLINES (1<<1)
-/* Interpret CR LF sequences as a single newline, rather than two of them */
-#define GFXR_FONT_FLAG_EAT_TRAILING_LF (1<<2)
 
-
-gfx_bitmap_font_t *gfxr_read_font(int id, byte *resource, int size);
-/* Geneartes a bitmap font data structure from a resource
-** Parameters: (int) id: Resource ID of the resulting font
-**             (byte *) resource: Pointer to the resource data
-**             (int) size: Size of the resource block
-** Returns   : (gfx_bitmap_font_t *) The resulting font structure, or
-**                                   NULL on error
-*/
-
-void gfxr_free_font(gfx_bitmap_font_t *font);
-/* Frees a previously allocated font structure
-** Parameters: (gfx_bitmap_font_t *) font: The font to free
-** Returns   : (void)
-*/
-
-gfx_bitmap_font_t *gfxr_scale_font(gfx_bitmap_font_t *font, gfx_mode_t *mode, gfxr_font_scale_filter_t filter);
-/* Scales a font resource
-** Parameters: (gfx_bitmap_font_t *) font: The font to scale
-**             (gfx_mode_t *) mode: The graphics mode to scale it for
-**             (gfxr_font_scale_filter_t) filter: A filter to use
-** Returns   : (gfx_bitmap_font_t *) A scaled font, or NULL on error
-*/
-
-text_fragment_t *gfxr_font_calculate_size(gfx_bitmap_font_t *font, int max_width, const char *text,
-	int *width, int *height, int *lines, int *line_height, int *last_offset, int flags);
-/* Calculates the size that would be occupied by drawing a specified text
-** Parameters: (gfx_bitmap_font_t *) font: The font to calculate with
-**             (int) max_width: Maximum pixel width allowed for the output
-**             (const char *) text: The text to calculate for
-**             (int) flags: Any text formatting flags
-** Returns   : (text_fragment *) a newly allocated array of text_fragments,
-**                               containing the start and size of each string
-**                               segment
-**             (int) *width: The resulting width
-**             (int) *height: The resulting height
-**             (int) *lines: Number of lines used
-**             (int) *line_height: Pixel height of a single line of text
-**             (int) *last_offset: Pixel offset after the last drawn line
-** This function assumes 320x200 mode.
-*/
-
-gfx_pixmap_t *gfxr_draw_font(gfx_bitmap_font_t *font, const char *text, int characters,
-	gfx_pixmap_color_t *fg0, gfx_pixmap_color_t *fg1, gfx_pixmap_color_t *bg);
-/* Draws text in a specific font to a pixmap
-** Parameters: (gfx_bitmap_font_t *) font: The font to use for drawing
-**             (char *) text: The start of the text to draw
-**             (int) characters: The number of characters to draw
-**             (gfx_pixmap_color_t *) fg0: The first foreground color
-**             (gfx_pixmap_color_t *) fg1: The second foreground color
-**             (gfx_pixmap_color_t *) bg: The background color
-** Returns   : (gfx_pixmap_t *) The result pixmap, or NULL on error
-** The results are written to the pixmap's index buffer. Contents of the
-** foreground and background fields are copied into a newly allocated font
-** structure, so that the pixmap may be translated directly.
-** If any of the colors is null, it will be assumed to be transparent.
-** In color index mode, the specified colors have to be preallocated.
-*/
-
-
 /*********************/
 /*  SCI0 operations  */
 /*********************/

Modified: scummvm/trunk/engines/sci/gfx/gfx_system.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_system.h	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/gfx_system.h	2009-03-08 08:15:56 UTC (rev 39211)
@@ -289,31 +289,7 @@
 };
 
 
-struct gfx_bitmap_font_t { /* gfx_bitmap_font_t: Bitmap font information */
-	int ID; /* Unique resource ID */
 
-	int chars_nr; /* Numer of available characters */
-
-	int *widths; /* chars_nr character widths, in pixels */
-
-	int row_size; /* Byte size of each pixel row. For unscaled fonts, this is
-		      ** always 1, 2, or 4. Otherwise, it's a multiple of 4.
-		      */
-
-	int line_height; /* Height of each text line (usually identical to height) */
-	int height; /* Height for all characters, in pixel rows */
-	int char_size; /* Amount of memory occupied by one character in data */
-
-	byte *data; /* Font data, consisting of 'chars_nr' entries of 'height' rows
-		    ** of 'row_size' bytes. For each character ch, its first byte
-		    ** (the topmost row) is located at (data + (charsize * ch)), and
-		    ** its pixel width is widths[ch], provided that (ch < chars_nr).
-		    */
-
-};
-
-
-
 /***********************/
 /*** Constant values ***/
 /***********************/

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-03-08 08:15:56 UTC (rev 39211)
@@ -27,6 +27,7 @@
 
 #include "sci/sci_memory.h"
 #include "sci/gfx/operations.h"
+#include "sci/gfx/font.h"
 
 #include "common/system.h"
 #include "common/events.h"

Modified: scummvm/trunk/engines/sci/gfx/operations.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.h	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/operations.h	2009-03-08 08:15:56 UTC (rev 39211)
@@ -38,6 +38,8 @@
 
 namespace Sci {
 
+struct text_fragment_t;
+
 #define GFXOP_NO_POINTER -1
 
 /* Threshold in color index mode to differentiate between visible and non-visible stuff.

Modified: scummvm/trunk/engines/sci/gfx/resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resmgr.cpp	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/resmgr.cpp	2009-03-08 08:15:56 UTC (rev 39211)
@@ -34,6 +34,7 @@
 #include "sci/gfx/gfx_driver.h"
 #include "sci/gfx/gfx_resmgr.h"
 #include "sci/gfx/gfx_state_internal.h"
+#include "sci/gfx/font.h"
 
 #include "common/system.h"
 

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_font.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_font.cpp	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_font.cpp	2009-03-08 08:15:56 UTC (rev 39211)
@@ -27,6 +27,7 @@
 #include "sci/gfx/gfx_system.h"
 #include "sci/gfx/gfx_resource.h"
 #include "sci/gfx/gfx_tools.h"
+#include "sci/gfx/font.h"
 
 namespace Sci {
 

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp	2009-03-08 08:15:56 UTC (rev 39211)
@@ -30,6 +30,7 @@
 #include "sci/gfx/gfx_widgets.h"
 #include "sci/gfx/gfx_resmgr.h"
 #include "sci/gfx/gfx_options.h"
+#include "sci/gfx/font.h"
 
 #include "common/util.h"
 

Modified: scummvm/trunk/engines/sci/gfx/sci_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/sci_widgets.cpp	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/gfx/sci_widgets.cpp	2009-03-08 08:15:56 UTC (rev 39211)
@@ -29,6 +29,7 @@
 #include "sci/gfx/menubar.h"
 #include "sci/gfx/sci_widgets.h"
 #include "sci/gfx/gfx_state_internal.h"
+#include "sci/gfx/font.h"
 
 #include "common/system.h"
 

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-03-08 08:15:56 UTC (rev 39211)
@@ -251,7 +251,6 @@
 	gfx_options_t gfx_options;
 	gfx_options.workarounds = 0;
 	gfx_options.buffer_pics_nr = 0;
-	gfx_options.correct_rendering = 1;
 	gfx_options.pic0_unscaled = 1;
 	gfx_options.pic0_dither_mode = GFXR_DITHER_MODE_D256;
 	gfx_options.pic0_dither_pattern = GFXR_DITHER_PATTERN_SCALED;

Modified: scummvm/trunk/engines/sci/scicore/vocab.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab.cpp	2009-03-08 03:26:21 UTC (rev 39210)
+++ scummvm/trunk/engines/sci/scicore/vocab.cpp	2009-03-08 08:15:56 UTC (rev 39211)
@@ -47,9 +47,6 @@
 }
 
 word_t **vocab_get_words(ResourceManager *resmgr, int *word_counter) {
-	int counter = 0;
-	unsigned int seeker;
-	word_t **words;
 
 	char currentword[256] = ""; // They're not going to use words longer than 255 ;-)
 	int currentwordpos = 0;
@@ -71,6 +68,7 @@
 		return NULL; // NOT critical: SCI1 games and some demos don't have one!
 	}
 
+	unsigned int seeker;
 	if (vocab_version == 1)
 		seeker = 255 * 2; // vocab.900 starts with 255 16-bit pointers which we don't use
 	else
@@ -82,6 +80,8 @@
 		// Now this ought to be critical, but it'll just cause parse() and said() not to work
 	}
 
+	int counter = 0;
+	word_t **words;
 	words = (word_t **)sci_malloc(sizeof(word_t *));
 
 	while (seeker < resource->size) {


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