mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-02 08:19:19 +00:00
NEVERHOOD: Add new SceneInfo2700 structure and some tables using it for Module2700
This commit is contained in:
parent
770689b2f1
commit
ee1bf85456
@ -277,6 +277,54 @@ struct SceneInfo140Item {
|
||||
|
||||
};
|
||||
|
||||
struct SceneInfo2700Item {
|
||||
uint32 id;
|
||||
uint32 bgFilename;
|
||||
uint32 class437Filename;
|
||||
uint32 dataResourceFilename;
|
||||
uint32 pointListName;
|
||||
uint32 rectListName;
|
||||
uint32 exPaletteFilename2;
|
||||
uint32 exPaletteFilename1;
|
||||
uint32 mouseCursorFilename;
|
||||
int16 which1;
|
||||
int16 which2;
|
||||
uint32 field24;
|
||||
|
||||
void load(uint32 offset) {
|
||||
byte *item = getData(offset);
|
||||
id = offset;
|
||||
// Only save the hashes instead of the full names
|
||||
bgFilename = calcHash(getStringP(READ_LE_UINT32(item + 0)));
|
||||
class437Filename = calcHash(getStringP(READ_LE_UINT32(item + 4)));
|
||||
dataResourceFilename = calcHash(getStringP(READ_LE_UINT32(item + 8)));
|
||||
pointListName = calcHash(getStringP(READ_LE_UINT32(item + 12)));
|
||||
rectListName = calcHash(getStringP(READ_LE_UINT32(item + 16)));
|
||||
exPaletteFilename2 = calcHash(getStringP(READ_LE_UINT32(item + 20)));
|
||||
exPaletteFilename1 = calcHash(getStringP(READ_LE_UINT32(item + 24)));
|
||||
mouseCursorFilename = calcHash(getStringP(READ_LE_UINT32(item + 28)));
|
||||
which1 = READ_LE_UINT16(item + 32);
|
||||
which2 = READ_LE_UINT16(item + 34);
|
||||
field24 = READ_LE_UINT16(item + 36);
|
||||
}
|
||||
|
||||
void save(FILE *fd) {
|
||||
writeUint32LE(fd, id);
|
||||
writeUint32LE(fd, bgFilename);
|
||||
writeUint32LE(fd, class437Filename);
|
||||
writeUint32LE(fd, dataResourceFilename);
|
||||
writeUint32LE(fd, pointListName);
|
||||
writeUint32LE(fd, rectListName);
|
||||
writeUint32LE(fd, exPaletteFilename2);
|
||||
writeUint32LE(fd, exPaletteFilename1);
|
||||
writeUint32LE(fd, mouseCursorFilename);
|
||||
writeUint16LE(fd, which1);
|
||||
writeUint16LE(fd, which2);
|
||||
writeUint32LE(fd, field24);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template<class ITEMCLASS>
|
||||
class StaticDataList {
|
||||
public:
|
||||
@ -456,6 +504,7 @@ StaticDataListVector<RectList> rectLists;
|
||||
StaticDataListVector<MessageList> messageLists;
|
||||
StaticDataListVector<NavigationList> navigationLists;
|
||||
StaticDataVector<SceneInfo140Item> sceneInfo140Items;
|
||||
StaticDataVector<SceneInfo2700Item> sceneInfo2700Items;
|
||||
|
||||
void addMessageList(uint32 messageListCount, uint32 messageListOffset) {
|
||||
MessageList *messageList = new MessageList();
|
||||
@ -474,6 +523,7 @@ int main(int argc, char *argv[]) {
|
||||
messageLists.loadListVector(messageListOffsets);
|
||||
navigationLists.loadListVector(navigationListOffsets);
|
||||
sceneInfo140Items.loadVector(sceneInfo140Offsets);
|
||||
sceneInfo2700Items.loadVector(sceneInfo2700Offsets);
|
||||
|
||||
datFile = fopen("neverhood.dat", "wb");
|
||||
|
||||
@ -485,6 +535,7 @@ int main(int argc, char *argv[]) {
|
||||
hitRectLists.saveListVector(datFile);
|
||||
navigationLists.saveListVector(datFile);
|
||||
sceneInfo140Items.saveVector(datFile);
|
||||
sceneInfo2700Items.saveVector(datFile);
|
||||
|
||||
fclose(datFile);
|
||||
|
||||
|
@ -420,6 +420,14 @@ static const uint32 navigationListOffsets[] = {
|
||||
// Module2000
|
||||
3, 0x004B7B48,
|
||||
3, 0x004B7B00,
|
||||
// Module2600
|
||||
2, 0x004B8608,
|
||||
4, 0x004B8638,
|
||||
2, 0x004B8698,
|
||||
2, 0x004B86C8,
|
||||
4, 0x004B8758,
|
||||
4, 0x004B86F8,
|
||||
2, 0x004B87B8,
|
||||
// Module3000
|
||||
2, 0x004B7C80,
|
||||
2, 0x004B7CE0,
|
||||
@ -478,3 +486,56 @@ static const uint32 sceneInfo140Offsets[] = {
|
||||
0
|
||||
};
|
||||
|
||||
static const uint32 sceneInfo2700Offsets[] = {
|
||||
//
|
||||
0x004B1710,
|
||||
0x004B1738,
|
||||
0x004B1760,
|
||||
0x004B1788,
|
||||
0x004B17B0,
|
||||
0x004B17D8,
|
||||
0x004B1800,
|
||||
0x004B1828,
|
||||
0x004B1850,
|
||||
0x004B1878,
|
||||
0x004B18A0,
|
||||
0x004B18C8,
|
||||
0x004B18F0,
|
||||
0x004B1918,
|
||||
//
|
||||
0x004B19E0,
|
||||
0x004B1A08,
|
||||
0x004B1A30,
|
||||
0x004B1A58,
|
||||
0x004B1A80,
|
||||
0x004B1AA8,
|
||||
0x004B1AD0,
|
||||
0x004B1AF8,
|
||||
0x004B1B20,
|
||||
0x004B1B48,
|
||||
0x004B1B70,
|
||||
0x004B1B98,
|
||||
0x004B1BC0,
|
||||
0x004B1BE8,
|
||||
0x004B1C10,
|
||||
0x004B1C38,
|
||||
0x004B1C60,
|
||||
0x004B1C88,
|
||||
0x004B1CB0,
|
||||
0x004B1CD8,
|
||||
0x004B1D00,
|
||||
0x004B1D28,
|
||||
0x004B1D50,
|
||||
0x004B1D78,
|
||||
//
|
||||
0x004B1DB0,
|
||||
//
|
||||
0x004B1DE8,
|
||||
0x004B1E10,
|
||||
0x004B1E38,
|
||||
0x004B1E60,
|
||||
//
|
||||
0x004B1950,
|
||||
//
|
||||
0
|
||||
};
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user