From 24684fe321f337caf96af917a3b7e647e8fd113b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 1 Dec 2015 02:05:29 +0200 Subject: LAB: Move getText to the Resource class Also, make getFont() error out when it can't find a font, and get rid of BigMsgFont --- engines/lab/map.cpp | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'engines/lab/map.cpp') diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index 2db36103b5..02cdbfb1ac 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -42,10 +42,6 @@ namespace Lab { -static TextFont *BigMsgFont; -static TextFont bmf; - - extern uint16 Direction; extern CloseDataPtr CPtr; @@ -70,33 +66,6 @@ void setAmigaPal(uint16 *pal, uint16 numcolors) { g_lab->writeColorRegsSmooth(vgapal, 0, 16); } -void decrypt(byte *text) { - while (text && *text != '\0') { - *text++ -= (byte)95; - } -} - -/*****************************************************************************/ -/* Gets a chunk of text and puts it into the graphics memory. */ -/*****************************************************************************/ -char *getText(const char *filename) { - bool dodecrypt; - byte **tfile; - - g_lab->_music->updateMusic(); - dodecrypt = (isBuffered(filename) == NULL); - tfile = g_lab->_music->newOpen(filename); - - if (!tfile) - return NULL; - - if (dodecrypt) - decrypt(*tfile); - - return (char *)*tfile; -} - - /*****************************************************************************/ /* Reads in an image from disk. */ @@ -193,11 +162,6 @@ static bool loadMapData() { Gadget *gptr; uint16 counter; - BigMsgFont = &bmf; - - if (!(BigMsgFont = g_lab->_resource->getFont("P:Map.fon"))) - BigMsgFont = MsgFont; - resetBuffer(); /* Make images load into start of buffer */ buffer = g_lab->_music->newOpen("P:MapImage", Size); -- cgit v1.2.3