Fix data install tables when adding a file that doesn't exist in the

data install
This commit is contained in:
codestation 2011-01-03 18:57:10 +00:00
parent 2f84945b33
commit 1ede17a3ae
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,8 @@
# translation_file, data_install_file, offset in the data install file where translation_file is found # 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 0017,0011,00204000
0098,NONE,FFFFFFFF
2813,0031,00280800 2813,0031,00280800
2814,0031,00284800 2814,0031,00284800
2816,0031,002AE000 2816,0031,002AE000

View file

@ -82,13 +82,14 @@ public class PatchBuilder extends DecryptTable {
} }
} }
Vector<String> install_uniq = new Vector<String>(new LinkedHashSet<String>(install_files)); Vector<String> install_uniq = new Vector<String>(new LinkedHashSet<String>(install_files));
while(install_uniq.remove("NONE"));
writeInt(out, install_uniq.size()); writeInt(out, install_uniq.size());
int install_count = 0; int install_count = 0;
String match = install_files.firstElement(); String match = install_files.firstElement();
out.write(match.getBytes()); out.write(match.getBytes());
writeInt(out, install_count); writeInt(out, install_count);
for(String file : install_files) { for(String file : install_files) {
if(!match.equals(file)) { if(!file.equals("NONE") && !match.equals(file)) {
out.write(file.getBytes()); out.write(file.getBytes());
match = file; match = file;
writeInt(out, install_count); writeInt(out, install_count);