From 1e738f56222070f31bfd39d48dcb9fe66a5b98b6 Mon Sep 17 00:00:00 2001 From: 10yard Date: Thu, 28 Nov 2024 16:48:24 +0000 Subject: [PATCH] Add DK JR L22 to romlist with patch/dkongjrl22.ips --- dk_config.py | 1 + dkwolf/cfg/dkong.cfg | 2 +- launch.py | 11 ++++++----- patch/dkongjrl22.ips | 0 romlist.csv | 1 + 5 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 patch/dkongjrl22.ips diff --git a/dk_config.py b/dk_config.py index 547944e..3364011 100644 --- a/dk_config.py +++ b/dk_config.py @@ -257,6 +257,7 @@ def is_pi(): ("dkongjrvines", "dkstart5:2"), ("dkongjrchains", "dkstart5:3"), ("dkongjrhideout", "dkstart5:4"), + ("dkongjrl22", "dklevel22"), ("ckongpt2_barrels", "dkstart5:1"), ("ckongpt2_pies", "dkstart5:2"), ("ckongpt2_springs", "dkstart5:3"), diff --git a/dkwolf/cfg/dkong.cfg b/dkwolf/cfg/dkong.cfg index 27e4173..588e000 100644 --- a/dkwolf/cfg/dkong.cfg +++ b/dkwolf/cfg/dkong.cfg @@ -3,7 +3,7 @@ - + diff --git a/launch.py b/launch.py index daac5ce..43f5023 100644 --- a/launch.py +++ b/launch.py @@ -42,7 +42,7 @@ def exit_program(confirm=False): for attempt in 1, 2, 3: try: with open('save.p', 'wb') as f: - pickle.dump([_g.score, _g.timer_adjust, _g.last_selected, _g.achievements], f) + pickle.dump([_g.score, _g.timer_adjust, _g.achievements], f) break except (EOFError, FileNotFoundError, IOError): pygame.time.delay(250 * attempt) @@ -130,9 +130,9 @@ def update_screen(delay_ms=0): def load_frontend_state(): try: with open('save.p', "rb") as f: - _g.score, _g.timer_adjust, _g.last_selected, _g.achievements = pickle.load(f) + _g.score, _g.timer_adjust, _g.achievements = pickle.load(f) except (EOFError, FileNotFoundError, IOError, ValueError): - _g.score, _g.timer_adjust, _g.last_selected, _g.achievements = SCORE_START, 0, None, {} + _g.score, _g.timer_adjust, _g.achievements = SCORE_START, 0, {} def check_patches_available(): @@ -145,7 +145,7 @@ def check_patches_available(): for i, patch in enumerate(applied_patches): write_text(patch.upper().replace("_","-"), font=pl_font7, x=x_offset, y=y_offset) update_screen(delay_ms=20) - y_offset += 7 + y_offset += 6 if y_offset > 232: x_offset += 75 y_offset = 11 @@ -684,7 +684,7 @@ def build_menus(initial=False): write_text(f"Generating game list..", x=108 + _g.psx, y=38 + _g.psy, bg=MAGENTA, fg=PINK, bubble=True) #_percent = ceil(_count / len(_g.romlist) * 100) # write_text(f"Generating game list..{str(_percent)}%", x=108 + _g.psx, y=38 + _g.psy, bg=MAGENTA, fg=PINK, bubble=True) - # update_screen() + #update_screen() try: widget = _g.menu.add_button(alt, launch_rom, (sub, name, alt, emu, rec, unlock, st3, st2, st1), button_id=sub+name) except (IndexError, ValueError) as error: @@ -1019,6 +1019,7 @@ def open_menu(menu, remember_selection=False): pass _g.current_menu_title = menu.get_title() menu.enable() + menu.mainloop(_g.screen, bgfun=menu_callback) reset_all_inputs() diff --git a/patch/dkongjrl22.ips b/patch/dkongjrl22.ips new file mode 100644 index 0000000..e69de29 diff --git a/romlist.csv b/romlist.csv index 227598b..21df0fc 100644 --- a/romlist.csv +++ b/romlist.csv @@ -102,4 +102,5 @@ dkongjr,dkongjrspringboard,JR Springboard,Junior Springboard,9999,1,2,,10000,150 dkongjr,dkongjrvines,JR Vines,Junior Vines ,9999,1,2,,10000,15000,30000 dkongjr,dkongjrchains,JR Chains,Junior Chains,9999,1,2,,10000,15000,30000 dkongjr,dkongjrhideout,JR Hideout,Junior Hideout,9999,1,2,,10000,15000,30000 +dkongjr,dkongjrl22,JR Killscreen,Junior Killscreen 22,9999,1,2,,1500,2500,4000 bigkong,bigkong_barrels,BigKong Barrels,Big Kong Barrels Only,9999,1,2,38000,4000,10000,20000