Skip to content

Commit

Permalink
Minor fixes: adjust jumpman's ladder centering, clear screen when lau…
Browse files Browse the repository at this point in the history
…nching game

Remove penalty and playback LUA scripts
  • Loading branch information
10yard committed Jul 15, 2021
1 parent 601749d commit 1f337d9
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 194 deletions.
39 changes: 21 additions & 18 deletions interface/hack_lava.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ function draw_lava()
-- Dim the screen above lava flow
screen:draw_box(256, 224, lava_y, 0, 0xc77990000, 0)

-- Flash colour palette for dramatic effect
-- PANIC! text with flashing colour palette for dramatic effect
if toggle() == 1 then
mem:write_i8(0xc7d86, 1)
block_text("PANIC!", 128, 16, 0xcffEE7511, 0xcffF5BCA0)
else
mem:write_i8(0xc7d86, 0)
end

-- Temporary change to music for added drama
-- Temporary change music for added drama
if stage ~= 2 then
mem:write_i8(0xc6089, 9)
else
Expand Down Expand Up @@ -100,22 +100,25 @@ function draw_lava()

-- Add dancing flames above lava
for k, i in pairs({8, 24, 40, 56, 72, 88, 104, 120, 136, 152, 168, 184, 200, 216}) do
local adjust_y = math_random(-4, 4)
local flame_y = lava_y + adjust_y
local flame_color = ORANGE
if flame_y > 0 then
if adjust_y > 0 then
flame_color = ORANGE
else
flame_color = RED
local flicker = math_random(2)
if flicker == 1 then
local adjust_y = math_random(-5, 4)
local flame_y = lava_y + adjust_y
local flame_color = ORANGE
if flame_y > 0 then
if adjust_y > 0 then
flame_color = ORANGE
else
flame_color = RED
end
-- Draw flame graphic
screen:draw_box(flame_y + 0, i - 0, flame_y + 1, i - 1, flame_color)
screen:draw_box(flame_y + 1, i - 1, flame_y + 2, i - 2, flame_color)
screen:draw_box(flame_y + 2, i - 2, flame_y + 3, i - 3, flame_color)
screen:draw_box(flame_y + 3, i - 1, flame_y + 4, i - 2, flame_color)
screen:draw_box(flame_y + 4, i - 0, flame_y + 5, i - 1, flame_color)
screen:draw_box(flame_y + 5, i - 1, flame_y + 6, i - 2, flame_color)
end
-- Draw flame graphic
screen:draw_box(flame_y + 0, i - 0, flame_y + 1, i - 1, flame_color)
screen:draw_box(flame_y + 1, i - 1, flame_y + 2, i - 2, flame_color)
screen:draw_box(flame_y + 2, i - 2, flame_y + 3, i - 3, flame_color)
screen:draw_box(flame_y + 3, i - 1, flame_y + 4, i - 2, flame_color)
screen:draw_box(flame_y + 4, i - 0, flame_y + 5, i - 1, flame_color)
screen:draw_box(flame_y + 5, i - 1, flame_y + 6, i - 2, flame_color)
end
end
end
Expand All @@ -125,7 +128,7 @@ end
------------------------------------------------------------------------------------------------
if loaded == 3 then
if lava_hack_started ~= 1 then
--register the frame drawing callbackz
--register the frame drawing callback
emu.register_frame_done(draw_lava, "frame")
end
lava_hack_started = 1
Expand Down
102 changes: 0 additions & 102 deletions interface/hack_penalty.lua

This file was deleted.

66 changes: 0 additions & 66 deletions interface/playback.lua

This file was deleted.

10 changes: 6 additions & 4 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,16 +649,16 @@ def launch_rom(info, override_emu=None):
reset_all_inputs()
if os.path.exists(launch_directory):
os.chdir(launch_directory)
clear_screen()
if EMU_EXIT:
launch_command += f"; {EMU_EXIT}"
os.system(launch_command)

clear_screen()
os.system(launch_command)
clear_screen(and_reset_display=True)
pygame.time.delay(50) # debounce
_g.lastexit = _g.timer.duration
os.chdir(ROOT_DIR)

clear_screen(and_reset_display=True)
if competing:
# Check to see if Jumpman achieved 1st, 2nd or 3rd score target to earn coins
scored = get_award(name, st3, st2, st1)
Expand Down Expand Up @@ -694,8 +694,10 @@ def playback_rom(info, inpfile):
os.chdir(launch_directory)
playback_command += f" -playback {os.path.basename(inpfile)} -exit_after_playback"
intermission_channel.stop()
os.system(playback_command)

clear_screen()
os.system(playback_command)
clear_screen(and_reset_display=True)
pygame.time.delay(50) # debounce
_g.lastexit = _g.timer.duration
os.chdir(ROOT_DIR)
Expand Down
6 changes: 2 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ These settings relate to Donkey Kong hacks.
Allow the DK climb scene to be quickly skipped in game by pressing Jump button

`ALLOW_COIN_TO_END_GAME = 1`
1 to allow push of coin during gameplay to trigger end of game, sacrificing all remaining lives. This allows a score to be registered after reaching your target score.
1 to allow push of coin during gameplay to trigger end of game, sacrificing all remaining lives, so a score can be registered.

`SHOW_AWARD_PROGRESS = 1`
1 to show award progress when playing game (replaces highscore at top of screen)
Expand Down Expand Up @@ -370,9 +370,7 @@ As well as an emulator number, the roms can be given a recording emulator numbe

The special subfolder name **shell** can be used when you want to launch a batch file or shell script. Create a .bat or .sh file inside the **/shell** subfolder. The emulator number can be left blank.

An accompanying icon in .png format should be placed into the **artwork/icons** folder or subfolder with the same name as the rom. Recommended icon size is 12px wide x 22px High. You can use the default_machine.png as a template.

Hopefully that all makes sense. Refer to the example romlist.csv
An accompanying icon in .png format should be placed into the **artwork/icons** folder or subfolder with the same name as the rom. Recommended icon size is 12px wide x 22px High.


![DKAFE slots](https://github.com/10yard/dkafe/blob/master/artwork/about/slots.png)
Expand Down

0 comments on commit 1f337d9

Please sign in to comment.