aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/engine.cpp3
-rw-r--r--engines/lab/lab.h3
-rw-r--r--engines/lab/labfun.h56
-rw-r--r--engines/lab/labsets.h61
-rw-r--r--engines/lab/savegame.cpp7
-rw-r--r--engines/lab/special.cpp4
6 files changed, 66 insertions, 68 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index a986807a1f..ed4908bb25 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -565,7 +565,6 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
bool doit;
uint16 NewDir;
-
_anim->_doBlack = false;
if ((msgClass == RAWKEY) && (!_graphics->_longWinInFront)) {
@@ -1055,9 +1054,7 @@ void LabEngine::go() {
}
_event->initMouse();
-
_msgFont = _resource->getFont("P:AvanteG.12");
-
_event->mouseHide();
Intro *intro = new Intro(this);
diff --git a/engines/lab/lab.h b/engines/lab/lab.h
index b917da7bce..06e4b7480a 100644
--- a/engines/lab/lab.h
+++ b/engines/lab/lab.h
@@ -42,6 +42,7 @@
#include "lab/resource.h"
#include "lab/anim.h"
#include "lab/graphics.h"
+#include "lab/labsets.h"
struct ADGameDescription;
@@ -149,6 +150,8 @@ public:
void drawMonText(char *text, TextFont *monitorFont, uint16 x1, uint16 y1, uint16 x2, uint16 y2, bool isinteractive);
void processMonitor(char *ntext, TextFont *monitorFont, bool isinteractive, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
void doMonitor(char *background, char *textfile, bool isinteractive, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
+ void doNotes();
+ void doWestPaper();
void eatMessages();
void drawStaticMessage(byte index);
void drawDirection(CloseDataPtr lcPtr);
diff --git a/engines/lab/labfun.h b/engines/lab/labfun.h
index 20785f4f4d..d58b27ecc8 100644
--- a/engines/lab/labfun.h
+++ b/engines/lab/labfun.h
@@ -68,63 +68,13 @@ struct SaveGameHeader {
/*----- From graphics.c ------*/
/*----------------------------*/
-/* Reads in pictures */
-
bool readMusic(const char *filename, bool waitTillFinished);
-void drawStaticMessage(byte index);
-
-/* Double Buffer stuff */
-
-void newFlipViews(void *scrPtr, uint16 *newpal, uint16 numcolors);
-void flipViews(void *scrPtr);
-
-/*----------------------------*/
-/*----- From Interface.c -----*/
-/*----------------------------*/
-
-Gadget *addGadButton(uint16 x, uint16 y, void *UpImage, void *DownImage, uint16 id);
-void gadgetsOnOff(void *gptr, void *win, int32 num, bool on);
-
-/*----------------------*/
-/*----- From Lab.c -----*/
-/*----------------------*/
-
-void eatMessages();
-bool quitPlaying();
-
-void readBlock(void *Buffer, uint32 Size, byte **File);
-
-/*---------------------------*/
-/*----- From LabSets.c ------*/
-/*---------------------------*/
-
-class LargeSet {
-public:
- LargeSet(uint16 last, LabEngine *vm);
- ~LargeSet();
- bool in(uint16 element);
- void inclElement(uint16 element);
- void exclElement(uint16 element);
- bool readInitialConditions(const char *fileName);
-
-private:
- LabEngine *_vm;
-
-public:
- uint16 _lastElement;
- uint16 *_array;
-};
/*---------------------------*/
/*-------- From Map.c -------*/
/*---------------------------*/
void fade(bool fadein, uint16 res);
-void doMap(uint16 CurRoom);
-void doJournal();
-void doNotes();
-void doWestPaper();
-void doMonitor(char *background, char *textfile, bool isinteractive, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
/*--------------------------*/
/*----- From saveGame.c ----*/
@@ -134,12 +84,6 @@ bool saveGame(uint16 Direction, uint16 Quarters, int slot, Common::String desc);
bool loadGame(uint16 *Direction, uint16 *Quarters, int slot);
bool readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &header);
-/*--------------------------*/
-/*----- From Special.c -----*/
-/*--------------------------*/
-
-void showCombination(const char *filename);
-
} // End of namespace Lab
#endif /* LAB_LABFUN_H */
diff --git a/engines/lab/labsets.h b/engines/lab/labsets.h
new file mode 100644
index 0000000000..3251ee18a3
--- /dev/null
+++ b/engines/lab/labsets.h
@@ -0,0 +1,61 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+ /*
+ * This code is based on Labyrinth of Time code with assistance of
+ *
+ * Copyright (c) 1993 Terra Nova Development
+ * Copyright (c) 2004 The Wyrmkeep Entertainment Co.
+ *
+ */
+
+#ifndef LAB_LABSETS_H
+#define LAB_LABSETS_H
+
+namespace Lab {
+
+/*---------------------------*/
+/*----- From LabSets.c ------*/
+/*---------------------------*/
+
+class LabEngine;
+
+class LargeSet {
+public:
+ LargeSet(uint16 last, LabEngine *vm);
+ ~LargeSet();
+ bool in(uint16 element);
+ void inclElement(uint16 element);
+ void exclElement(uint16 element);
+ bool readInitialConditions(const char *fileName);
+
+private:
+ LabEngine *_vm;
+
+public:
+ uint16 _lastElement;
+ uint16 *_array;
+};
+
+} // End of namespace Lab
+
+#endif // LAB_LABSETS_H
diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp
index d97a03688f..cfb636fa58 100644
--- a/engines/lab/savegame.cpp
+++ b/engines/lab/savegame.cpp
@@ -42,14 +42,7 @@ namespace Lab {
#define SAVEGAME_ID MKTAG('L', 'O', 'T', 'S')
#define SAVEGAME_VERSION 1
-#define BOOKMARK 0
-#define CARDMARK 1
-#define FLOPPY 2
-
-
/*----- The machine independent section of saveGame.c -----*/
-
-
/* Lab: Labyrinth specific */
extern char *getPictName(CloseDataPtr *lcptr);
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index 4143ad6d73..7c7dcb1477 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -101,7 +101,7 @@ static byte *loadBackPict(const char *fileName, bool tomem) {
/*****************************************************************************/
/* Does the things to properly set up the detective notes. */
/*****************************************************************************/
-void doNotes() {
+void LabEngine::doNotes() {
TextFont *noteFont = g_lab->_resource->getFont("P:Note.fon");
char *ntext = g_lab->_resource->getText("Lab:Rooms/Notes");
@@ -117,7 +117,7 @@ void doNotes() {
/* Does the things to properly set up the old west newspaper. Assumes that */
/* OpenHiRes already called. */
/*****************************************************************************/
-void doWestPaper() {
+void LabEngine::doWestPaper() {
char *ntext;
TextFont *paperFont;
int32 FileLen, CharsPrinted;