2003-04-25 15:17:53 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2006-01-18 17:39:49 +00:00
|
|
|
* Copyright (C) 2003-2006 The ScummVM project
|
2003-04-25 15:17:53 +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.
|
2003-04-25 15:17:53 +00:00
|
|
|
*
|
2006-02-11 10:03:24 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2003-04-25 15:17:53 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SKYCOMPACT_H
|
|
|
|
#define SKYCOMPACT_H
|
|
|
|
|
|
|
|
#include "sky/sky.h"
|
|
|
|
#include "sky/struc.h"
|
|
|
|
#include "sky/skydefs.h"
|
|
|
|
|
2005-05-10 22:56:25 +00:00
|
|
|
namespace Common {
|
|
|
|
class File;
|
|
|
|
}
|
2004-01-03 01:58:58 +00:00
|
|
|
|
2004-12-15 06:48:08 +00:00
|
|
|
enum CptIds {
|
|
|
|
CPT_JOEY = 1,
|
|
|
|
CPT_FOSTER = 3,
|
2005-12-13 15:27:32 +00:00
|
|
|
CPT_TEXT_1 = 0x17,
|
|
|
|
CPT_TEXT_11 = 0x21,
|
2004-12-16 06:10:11 +00:00
|
|
|
CPT_MENU_BAR = 0x2E,
|
2004-12-15 06:48:08 +00:00
|
|
|
CPT_REICH_DOOR_20 = 0x30AB,
|
2005-02-20 18:33:36 +00:00
|
|
|
CPT_MOVE_LIST = 0xBD,
|
|
|
|
CPT_TALK_TABLE_LIST = 0xBC
|
2004-12-15 06:48:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum CptTypeIds {
|
|
|
|
CPT_NULL = 0,
|
|
|
|
COMPACT,
|
|
|
|
TURNTAB,
|
|
|
|
ANIMSEQ,
|
|
|
|
MISCBIN,
|
|
|
|
GETTOTAB,
|
|
|
|
ROUTEBUF,
|
|
|
|
MAINLIST
|
|
|
|
};
|
2003-07-03 17:17:32 +00:00
|
|
|
|
2004-12-15 06:48:08 +00:00
|
|
|
namespace Sky {
|
|
|
|
|
|
|
|
class SkyCompact {
|
|
|
|
public:
|
|
|
|
SkyCompact(void);
|
|
|
|
~SkyCompact(void);
|
|
|
|
Compact *fetchCpt(uint16 cptId);
|
|
|
|
Compact *fetchCptInfo(uint16 cptId, uint16 *elems = NULL, uint16 *type = NULL, char *name = NULL);
|
|
|
|
static uint16 *getSub(Compact *cpt, uint16 mode);
|
|
|
|
static MegaSet *getMegaSet(Compact *cpt);
|
|
|
|
uint16 *getGrafixPtr(Compact *cpt);
|
|
|
|
uint16 *getTurnTable(Compact *cpt, uint16 dir);
|
|
|
|
void *getCompactElem(Compact *cpt, uint16 off);
|
|
|
|
bool cptIsId(Compact *cpt, uint16 id);
|
|
|
|
uint8 *createResetData(uint16 gameVersion);
|
|
|
|
uint16 _numSaveIds;
|
|
|
|
uint16 *_saveIds;
|
2004-12-16 06:10:11 +00:00
|
|
|
// - debugging functions
|
|
|
|
uint16 findCptId(void *cpt);
|
|
|
|
uint16 findCptId(const char *cptName);
|
|
|
|
uint16 giveNumDataLists(void);
|
|
|
|
uint16 giveDataListLen(uint16 listNum);
|
2004-12-15 06:48:08 +00:00
|
|
|
private:
|
|
|
|
uint16 _numDataLists;
|
|
|
|
uint16 *_dataListLen;
|
|
|
|
uint16 *_rawBuf;
|
|
|
|
char *_asciiBuf;
|
|
|
|
Compact ***_compacts;
|
|
|
|
char ***_cptNames;
|
|
|
|
uint16 **_cptSizes;
|
|
|
|
uint16 **_cptTypes;
|
2005-05-10 22:56:25 +00:00
|
|
|
Common::File *_cptFile;
|
2004-12-15 06:48:08 +00:00
|
|
|
uint32 _resetDataPos;
|
|
|
|
};
|
2003-04-25 15:17:53 +00:00
|
|
|
|
2004-01-03 01:58:58 +00:00
|
|
|
} // End of namespace Sky
|
|
|
|
|
2003-04-25 15:17:53 +00:00
|
|
|
#endif
|