mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 09:49:14 +00:00
TINSEL: Adjust LoadFile for Noir, stubbing out compression for now.
This commit is contained in:
parent
6e3daad277
commit
0f78bfeeae
@ -34,6 +34,7 @@
|
||||
#include "tinsel/timers.h" // for DwGetCurrentTime()
|
||||
#include "tinsel/tinsel.h"
|
||||
#include "tinsel/scene.h"
|
||||
#include "tinsel/noir/lzss.h"
|
||||
|
||||
namespace Tinsel {
|
||||
|
||||
@ -254,7 +255,7 @@ void Handle::LoadFile(MEMHANDLE *pH) {
|
||||
memcpy(szFilename, pH->szName, sizeof(pH->szName));
|
||||
szFilename[sizeof(pH->szName)] = 0;
|
||||
|
||||
if (pH->filesize & fCompressed) {
|
||||
if (!TinselV3 && MEMFLAGS(pH) & fCompressed) {
|
||||
error("Compression handling has been removed - %s", szFilename);
|
||||
}
|
||||
|
||||
@ -269,7 +270,11 @@ void Handle::LoadFile(MEMHANDLE *pH) {
|
||||
// make sure address is valid
|
||||
assert(addr);
|
||||
|
||||
bytes = f.read(addr, pH->filesize & FSIZE_MASK);
|
||||
if (TinselV3 && MEMFLAGS(pH) & fCompressed) {
|
||||
bytes = decompressLZSS(f, addr);
|
||||
} else {
|
||||
bytes = f.read(addr, pH->filesize & FSIZE_MASK);
|
||||
}
|
||||
|
||||
// close the file
|
||||
f.close();
|
||||
|
@ -1,6 +1,7 @@
|
||||
MODULE := engines/tinsel
|
||||
|
||||
MODULE_OBJS := \
|
||||
noir/lzss.o \
|
||||
actors.o \
|
||||
adpcm.o \
|
||||
anim.o \
|
||||
|
35
engines/tinsel/noir/lzss.cpp
Normal file
35
engines/tinsel/noir/lzss.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Prototypes of actor functions
|
||||
*/
|
||||
|
||||
#include "common/textconsole.h"
|
||||
#include "tinsel/noir/lzss.h"
|
||||
|
||||
namespace Tinsel {
|
||||
|
||||
int decompressLZSS(Common::ReadStream &input, byte *output) {
|
||||
error("TODO: Implement decompression");
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
35
engines/tinsel/noir/lzss.h
Normal file
35
engines/tinsel/noir/lzss.h
Normal file
@ -0,0 +1,35 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Prototypes of actor functions
|
||||
*/
|
||||
|
||||
#ifndef TINSEL_NOIR_LZSS_H
|
||||
#define TINSEL_NOIR_LZSS_H
|
||||
|
||||
#include "common/stream.h"
|
||||
|
||||
namespace Tinsel {
|
||||
|
||||
int decompressLZSS(Common::ReadStream &input, byte *output);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user