From 1ede17a3aeb19fa7faef60591eb8dda2120c7841 Mon Sep 17 00:00:00 2001 From: codestation Date: Mon, 3 Jan 2011 18:57:10 +0000 Subject: [PATCH] Fix data install tables when adding a file that doesn't exist in the data install --- data_install.txt | 3 +++ src/base/PatchBuilder.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data_install.txt b/data_install.txt index 9e6306e..13690b0 100644 --- a/data_install.txt +++ b/data_install.txt @@ -1,5 +1,8 @@ # translation_file, data_install_file, offset in the data install file where translation_file is found +# Note: if you add files that doesn't exist in the data install just follow the +# format of the 0098 0017,0011,00204000 +0098,NONE,FFFFFFFF 2813,0031,00280800 2814,0031,00284800 2816,0031,002AE000 diff --git a/src/base/PatchBuilder.java b/src/base/PatchBuilder.java index 492a17d..9498a35 100644 --- a/src/base/PatchBuilder.java +++ b/src/base/PatchBuilder.java @@ -82,13 +82,14 @@ public class PatchBuilder extends DecryptTable { } } Vector install_uniq = new Vector(new LinkedHashSet(install_files)); + while(install_uniq.remove("NONE")); writeInt(out, install_uniq.size()); int install_count = 0; String match = install_files.firstElement(); out.write(match.getBytes()); writeInt(out, install_count); for(String file : install_files) { - if(!match.equals(file)) { + if(!file.equals("NONE") && !match.equals(file)) { out.write(file.getBytes()); match = file; writeInt(out, install_count);