diff options
author | SilverstarStream <46911095+SilverstarStream@users.noreply.github.com> | 2021-12-21 17:31:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-21 16:31:00 -0800 |
commit | 6a4e47d0bcbebfae31af8459031367b3a5dfd5ae (patch) | |
tree | 5d8621c2723b8c60eed17b68e25f120223150909 /src/com/dabomstew | |
parent | e825ecda5602a055e5fdece25b827ff203d6b11f (diff) |
Gen 4: saving ROM writes changes (#354)
* Gen 4: saving ROM writes changes
* Gen 4: other settings write changes
Diffstat (limited to 'src/com/dabomstew')
-rwxr-xr-x | src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java index 0b7811e..9270bb3 100755 --- a/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java +++ b/src/com/dabomstew/pkrandom/romhandlers/Gen4RomHandler.java @@ -694,17 +694,17 @@ public class Gen4RomHandler extends AbstractDSRomHandler { throw new RandomizerIOException(e);
}
try {
- writeNARC(romEntry.getString("Text"), msgNarc);
+ writeNARC(romEntry.getFile("Text"), msgNarc);
} catch (IOException e) {
throw new RandomizerIOException(e);
}
try {
- writeNARC(romEntry.getString("Scripts"), scriptNarc);
+ writeNARC(romEntry.getFile("Scripts"), scriptNarc);
} catch (IOException e) {
throw new RandomizerIOException(e);
}
try {
- writeNARC(romEntry.getString("Events"), eventNarc);
+ writeNARC(romEntry.getFile("Events"), eventNarc);
} catch (IOException e) {
throw new RandomizerIOException(e);
}
@@ -729,7 +729,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { }
try {
- this.writeNARC(romEntry.getString("MoveData"), moveNarc);
+ this.writeNARC(romEntry.getFile("MoveData"), moveNarc);
} catch (IOException e) {
throw new RandomizerIOException(e);
}
@@ -766,7 +766,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { setStrings(romEntry.getInt("PokemonNamesTextOffset"), namesList, false);
try {
- String pstatsnarc = romEntry.getString("PokemonStats");
+ String pstatsnarc = romEntry.getFile("PokemonStats");
this.writeNARC(pstatsnarc, pokeNarc);
} catch (IOException e) {
throw new RandomizerIOException(e);
@@ -2582,8 +2582,8 @@ public class Gen4RomHandler extends AbstractDSRomHandler { }
trpokes.files.add(trpoke);
}
- this.writeNARC(romEntry.getString("TrainerData"), trainers);
- this.writeNARC(romEntry.getString("TrainerPokemon"), trpokes);
+ this.writeNARC(romEntry.getFile("TrainerData"), trainers);
+ this.writeNARC(romEntry.getFile("TrainerPokemon"), trpokes);
// In Gen 4, the game prioritizes showing the special double battle intro over almost any
// other kind of intro. Since the trainer music is tied to the intro, this results in the
@@ -2657,7 +2657,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { NARCArchive battleSkillSubSeq = readNARC(romEntry.getFile("BattleSkillSubSeq"));
byte[] trainerEndFile = battleSkillSubSeq.files.get(romEntry.getInt("TrainerEndFileNumber"));
trainerEndFile[romEntry.getInt("TrainerEndTextBoxOffset")] = 0;
- writeNARC(romEntry.getString("BattleSkillSubSeq"), battleSkillSubSeq);
+ writeNARC(romEntry.getFile("BattleSkillSubSeq"), battleSkillSubSeq);
}
} catch (IOException ex) {
@@ -2780,7 +2780,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { //}
// Save
try {
- this.writeNARC(romEntry.getString("PokemonMovesets"), movesLearnt);
+ this.writeNARC(romEntry.getFile("PokemonMovesets"), movesLearnt);
} catch (IOException e) {
throw new RandomizerIOException(e);
}
@@ -3073,7 +3073,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { replaceAllStringsInEntry(romEntry.getInt("KenyaTextOffset"), replacements);
}
}
- writeNARC(romEntry.getString("InGameTrades"), tradeNARC);
+ writeNARC(romEntry.getFile("InGameTrades"), tradeNARC);
}
if (romEntry.getInt("MysteryEggOffset") > 0) {
// Same overlay as MT moves
@@ -3524,7 +3524,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { }
}
if (romEntry.romType == Gen4Constants.Type_HGSS) {
- writeFile(romEntry.getString("MoveTutorCompat"), mtcFile);
+ writeFile(romEntry.getFile("MoveTutorCompat"), mtcFile);
} else {
writeOverlay(romEntry.getInt("MoveTutorCompatOvlNumber"), mtcFile);
}
@@ -3720,7 +3720,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { evosWritten++;
}
}
- writeNARC(romEntry.getString("PokemonEvolutions"), evoNARC);
+ writeNARC(romEntry.getFile("PokemonEvolutions"), evoNARC);
} catch (IOException e) {
throw new RandomizerIOException(e);
}
@@ -4040,7 +4040,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { itemID = 135;
}
}
- writeNARC(romEntry.getString("ItemData"),itemPriceNarc);
+ writeNARC(romEntry.getFile("ItemData"),itemPriceNarc);
} catch (IOException e) {
throw new RandomizerIOException(e);
}
@@ -4600,7 +4600,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { writeLong(tfile, 0x50, 0); // disable gender
}
}
- this.writeNARC(romEntry.getString("InGameTrades"), tradeNARC);
+ this.writeNARC(romEntry.getFile("InGameTrades"), tradeNARC);
this.setStrings(romEntry.getInt("IngameTradesTextOffset"), tradeStrings);
// update what the people say when they talk to you
if (romEntry.arrayEntries.containsKey("IngameTradePersonTextOffsets")) {
@@ -4697,7 +4697,7 @@ public class Gen4RomHandler extends AbstractDSRomHandler { writeWord(babyPokes, i * 2, baby.number);
}
// finish up
- writeFile(romEntry.getString("BabyPokemon"), babyPokes);
+ writeFile(romEntry.getFile("BabyPokemon"), babyPokes);
} catch (IOException e) {
throw new RandomizerIOException(e);
}
|