From d565b10384dd771fdae7f8fedb793e87c05c022d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 8 Oct 2015 06:15:36 +0300 Subject: LAB: Move the font loading code into the Resource class --- engines/lab/special.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'engines/lab/special.cpp') diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index bedf7215d0..b7f14729a9 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -44,6 +44,7 @@ #include "lab/timing.h" #include "lab/stddefines.h" #include "lab/parsetypes.h" +#include "lab/resource.h" namespace Lab { @@ -474,7 +475,7 @@ void doNotes() { /* Load in the data */ BigMsgFont = &bmfont; - if (!getFont("P:Note.fon", BigMsgFont)) { + if (!(BigMsgFont = g_resource->getFont("P:Note.fon"))) { BigMsgFont = NULL; return; } @@ -500,7 +501,7 @@ void doWestPaper() { BigMsgFont = &bmfont; - if (!getFont("P:News22.fon", BigMsgFont)) { + if (!(BigMsgFont = g_resource->getFont("P:News22.fon"))) { BigMsgFont = NULL; return; } @@ -512,7 +513,7 @@ void doWestPaper() { BigMsgFont = &bmfont; - if (!getFont("P:News32.fon", BigMsgFont)) { + if (!(BigMsgFont = g_resource->getFont("P:News32.fon"))) { BigMsgFont = NULL; return; } @@ -531,7 +532,7 @@ void doWestPaper() { BigMsgFont = &bmfont; - if (!getFont("P:Note.fon", BigMsgFont)) { + if (!(BigMsgFont = g_resource->getFont("P:Note.fon"))) { BigMsgFont = NULL; return; } @@ -562,7 +563,7 @@ static bool loadJournalData() { BigMsgFont = &bmfont; - if (!getFont("P:Journal.fon", BigMsgFont)) { + if (!(BigMsgFont = g_resource->getFont("P:Journal.fon"))) { BigMsgFont = NULL; return false; } @@ -1071,7 +1072,7 @@ void doMonitor(char *background, char *textfile, bool isinteractive, uint16 x1, BigMsgFont = &bmfont; - if (!getFont("P:Map.fon", BigMsgFont)) { + if (!(BigMsgFont = g_resource->getFont("P:Map.fon"))) { freeAllStolenMem(); BigMsgFont = NULL; return; -- cgit v1.2.3