From ad34d56e8dd04983dc594c0a1d90798ed4d457a7 Mon Sep 17 00:00:00 2001 From: 4am Date: Sat, 13 Nov 2021 17:11:26 -0500 Subject: [PATCH] add action HGR indexes to TOTAL.IDX --- Makefile | 14 +++++++------- src/constants.a | 2 +- src/index/artwork.idx.a | 2 +- src/index/dhgr.idx.a | 2 +- src/index/gr.idx.a | 2 +- src/index/hgr0.idx.a | 8 ++++++++ src/index/hgr1.idx.a | 8 ++++++++ src/index/hgr2.idx.a | 8 ++++++++ src/index/hgr3.idx.a | 8 ++++++++ src/index/hgr4.idx.a | 8 ++++++++ src/index/hgr5.idx.a | 8 ++++++++ src/index/hgr6.idx.a | 8 ++++++++ src/prodos.path.a | 38 +++++++++++++++++++++++++++++++------- src/ui.attract.hgr.a | 21 ++++++++++++--------- 14 files changed, 110 insertions(+), 27 deletions(-) create mode 100644 src/index/hgr0.idx.a create mode 100644 src/index/hgr1.idx.a create mode 100644 src/index/hgr2.idx.a create mode 100644 src/index/hgr3.idx.a create mode 100644 src/index/hgr4.idx.a create mode 100644 src/index/hgr5.idx.a create mode 100644 src/index/hgr6.idx.a diff --git a/Makefile b/Makefile index 2464803cb..fc9a648a1 100644 --- a/Makefile +++ b/Makefile @@ -53,13 +53,6 @@ dsk: index asmproboot asmlauncher build/PREFS.CONF \ build/CREDITS \ build/HELPTEXT \ - build/HGR0.IDX \ - build/HGR1.IDX \ - build/HGR2.IDX \ - build/HGR3.IDX \ - build/HGR4.IDX \ - build/HGR5.IDX \ - build/HGR6.IDX \ res/DECRUNCH \ res/JOYSTICK \ res/Finder.Data \ @@ -191,6 +184,13 @@ index: md asmfx asmprelaunch compress bin/addfile.sh build/GAMEHELP.IDX build/TOTAL.IDX > src/index/gamehelp.idx.a bin/addfile.sh build/SLIDESHOW.IDX build/TOTAL.IDX > src/index/slideshow.idx.a bin/addfile.sh build/MINIATTRACT.IDX build/TOTAL.IDX > src/index/miniattract.idx.a + bin/addfile.sh build/HGR0.IDX build/TOTAL.IDX > src/index/hgr0.idx.a + bin/addfile.sh build/HGR1.IDX build/TOTAL.IDX > src/index/hgr1.idx.a + bin/addfile.sh build/HGR2.IDX build/TOTAL.IDX > src/index/hgr2.idx.a + bin/addfile.sh build/HGR3.IDX build/TOTAL.IDX > src/index/hgr3.idx.a + bin/addfile.sh build/HGR4.IDX build/TOTAL.IDX > src/index/hgr4.idx.a + bin/addfile.sh build/HGR5.IDX build/TOTAL.IDX > src/index/hgr5.idx.a + bin/addfile.sh build/HGR6.IDX build/TOTAL.IDX > src/index/hgr6.idx.a bin/addfile.sh build/DHGR.IDX build/TOTAL.IDX > src/index/dhgr.idx.a bin/addfile.sh build/GR.IDX build/TOTAL.IDX > src/index/gr.idx.a bin/addfile.sh build/ARTWORK.IDX build/TOTAL.IDX > src/index/artwork.idx.a diff --git a/src/constants.a b/src/constants.a index 32b18e782..10d518d65 100644 --- a/src/constants.a +++ b/src/constants.a @@ -201,7 +201,7 @@ PRELAUNCH_STANDARD_SIZE = 61 ; LoadStandardPrelaunch, eventually to be d iCurBlockLo = $D401 ; constant iCurBlockHi = $D403 ; constant launchpatch = $D662 ; glue.launch.a -iAddToPath = $FED4 ; Roger Rabbit, avoid, use Infiltrator 2 style instead +iAddToPath = $FEA5 ; Roger Rabbit, avoid, use Infiltrator 2 style instead itraverse = $D964 ; Roger Rabbit, avoid, use Infiltrator 2 style instead ldrlo = $55 ; constant ldrhi = $56 ; constant diff --git a/src/index/artwork.idx.a b/src/index/artwork.idx.a index e2d13d3a3..a0e09a415 100644 --- a/src/index/artwork.idx.a +++ b/src/index/artwork.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 82246 + !be24 95588 !le16 4186 diff --git a/src/index/dhgr.idx.a b/src/index/dhgr.idx.a index 8074f87bd..974f6689b 100644 --- a/src/index/dhgr.idx.a +++ b/src/index/dhgr.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 80904 + !be24 94246 !le16 1249 diff --git a/src/index/gr.idx.a b/src/index/gr.idx.a index da70276c8..002dee311 100644 --- a/src/index/gr.idx.a +++ b/src/index/gr.idx.a @@ -4,5 +4,5 @@ ; This file is automatically generated ; !byte 0 - !be24 82153 + !be24 95495 !le16 93 diff --git a/src/index/hgr0.idx.a b/src/index/hgr0.idx.a new file mode 100644 index 000000000..2f770e1a3 --- /dev/null +++ b/src/index/hgr0.idx.a @@ -0,0 +1,8 @@ +; +; Index record for build/HGR0.IDX +; +; This file is automatically generated +; + !byte 0 + !be24 80904 + !le16 4364 diff --git a/src/index/hgr1.idx.a b/src/index/hgr1.idx.a new file mode 100644 index 000000000..3ded31dc1 --- /dev/null +++ b/src/index/hgr1.idx.a @@ -0,0 +1,8 @@ +; +; Index record for build/HGR1.IDX +; +; This file is automatically generated +; + !byte 0 + !be24 85268 + !le16 1516 diff --git a/src/index/hgr2.idx.a b/src/index/hgr2.idx.a new file mode 100644 index 000000000..c8ac5846f --- /dev/null +++ b/src/index/hgr2.idx.a @@ -0,0 +1,8 @@ +; +; Index record for build/HGR2.IDX +; +; This file is automatically generated +; + !byte 0 + !be24 86784 + !le16 1031 diff --git a/src/index/hgr3.idx.a b/src/index/hgr3.idx.a new file mode 100644 index 000000000..d365b30d2 --- /dev/null +++ b/src/index/hgr3.idx.a @@ -0,0 +1,8 @@ +; +; Index record for build/HGR3.IDX +; +; This file is automatically generated +; + !byte 0 + !be24 87815 + !le16 3237 diff --git a/src/index/hgr4.idx.a b/src/index/hgr4.idx.a new file mode 100644 index 000000000..187936066 --- /dev/null +++ b/src/index/hgr4.idx.a @@ -0,0 +1,8 @@ +; +; Index record for build/HGR4.IDX +; +; This file is automatically generated +; + !byte 0 + !be24 91052 + !le16 2648 diff --git a/src/index/hgr5.idx.a b/src/index/hgr5.idx.a new file mode 100644 index 000000000..282cc94f6 --- /dev/null +++ b/src/index/hgr5.idx.a @@ -0,0 +1,8 @@ +; +; Index record for build/HGR5.IDX +; +; This file is automatically generated +; + !byte 0 + !be24 93700 + !le16 441 diff --git a/src/index/hgr6.idx.a b/src/index/hgr6.idx.a new file mode 100644 index 000000000..a66ca09ab --- /dev/null +++ b/src/index/hgr6.idx.a @@ -0,0 +1,8 @@ +; +; Index record for build/HGR6.IDX +; +; This file is automatically generated +; + !byte 0 + !be24 94141 + !le16 105 diff --git a/src/prodos.path.a b/src/prodos.path.a index 321982112..37e3b35cd 100644 --- a/src/prodos.path.a +++ b/src/prodos.path.a @@ -93,6 +93,37 @@ kDHGRActionIndexRecord kGRActionIndexRecord !source "src/index/gr.idx.a" +kHGRActionIndexLo + !byte kHGRActionIndexRecord0 + !byte >kHGRActionIndexRecord1 + !byte >kHGRActionIndexRecord2 + !byte >kHGRActionIndexRecord3 + !byte >kHGRActionIndexRecord4 + !byte >kHGRActionIndexRecord5 + !byte >kHGRActionIndexRecord6 +kHGRActionIndexRecord0 + !source "src/index/hgr0.idx.a" +kHGRActionIndexRecord1 + !source "src/index/hgr1.idx.a" +kHGRActionIndexRecord2 + !source "src/index/hgr2.idx.a" +kHGRActionIndexRecord3 + !source "src/index/hgr3.idx.a" +kHGRActionIndexRecord4 + !source "src/index/hgr4.idx.a" +kHGRActionIndexRecord5 + !source "src/index/hgr5.idx.a" +kHGRActionIndexRecord6 + !source "src/index/hgr6.idx.a" + kTotalDataFile !byte 10 !raw "TOTAL.DATA" @@ -113,13 +144,6 @@ kAnimatedTitleDirectory !byte 15 !raw "TITLE.ANIMATED/" -kHGRActionIndexFile - !byte 8 - !raw "HGR" -gHGRActionIndexNumber - !raw "_" - !raw ".IDX" - kDemoDirectory !byte 5 !raw "DEMO/" diff --git a/src/ui.attract.hgr.a b/src/ui.attract.hgr.a index 32a590c23..389d51045 100644 --- a/src/ui.attract.hgr.a +++ b/src/ui.attract.hgr.a @@ -159,18 +159,21 @@ LoadIndexedHGRFile ldy #1 lda (PTR), y sec - sbc #$41 - lsr - lsr - clc - adc #$30 ; A = "0".."6" (ASCII) - sta gHGRActionIndexNumber ; part of kHGRActionIndexFile + sbc #$41 ; A in [0..25] + lsr ; A in [0..15] + lsr ; A in [0..7] + tax + lda kHGRActionIndexLo, x + sta HGRActionIndexRecord + lda kHGRActionIndexHi, x + sta HGRActionIndexRecord+1 - jsr LoadFile ; load index file into $4000 - !word kRootDirectory - !word kHGRActionIndexFile + jsr LoadIndexedFile ; load index file into $4000 + !word kTotalIndexFile HGRActionIndexPtr !word $4000 +HGRActionIndexRecord + !word $FDFD ; SMC jsr okvs_find !word HGRActionIndexPtr