mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 10:17:22 +00:00
cleanup
svn-id: r11588
This commit is contained in:
parent
3080be97e0
commit
38c4321f59
@ -311,43 +311,34 @@ void Command::readCommandsFrom(byte *&ptr) {
|
||||
|
||||
uint16 i;
|
||||
|
||||
// Command List Data
|
||||
_numCmdList = READ_BE_UINT16(ptr); ptr += 2;
|
||||
|
||||
_cmdList = new CmdListData[_numCmdList + 1];
|
||||
memset(&_cmdList[0], 0, sizeof(CmdListData));
|
||||
for (i = 1; i <= _numCmdList; i++) {
|
||||
_cmdList[i].readFrom(ptr);
|
||||
}
|
||||
|
||||
// Command AREA
|
||||
_numCmdArea = READ_BE_UINT16(ptr); ptr += 2;
|
||||
|
||||
_cmdArea = new CmdArea[_numCmdArea + 1];
|
||||
memset(&_cmdArea[0], 0, sizeof(CmdArea));
|
||||
for (i = 1; i <= _numCmdArea; i++) {
|
||||
_cmdArea[i].readFrom(ptr);
|
||||
}
|
||||
|
||||
// Command OBJECT
|
||||
_numCmdObject = READ_BE_UINT16(ptr); ptr += 2;
|
||||
|
||||
_cmdObject = new CmdObject[_numCmdObject + 1];
|
||||
memset(&_cmdObject[0], 0, sizeof(CmdObject));
|
||||
for (i = 1; i <= _numCmdObject; i++) {
|
||||
_cmdObject[i].readFrom(ptr);
|
||||
}
|
||||
|
||||
// Command INVENTORY
|
||||
_numCmdInventory = READ_BE_UINT16(ptr); ptr += 2;
|
||||
|
||||
_cmdInventory = new CmdInventory[_numCmdInventory + 1];
|
||||
memset(&_cmdInventory[0], 0, sizeof(CmdInventory));
|
||||
for (i = 1; i <= _numCmdInventory; i++) {
|
||||
_cmdInventory[i].readFrom(ptr);
|
||||
}
|
||||
|
||||
// Command GAMESTATE
|
||||
_numCmdGameState = READ_BE_UINT16(ptr); ptr += 2;
|
||||
_cmdGameState = new CmdGameState[_numCmdGameState + 1];
|
||||
memset(&_cmdGameState[0], 0, sizeof(CmdGameState));
|
||||
|
@ -233,7 +233,7 @@ private:
|
||||
TextSlot _texts[GAME_SCREEN_HEIGHT];
|
||||
uint8 _curTextColor;
|
||||
|
||||
int _cameraBob; // cambob
|
||||
int _cameraBob;
|
||||
|
||||
BamData _bam;
|
||||
|
||||
|
@ -714,8 +714,6 @@ void Logic::roomErase() {
|
||||
_graphics->bankErase(10);
|
||||
_graphics->bankErase(12);
|
||||
|
||||
// TODO: TALKHEAD=0;
|
||||
|
||||
if (_currentRoom >= 114) {
|
||||
_display->palFadeOut(0, 255, _currentRoom);
|
||||
}
|
||||
|
@ -148,8 +148,6 @@ public:
|
||||
const char *objectName(uint16 objNum) const { return _objName[objNum]; }
|
||||
const char *objectTextualDescription(uint16 objNum) const { return _objDescription[objNum]; }
|
||||
|
||||
uint16 numFrames() const { return _numFrames; }
|
||||
|
||||
void zoneSet(uint16 screen, uint16 zone, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
|
||||
void zoneSet(uint16 screen, uint16 zone, const Box& box);
|
||||
uint16 zoneIn(uint16 screen, uint16 x, uint16 y) const;
|
||||
@ -171,15 +169,17 @@ public:
|
||||
int16 entryObj() const { return _entryObj; }
|
||||
void entryObj(int16 obj) { _entryObj = obj; }
|
||||
|
||||
uint16 numFrames() const { return _numFrames; }
|
||||
|
||||
void personSetData(int16 noun, const char *actorName, bool loadBank, Person *pp); // SET_PERSON_DATA
|
||||
uint16 personSetup(uint16 noun, uint16 curImage); // SETUP_PERSON
|
||||
uint16 personAllocate(uint16 noun, uint16 curImage); // ALLOCATE_PERSON
|
||||
uint16 personFrames(uint16 bobNum) const { return _personFrames[bobNum]; }
|
||||
|
||||
uint16 animCreate(uint16 curImage, const Person *person); // CREATE_ANIM
|
||||
void animErase(uint16 bobNum);
|
||||
void animReset(uint16 bobNum);
|
||||
void animSetup(const GraphicData *gd, uint16 firstImage, uint16 bobNum, bool visible); // FIND_GRAPHIC_ANIMS
|
||||
uint16 personFrames(uint16 bobNum) const { return _personFrames[bobNum]; }
|
||||
|
||||
void joeSetupFromBanks(const char *animBank, const char *standBank);
|
||||
|
||||
|
@ -24,11 +24,8 @@
|
||||
|
||||
namespace Queen {
|
||||
|
||||
#define DEMO_JAS_VERSION_OFFSET 0x119A8
|
||||
#define JAS_VERSION_OFFSET 0x12484
|
||||
|
||||
static const char *tableFilename = "queen.tbl";
|
||||
|
||||
const char *Resource::_tableFilename = "queen.tbl";
|
||||
|
||||
const GameVersion Resource::_gameVersions[] = {
|
||||
{ "PEM10", true, false, 0x00000008, 22677657 },
|
||||
@ -66,7 +63,7 @@ Resource::Resource(const Common::String &datafilePath, const char *datafileName,
|
||||
_resourceEntries = 1076;
|
||||
_resourceTable = _resourceTablePEM10;
|
||||
} else {
|
||||
error("Couldn't find tablefile '%s%s'", _datafilePath.c_str(), tableFilename);
|
||||
error("Couldn't find tablefile '%s%s'", _datafilePath.c_str(), _tableFilename);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -203,7 +200,7 @@ const GameVersion *Resource::detectGameVersion(uint32 dataFilesize) {
|
||||
//we try to verify that it is indeed the version we think it is later on
|
||||
const GameVersion *pgv = _gameVersions;
|
||||
int i;
|
||||
for (i = 0; i < VER_NUMBER; ++i, ++pgv) {
|
||||
for (i = 0; i < VER_COUNT; ++i, ++pgv) {
|
||||
if (pgv->dataFileSize == dataFilesize) {
|
||||
return pgv;
|
||||
}
|
||||
@ -214,9 +211,9 @@ const GameVersion *Resource::detectGameVersion(uint32 dataFilesize) {
|
||||
|
||||
bool Resource::readTableFile() {
|
||||
File tableFile;
|
||||
tableFile.open(tableFilename, _datafilePath);
|
||||
tableFile.open(_tableFilename, _datafilePath);
|
||||
if (!tableFile.isOpen())
|
||||
tableFile.open(tableFilename, ""); //try current directory
|
||||
tableFile.open(_tableFilename, ""); //try current directory
|
||||
if (tableFile.isOpen() && tableFile.readUint32BE() == 'QTBL') {
|
||||
tableFile.seek(_gameVersion->tableOffset);
|
||||
_resourceEntries = tableFile.readUint16BE();
|
||||
|
@ -41,7 +41,7 @@ enum Version {
|
||||
VER_DEMO_PCGAMES = 9,
|
||||
VER_DEMO = 10,
|
||||
|
||||
VER_NUMBER = 11
|
||||
VER_COUNT = 11
|
||||
};
|
||||
|
||||
struct ResourceEntry {
|
||||
@ -80,6 +80,10 @@ public:
|
||||
bool writeSave(uint16 slot, const byte *saveData, uint32 size);
|
||||
bool readSave(uint16 slot, byte *&ptr);
|
||||
|
||||
enum {
|
||||
DEMO_JAS_VERSION_OFFSET = 0x119A8,
|
||||
JAS_VERSION_OFFSET = 0x12484
|
||||
};
|
||||
|
||||
protected:
|
||||
File *_resourceFile;
|
||||
@ -91,6 +95,8 @@ protected:
|
||||
const char *_savePath;
|
||||
uint32 _resourceEntries;
|
||||
ResourceEntry *_resourceTable;
|
||||
|
||||
static const char *_tableFilename;
|
||||
static const GameVersion _gameVersions[];
|
||||
static ResourceEntry _resourceTablePEM10[];
|
||||
|
||||
|
@ -34,7 +34,6 @@ enum StateTalk {
|
||||
STATE_TALK_MUTE
|
||||
};
|
||||
|
||||
|
||||
enum StateGrab {
|
||||
STATE_GRAB_NONE,
|
||||
STATE_GRAB_DOWN,
|
||||
@ -42,13 +41,11 @@ enum StateGrab {
|
||||
STATE_GRAB_MID
|
||||
};
|
||||
|
||||
|
||||
enum StateOn {
|
||||
STATE_ON_ON,
|
||||
STATE_ON_OFF
|
||||
};
|
||||
|
||||
|
||||
enum StateUse {
|
||||
STATE_USE,
|
||||
STATE_USE_ON
|
||||
|
Loading…
x
Reference in New Issue
Block a user