2002-08-18 16:21:34 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2003-03-06 21:46:56 +00:00
|
|
|
* Copyright (C) 2001-2003 The ScummVM project
|
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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SIMON_INTERN_H
|
|
|
|
#define SIMON_INTERN_H
|
|
|
|
|
2003-10-03 19:42:27 +00:00
|
|
|
namespace Simon {
|
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
struct Child {
|
|
|
|
Child *next;
|
|
|
|
uint16 type;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Child1 : Child {
|
|
|
|
uint16 subroutine_id;
|
|
|
|
uint16 fr2;
|
|
|
|
uint16 array[1];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Child2 : Child {
|
|
|
|
uint16 string_id;
|
|
|
|
uint32 avail_props;
|
|
|
|
int16 array[1];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Child9 : Child {
|
|
|
|
uint16 array[4];
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
CHILD1_SIZE = sizeof(Child1) - sizeof(uint16),
|
|
|
|
CHILD2_SIZE = sizeof(Child2) - sizeof(int16)
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Item {
|
|
|
|
uint16 parent;
|
|
|
|
uint16 child;
|
|
|
|
uint16 sibling;
|
|
|
|
int16 unk1;
|
|
|
|
int16 unk2;
|
|
|
|
int16 unk3; /* signed int */
|
|
|
|
uint16 unk4;
|
|
|
|
uint16 xxx_1; /* unused? */
|
|
|
|
Child *children;
|
2003-05-20 13:20:18 +00:00
|
|
|
|
2003-05-20 14:43:22 +00:00
|
|
|
Item() { memset(this, 0, sizeof(*this)); }
|
2002-08-18 16:21:34 +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 */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FillOrCopyDataEntry {
|
|
|
|
Item *item;
|
|
|
|
uint16 hit_area;
|
|
|
|
uint16 xxx_1;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FillOrCopyData {
|
|
|
|
int16 unk1;
|
|
|
|
Item *item_ptr;
|
|
|
|
FillOrCopyDataEntry e[64];
|
|
|
|
int16 unk3, unk4;
|
|
|
|
uint16 unk2;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FillOrCopyStruct {
|
|
|
|
byte mode;
|
|
|
|
byte flags;
|
|
|
|
uint16 x, y;
|
|
|
|
uint16 width, height;
|
|
|
|
uint16 textColumn, textRow;
|
|
|
|
uint8 textColumnOffset, textLength, textMaxLength;
|
|
|
|
uint8 fill_color, text_color, unk5;
|
|
|
|
FillOrCopyData *fcs_data;
|
2003-05-20 14:43:22 +00:00
|
|
|
FillOrCopyStruct() { memset(this, 0, sizeof(*this)); }
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
// note on text offset:
|
|
|
|
// 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
|
|
|
};
|
|
|
|
|
|
|
|
struct SubroutineLine {
|
|
|
|
uint16 next;
|
|
|
|
int16 cond_a;
|
|
|
|
int16 cond_b;
|
|
|
|
int16 cond_c;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct TimeEvent {
|
|
|
|
uint32 time;
|
|
|
|
uint16 subroutine_id;
|
|
|
|
TimeEvent *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GameSpecificSettings {
|
2003-11-12 16:00:11 +00:00
|
|
|
#ifndef __PALM_OS__
|
2002-08-18 16:21:34 +00:00
|
|
|
const char *gme_filename;
|
|
|
|
const char *wav_filename;
|
2002-10-29 14:33:59 +00:00
|
|
|
const char *voc_filename;
|
|
|
|
const char *mp3_filename;
|
|
|
|
const char *voc_effects_filename;
|
|
|
|
const char *mp3_effects_filename;
|
|
|
|
const char *gamepc_filename;
|
2003-11-12 16:00:11 +00:00
|
|
|
#else
|
|
|
|
const char gme_filename[12];
|
|
|
|
const char wav_filename[12];
|
|
|
|
const char voc_filename[12];
|
|
|
|
const char mp3_filename[12];
|
|
|
|
const char voc_effects_filename[12];
|
|
|
|
const char mp3_effects_filename[12];
|
|
|
|
const char gamepc_filename[12];
|
|
|
|
#endif
|
2002-08-18 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
2003-10-03 19:42:27 +00:00
|
|
|
} // End of namespace Simon
|
|
|
|
|
2002-11-27 15:08:24 +00:00
|
|
|
enum {
|
2003-12-02 06:23:05 +00:00
|
|
|
GF_SIMON2 = 1 << 0,
|
|
|
|
GF_WIN = 1 << 1,
|
|
|
|
GF_TALKIE = 1 << 2,
|
|
|
|
GF_DEMO = 1 << 3,
|
|
|
|
GF_MAC = 1 << 4,
|
|
|
|
GF_AMIGA = 1 << 5,
|
|
|
|
GF_ACORN = 1 << 6,
|
|
|
|
GF_OLD_BUNDLE = 1 << 7
|
2003-03-01 22:52:49 +00:00
|
|
|
};
|
2002-11-27 15:08:24 +00:00
|
|
|
|
2003-03-01 22:52:49 +00:00
|
|
|
enum {
|
2003-12-02 06:23:05 +00:00
|
|
|
GAME_SIMON1DOS = GF_OLD_BUNDLE,
|
2003-03-01 22:52:49 +00:00
|
|
|
GAME_SIMON2DOS = GF_SIMON2,
|
|
|
|
GAME_SIMON1TALKIE = GF_TALKIE,
|
|
|
|
GAME_SIMON2TALKIE = GF_SIMON2 | GF_TALKIE,
|
|
|
|
GAME_SIMON1WIN = GF_WIN | GF_TALKIE,
|
|
|
|
GAME_SIMON2WIN = GF_SIMON2 | GF_WIN | GF_TALKIE,
|
2003-12-02 06:23:05 +00:00
|
|
|
GAME_SIMON1DEMO = GF_DEMO | GF_OLD_BUNDLE,
|
2003-03-01 22:52:49 +00:00
|
|
|
GAME_SIMON2MAC = GF_SIMON2 | GF_WIN | GF_TALKIE | GF_MAC,
|
2003-12-02 06:23:05 +00:00
|
|
|
GAME_SIMON1AMIGA = GF_AMIGA | GF_OLD_BUNDLE,
|
2003-09-24 06:19:30 +00:00
|
|
|
GAME_SIMON1CD32 = GF_TALKIE | GF_AMIGA,
|
|
|
|
GAME_SIMON1ACORN = GF_TALKIE | GF_ACORN
|
2002-11-27 15:08:24 +00:00
|
|
|
};
|
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
#endif
|