2007-05-30 21:56:52 +00:00
|
|
|
/* 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.
|
2002-08-18 16:21:34 +00:00
|
|
|
*
|
|
|
|
* 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.
|
2014-02-18 01:34:17 +00:00
|
|
|
*
|
2002-08-18 16:21:34 +00:00
|
|
|
* 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.
|
2014-02-18 01:34:17 +00:00
|
|
|
*
|
2002-08-18 16:21:34 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-08-18 16:21:34 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-09-29 08:14:27 +00:00
|
|
|
#ifndef AGOS_INTERN_H
|
|
|
|
#define AGOS_INTERN_H
|
2002-08-18 16:21:34 +00:00
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
namespace AGOS {
|
2003-10-03 19:42:27 +00:00
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
enum ChildType {
|
|
|
|
kRoomType = 1,
|
|
|
|
kObjectType = 2,
|
|
|
|
kPlayerType = 3,
|
2007-07-02 00:25:15 +00:00
|
|
|
kGenExitType = 4, // Elvira 1 specific
|
|
|
|
kSuperRoomType = 4, // Elvira 2 specific
|
2007-06-30 16:25:59 +00:00
|
|
|
|
|
|
|
kContainerType = 7,
|
|
|
|
kChainType = 8,
|
|
|
|
kUserFlagType = 9,
|
2008-01-27 19:47:41 +00:00
|
|
|
|
2007-06-30 16:25:59 +00:00
|
|
|
kInheritType = 255
|
|
|
|
};
|
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
struct Child {
|
|
|
|
Child *next;
|
|
|
|
uint16 type;
|
|
|
|
};
|
|
|
|
|
2006-04-06 14:01:52 +00:00
|
|
|
struct SubRoom : Child {
|
2002-08-18 16:21:34 +00:00
|
|
|
uint16 subroutine_id;
|
2006-04-06 14:01:52 +00:00
|
|
|
uint16 roomExitStates;
|
2006-04-06 14:30:41 +00:00
|
|
|
uint16 roomExit[1];
|
2006-09-30 02:15:02 +00:00
|
|
|
uint16 roomShort;
|
|
|
|
uint16 roomLong;
|
|
|
|
uint16 flags;
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2006-10-04 07:10:22 +00:00
|
|
|
struct SubSuperRoom : Child {
|
|
|
|
uint16 subroutine_id;
|
|
|
|
uint16 roomX;
|
|
|
|
uint16 roomY;
|
|
|
|
uint16 roomZ;
|
2006-11-05 08:27:15 +00:00
|
|
|
uint16 roomExitStates[1];
|
2006-10-04 07:10:22 +00:00
|
|
|
};
|
|
|
|
|
2006-04-06 14:01:52 +00:00
|
|
|
struct SubObject : Child {
|
|
|
|
uint16 objectName;
|
2006-09-30 05:51:06 +00:00
|
|
|
uint16 objectSize;
|
|
|
|
uint16 objectWeight;
|
2006-04-06 14:01:52 +00:00
|
|
|
uint32 objectFlags;
|
2006-04-06 14:30:41 +00:00
|
|
|
int16 objectFlagValue[1];
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2006-10-05 13:46:48 +00:00
|
|
|
struct SubPlayer : Child {
|
|
|
|
int16 userKey;
|
|
|
|
int16 size;
|
|
|
|
int16 weight;
|
|
|
|
int16 strength;
|
|
|
|
int16 flags;
|
|
|
|
int16 level;
|
|
|
|
int32 score;
|
|
|
|
};
|
|
|
|
|
2006-11-06 14:28:19 +00:00
|
|
|
struct SubGenExit : Child {
|
2006-09-19 11:59:13 +00:00
|
|
|
uint16 subroutine_id;
|
2006-11-06 14:28:19 +00:00
|
|
|
uint16 dest[6];
|
2006-09-19 11:59:13 +00:00
|
|
|
};
|
|
|
|
|
2006-11-06 14:28:19 +00:00
|
|
|
struct SubContainer : Child {
|
2006-09-19 11:59:13 +00:00
|
|
|
uint16 subroutine_id;
|
2006-11-06 14:28:19 +00:00
|
|
|
uint16 volume;
|
|
|
|
uint16 flags;
|
2006-09-19 11:59:13 +00:00
|
|
|
};
|
|
|
|
|
2006-11-06 14:28:19 +00:00
|
|
|
struct SubChain : Child {
|
2006-09-19 11:59:13 +00:00
|
|
|
uint16 subroutine_id;
|
2006-11-06 14:28:19 +00:00
|
|
|
uint16 chChained;
|
2006-09-30 02:15:02 +00:00
|
|
|
};
|
|
|
|
|
2006-11-06 14:28:19 +00:00
|
|
|
struct SubUserFlag : Child {
|
2006-09-30 02:15:02 +00:00
|
|
|
uint16 subroutine_id;
|
2006-11-06 14:28:19 +00:00
|
|
|
uint16 userFlags[8];
|
|
|
|
uint16 userItems[1];
|
2006-09-30 02:15:02 +00:00
|
|
|
};
|
|
|
|
|
2006-11-06 14:28:19 +00:00
|
|
|
struct SubInherit : Child {
|
2006-09-30 02:15:02 +00:00
|
|
|
uint16 subroutine_id;
|
2006-11-06 14:28:19 +00:00
|
|
|
uint16 inMaster;
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2006-04-06 14:01:52 +00:00
|
|
|
SubRoom_SIZE = sizeof(SubRoom) - sizeof(uint16),
|
2006-10-04 07:10:22 +00:00
|
|
|
SubSuperRoom_SIZE = sizeof(SubSuperRoom) - sizeof(uint16),
|
2006-04-06 14:01:52 +00:00
|
|
|
SubObject_SIZE = sizeof(SubObject) - sizeof(int16)
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2008-03-22 09:46:25 +00:00
|
|
|
struct RoomState {
|
|
|
|
uint16 state;
|
|
|
|
uint16 classFlags;
|
|
|
|
uint16 roomExitStates;
|
|
|
|
|
|
|
|
RoomState() { memset(this, 0, sizeof(*this)); }
|
|
|
|
};
|
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
struct Item {
|
|
|
|
uint16 parent;
|
|
|
|
uint16 child;
|
2006-10-06 14:44:39 +00:00
|
|
|
uint16 next;
|
2005-10-03 14:08:07 +00:00
|
|
|
int16 noun;
|
|
|
|
int16 adjective;
|
|
|
|
int16 state; /* signed int */
|
|
|
|
uint16 classFlags;
|
2006-09-28 23:22:07 +00:00
|
|
|
uint16 itemName;
|
2002-08-18 16:21:34 +00:00
|
|
|
Child *children;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2003-05-20 14:43:22 +00:00
|
|
|
Item() { memset(this, 0, sizeof(*this)); }
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2006-04-05 02:45:28 +00:00
|
|
|
struct IconEntry {
|
2002-08-18 16:21:34 +00:00
|
|
|
Item *item;
|
2006-04-05 02:45:28 +00:00
|
|
|
uint16 boxCode;
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2006-04-05 02:45:28 +00:00
|
|
|
struct IconBlock {
|
|
|
|
int16 line;
|
|
|
|
Item *itemRef;
|
|
|
|
IconEntry iconArray[64];
|
2005-10-19 10:54:22 +00:00
|
|
|
int16 upArrow, downArrow;
|
2006-04-05 02:45:28 +00:00
|
|
|
uint16 classMask;
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2006-04-05 02:45:28 +00:00
|
|
|
struct WindowBlock {
|
2002-08-18 16:21:34 +00:00
|
|
|
byte mode;
|
|
|
|
byte flags;
|
2007-06-04 04:41:46 +00:00
|
|
|
int16 x, y;
|
|
|
|
int16 width, height;
|
|
|
|
int16 textColumn, textRow;
|
|
|
|
int16 scrollY;
|
2006-03-16 05:41:39 +00:00
|
|
|
uint16 textColumnOffset, textLength, textMaxLength;
|
2009-02-07 01:11:51 +00:00
|
|
|
uint8 fillColor, textColor;
|
2006-04-05 02:45:28 +00:00
|
|
|
IconBlock *iconPtr;
|
|
|
|
WindowBlock() { memset(this, 0, sizeof(*this)); }
|
2008-05-22 23:40:36 +00:00
|
|
|
~WindowBlock() { free (iconPtr); }
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
2005-07-30 21:11:48 +00:00
|
|
|
// note on text offset:
|
2002-08-18 16:21:34 +00:00
|
|
|
// the actual x-coordinate is: textColumn * 8 + textColumnOffset
|
|
|
|
// the actual y-coordinate is: textRow * 8
|
|
|
|
|
|
|
|
enum {
|
|
|
|
SUBROUTINE_LINE_SMALL_SIZE = 2,
|
2002-12-25 00:48:13 +00:00
|
|
|
SUBROUTINE_LINE_BIG_SIZE = 8
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2007-02-12 09:04:34 +00:00
|
|
|
#include "common/pack-start.h"
|
|
|
|
|
2006-05-05 05:53:36 +00:00
|
|
|
struct Subroutine {
|
|
|
|
uint16 id; /* subroutine ID */
|
|
|
|
uint16 first; /* offset from subroutine start to first subroutine line */
|
|
|
|
Subroutine *next; /* next subroutine in linked list */
|
|
|
|
};
|
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
struct SubroutineLine {
|
|
|
|
uint16 next;
|
2005-11-18 22:34:41 +00:00
|
|
|
int16 verb;
|
|
|
|
int16 noun1;
|
|
|
|
int16 noun2;
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2007-02-12 09:04:34 +00:00
|
|
|
#include "common/pack-end.h"
|
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
struct TimeEvent {
|
|
|
|
uint32 time;
|
|
|
|
uint16 subroutine_id;
|
|
|
|
TimeEvent *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GameSpecificSettings {
|
2011-08-27 14:40:55 +00:00
|
|
|
const char *base_filename;
|
|
|
|
const char *restore_filename;
|
|
|
|
const char *tbl_filename;
|
2006-04-20 02:23:17 +00:00
|
|
|
const char *effects_filename;
|
|
|
|
const char *speech_filename;
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2006-05-05 05:53:36 +00:00
|
|
|
enum BoxFlags {
|
2009-03-05 21:38:17 +00:00
|
|
|
kBFToggleBox = 0x1, // Elvira 1/2
|
|
|
|
kBFTextBox = 0x1, // Others
|
2006-05-05 05:53:36 +00:00
|
|
|
kBFBoxSelected = 0x2,
|
2009-03-05 21:38:17 +00:00
|
|
|
kBFInvertSelect = 0x4, // Elvira 1/2
|
|
|
|
kBFNoTouchName = 0x4, // Others
|
2006-05-05 05:53:36 +00:00
|
|
|
kBFInvertTouch = 0x8,
|
|
|
|
kBFHyperBox = 0x10, // Feeble Files
|
2009-03-05 21:38:17 +00:00
|
|
|
kBFDragBox = 0x10, // Others
|
2006-05-05 05:53:36 +00:00
|
|
|
kBFBoxInUse = 0x20,
|
|
|
|
kBFBoxDead = 0x40,
|
|
|
|
kBFBoxItem = 0x80
|
|
|
|
};
|
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
enum OldBoxFlags_PN {
|
|
|
|
kOBFObject = 0x1,
|
|
|
|
kOBFExit = 0x2,
|
|
|
|
kOBFDraggable = 0x4,
|
|
|
|
kOBFUseEmptyLine = 0x8,
|
|
|
|
kOBFBoxDisabled = 0x10,
|
|
|
|
kOBFInventoryBox = 0x20,
|
|
|
|
kOBFRoomBox = 0x40,
|
|
|
|
kOBFMoreBox = 0x80,
|
|
|
|
kOBFNoShowName = 0x100,
|
|
|
|
kOBFUseMessageList = 0x400,
|
|
|
|
// ScummVM specific
|
|
|
|
kOBFBoxSelected = 0x800,
|
|
|
|
kOBFInvertTouch = 0x1000
|
|
|
|
};
|
|
|
|
|
2006-05-05 05:53:36 +00:00
|
|
|
enum SubObjectFlags {
|
|
|
|
kOFText = 0x1,
|
|
|
|
kOFSize = 0x2,
|
2006-10-07 01:10:32 +00:00
|
|
|
kOFWorn = 0x4, // Elvira 1
|
|
|
|
kOFWeight = 0x4, // Others
|
2006-05-05 05:53:36 +00:00
|
|
|
kOFVolume = 0x8,
|
|
|
|
kOFIcon = 0x10,
|
|
|
|
kOFKeyColor1 = 0x20,
|
|
|
|
kOFKeyColor2 = 0x40,
|
|
|
|
kOFMenu = 0x80,
|
|
|
|
kOFNumber = 0x100,
|
2006-10-04 03:29:14 +00:00
|
|
|
kOFSoft = 0x200, // Waxworks
|
|
|
|
kOFVoice = 0x200 // Others
|
2006-05-05 05:53:36 +00:00
|
|
|
};
|
2003-10-03 19:42:27 +00:00
|
|
|
|
2005-11-12 06:01:24 +00:00
|
|
|
enum GameFeatures {
|
2014-02-26 21:37:44 +00:00
|
|
|
GF_TALKIE = 1 << 0,
|
|
|
|
GF_OLD_BUNDLE = 1 << 1,
|
|
|
|
GF_CRUNCHED = 1 << 2,
|
|
|
|
GF_CRUNCHED_GAMEPC = 1 << 3,
|
|
|
|
GF_ZLIBCOMP = 1 << 4,
|
|
|
|
GF_32COLOR = 1 << 5,
|
|
|
|
GF_EGA = 1 << 6,
|
|
|
|
GF_PLANAR = 1 << 7,
|
|
|
|
GF_DEMO = 1 << 8,
|
|
|
|
GF_PACKED = 1 << 9,
|
2018-05-10 10:22:47 +00:00
|
|
|
GF_BROKEN_FF_RATING = 1 << 10,
|
|
|
|
GF_WAVSFX = 1 << 11
|
2005-11-12 06:01:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum GameFileTypes {
|
|
|
|
GAME_BASEFILE = 1 << 0,
|
|
|
|
GAME_ICONFILE = 1 << 1,
|
|
|
|
GAME_GMEFILE = 1 << 2,
|
2006-10-14 14:51:15 +00:00
|
|
|
GAME_MENUFILE = 1 << 3,
|
|
|
|
GAME_STRFILE = 1 << 4,
|
|
|
|
GAME_RMSLFILE = 1 << 5,
|
2007-05-27 11:32:19 +00:00
|
|
|
GAME_STATFILE = 1 << 6,
|
|
|
|
GAME_TBLFILE = 1 << 7,
|
|
|
|
GAME_XTBLFILE = 1 << 8,
|
|
|
|
GAME_RESTFILE = 1 << 9,
|
2009-03-08 08:45:21 +00:00
|
|
|
GAME_TEXTFILE = 1 << 10,
|
2009-05-01 05:39:06 +00:00
|
|
|
GAME_VGAFILE = 1 << 11,
|
2006-03-22 06:21:17 +00:00
|
|
|
|
2009-05-01 05:39:06 +00:00
|
|
|
GAME_GFXIDXFILE = 1 << 12
|
2005-11-12 06:01:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum GameIds {
|
2009-03-08 08:45:21 +00:00
|
|
|
GID_PN,
|
2006-10-06 05:13:09 +00:00
|
|
|
GID_ELVIRA1,
|
2006-09-19 11:59:13 +00:00
|
|
|
GID_ELVIRA2,
|
|
|
|
GID_WAXWORKS,
|
|
|
|
|
2008-12-14 01:13:59 +00:00
|
|
|
GID_SIMON1,
|
2005-11-12 06:01:24 +00:00
|
|
|
GID_SIMON1DOS,
|
|
|
|
GID_SIMON1CD32,
|
|
|
|
|
2008-12-14 01:13:59 +00:00
|
|
|
GID_SIMON2,
|
2006-10-03 14:18:17 +00:00
|
|
|
|
|
|
|
GID_FEEBLEFILES,
|
2006-09-28 23:22:07 +00:00
|
|
|
|
2006-09-29 05:33:22 +00:00
|
|
|
GID_DIMP,
|
2006-09-28 23:22:07 +00:00
|
|
|
GID_JUMBLE,
|
|
|
|
GID_PUZZLE,
|
|
|
|
GID_SWAMPY
|
2002-11-27 15:08:24 +00:00
|
|
|
};
|
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
} // End of namespace AGOS
|
2006-05-05 05:53:36 +00:00
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
#endif
|