aboutsummaryrefslogtreecommitdiff
path: root/graphics/font.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2006-05-09 14:16:43 +0000
committerEugene Sandulenko2006-05-09 14:16:43 +0000
commitd2546e397934da3e89fdd994e0c620dd0bcfbcd4 (patch)
tree8e7371097f7421496d6ea24ceaff6feeab7185d1 /graphics/font.cpp
parent4c6712246368148c91861fd30677a461e57e698b (diff)
downloadscummvm-rg350-d2546e397934da3e89fdd994e0c620dd0bcfbcd4.tar.gz
scummvm-rg350-d2546e397934da3e89fdd994e0c620dd0bcfbcd4.tar.bz2
scummvm-rg350-d2546e397934da3e89fdd994e0c620dd0bcfbcd4.zip
- Updated MSVC8 project files
- Renamed base/options.cpp to base/commandLine.cpp because of conflict with gui/options.cpp which sit in same directory in MSVC builds - Moved AudioCDManager singleton declaration outside of Audio namespace - Fixed numerous MSVC warning of potentially uninitialized variables and int <-> bool conversions. svn-id: r22397
Diffstat (limited to 'graphics/font.cpp')
-rw-r--r--graphics/font.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/graphics/font.cpp b/graphics/font.cpp
index 18379d7e8c..b40f6fc283 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -172,8 +172,8 @@ NewFontData* bdf_read_font(Common::SeekableReadStream &fp) {
/* read bdf font header information, return 0 on error*/
int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
- int encoding;
- int nchars, maxwidth;
+ int encoding = 0;
+ int nchars = 0, maxwidth;
int firstchar = 65535;
int lastchar = -1;
char buf[256];
@@ -308,8 +308,8 @@ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
int bdf_read_bitmaps(Common::SeekableReadStream &fp, NewFontData* pf) {
long ofs = 0;
int maxwidth = 0;
- int i, k, encoding, width;
- int bbw, bbh, bbx, bby;
+ int i, k, encoding = 0, width = 0;
+ int bbw, bbh = 0, bbx = 0, bby = 0;
int proportional = 0;
int encodetable = 0;
long l;
@@ -627,7 +627,7 @@ NewFont *NewFont::loadFromCache(Common::SeekableReadStream &stream) {
data->bits[i] = stream.readUint16BE();
}
- bool hasOffsetTable = stream.readByte();
+ bool hasOffsetTable = (stream.readByte() != 0);
if (hasOffsetTable) {
data->offset = (unsigned long*)malloc(sizeof(unsigned long)*data->size);
if (!data->offset) {
@@ -641,7 +641,7 @@ NewFont *NewFont::loadFromCache(Common::SeekableReadStream &stream) {
}
}
- bool hasWidthTable = stream.readByte();
+ bool hasWidthTable = (stream.readByte() != 0);
if (hasWidthTable) {
data->width = (unsigned char*)malloc(sizeof(unsigned char)*data->size);
if (!data->width) {