diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lab/detection.cpp | 1 | ||||
-rw-r--r-- | engines/lab/engine.cpp | 2 | ||||
-rw-r--r-- | engines/lab/graphics.cpp | 3 | ||||
-rw-r--r-- | engines/lab/graphics.h | 1 | ||||
-rw-r--r-- | engines/lab/lab.h | 1 | ||||
-rw-r--r-- | engines/lab/labfun.h | 3 | ||||
-rw-r--r-- | engines/lab/map.cpp | 3 | ||||
-rw-r--r-- | engines/lab/parsefun.h | 58 | ||||
-rw-r--r-- | engines/lab/processroom.cpp | 3 | ||||
-rw-r--r-- | engines/lab/processroom.h (renamed from engines/lab/parsetypes.h) | 26 | ||||
-rw-r--r-- | engines/lab/special.cpp | 3 | ||||
-rw-r--r-- | engines/lab/transitions.cpp | 2 |
12 files changed, 26 insertions, 80 deletions
diff --git a/engines/lab/detection.cpp b/engines/lab/detection.cpp index 3b01d77568..b61b4e4313 100644 --- a/engines/lab/detection.cpp +++ b/engines/lab/detection.cpp @@ -30,7 +30,6 @@ #include "engines/advancedDetector.h" -#include "common/system.h" #include "common/str-array.h" #include "common/savefile.h" diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 07c49d5a05..d2e7a55cc6 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -33,7 +33,7 @@ #include "lab/anim.h" #include "lab/image.h" #include "lab/intro.h" -#include "lab/parsefun.h" +#include "lab/processroom.h" #include "lab/interface.h" #include "lab/resource.h" diff --git a/engines/lab/graphics.cpp b/engines/lab/graphics.cpp index 80eae97ab0..8da54cc90a 100644 --- a/engines/lab/graphics.cpp +++ b/engines/lab/graphics.cpp @@ -30,10 +30,9 @@ #include "lab/lab.h" #include "lab/anim.h" -#include "lab/parsetypes.h" #include "lab/image.h" #include "lab/labfun.h" -#include "lab/parsefun.h" +#include "lab/processroom.h" #include "lab/resource.h" #include "lab/graphics.h" diff --git a/engines/lab/graphics.h b/engines/lab/graphics.h index 1bfc0278e5..9c25295343 100644 --- a/engines/lab/graphics.h +++ b/engines/lab/graphics.h @@ -33,6 +33,7 @@ #include "graphics/palette.h" #include "lab/anim.h" +#include "lab/processroom.h" namespace Lab { diff --git a/engines/lab/lab.h b/engines/lab/lab.h index af93367295..fb2d20d5a4 100644 --- a/engines/lab/lab.h +++ b/engines/lab/lab.h @@ -33,6 +33,7 @@ #include "common/array.h" #include "common/events.h" +#include "common/system.h" #include "engines/engine.h" #include "lab/labfun.h" diff --git a/engines/lab/labfun.h b/engines/lab/labfun.h index e67d0f786a..e0a3b089c6 100644 --- a/engines/lab/labfun.h +++ b/engines/lab/labfun.h @@ -32,11 +32,8 @@ #define LAB_LABFUN_H #include "common/events.h" -#include "lab/parsetypes.h" - #include "common/file.h" #include "common/savefile.h" - #include "engines/savestate.h" namespace Lab { diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index 4136b28bab..8c71d1a6a6 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -32,8 +32,7 @@ #include "lab/labfun.h" #include "lab/anim.h" #include "lab/image.h" -#include "lab/parsefun.h" -#include "lab/parsetypes.h" +#include "lab/processroom.h" #include "lab/resource.h" #include "lab/interface.h" diff --git a/engines/lab/parsefun.h b/engines/lab/parsefun.h deleted file mode 100644 index 78f7904e0b..0000000000 --- a/engines/lab/parsefun.h +++ /dev/null @@ -1,58 +0,0 @@ -/* 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_PARSEFUN_H -#define LAB_PARSEFUN_H - -#include "lab/labfun.h" -#include "lab/parsetypes.h" - -namespace Lab { - -/* From Parser.c */ - -bool parse(const char *inputFile); - -/* From ProcessRoom.c */ - -ViewData *getViewData(uint16 roomNum, uint16 direction); -void drawDirection(CloseDataPtr lcptr); -uint16 processArrow(uint16 curDirection, uint16 arrow); -void setCurClose(Common::Point pos, CloseDataPtr *cptr, bool useAbsoluteCoords = false); -bool takeItem(uint16 x, uint16 y, CloseDataPtr *cptr); -bool doActionRule(Common::Point pos, int16 action, int16 roomNum, CloseDataPtr *lcptr); -bool doOperateRule(int16 x, int16 y, int16 itemNum, CloseDataPtr *lcptr); -bool doGoForward(CloseDataPtr *lcptr); -bool doTurn(uint16 from, uint16 to, CloseDataPtr *lcptr); -bool doMainView(CloseDataPtr *lcptr); - -} // End of namespace Lab - -#endif /* LAB_PARSEFUN_H */ diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index 8afa543cfe..fa270ded61 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -32,8 +32,7 @@ #include "lab/lab.h" #include "lab/labfun.h" -#include "lab/parsetypes.h" -#include "lab/parsefun.h" +#include "lab/processroom.h" #include "lab/resource.h" #include "lab/anim.h" #include "lab/interface.h" diff --git a/engines/lab/parsetypes.h b/engines/lab/processroom.h index 1f03bc3564..d69dae1f55 100644 --- a/engines/lab/parsetypes.h +++ b/engines/lab/processroom.h @@ -28,14 +28,12 @@ * */ -#ifndef LAB_PARSETYPES_H -#define LAB_PARSETYPES_H - -#include "common/system.h" +#ifndef LAB_PROCESSROOM_H +#define LAB_PROCESSROOM_H namespace Lab { -/*------------------------------- Action types ------------------------------*/ + /*------------------------------- Action types ------------------------------*/ #define PLAYSOUND 1 #define PLAYSOUNDCONT 2 #define SHOWDIFF 3 @@ -73,7 +71,7 @@ namespace Lab { #define CSHOWMESSAGE 35 #define PLAYSOUNDB 36 -/* Rule Types */ + /* Rule Types */ #define ACTION 1 #define OPERATE 2 #define GOFORWARD 3 @@ -82,7 +80,7 @@ namespace Lab { #define GOMAINVIEW 6 #define TURNFROMTO 7 -/*----------------------------- Rule Type Action ----------------------------*/ + /*----------------------------- Rule Type Action ----------------------------*/ #define TAKE 1 #define MOVE 2 #define OPENDOOR 3 @@ -191,6 +189,18 @@ struct MapData { #pragma pack(pop) #endif +bool parse(const char *inputFile); +ViewData *getViewData(uint16 roomNum, uint16 direction); +void drawDirection(CloseDataPtr lcptr); +uint16 processArrow(uint16 curDirection, uint16 arrow); +void setCurClose(Common::Point pos, CloseDataPtr *cptr, bool useAbsoluteCoords = false); +bool takeItem(uint16 x, uint16 y, CloseDataPtr *cptr); +bool doActionRule(Common::Point pos, int16 action, int16 roomNum, CloseDataPtr *lcptr); +bool doOperateRule(int16 x, int16 y, int16 itemNum, CloseDataPtr *lcptr); +bool doGoForward(CloseDataPtr *lcptr); +bool doTurn(uint16 from, uint16 to, CloseDataPtr *lcptr); +bool doMainView(CloseDataPtr *lcptr); + } // End of namespace Lab -#endif /* LAB_PARSETYPES_H */ +#endif /* LAB_PROCESSROOM_H */ diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 41fcad7a86..469d8ab9d8 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -36,10 +36,9 @@ #include "lab/lab.h" #include "lab/labfun.h" #include "lab/image.h" -#include "lab/parsefun.h" +#include "lab/processroom.h" #include "lab/interface.h" #include "lab/anim.h" -#include "lab/parsetypes.h" #include "lab/resource.h" namespace Lab { diff --git a/engines/lab/transitions.cpp b/engines/lab/transitions.cpp index b7d8e8c6a1..c8a497cab0 100644 --- a/engines/lab/transitions.cpp +++ b/engines/lab/transitions.cpp @@ -29,7 +29,7 @@ */ #include "lab/lab.h" -#include "lab/parsefun.h" +#include "lab/processroom.h" #include "lab/graphics.h" namespace Lab { |