Skip to content

Commit

Permalink
add ips creation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajarmar committed Dec 15, 2020
1 parent 1653f54 commit 8b33058
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*.swp
*.sav
flips.exe
*.bat
flipscfg.bin

# vscode stuff
Expand Down
33 changes: 33 additions & 0 deletions Z2/newips_z2.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off

cd ips

SETLOCAL ENABLEDELAYEDEXPANSION
set /A mainver_max=0
set /A subver_max=0
for %%f in (*) do (
set str=%%~nf
set /A mainver=!str:~8,10!
if !mainver! gtr !mainver_max! (
set /A mainver_max=!mainver!
set /A subver_max=0
)
set mainverstr=z2prac_v!mainver!
if not x!mainverstr!==x%%~nf (
for /f "tokens=3 delims=_" %%a in ("!str!") do set subver=%%a
if !subver! gtr !subver_max! set /A subver_max=!subver!
)
)

cd ..

set /A newmainver=!mainver_max!+1
set /A newsubver=!subver_max!+1
set /P bigver="New main version? [y/n]: "
if !bigver!==y (
flips "Rockman Zero 2 (Japan).gba" "z2prac.gba" "ips\z2prac_v!newmainver!.ips"
) else (flips "Rockman Zero 2 (Japan).gba" "z2prac.gba" "ips\z2prac_v!mainver_max!_!newsubver!.ips")

ENDLOCAL

cd ..
33 changes: 33 additions & 0 deletions Z3/newips_z3.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off

cd ips

SETLOCAL ENABLEDELAYEDEXPANSION
set /A mainver_max=0
set /A subver_max=0
for %%f in (*) do (
set str=%%~nf
set /A mainver=!str:~8,10!
if !mainver! gtr !mainver_max! (
set /A mainver_max=!mainver!
set /A subver_max=0
)
set mainverstr=z3prac_v!mainver!
if not x!mainverstr!==x%%~nf (
for /f "tokens=3 delims=_" %%a in ("!str!") do set subver=%%a
if !subver! gtr !subver_max! set /A subver_max=!subver!
)
)

cd ..

set /A newmainver=!mainver_max!+1
set /A newsubver=!subver_max!+1
set /P bigver="New main version? [y/n]: "
if !bigver!==y (
flips "Rockman Zero 3 (Japan).gba" "z3prac.gba" "ips\z3prac_v!newmainver!.ips"
) else (flips "Rockman Zero 3 (Japan).gba" "z3prac.gba" "ips\z3prac_v!mainver_max!_!newsubver!.ips")

ENDLOCAL

cd ..
33 changes: 33 additions & 0 deletions Z4/newips_z4.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off

cd bps

SETLOCAL ENABLEDELAYEDEXPANSION
set /A mainver_max=0
set /A subver_max=0
for %%f in (*) do (
set str=%%~nf
set /A mainver=!str:~8,10!
if !mainver! gtr !mainver_max! (
set /A mainver_max=!mainver!
set /A subver_max=0
)
set mainverstr=z4prac_v!mainver!
if not x!mainverstr!==x%%~nf (
for /f "tokens=3 delims=_" %%a in ("!str!") do set subver=%%a
if !subver! gtr !subver_max! set /A subver_max=!subver!
)
)

cd ..

set /A newmainver=!mainver_max!+1
set /A newsubver=!subver_max!+1
set /P bigver="New main version? [y/n]: "
if !bigver!==y (
flips "Rockman Zero 4 (Japan).gba" "z4prac.gba" "bps\z4prac_v!newmainver!.bps"
) else (flips "Rockman Zero 4 (Japan).gba" "z4prac.gba" "bps\z4prac_v!mainver_max!_!newsubver!.bps")

ENDLOCAL

cd ..

0 comments on commit 8b33058

Please sign in to comment.