mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 03:24:50 +00:00
DM: Add support for uncompressed dungeon.dat
This commit is contained in:
parent
b5eb075a66
commit
4f916a08d2
@ -6,12 +6,6 @@ Bugs:
|
||||
Logic:
|
||||
Items thrown on the right side end up on the left side
|
||||
|
||||
|
||||
Possible bugs:
|
||||
- k1_LeftMouseButton and k2_RightMouseButton have values 1 and 2 respectively, contrary to the original in the original: MASK0x0001_MOUSE_RIGHT_BUTTON, MASK0x0002_MOUSE_LEFT_BUTTON
|
||||
- possible garbage value return in f140_getObjectWeight
|
||||
|
||||
|
||||
Todo:
|
||||
Add wiki entry for DM
|
||||
|
||||
@ -20,8 +14,7 @@ Todo:
|
||||
I forgot to add a bunch of warning for show/hide mouse pointer and other mouse functions
|
||||
|
||||
Code stuff todo:
|
||||
Complete stub methods(blitShrink, etc.)
|
||||
Add scroller
|
||||
Complete stub methods(blitShrink, blitmask, scroller, etc.)
|
||||
Save file f433_processCommand140_saveGame fails silently, add error checking
|
||||
Clean up f113_drawField
|
||||
|
||||
|
@ -427,11 +427,11 @@ DungeonMan::~DungeonMan() {
|
||||
void DungeonMan::f455_decompressDungeonFile() {
|
||||
Common::File f;
|
||||
f.open("Dungeon.dat");
|
||||
if (f.readUint16BE() == 0x8104) {
|
||||
if (f.readUint16BE() == 0x8104) { // if dungeon is compressed
|
||||
_rawDunFileDataSize = f.readUint32BE();
|
||||
delete[] _rawDunFileData;
|
||||
_rawDunFileData = new byte[_rawDunFileDataSize];
|
||||
f.readUint16BE();
|
||||
f.readUint16BE(); // discard
|
||||
byte common[4];
|
||||
for (uint16 i = 0; i < 4; ++i)
|
||||
common[i] = f.readByte();
|
||||
@ -475,8 +475,12 @@ void DungeonMan::f455_decompressDungeonFile() {
|
||||
bitsUsedInWord += 10;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
warning(false, "TODO: if the dungeon is uncompressed, read it here");
|
||||
} else { // read uncompressed Dungeon.dat
|
||||
f.seek(0);
|
||||
_rawDunFileDataSize = f.size();
|
||||
delete[] _rawDunFileData;
|
||||
_rawDunFileData = new byte[_rawDunFileDataSize];
|
||||
f.read(_rawDunFileData, _rawDunFileDataSize);
|
||||
}
|
||||
f.close();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user