diff --git a/bin/xgm2tool.jar b/bin/xgm2tool.jar index 62c4e9c3..a7144082 100644 Binary files a/bin/xgm2tool.jar and b/bin/xgm2tool.jar differ diff --git a/tools/xgm2tool/src/sgdk/xgm2tool/Launcher.java b/tools/xgm2tool/src/sgdk/xgm2tool/Launcher.java index 6e8f525a..3a00e8f8 100644 --- a/tools/xgm2tool/src/sgdk/xgm2tool/Launcher.java +++ b/tools/xgm2tool/src/sgdk/xgm2tool/Launcher.java @@ -17,7 +17,7 @@ public class Launcher extends JFrame { - final static String VERSION = "1.03"; + final static String VERSION = "1.04"; final static int SYSTEM_AUTO = -1; final static int SYSTEM_NTSC = 0; diff --git a/tools/xgm2tool/src/sgdk/xgm2tool/format/XGM.java b/tools/xgm2tool/src/sgdk/xgm2tool/format/XGM.java index c9a271e6..9060c29b 100644 --- a/tools/xgm2tool/src/sgdk/xgm2tool/format/XGM.java +++ b/tools/xgm2tool/src/sgdk/xgm2tool/format/XGM.java @@ -1239,10 +1239,14 @@ else if (com.isWait(true)) // optimized command is not the last frame command ? if ((indOpt != -1) && (indOpt != (frameCommands.size() - 2))) { - // swap with last command - final int ind1 = FMcommands.indexOf(frameCommands.get(indOpt)); + final XGMFMCommand comOpt = frameCommands.get(indOpt); + final int ind1 = FMcommands.indexOf(comOpt); final int ind2 = FMcommands.indexOf(frameCommands.get(frameCommands.size() - 2)); - Collections.swap(FMcommands, ind1, ind2); + + // move to last command (don't swap) + FMcommands.add(ind2 + 1, comOpt); + FMcommands.remove(ind1); + // Collections.swap(FMcommands, ind1, ind2); } }