aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/text.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2015-07-17 10:36:20 +0300
committerEugene Sandulenko2015-12-15 00:05:02 +0100
commit79ed1e1f05dc1537f666018bc7240a5d96835b5b (patch)
treef89e11d715c89ce3e2e0940091f32af022b06b7f /engines/lab/text.cpp
parent884b80f2150c4509912988b19e0106aa15e1008f (diff)
downloadscummvm-rg350-79ed1e1f05dc1537f666018bc7240a5d96835b5b.tar.gz
scummvm-rg350-79ed1e1f05dc1537f666018bc7240a5d96835b5b.tar.bz2
scummvm-rg350-79ed1e1f05dc1537f666018bc7240a5d96835b5b.zip
LAB: Get rid of numtostr(), and simplify most uses of sizeOfFile()
Diffstat (limited to 'engines/lab/text.cpp')
-rw-r--r--engines/lab/text.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/lab/text.cpp b/engines/lab/text.cpp
index 5c456c4523..5056d24e63 100644
--- a/engines/lab/text.cpp
+++ b/engines/lab/text.cpp
@@ -41,10 +41,9 @@ namespace Lab {
bool openFontMem(const char *TextFontPath, struct TextFont *tf, byte *fontbuffer) {
byte **file = NULL;
char header[5];
- int32 filesize, headersize = 4L + 2L + 256 * 3 + 4L;
+ uint32 filesize, headersize = 4L + 2L + 256 * 3 + 4L;
- filesize = sizeOfFile(TextFontPath);
- file = g_music->newOpen(TextFontPath);
+ file = g_music->newOpen(TextFontPath, filesize);
if ((file != NULL) && (filesize > headersize)) {
header[4] = 0;
@@ -76,11 +75,10 @@ bool openFontMem(const char *TextFontPath, struct TextFont *tf, byte *fontbuffer
bool openFont(const char *TextFontPath, struct TextFont **tf) {
byte **file = NULL;
char header[5];
- int32 filesize, headersize = 4L + 2L + 256 * 3 + 4L;
+ uint32 filesize, headersize = 4L + 2L + 256 * 3 + 4L;
if ((*tf = (TextFont *)calloc(sizeof(struct TextFont), 1))) {
- filesize = sizeOfFile(TextFontPath);
- file = g_music->newOpen(TextFontPath);
+ file = g_music->newOpen(TextFontPath, filesize);
if ((file != NULL) && (filesize > headersize)) {
header[4] = 0;