LAB: Move doNotes and doWestPaper to LabEngine, remove some useless defines

This commit is contained in:
Strangerke 2015-12-06 16:03:34 +01:00 committed by Willem Jan Palenstijn
parent fa966938c8
commit f48cf343c2
6 changed files with 66 additions and 68 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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 */

61
engines/lab/labsets.h Normal file
View File

@ -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

View File

@ -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);

View File

@ -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;