[Scummvm-cvs-logs] CVS: tools convbdf.c,1.4,1.5
Max Horn
fingolfin at users.sourceforge.net
Sun Aug 15 07:06:16 CEST 2004
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23768
Modified Files:
convbdf.c
Log Message:
Changed the way NewFonts are instantiated (will make it easier to add multiple fonts)
Index: convbdf.c
===================================================================
RCS file: /cvsroot/scummvm/tools/convbdf.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- convbdf.c 6 May 2004 09:20:27 -0000 1.4
+++ convbdf.c 15 Aug 2004 14:05:33 -0000 1.5
@@ -814,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"
- "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"
+ "static const FontDesc desc = {\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"
+ "\t" "sizeof(_font_bits)/sizeof(bitmap_t)\n"
"};\n",
pf->name,
pf->maxwidth, pf->height,
@@ -847,7 +847,7 @@
buf,
pf->defaultchar);
- fprintf(ofp, "\n" "const NewFont g_sysfont;\n");
+ fprintf(ofp, "\n" "const NewFont g_sysfont(desc);\n");
fprintf(ofp, "\n} // End of namespace GUI\n");
return 0;
More information about the Scummvm-git-logs
mailing list