NEVERHOOD: Enable Japanese version.

It was choking on missing "Making of". I tested by going through
first couple of puzzles and main menu. Menu is fully translated
but the puzzles are textless so far.
This commit is contained in:
Vladimir Serbinenko
2022-11-19 16:24:31 +02:00
committed by Filippos Karapetis
parent de4d90cb95
commit c48989abdc
6 changed files with 19 additions and 11 deletions
+10 -4
View File
@@ -54,14 +54,17 @@ BlbArchive::~BlbArchive() {
delete[] _extData;
}
void BlbArchive::open(const Common::String &filename) {
bool BlbArchive::open(const Common::String &filename, bool isOptional) {
BlbHeader header;
uint16 *extDataOffsets;
_entries.clear();
if (!_fd.open(filename))
error("BlbArchive::open() Could not open %s", filename.c_str());
if (!_fd.open(filename)) {
if (!isOptional)
error("BlbArchive::open() Could not open %s", filename.c_str());
return false;
}
header.id1 = _fd.readUint32LE();
header.id2 = _fd.readUint16LE();
@@ -69,8 +72,10 @@ void BlbArchive::open(const Common::String &filename) {
header.fileSize = _fd.readUint32LE();
header.fileCount = _fd.readUint32LE();
if (header.id1 != 0x2004940 || header.id2 != 7 || header.fileSize != _fd.size())
if (header.id1 != 0x2004940 || header.id2 != 7 || header.fileSize != _fd.size()) {
error("BlbArchive::open() %s seems to be corrupt", filename.c_str());
return false;
}
debug(4, "%s: fileCount = %d", filename.c_str(), header.fileCount);
@@ -111,6 +116,7 @@ void BlbArchive::open(const Common::String &filename) {
delete[] extDataOffsets;
return true;
}
void BlbArchive::load(uint index, byte *buffer, uint32 size) {
+1 -1
View File
@@ -54,7 +54,7 @@ class BlbArchive {
public:
BlbArchive();
~BlbArchive();
void open(const Common::String &filename);
bool open(const Common::String &filename, bool isOptional);
void load(uint index, byte *buffer, uint32 size);
void load(BlbArchiveEntry *entry, byte *buffer, uint32 size);
byte *getEntryExtData(uint index);
+2 -2
View File
@@ -117,11 +117,11 @@ static const ADGameDescription gameDescriptions[] = {
// Bugreport #11074
{
"neverhood",
_s("Missing game code"), // Reason for being unsupported
"",
AD_ENTRY1s("hd.blb", "c791725bbbc23c0f8bf78eece4555565", 4308928),
Common::JA_JPN,
Common::kPlatformWindows,
ADGF_DROPPLATFORM | ADGF_UNSUPPORTED,
ADGF_DROPPLATFORM,
GUIO1(GUIO_NONE)
},
+2 -1
View File
@@ -94,7 +94,8 @@ Common::Error NeverhoodEngine::run() {
_res->addArchive("c.blb");
_res->addArchive("hd.blb");
_res->addArchive("i.blb");
_res->addArchive("m.blb");
// Japanese version is missing "making of".
_res->addArchive("m.blb", getLanguage() == Common::Language::JA_JPN);
_res->addArchive("s.blb");
_res->addArchive("t.blb");
}
+3 -2
View File
@@ -36,9 +36,10 @@ ResourceMan::ResourceMan() {
ResourceMan::~ResourceMan() {
}
void ResourceMan::addArchive(const Common::String &filename) {
void ResourceMan::addArchive(const Common::String &filename, bool isOptional) {
BlbArchive *archive = new BlbArchive();
archive->open(filename);
if (!archive->open(filename, isOptional))
return;
_archives.push_back(archive);
debug(3, "ResourceMan::addArchive(%s) %d files", filename.c_str(), archive->getCount());
for (uint archiveEntryIndex = 0; archiveEntryIndex < archive->getCount(); archiveEntryIndex++) {
+1 -1
View File
@@ -70,7 +70,7 @@ class ResourceMan {
public:
ResourceMan();
~ResourceMan();
void addArchive(const Common::String &filename);
void addArchive(const Common::String &filename, bool isOptional = false);
ResourceFileEntry *findEntrySimple(uint32 fileHash);
ResourceFileEntry *findEntry(uint32 fileHash, ResourceFileEntry **firstEntry = NULL);
Common::SeekableReadStream *createStream(uint32 fileHash);