Skip to content

Commit 3c45480

Browse files
authored
Merge pull request #232 from idlechild/master
Combine preset data for efficiency
2 parents a5f776b + 54d897d commit 3c45480

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+50315
-366
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ jobs:
3434
- name: Build practice hack patches
3535
run: |
3636
cp ./asar/asar-1.81/asar/asar-standalone ./tools/asar
37+
chmod +x ./build_presets.sh
3738
chmod +x ./build.sh
3839
chmod +x ./build_PAL.sh
40+
./build_presets.sh
3941
./build.sh
4042
./build_PAL.sh
4143
mkdir ./web/public/patches

.github/workflows/pullrequest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ jobs:
3333
- name: Build practice hack patches
3434
run: |
3535
cp ./asar/asar-1.81/asar/asar-standalone ./tools/asar
36+
chmod +x ./build_presets.sh
3637
chmod +x ./build_dev.sh
3738
chmod +x ./build.sh
3839
chmod +x ./build_PAL.sh
40+
./build_presets.sh
3941
./build_dev.sh
4042
./build.sh -DPRERELEASE=$(git rev-parse --short HEAD)
4143
./build_PAL.sh -DPRERELEASE=$(git rev-parse --short HEAD)

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ RUN mkdir -p /app/build \
2727
COPY build.sh /app/build.sh
2828
COPY build_dev.sh /app/build_dev.sh
2929
COPY build_PAL.sh /app/build_PAL.sh
30+
COPY build_presets.sh /app/build_presets.sh
3031

3132
ARG now
3233

@@ -44,6 +45,7 @@ COPY resources/ resources/
4445
RUN rm -rf src
4546
COPY src/ src/
4647

48+
RUN ./build_presets.sh
4749
RUN ./build_dev.sh
4850
RUN ./build_PAL.sh
4951
RUN ./build.sh

build_presets.bat

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@echo off
2+
3+
echo Building Combined Preset Data
4+
cd src\presets
5+
if exist combined_map_preset_data.asm del combined_map_preset_data.asm
6+
if exist combined_preset_data.asm del combined_preset_data.asm
7+
python combine_map_preset_data.py
8+
python combine_preset_data.py
9+
cd ..\..
10+

build_presets.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
echo "Building Combined Preset Data"
4+
cd src/presets
5+
rm -f combined_map_preset_data.asm
6+
rm -f combined_preset_data.asm
7+
python3 combine_map_preset_data.py
8+
python3 combine_preset_data.py
9+
cd ../..
10+

resources/cm_gfx.bin

0 Bytes
Binary file not shown.

resources/cm_gfx2.bin

0 Bytes
Binary file not shown.

resources/sort_debug_symbols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
elif in_source_files:
9393
if new_file:
9494
new_file.write(row)
95-
parts = re.split(" |\.|\/", row)
95+
parts = re.split(" |\\.|\\/", row)
9696
if len(parts) > 3:
9797
named_source = parts[len(parts) - 2]
9898
if named_source in sources_dict.values():

src/BRBmenu.asm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ brb_menu_timer_mode:
5555
db #$FF
5656

5757
brb_menu_timer_min:
58-
%cm_numfield("Minutes on Timer", !ram_cm_brb_mins, 0, 99, 1, 2, #0)
58+
%cm_numfield_word("Minutes on Timer", !ram_cm_brb_mins, 0, 99, 1, 2, #0)
5959

6060
brb_menu_timer_sec:
61-
%cm_numfield("Seconds on Timer", !ram_cm_brb_secs, 0, 59, 1, 2, #0)
61+
%cm_numfield_word("Seconds on Timer", !ram_cm_brb_secs, 0, 59, 1, 2, #0)
6262

6363
brb_menu_timer_clear:
6464
%cm_jsl("Clear Timer", .routine, #0)
@@ -94,9 +94,12 @@ brb_menu_music_toggle:
9494
db #$FF
9595
.routine
9696
; Clear music queue
97-
STZ !MUSIC_QUEUE_TIMERS : STZ !MUSIC_QUEUE_TIMERS+$2 : STZ !MUSIC_QUEUE_TIMERS+$4 : STZ !MUSIC_QUEUE_TIMERS+$6
98-
STZ !MUSIC_QUEUE_TIMERS+$8 : STZ !MUSIC_QUEUE_TIMERS+$A : STZ !MUSIC_QUEUE_TIMERS+$C : STZ !MUSIC_QUEUE_TIMERS+$E
99-
STZ !MUSIC_QUEUE_NEXT : STZ !MUSIC_QUEUE_START : STZ !MUSIC_ENTRY : STZ !MUSIC_TIMER
97+
STZ !MUSIC_QUEUE_TIMERS : STZ !MUSIC_QUEUE_TIMERS+$2
98+
STZ !MUSIC_QUEUE_TIMERS+$4 : STZ !MUSIC_QUEUE_TIMERS+$6
99+
STZ !MUSIC_QUEUE_TIMERS+$8 : STZ !MUSIC_QUEUE_TIMERS+$A
100+
STZ !MUSIC_QUEUE_TIMERS+$C : STZ !MUSIC_QUEUE_TIMERS+$E
101+
STZ !MUSIC_QUEUE_NEXT : STZ !MUSIC_QUEUE_START
102+
STZ !MUSIC_ENTRY : STZ !MUSIC_TIMER
100103
CMP #$0001 : BEQ .resume_music
101104
STZ $2140
102105
RTL

src/crash.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ CrashViewer:
206206
%ai16()
207207
JSL crash_next_frame
208208
JSL crash_cgram_transfer
209+
LDA $C1 : PHA : LDA $C3 : PHA
209210
JSL cm_transfer_custom_tileset
211+
PLA : STA $C3 : PLA : STA $C1
210212

211213
LDA #$0000 : STA !ram_crash_page : STA !ram_crash_palette : STA !ram_crash_cursor
212214
STA !ram_crash_input : STA !ram_crash_input_new

0 commit comments

Comments
 (0)