From accb80b445e3d084a2f3f41e4b0581b11c287776 Mon Sep 17 00:00:00 2001 From: 4am Date: Thu, 2 Apr 2020 17:58:13 -0400 Subject: [PATCH] infrastructure to per-game help pages --- Makefile | 8 +++++--- res/GAMEHELP/LODE.RUNNER | 25 +++++++++++++++++++++++++ res/GAMEHELP/STANDARD | 12 ++++++++++++ src/prodos.path.a | 4 ++++ src/ui.credits.a | 17 +++++++++++++---- 5 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 res/GAMEHELP/LODE.RUNNER create mode 100644 res/GAMEHELP/STANDARD diff --git a/Makefile b/Makefile index 7c3a80b47..82cb0a3ca 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,10 @@ dsk: md asm for f in build/X/*; do $(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/X/$$(basename $$f)" "$$f"; done >>build/log bin/buildfileinfo.sh build/PRELAUNCH "06" "0106" >>build/log $(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/PRELAUNCH" "build/PRELAUNCH" >>build/log + rsync -aP res/GAMEHELP build/ >>build/log + for f in res/TITLE.HGR/* res/TITLE.DHGR/*; do rsync --ignore-existing build/GAMEHELP/STANDARD build/GAMEHELP/$$(basename $$f); done + bin/buildfileinfo.sh build/GAMEHELP "04" "8000" >>build/log + $(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/GAMEHELP" "build/GAMEHELP" >>build/log bin/changebootloader.sh build/"$(DISK)" res/proboothd asm: md asmlauncher asmfx asmprelaunch @@ -81,9 +85,7 @@ mount: dsk osascript bin/V2Make.scpt "`pwd`" bin/4cade.vii build/"$(DISK)" md: - mkdir -p build/X - mkdir -p build/FX - mkdir -p build/PRELAUNCH + mkdir -p build/X build/FX build/PRELAUNCH build/GAMEHELP clean: rm -rf build/ || rm -rf build diff --git a/res/GAMEHELP/LODE.RUNNER b/res/GAMEHELP/LODE.RUNNER new file mode 100644 index 000000000..67279b2c1 --- /dev/null +++ b/res/GAMEHELP/LODE.RUNNER @@ -0,0 +1,25 @@ + Collect all gold, climb to top + + Dig to fall down or trap enemies + + + < dig U O dig > + I + move J L move + K + + +Esc* * * * * * * * * * * * * * * * pause + +Ctrl-S * * * * * * * * * * *toggle sound + +Ctrl-A * * * * * * * * * * restart level + +Ctrl-R * * * * * * * * * * *restart game + +Ctrl-K / Ctrl-J* * * keyboard / joystick + +Ctrl-X / Ctrl-Y* * * *flip joystick axis + +Return * * * * * * * * *show high scores +[eof] diff --git a/res/GAMEHELP/STANDARD b/res/GAMEHELP/STANDARD new file mode 100644 index 000000000..818f5b07c --- /dev/null +++ b/res/GAMEHELP/STANDARD @@ -0,0 +1,12 @@ + + + + + + + + + + + T O D O +[eof] diff --git a/src/prodos.path.a b/src/prodos.path.a index 5829c7521..30a315332 100644 --- a/src/prodos.path.a +++ b/src/prodos.path.a @@ -98,6 +98,10 @@ kPrelaunchDirectory !byte 10 !raw "PRELAUNCH/" +kGameHelpDirectory + !byte 9 + !raw "GAMEHELP/" + kStandardPrelaunch !byte 8 !raw "STANDARD" diff --git a/src/ui.credits.a b/src/ui.credits.a index 9459c6295..6aac74175 100644 --- a/src/ui.credits.a +++ b/src/ui.credits.a @@ -21,7 +21,7 @@ Credits !word kRootDirectory !word kCreditsFile !word $8000 - jsr ForceHGRMode +-- jsr ForceHGRMode jsr ClearOffscreen lda OffscreenPage ror ; draw on offscreen page @@ -36,17 +36,26 @@ Credits ;------------------------------------------------------------------------------ ; Help -; display global help page and wait +; display per-game or global help page and wait ; ; in: none ; out: see above ;------------------------------------------------------------------------------ Help - jsr LoadFile ; load help text into $8000 + jsr GetGameToLaunch + bcs @global + +ST16 @fname + jsr LoadFile + !word kGameHelpDirectory +@fname !word $FDFD ; SMC + !word $8000 + clc + bcc -- ; always branches +@global jsr LoadFile ; load help text into $8000 !word kRootDirectory !word kHelpTextFile !word $8000 - jsr LoadHelpOffscreen + jsr LoadHelpOffscreen ; load fancy backdrop lda OffscreenPage ror ; draw on offscreen page +LDADDR $8000