Skip to content

Commit 6c1a836

Browse files
authored
Merge pull request #202 from idlechild/master
Practice Hack 2.6.0 rollup
2 parents 05869cd + b68e80d commit 6c1a836

33 files changed

+5267
-97
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.sw[op]
55
build/
66
tools/*.exe
7+
tools/asar
78
.vscode/launch.json
89
.vscode/tasks.json
910
/names/custom_names.txt

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN wget https://github.com/RPGHacker/asar/archive/v1.81.tar.gz \
1818
&& cp asar/asar-standalone /app/tools/asar
1919

2020
RUN mkdir -p /app/build \
21+
&& mkdir -p /app/enemies \
2122
&& mkdir -p /app/layout \
2223
&& mkdir -p /app/names \
2324
&& mkdir -p /app/resources \
@@ -32,6 +33,8 @@ ARG now
3233
WORKDIR /app
3334
RUN rm -rf build
3435
RUN mkdir -p build
36+
RUN rm -rf enemies
37+
COPY enemies/ enemies/
3538
RUN rm -rf layout
3639
COPY layout/ layout/
3740
RUN rm -rf names

build.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
if not exist build mkdir build
44

55
echo Building SM NTSC Practice Hack
6+
python enemies\create_clear_enemies_data.py ..\src\clearenemies.asm clear_enemies.txt
67
python layout\create_layout.py portals.txt layoutmenutemplate.asm ..\src\layoutmenu.asm ..\src\layoutportaltables.asm
78
python names\create_names.py ..\src\roomnames.asm default_names.txt custom_names.txt
89
cd resources

build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,31 @@ trap success=1 ERR
77
mkdir -p build
88

99
echo "Building SM NTSC Practice Hack"
10+
python3 enemies/create_clear_enemies_data.py ../src/clearenemies.asm clear_enemies.txt
1011
python3 layout/create_layout.py portals.txt layoutmenutemplate.asm ../src/layoutmenu.asm ../src/layoutportaltables.asm
1112
python3 names/create_names.py ../src/roomnames.asm default_names.txt custom_names.txt
1213
cd resources
1314
python3 create_ram_symbols.py ../src/defines.asm ../src/symbols.asm
1415
python3 create_dummies.py 00.sfc ff.sfc
1516

1617
echo "Building saveless version"
18+
rm -f ../build/smhack20.ips
1719
cp *.sfc ../build
1820
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/00.sfc
1921
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/ff.sfc
2022
python3 sort_debug_symbols.py ../build/symbols.sym x x
2123
python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smhack20.ips
2224

2325
echo "Building SD2SNES version"
26+
rm -f ../build/smhack20_sd2snes.ips
2427
cp *.sfc ../build
2528
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/00.sfc
2629
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/ff.sfc
2730
python3 sort_debug_symbols.py ../build/symbols.sym x x
2831
python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smhack20_sd2snes.ips
2932

3033
echo "Building TinyStates version"
34+
rm -f ../build/smhack20_tinystates.ips
3135
cp *.sfc ../build
3236
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/00.sfc
3337
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/ff.sfc

build_PAL.bat

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,42 @@
33
if not exist build mkdir build
44

55
echo Building SM PAL Practice Hack
6+
python enemies\create_clear_enemies_data.py ..\src\clearenemies.asm clear_enemies.txt
67
python layout\create_layout.py portals.txt layoutmenutemplate.asm ..\src\layoutmenu.asm ..\src\layoutportaltables.asm
78
python names\create_names.py ..\src\roomnames.asm default_names.txt custom_names.txt
89
cd resources
910
python create_ram_symbols.py ..\src\defines.asm ..\src\symbols.asm
1011
python create_dummies.py 00.sfc ff.sfc
1112

1213
echo Building saveless version
14+
if exist ..\build\smpalhack20.ips del ..\build\smpalhack20.ips
1315
copy *.sfc ..\build
1416
..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 ..\src\main.asm ..\build\00.sfc
17+
if ERRORLEVEL 1 goto end_build_saveless
1518
..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 ..\src\main.asm ..\build\ff.sfc
1619
python sort_debug_symbols.py ..\build\symbols.sym x x
1720
python create_ips.py ..\build\00.sfc ..\build\ff.sfc ..\build\smpalhack20.ips
21+
:end_build_saveless
1822

1923
echo Building SD2SNES version
24+
if exist ..\build\smpalhack20_sd2snes.ips del ..\build\smpalhack20_sd2snes.ips
2025
copy *.sfc ..\build
2126
..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 ..\src\main.asm ..\build\00.sfc
27+
if ERRORLEVEL 1 goto end_build_sd2snes
2228
..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 ..\src\main.asm ..\build\ff.sfc
2329
python sort_debug_symbols.py ..\build\symbols.sym x x
2430
python create_ips.py ..\build\00.sfc ..\build\ff.sfc ..\build\smpalhack20_sd2snes.ips
31+
:end_build_sd2snes
2532

2633
echo Building TinyStates version
34+
if exist ..\build\smpalhack20_tinystates.ips del ..\build\smpalhack20_tinystates.ips
2735
copy *.sfc ..\build
2836
..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=1 ..\src\main.asm ..\build\00.sfc
37+
if ERRORLEVEL 1 goto end_build_tinystates
2938
..\tools\asar --no-title-check --symbols=wla --symbols-path=..\build\symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=1 ..\src\main.asm ..\build\ff.sfc
3039
python sort_debug_symbols.py ..\build\symbols.sym x x
3140
python create_ips.py ..\build\00.sfc ..\build\ff.sfc ..\build\smpalhack20_tinystates.ips
41+
:end_build_tinystates
3242

3343
del 00.sfc ff.sfc ..\build\00.sfc ..\build\ff.sfc ..\build\symbols.sym
3444
cd ..

build_PAL.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,31 @@ trap success=1 ERR
77
mkdir -p build
88

99
echo "Building SM PAL Practice Hack"
10+
python3 enemies/create_clear_enemies_data.py ../src/clearenemies.asm clear_enemies.txt
1011
python3 layout/create_layout.py portals.txt layoutmenutemplate.asm ../src/layoutmenu.asm ../src/layoutportaltables.asm
1112
python3 names/create_names.py ../src/roomnames.asm default_names.txt custom_names.txt
1213
cd resources
1314
python3 create_ram_symbols.py ../src/defines.asm ../src/symbols.asm
1415
python3 create_dummies.py 00.sfc ff.sfc
1516

1617
echo "Building saveless version"
18+
rm -f ../build/smpalhack20.ips
1719
cp *.sfc ../build
1820
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/00.sfc
1921
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/ff.sfc
2022
python3 sort_debug_symbols.py ../build/symbols.sym x x
2123
python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smpalhack20.ips
2224

2325
echo "Building SD2SNES version"
26+
rm -f ../build/smpalhack20_sd2snes.ips
2427
cp *.sfc ../build
2528
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/00.sfc
2629
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=1 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=0 "$@" ../src/main.asm ../build/ff.sfc
2730
python3 sort_debug_symbols.py ../build/symbols.sym x x
2831
python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smpalhack20_sd2snes.ips
2932

3033
echo "Building TinyStates version"
34+
rm -f ../build/smpalhack20_tinystates.ips
3135
cp *.sfc ../build
3236
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/00.sfc
3337
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_PAL=1 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/ff.sfc

build_dev.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ cls
44
if not exist build mkdir build
55

66
echo Building SM NTSC Dev Practice Hack
7+
python enemies\create_clear_enemies_data.py ..\src\clearenemies.asm clear_enemies.txt
78
python layout\create_layout.py portals.txt layoutmenutemplate.asm ..\src\layoutmenu.asm ..\src\layoutportaltables.asm
89
python names\create_names.py ..\src\roomnames.asm default_names.txt custom_names.txt
910
cd resources

build_dev.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,24 @@ trap success=1 ERR
77
mkdir -p build
88

99
echo "Building SM NTSC Dev Practice Hack"
10+
python3 enemies/create_clear_enemies_data.py ../src/clearenemies.asm clear_enemies.txt
1011
python3 layout/create_layout.py portals.txt layoutmenutemplate.asm ../src/layoutmenu.asm ../src/layoutportaltables.asm
1112
python3 names/create_names.py ../src/roomnames.asm default_names.txt custom_names.txt
1213
cd resources
1314
python3 create_ram_symbols.py ../src/defines.asm ../src/symbols.asm
1415
python3 create_dummies.py 00.sfc ff.sfc
1516

1617
echo "Building tinystates Dev version"
17-
PRERELEASE=$(git rev-parse --short HEAD)
18+
rm -f ../build/smhack20_tinystates_dev.ips
1819
cp *.sfc ../build
19-
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 -DPRERELEASE=$PRERELEASE "$@" ../src/main.asm ../build/00.sfc
20-
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 -DPRERELEASE=$PRERELEASE "$@" ../src/main.asm ../build/ff.sfc
20+
if git --version &>/dev/null; then
21+
PRERELEASE=$(git rev-parse --short HEAD)
22+
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 -DPRERELEASE=$PRERELEASE "$@" ../src/main.asm ../build/00.sfc
23+
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 -DPRERELEASE=$PRERELEASE "$@" ../src/main.asm ../build/ff.sfc
24+
else
25+
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/00.sfc
26+
../tools/asar --no-title-check --symbols=wla --symbols-path=../build/Debugging_Symbols.sym -DFEATURE_SD2SNES=0 -DFEATURE_DEV=1 -DFEATURE_PAL=0 -DFEATURE_TINYSTATES=1 "$@" ../src/main.asm ../build/ff.sfc
27+
fi
2128
python3 sort_debug_symbols.py ../build/Debugging_Symbols.sym ../build/Debugging_Sorted.sym ../build/Debugging_Combined.sym
2229
python3 create_ips.py ../build/00.sfc ../build/ff.sfc ../build/smhack20_tinystates_dev.ips
2330

build_docker.bat

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
@echo off
22
for /f "tokens=2-4 delims=/ " %%a in ('DATE /T') do (set mydate=%%c-%%a-%%b)
3+
if exist build\smhack20.ips del build\smhack20.ips
4+
if exist build\smhack20_sd2snes.ips del build\smhack20_sd2snes.ips
5+
if exist build\smhack20_tinystates.ips del build\smhack20_tinystates.ips
6+
if exist build\smhack20_tinystates_dev.ips del build\smhack20_tinystates_dev.ips
7+
if exist build\smpalhack20.ips del build\smpalhack20.ips
8+
if exist build\smpalhack20_sd2snes.ips del build\smpalhack20_sd2snes.ips
9+
if exist build\smpalhack20_tinystates.ips del build\smpalhack20_tinystates.ips
310
docker build --tag sm_practice_hack --build-arg now="%mydate%_%TIME%" --output build .
4-

build_docker.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/bash
2-
2+
rm -f build/smhack20.ips
3+
rm -f build/smhack20_sd2snes.ips
4+
rm -f build/smhack20_tinystates.ips
5+
rm -f build/smhack20_tinystates_dev.ips
6+
rm -f build/smpalhack20.ips
7+
rm -f build/smpalhack20_sd2snes.ips
8+
rm -f build/smpalhack20_tinystates.ips
39
docker build --tag sm_practice_hack --build-arg now="$(date +%s)" --output build .
4-

0 commit comments

Comments
 (0)