[Scummvm-cvs-logs] CVS: tools convbdf.c,1.3,1.4

Max Horn fingolfin at users.sourceforge.net
Thu May 6 02:21:30 CEST 2004


Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11150

Modified Files:
	convbdf.c 
Log Message:
Updated to match new font implementation

Index: convbdf.c
===================================================================
RCS file: /cvsroot/scummvm/tools/convbdf.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- convbdf.c	30 Dec 2003 16:33:45 -0000	1.3
+++ convbdf.c	6 May 2004 09:20:27 -0000	1.4
@@ -679,7 +679,8 @@
 	char obuf[256];
 	char hdr1[] = {
 		"/* Generated by convbdf on %s. */\n"
-		"#include \"font.h\"\n"
+		"#include \"common/stdafx.h\"\n"
+		"#include \"graphics/font.h\"\n"
 		"\n"
 		"/* Font information:\n"
 		"   name: %s\n"
@@ -695,7 +696,7 @@
 		"   %s\n"
 		"*/\n"
 		"\n"
-		"namespace GUI {\n"
+		"namespace Graphics {\n"
 		"\n"
 		"/* Font character bitmap data. */\n"
 		"static const bitmap_t _font_bits[] = {\n"
@@ -813,29 +814,29 @@
 
 	/* output struct font struct*/
 	if (pf->offset)
-		sprintf(obuf, "_sysfont_offset,");
+		sprintf(obuf, "_sysfont_offset;");
 	else
-		sprintf(obuf, "0,  /* no encode table*/");
+		sprintf(obuf, "0;  /* no encode table*/");
 
 	if (pf->width)
-		sprintf(buf, "_sysfont_width,");
+		sprintf(buf, "_sysfont_width;");
 	else
-		sprintf(buf, "0,  /* fixed width*/");
+		sprintf(buf, "0;  /* fixed width*/");
 
 	fprintf(ofp,
 			"/* Exported structure definition. */\n"
-			"const Font g_sysfont = {\n"
-			"\t\"%s\",\n"
-			"\t%d,\n"
-			"\t%d,\n"
-			"\t%d,\n"
-			"\t%d,\n"
-			"\t%d,\n"
-			"\t_font_bits,\n"
-			"\t%s\n"
-			"\t%s\n"
-			"\t%d,\n"
-			"\tsizeof(_font_bits)/sizeof(bitmap_t),\n"
+			"NewFont::NewFont() {\n"
+			"\t" "name = \"%s\";\n"
+			"\t" "maxwidth = %d;\n"
+			"\t" "height = %d;\n"
+			"\t" "ascent = %d;\n"
+			"\t" "firstchar = %d;\n"
+			"\t" "size = %d;\n"
+			"\t" "bits = _font_bits;\n"
+			"\t" "offset = %s\n"
+			"\t" "width = %s\n"
+			"\t" "defaultchar = %d;\n"
+			"\t" "bits_size = sizeof(_font_bits)/sizeof(bitmap_t);\n"
 			"};\n",
 			pf->name,
 			pf->maxwidth, pf->height,
@@ -846,6 +847,7 @@
 			buf,
 			pf->defaultchar);
 
+	fprintf(ofp, "\n" "const NewFont g_sysfont;\n");
 	fprintf(ofp, "\n} // End of namespace GUI\n");
  
 	return 0;





More information about the Scummvm-git-logs mailing list