LAB: Merge parsetypes.h and parsefun.h into processroom.h

This commit is contained in:
Filippos Karapetis 2015-12-08 01:36:16 +02:00 committed by Willem Jan Palenstijn
parent daf0655754
commit 00d61638ac
12 changed files with 26 additions and 80 deletions

View file

@ -30,7 +30,6 @@
#include "engines/advancedDetector.h" #include "engines/advancedDetector.h"
#include "common/system.h"
#include "common/str-array.h" #include "common/str-array.h"
#include "common/savefile.h" #include "common/savefile.h"

View file

@ -33,7 +33,7 @@
#include "lab/anim.h" #include "lab/anim.h"
#include "lab/image.h" #include "lab/image.h"
#include "lab/intro.h" #include "lab/intro.h"
#include "lab/parsefun.h" #include "lab/processroom.h"
#include "lab/interface.h" #include "lab/interface.h"
#include "lab/resource.h" #include "lab/resource.h"

View file

@ -30,10 +30,9 @@
#include "lab/lab.h" #include "lab/lab.h"
#include "lab/anim.h" #include "lab/anim.h"
#include "lab/parsetypes.h"
#include "lab/image.h" #include "lab/image.h"
#include "lab/labfun.h" #include "lab/labfun.h"
#include "lab/parsefun.h" #include "lab/processroom.h"
#include "lab/resource.h" #include "lab/resource.h"
#include "lab/graphics.h" #include "lab/graphics.h"

View file

@ -33,6 +33,7 @@
#include "graphics/palette.h" #include "graphics/palette.h"
#include "lab/anim.h" #include "lab/anim.h"
#include "lab/processroom.h"
namespace Lab { namespace Lab {

View file

@ -33,6 +33,7 @@
#include "common/array.h" #include "common/array.h"
#include "common/events.h" #include "common/events.h"
#include "common/system.h"
#include "engines/engine.h" #include "engines/engine.h"
#include "lab/labfun.h" #include "lab/labfun.h"

View file

@ -32,11 +32,8 @@
#define LAB_LABFUN_H #define LAB_LABFUN_H
#include "common/events.h" #include "common/events.h"
#include "lab/parsetypes.h"
#include "common/file.h" #include "common/file.h"
#include "common/savefile.h" #include "common/savefile.h"
#include "engines/savestate.h" #include "engines/savestate.h"
namespace Lab { namespace Lab {

View file

@ -32,8 +32,7 @@
#include "lab/labfun.h" #include "lab/labfun.h"
#include "lab/anim.h" #include "lab/anim.h"
#include "lab/image.h" #include "lab/image.h"
#include "lab/parsefun.h" #include "lab/processroom.h"
#include "lab/parsetypes.h"
#include "lab/resource.h" #include "lab/resource.h"
#include "lab/interface.h" #include "lab/interface.h"

View file

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

View file

@ -32,8 +32,7 @@
#include "lab/lab.h" #include "lab/lab.h"
#include "lab/labfun.h" #include "lab/labfun.h"
#include "lab/parsetypes.h" #include "lab/processroom.h"
#include "lab/parsefun.h"
#include "lab/resource.h" #include "lab/resource.h"
#include "lab/anim.h" #include "lab/anim.h"
#include "lab/interface.h" #include "lab/interface.h"

View file

@ -28,14 +28,12 @@
* *
*/ */
#ifndef LAB_PARSETYPES_H #ifndef LAB_PROCESSROOM_H
#define LAB_PARSETYPES_H #define LAB_PROCESSROOM_H
#include "common/system.h"
namespace Lab { namespace Lab {
/*------------------------------- Action types ------------------------------*/ /*------------------------------- Action types ------------------------------*/
#define PLAYSOUND 1 #define PLAYSOUND 1
#define PLAYSOUNDCONT 2 #define PLAYSOUNDCONT 2
#define SHOWDIFF 3 #define SHOWDIFF 3
@ -73,7 +71,7 @@ namespace Lab {
#define CSHOWMESSAGE 35 #define CSHOWMESSAGE 35
#define PLAYSOUNDB 36 #define PLAYSOUNDB 36
/* Rule Types */ /* Rule Types */
#define ACTION 1 #define ACTION 1
#define OPERATE 2 #define OPERATE 2
#define GOFORWARD 3 #define GOFORWARD 3
@ -82,7 +80,7 @@ namespace Lab {
#define GOMAINVIEW 6 #define GOMAINVIEW 6
#define TURNFROMTO 7 #define TURNFROMTO 7
/*----------------------------- Rule Type Action ----------------------------*/ /*----------------------------- Rule Type Action ----------------------------*/
#define TAKE 1 #define TAKE 1
#define MOVE 2 #define MOVE 2
#define OPENDOOR 3 #define OPENDOOR 3
@ -191,6 +189,18 @@ struct MapData {
#pragma pack(pop) #pragma pack(pop)
#endif #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 } // End of namespace Lab
#endif /* LAB_PARSETYPES_H */ #endif /* LAB_PROCESSROOM_H */

View file

@ -36,10 +36,9 @@
#include "lab/lab.h" #include "lab/lab.h"
#include "lab/labfun.h" #include "lab/labfun.h"
#include "lab/image.h" #include "lab/image.h"
#include "lab/parsefun.h" #include "lab/processroom.h"
#include "lab/interface.h" #include "lab/interface.h"
#include "lab/anim.h" #include "lab/anim.h"
#include "lab/parsetypes.h"
#include "lab/resource.h" #include "lab/resource.h"
namespace Lab { namespace Lab {

View file

@ -29,7 +29,7 @@
*/ */
#include "lab/lab.h" #include "lab/lab.h"
#include "lab/parsefun.h" #include "lab/processroom.h"
#include "lab/graphics.h" #include "lab/graphics.h"
namespace Lab { namespace Lab {