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.
|
|
|
|
|
|
|
|
* 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
|
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-02-11 12:46:41 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
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
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2006-04-05 02:45:28 +00:00
|
|
|
uint8 fill_color, text_color;
|
|
|
|
IconBlock *iconPtr;
|
|
|
|
WindowBlock() { memset(this, 0, sizeof(*this)); }
|
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 {
|
2005-11-05 18:51:12 +00:00
|
|
|
#ifndef PALMOS_68K
|
2006-04-20 02:23:17 +00:00
|
|
|
const char *effects_filename;
|
|
|
|
const char *speech_filename;
|
2003-12-21 09:01:58 +00:00
|
|
|
#else
|
2006-04-20 02:23:17 +00:00
|
|
|
const char effects_filename[12];
|
|
|
|
const char speech_filename[12];
|
2003-12-21 09:01:58 +00:00
|
|
|
#endif
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2006-05-05 05:53:36 +00:00
|
|
|
enum BoxFlags {
|
|
|
|
kBFTextBox = 0x1,
|
|
|
|
kBFBoxSelected = 0x2,
|
|
|
|
kBFNoTouchName = 0x4,
|
|
|
|
kBFInvertTouch = 0x8,
|
|
|
|
kBFDragBox = 0x10, // Simon 1/2
|
|
|
|
kBFHyperBox = 0x10, // Feeble Files
|
|
|
|
kBFBoxInUse = 0x20,
|
|
|
|
kBFBoxDead = 0x40,
|
|
|
|
kBFBoxItem = 0x80
|
|
|
|
};
|
|
|
|
|
|
|
|
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 {
|
2006-10-27 12:55:48 +00:00
|
|
|
GF_TALKIE = 1 << 0,
|
2006-10-16 04:31:09 +00:00
|
|
|
GF_OLD_BUNDLE = 1 << 1,
|
|
|
|
GF_CRUNCHED = 1 << 2,
|
|
|
|
GF_CRUNCHED_GAMEPC = 1 << 3,
|
|
|
|
GF_ZLIBCOMP = 1 << 4,
|
|
|
|
GF_32COLOR = 1 << 5,
|
2007-02-08 23:37:17 +00:00
|
|
|
GF_PLANAR = 1 << 6,
|
|
|
|
GF_DEMO = 1 << 7
|
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,
|
2006-03-22 06:21:17 +00:00
|
|
|
|
2007-05-27 11:32:19 +00:00
|
|
|
GAME_GFXIDXFILE = 1 << 10
|
2005-11-12 06:01:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum GameIds {
|
2006-10-06 05:13:09 +00:00
|
|
|
GID_ELVIRA1,
|
2006-09-19 11:59:13 +00:00
|
|
|
GID_ELVIRA2,
|
|
|
|
GID_WAXWORKS,
|
|
|
|
|
2005-11-12 06:01:24 +00:00
|
|
|
GID_SIMON1DOS,
|
2007-02-11 02:16:00 +00:00
|
|
|
GID_SIMON1ACORN,
|
2005-11-12 06:01:24 +00:00
|
|
|
GID_SIMON1AMIGA,
|
|
|
|
GID_SIMON1CD32,
|
|
|
|
GID_SIMON1TALKIE,
|
|
|
|
|
|
|
|
GID_SIMON2DOS,
|
|
|
|
GID_SIMON2TALKIE,
|
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
|