When I repack Models.H2O from the extracted files and play with the repacked file, I get a crash just after the first loading screen.
I did NOT change anything, just extracted and packed, to test. I tried with both cmd and GUI, nothing to do. I noticed the file changes its size a little (original = 97.477 KB, Repacked = 97.816 KB).
By any chance, do I need some kind of patch to Battle Realms in order to get it to work?
UPDATE:
Apparently i'm not the only one with this problem, and I tried to take action.
Opening the original file (this time interface_text.h2o) with the hex editor, all what i could see was a bunch of incomprensible bytes.
Opening the repacked file... surprise... the text was still perfectly readable, just like in the extracted files.
So I looked into the source code.
This is from cmd_extract.c, line 25 and following:
if (node->file->entrytype == ENTRYTYPE_COMPRESSED) {
printf("decompressing file: %s\n", node->name);
dumpchunk(src, dst, node->file->checksum);
} else if (node->file->entrytype == ENTRYTYPE_RAW) {
printf("extracting file: %s\n", node->name);
dump(src, dst, node->file->size_raw, node->file->checksum);
}This is from cmd_build.c, line 36:
entry->entrytype = ENTRYTYPE_RAW;
Not compressed. Just like the file I checked with hex editor.
Maybe I've figured it out, but i'm a noob (
I'd try to replace that line with
entry->entrytype = ENTRYTYPE_COMPRESSED;
... and have a test. Who knows.

Help


MultiQuote












