@gaialabs/iog-baserom 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/baserom/auto-use-items/CellKeysAutoUse.patch.asm +30 -0
- package/baserom/auto-use-items/CrystalBallAutoUse.patch.asm +131 -0
- package/baserom/auto-use-items/DiamondBlockAutoUse.patch.asm +50 -0
- package/baserom/auto-use-items/ElevatorKeyAutoUse.patch.asm +26 -0
- package/baserom/auto-use-items/GorgonFlowerAutoUse.patch.asm +153 -0
- package/baserom/auto-use-items/HieroglyphPuzzle.patch.asm +1187 -0
- package/baserom/auto-use-items/HopeStatueAutoUse.patch.asm +99 -0
- package/baserom/auto-use-items/IncanStatueAutoUse.patch.asm +75 -0
- package/baserom/auto-use-items/ItemUseStub.patch.asm +24 -0
- package/baserom/auto-use-items/MagicPowerAutoUse.patch.asm +55 -0
- package/baserom/auto-use-items/MeatAutoUse.patch.asm +33 -0
- package/baserom/auto-use-items/MushroomDropAutoUse.patch.asm +100 -0
- package/baserom/auto-use-items/PalaceKeyAutoUse.patch.asm +52 -0
- package/baserom/auto-use-items/PrisonKeyAutoUse.patch.asm +84 -0
- package/baserom/auto-use-items/PurificationStoneAutoUse.patch.asm +49 -0
- package/baserom/auto-use-items/RamaStatueAutoUse.patch.asm +100 -0
- package/baserom/auto-use-items/TearpotAutoUse.patch.asm +41 -0
- package/baserom/{spritemaps → boot-logo}/spm_boot_logos.sprite.asm +10 -0
- package/baserom/collectible-system/RelicMenu.patch.asm +250 -0
- package/baserom/collectible-system/key_item_core.asm +445 -0
- package/baserom/{patches → equipped-icon}/EquippedIcon.patch.asm +41 -46
- package/baserom/equipped-icon/ItemSwapping.patch.asm +99 -0
- package/baserom/{palettes → equipped-icon}/pal_item_exprite2.pal +0 -0
- package/baserom/{spritemaps → equipped-icon}/spm_sc02_main_characters.sprite.asm +10 -0
- package/baserom/equipped-icon/spriteset_aura.asm +131 -0
- package/baserom/equipped-icon/spriteset_dark_friar.asm +277 -0
- package/baserom/equipped-icon/spriteset_darkgaia_projectile.asm +233 -0
- package/baserom/fixes-tweaks/BCDHex.patch.asm +60 -0
- package/baserom/fixes-tweaks/HudRedesign.patch.asm +108 -0
- package/baserom/fixes-tweaks/NeilsFatherFix.patch.asm +26 -0
- package/baserom/fixes-tweaks/PyramidPortalExit.patch.asm +41 -0
- package/baserom/fixes-tweaks/SceneTitles.patch.asm +84 -0
- package/baserom/fixes-tweaks/ThankfulFlower.patch.asm +28 -0
- package/baserom/fixes-tweaks/Utils.patch.asm +111 -0
- package/baserom/{spritemaps → fixes-tweaks}/spm_goldship_sprites.sprite.asm +11 -0
- package/baserom/fonts/EnhancedOverworldText.patch.asm +44 -0
- package/baserom/fonts/EnhancedPrologueText.patch.asm +252 -0
- package/baserom/{graphics → fonts}/gfx_fonts.bin +0 -0
- package/baserom/fonts/gfx_overworld_font.bin +0 -0
- package/baserom/inventory/EnhancedSlotActor.patch.asm +50 -0
- package/baserom/inventory/InventoryCounters.patch.asm +407 -0
- package/baserom/inventory/InventoryManagement.patch.asm +390 -0
- package/baserom/kara-run/gfx_castle_sprites.bin +0 -0
- package/baserom/new-game-plus/NGPEpilogueSwitch.patch.asm +52 -0
- package/baserom/{patches → new-game-plus}/NewGamePlus.patch.asm +42 -23
- package/baserom/oakton/map_fr30.map +0 -0
- package/baserom/oakton/map_fr30_effect.map +0 -0
- package/baserom/options-menu/EnhancedInvItemPicker.patch.asm +130 -0
- package/baserom/options-menu/MinimalHudOption.patch.asm +109 -0
- package/baserom/options-menu/OptionsMenu.patch.asm +218 -0
- package/baserom/options-menu/TextSpeedOption.patch.asm +108 -0
- package/baserom/options-menu/options_input_remap.asm +373 -0
- package/baserom/options-menu/options_menu_core.asm +1221 -0
- package/baserom/patches/APUWaitFixes.patch.asm +30 -17
- package/baserom/patches/AccentMap.patch.asm +16 -5
- package/baserom/patches/MusicTransitions.patch.asm +41 -24
- package/baserom/player-input/MergeInputFlags.patch.asm +146 -0
- package/baserom/player-input/PlayerInput.patch.asm +51 -0
- package/baserom/red-jewels/AnnSparkle.patch.asm +28 -0
- package/baserom/red-jewels/ChestFlaggedHiddenRedJewel.patch.asm +50 -0
- package/baserom/red-jewels/FishermanRedJewel.patch.asm +55 -0
- package/baserom/red-jewels/LanceSparkle.patch.asm +38 -0
- package/baserom/red-jewels/RedJewelSparkle.patch.asm +49 -0
- package/baserom/red-jewels/SnakePanicSparkle.patch.asm +45 -0
- package/baserom/red-jewels/SparkleAlways.patch.asm.example +19 -0
- package/baserom/red-jewels/StoneGirlSparkle.patch.asm +26 -0
- package/baserom/red-jewels/TrappedSlaveSparkle.patch.asm +63 -0
- package/baserom/red-jewels/generic_sparkle.asm +57 -0
- package/baserom/run-button/RunButtonCore.patch.asm +89 -0
- package/baserom/run-button/RunButtonOption.patch.asm +50 -0
- package/baserom/{patches/BitmapPatch.patch.asm → scene-load/BitmapLoad.patch.asm} +27 -12
- package/baserom/scene-load/Cop51Decompress.patch.asm +98 -0
- package/baserom/scene-load/ExpriteLoader.patch.asm +82 -0
- package/baserom/scene-load/MapNameLookup.patch.asm +27 -0
- package/baserom/scene-load/MenuBGLoad.patch.asm +70 -0
- package/baserom/scene-load/SFXTable.patch.asm +92 -0
- package/baserom/scene-load/SceneMetaLoad.patch.asm +68 -0
- package/baserom/scene-load/SpritemapLoad.patch.asm +61 -0
- package/baserom/scene-load/TilemapLoad.patch.asm +109 -0
- package/baserom/scene-load/TilesetLoad.patch.asm +41 -0
- package/baserom/set_overworld.set +0 -0
- package/baserom/seths-jewel/SethsJewelGoldShip.patch.asm +22 -0
- package/baserom/seths-jewel/SethsJewelIcon.patch.asm +22 -0
- package/baserom/seths-jewel/SethsJewelItem.patch.asm +62 -0
- package/baserom/seths-jewel/SethsJewelSprites.patch.asm +49 -0
- package/baserom/{patches → sky-delivery}/SouthCapeDeliveryman.patch.asm +12 -3
- package/baserom/sky-delivery/WatermiaDeliveryman.patch.asm +15 -0
- package/dist/index.cjs +10159 -964
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +10161 -967
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -8
- package/baserom/asm/spriteset_aura.asm +0 -122
- package/baserom/asm/spriteset_dark_friar.asm +0 -268
- package/baserom/asm/spriteset_will_projectile.asm +0 -224
- package/baserom/patches/Cop51Patch.patch.asm +0 -81
- package/baserom/patches/DPShop.asm.old +0 -328
- package/baserom/patches/DeathWarp.asm.old +0 -174
- package/baserom/patches/ExpandedHealthBars.old +0 -203
- package/baserom/patches/ExpriteLoader.patch.asm +0 -66
- package/baserom/patches/GemShop.asm.old +0 -345
- package/baserom/patches/InventoryCounters.patch.asm +0 -292
- package/baserom/patches/InventoryManagement.patch.asm +0 -324
- package/baserom/patches/InventoryScript.asm.old +0 -319
- package/baserom/patches/ItemDictionary.asm.old +0 -86
- package/baserom/patches/ItemRewards.asm.old +0 -49
- package/baserom/patches/ItemSwapping.patch.asm +0 -80
- package/baserom/patches/MapNameLookup.patch.asm +0 -13
- package/baserom/patches/MenuBGPatch.patch.asm +0 -54
- package/baserom/patches/NGPEpilogueSwitch.patch.asm +0 -44
- package/baserom/patches/PixelConverter.patch.asm.old +0 -60
- package/baserom/patches/QuickScripts.asm.old +0 -210
- package/baserom/patches/RunButton.patch.asm +0 -79
- package/baserom/patches/SFXTable.patch.asm +0 -73
- package/baserom/patches/SceneLoadPatch.patch.asm +0 -52
- package/baserom/patches/SpritemapPatch.patch.asm +0 -45
- package/baserom/patches/Teleporter.patch.asm.old +0 -203
- package/baserom/patches/TilemapPatch.patch.asm +0 -94
- package/baserom/patches/TilesetPatch.patch.asm +0 -27
- package/baserom/patches/Utils.patch.asm +0 -414
- package/baserom/patches/WatermiaDeliveryman.patch.asm +0 -2
- /package/baserom/{graphics → boot-logo}/gfx_boot_exprite.raw.bin +0 -0
- /package/baserom/{graphics → boot-logo}/gfx_boot_logos.bin +0 -0
- /package/baserom/{palettes → boot-logo}/pal_boot_logos.pal +0 -0
- /package/baserom/{palettes → equipped-icon}/fx_palette_198000.pal +0 -0
- /package/baserom/{graphics → equipped-icon}/gfx_item_exprite.raw.bin +0 -0
- /package/baserom/{graphics → equipped-icon}/misc_fx_1CD580.bin +0 -0
- /package/baserom/{palettes → equipped-icon}/pal_item_exprite.pal +0 -0
- /package/baserom/{palettes → equipped-icon}/pal_sc02_main_characters.pal +0 -0
- /package/baserom/{graphics → fonts}/gfx_credits_font.bin +0 -0
- /package/baserom/{graphics → inventory}/gfx_inventory_sprites.bin +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; South Cape fisherman pot - hidden Red Jewel sparkle
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: When the pot actor runs, it spawns generic_sparkle and keeps the jewel
|
|
5
|
+
; interact on code_048462; pickup sets flag $D7 and kills the sparkle child.
|
|
6
|
+
; Vanilla behavior: e_sc01_pot staged pot animation and handler without sparkle VFX.
|
|
7
|
+
; Hooks (overrides): sc01_fisherman.e_sc01_pot!, code_048462!, code_048474! (RTL stub unchanged).
|
|
8
|
+
; Depends on: generic_sparkle; parent sc01_fisherman flag $D7 gating; item $01 gift flow.
|
|
9
|
+
; State: Flag byte $D7 on successful Red Jewel pickup.
|
|
10
|
+
; ==============================================================================
|
|
11
|
+
|
|
12
|
+
!playerYPos 09A4
|
|
13
|
+
|
|
14
|
+
---------------------------------------------
|
|
15
|
+
;sc01_fisherman
|
|
16
|
+
|
|
17
|
+
;code_048372- {
|
|
18
|
+
; sc01_fisherman_preamble:
|
|
19
|
+
; COP [BranchOnFlagByte] ( #1C, #01, &code_048372 )
|
|
20
|
+
; COP [BranchOnFlagByte] ( #16, #01, &sc01_fisherman_alt )
|
|
21
|
+
;}
|
|
22
|
+
|
|
23
|
+
;loc_0483AA- {
|
|
24
|
+
; sc01_fisherman_alt:
|
|
25
|
+
; LDA #$0200
|
|
26
|
+
; TSB $12
|
|
27
|
+
;}
|
|
28
|
+
|
|
29
|
+
sc01_fisherman.e_sc01_pot! {
|
|
30
|
+
LDA #$0200
|
|
31
|
+
TSB $12
|
|
32
|
+
COP [StageSpriteFrame] ( #3E )
|
|
33
|
+
COP [AnimOnce]
|
|
34
|
+
COP [MarkSolidHere]
|
|
35
|
+
;COP [BranchOnFlagByte] ( #D7, #01, &sc01_pot_exit ) ;not needed, parent does this
|
|
36
|
+
COP [SpawnAfterOffset] ( @generic_sparkle, #$0001, #$FFF7 )
|
|
37
|
+
STY $26
|
|
38
|
+
COP [SetInteractHandler] ( &code_048462 )
|
|
39
|
+
COP [SetEntryHere]
|
|
40
|
+
RTL
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
sc01_fisherman.code_048462! {
|
|
44
|
+
COP [BranchOnFlagByte] ( #D7, #01, &code_048474 )
|
|
45
|
+
COP [GiveItem] ( #01, &code_048475 )
|
|
46
|
+
LDY $26
|
|
47
|
+
LDA #$0001
|
|
48
|
+
STA $0026, Y
|
|
49
|
+
COP [PrintDialogString] ( &dialogstring_048479 )
|
|
50
|
+
COP [SetFlagByte] ( #D7 )
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
sc01_fisherman.code_048474! {
|
|
54
|
+
RTL
|
|
55
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Watermia Lance - Lilly party Red Jewel sparkle
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: After birthday-party flags ($A5, $E2) allow the jewel gift path, Lance's
|
|
5
|
+
; init spawns generic_sparkle when the jewel is still collectible; pickup sets $E2.
|
|
6
|
+
; Vanilla behavior: wa79_lance code_07ACEC placed sprite without sparkle; code_07AD15 gave
|
|
7
|
+
; jewel when $A5 set, gated on $E2, without sparkle teardown on $26 child.
|
|
8
|
+
; Hooks (overrides): wa79_lance.code_07ACEC!, code_07AD15!.
|
|
9
|
+
; Depends on: generic_sparkle; flag bytes $A5, $E2, $97; code_07AD28 -> HiddenRedJewelInventoryFull.
|
|
10
|
+
; ==============================================================================
|
|
11
|
+
|
|
12
|
+
wa79_lance.code_07ACEC! {
|
|
13
|
+
COP [SetTilePos] ( #07, #09 )
|
|
14
|
+
COP [StageSpriteFrame] ( #02 )
|
|
15
|
+
COP [AnimOnce]
|
|
16
|
+
COP [MarkSolidHere]
|
|
17
|
+
COP [NudgePosition] ( #00, #F8 )
|
|
18
|
+
COP [BranchOnFlagByte] ( #A5, #00, &wa79_lance_init_normal )
|
|
19
|
+
COP [BranchOnFlagByte] ( #E2, #01, &wa79_lance_init_normal )
|
|
20
|
+
COP [SpawnAfterOffset] ( @generic_sparkle, #$0000, #$FFF8 )
|
|
21
|
+
STY $26
|
|
22
|
+
|
|
23
|
+
wa79_lance_init_normal:
|
|
24
|
+
COP [SetInteractHandler] ( &code_07AD07 )
|
|
25
|
+
COP [SetEntryHere]
|
|
26
|
+
RTL
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
wa79_lance.code_07AD15! {
|
|
30
|
+
COP [BranchOnFlagByte] ( #E2, #01, &code_07AD2C )
|
|
31
|
+
COP [GiveItem] ( #01, &code_07AD28 )
|
|
32
|
+
LDY $26
|
|
33
|
+
LDA #$0001
|
|
34
|
+
STA $0026, Y
|
|
35
|
+
COP [PrintDialogString] ( &dialogstring_07AEDE )
|
|
36
|
+
COP [SetFlagByte] ( #E2 )
|
|
37
|
+
RTL
|
|
38
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Hidden Red Jewel - sparkle hint while collectible
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: Before the per-scene event flag ($0200 + $0E + $80) is set, spawns
|
|
5
|
+
; generic_sparkle child on init; on pickup sets flag, kills sparkle via $0026,Y,
|
|
6
|
+
; then gives item $01 with dialog. If flag already set at init, actor dies immediately.
|
|
7
|
+
; Vanilla behavior: hidden_red_jewel init only sets handler/metasprite/hitbox; interact
|
|
8
|
+
; tested flag inside HiddenRedJewelInteract without VFX or early despawn when taken.
|
|
9
|
+
; Hooks (overrides): hidden_red_jewel.HiddenRedJewelEntry insert-before/after; HiddenRedJewelInteract!.
|
|
10
|
+
; Depends on: generic_sparkle actor; flag_helpers Test/SetEventFlag_0200; HiddenRedJewelInventoryFull.
|
|
11
|
+
; State: Event flags $0280-$028F ($0E + $80 on base $0200); $26 holds sparkle child slot index.
|
|
12
|
+
; Hazards/notes: X = actor slot for all COP calls; sparkle offset #$FFFC from parent.
|
|
13
|
+
; ==============================================================================
|
|
14
|
+
|
|
15
|
+
!activator_type 001C
|
|
16
|
+
|
|
17
|
+
-----------------------------------
|
|
18
|
+
;hidden_red_jewel
|
|
19
|
+
|
|
20
|
+
hidden_red_jewel.HiddenRedJewelEntry- {
|
|
21
|
+
LDA $0E
|
|
22
|
+
CLC
|
|
23
|
+
ADC #$0080
|
|
24
|
+
JSL $@flag_helpers.TestEventFlag_0200
|
|
25
|
+
BCS hidden_red_jewel_destroy
|
|
26
|
+
COP [SpawnAfterOffset] ( @generic_sparkle, #$0000, #$FFFC )
|
|
27
|
+
STY $26
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
hidden_red_jewel.HiddenRedJewelEntry+ {
|
|
31
|
+
hidden_red_jewel_destroy:
|
|
32
|
+
COP [Die]
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
hidden_red_jewel.HiddenRedJewelInteract! {
|
|
37
|
+
COP [GiveItem] ( #01, &HiddenRedJewelInventoryFull )
|
|
38
|
+
LDA $0E
|
|
39
|
+
CLC
|
|
40
|
+
ADC #$0080
|
|
41
|
+
JSL $@flag_helpers.SetEventFlag_0200
|
|
42
|
+
|
|
43
|
+
hrji_complete:
|
|
44
|
+
LDY $26
|
|
45
|
+
LDA #$0001
|
|
46
|
+
STA $0026, Y
|
|
47
|
+
COP [PrintDialogString] ( &HiddenRedJewelFoundString )
|
|
48
|
+
COP [Die]
|
|
49
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Dao snake panic room - twin Red Jewel prize sparkle
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: While flag $E7 clear, init spawns generic_sparkle; loc_08B010 path sets
|
|
5
|
+
; $E7, gives two Red Jewels (or BCD +2 jewelsCollected), kills sparkle, custom strings.
|
|
6
|
+
; Vanilla behavior: daC6_snake_panic init without sparkle; loc_08B010 set $E7 and dialog
|
|
7
|
+
; with jewels already included in dialogstring_08B052 end lines.
|
|
8
|
+
; Hooks (overrides): daC6_snake_panic.code_08AE4C-; loc_08B010!; dialogstring_08B052! trim text.
|
|
9
|
+
; Depends on: generic_sparkle; flag byte $E7; snake_panic_inventory_full local full-inventory path.
|
|
10
|
+
; State: jewelsCollected on full inventory branch.
|
|
11
|
+
; ==============================================================================
|
|
12
|
+
|
|
13
|
+
daC6_snake_panic.code_08AE4C- {
|
|
14
|
+
COP [BranchOnFlagByte] ( #E7, #01, &code_08AE4C )
|
|
15
|
+
COP [SpawnAfterOffset] ( @generic_sparkle, #$0000, #$FFF8 )
|
|
16
|
+
STY $26
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
daC6_snake_panic.loc_08B010! {
|
|
21
|
+
COP [SetFlagByte] ( #E7 )
|
|
22
|
+
LDY $26
|
|
23
|
+
LDA #$0001
|
|
24
|
+
STA $0026, Y
|
|
25
|
+
COP [GiveItem] ( #01, &snake_panic_inventory_full )
|
|
26
|
+
COP [GiveItem] ( #01, &snake_panic_inventory_full )
|
|
27
|
+
COP [PrintDialogString] ( &daC6_snake_panic_normal_str )
|
|
28
|
+
BRA loc_08AFFF
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
snake_panic_inventory_full {
|
|
32
|
+
SED
|
|
33
|
+
LDA $jewelsCollected
|
|
34
|
+
CLC
|
|
35
|
+
ADC #$0002
|
|
36
|
+
STA $jewelsCollected
|
|
37
|
+
CLD
|
|
38
|
+
COP [PrintDialogString] ( &daC6_snake_panic_full_str )
|
|
39
|
+
BRA loc_08AFFF
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
daC6_snake_panic_normal_str `[PRT:@dialogstring_08B052][CLD]`
|
|
43
|
+
daC6_snake_panic_full_str `[PRT:@dialogstring_08B052]I'll send them to[N]the Jeweler.[END]`
|
|
44
|
+
|
|
45
|
+
daC6_snake_panic.dialogstring_08B052! `[TPL:A][DLY:2]Wow [BCD:3,AAC] snakes. Very[N]good![FIN]For your prize, I'll give [N]you two Red Jewels. [FIN]`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; generic_sparkle - UNUSED example patch (not assembled)
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it demonstrates: Optional override of generic_sparkle loop labels to animate the
|
|
5
|
+
; sparkle every frame regardless of inventoryEquippedType (drops activator_type checks).
|
|
6
|
+
; Targets live only in baserom generic_sparkle.asm, not in extracted/; overrides left unprefixed.
|
|
7
|
+
; ==============================================================================
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
generic_sparkle_normal_loop! {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
generic_sparkle_loop! {
|
|
14
|
+
COP [SetEntryHere]
|
|
15
|
+
LDA $26
|
|
16
|
+
BNE generic_sparkle_destroy
|
|
17
|
+
COP [AnimOneFrame]
|
|
18
|
+
RTL
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Gorgon hut stone girl - hidden Red Jewel sparkle
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: On init, if flag $E6 clear, spawns generic_sparkle; interact gives Red
|
|
5
|
+
; Jewel $01, sets $E6, and signals sparkle child to die via $0026,Y.
|
|
6
|
+
; Vanilla behavior: nvAE_stone_girl2 init and code_0893A3 gift without sparkle hint.
|
|
7
|
+
; Hooks (overrides): nvAE_stone_girl2.code_089369- insert; code_0893A3! full interact replace.
|
|
8
|
+
; Depends on: generic_sparkle; flag byte $E6; HiddenRedJewelInventoryFull on full inventory.
|
|
9
|
+
; ==============================================================================
|
|
10
|
+
|
|
11
|
+
nvAE_stone_girl2.code_089369- {
|
|
12
|
+
COP [BranchOnFlagByte] ( #E6, #01, &code_089369 )
|
|
13
|
+
COP [SpawnAfterOffset] ( @generic_sparkle, #$0000, #$FFF8 )
|
|
14
|
+
STY $26
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
nvAE_stone_girl2.code_0893A3! {
|
|
18
|
+
COP [BranchOnFlagByte] ( #E6, #01, &code_0893BA )
|
|
19
|
+
COP [GiveItem] ( #01, &code_0893B6 )
|
|
20
|
+
LDY $26
|
|
21
|
+
LDA #$0001
|
|
22
|
+
STA $0026, Y
|
|
23
|
+
COP [PrintDialogString] ( &dialogstring_08942A )
|
|
24
|
+
COP [SetFlagByte] ( #E6 )
|
|
25
|
+
RTL
|
|
26
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Diamond Mine trapped slave - triple Red Jewel gift sparkle
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: Replaces the slave's gift sequence to spawn generic_sparkle during the
|
|
5
|
+
; cutscene, then GiveItem x3 (or BCD +3 to jewelsCollected if inventory full) with
|
|
6
|
+
; updated dialog strings; clears sparkle via $0026,Y after WaitOnFlagByte $D9.
|
|
7
|
+
; Vanilla behavior: dm40_trapped_slave code_05D7CB gave three jewels without sparkle child
|
|
8
|
+
; or sparkle teardown; dialogstring_05D819 bundled thanks + jewel text in one string.
|
|
9
|
+
; Hooks (overrides): dm40_trapped_slave.code_05D7CB!; dialogstring_05D819! split to preamble only.
|
|
10
|
+
; Depends on: generic_sparkle; joypadMaskStd / displayModeFlags during scripted wait; flag $D9.
|
|
11
|
+
; State: jewelsCollected ($0AB0) on inventory-full path; flag byte $D9 waited on before gift.
|
|
12
|
+
; Hazards/notes: Long COP script; duplicate GiveItem x3 matches vanilla grant count.
|
|
13
|
+
; ==============================================================================
|
|
14
|
+
|
|
15
|
+
dm40_trapped_slave.code_05D7CB! {
|
|
16
|
+
COP [NudgePosition] ( #08, #00 )
|
|
17
|
+
LDA #$2000
|
|
18
|
+
TSB $10
|
|
19
|
+
COP [StageSpriteFrame] ( #0C )
|
|
20
|
+
COP [AnimOnce]
|
|
21
|
+
COP [SpawnAfterOffset] ( @generic_sparkle, #$0000, #$FFF8 )
|
|
22
|
+
STY $26
|
|
23
|
+
COP [WaitOnFlagByte] ( #D9, #01 )
|
|
24
|
+
LDY $26
|
|
25
|
+
LDA #$0001
|
|
26
|
+
STA $0026, Y
|
|
27
|
+
LDA #$2000
|
|
28
|
+
TRB $10
|
|
29
|
+
LDA #$EFFC
|
|
30
|
+
TSB $joypadMaskStd
|
|
31
|
+
COP [WaitByte] ( #77 )
|
|
32
|
+
COP [ClearFlagByte] ( #00 )
|
|
33
|
+
COP [GiveItem] ( #01, &dm40_trapped_slave_inventory_full )
|
|
34
|
+
COP [GiveItem] ( #01, &dm40_trapped_slave_inventory_full )
|
|
35
|
+
COP [GiveItem] ( #01, &dm40_trapped_slave_inventory_full )
|
|
36
|
+
COP [PrintDialogString] ( &dm40_trapped_slave_normal_str )
|
|
37
|
+
BRA dm40_trapped_slave_continue
|
|
38
|
+
|
|
39
|
+
dm40_trapped_slave_inventory_full:
|
|
40
|
+
SED
|
|
41
|
+
LDA $jewelsCollected
|
|
42
|
+
CLC
|
|
43
|
+
ADC #$0003
|
|
44
|
+
STA $jewelsCollected
|
|
45
|
+
CLD
|
|
46
|
+
COP [PrintDialogString] ( &dm40_trapped_slave_full_str )
|
|
47
|
+
|
|
48
|
+
dm40_trapped_slave_continue:
|
|
49
|
+
LDA #$EFFC
|
|
50
|
+
TRB $joypadMaskStd
|
|
51
|
+
LDA #$0080
|
|
52
|
+
TSB $displayModeFlags
|
|
53
|
+
COP [StageSpriteLoopMoveY] ( #0D, #08, #01 )
|
|
54
|
+
COP [AnimLoop]
|
|
55
|
+
LDA #$0080
|
|
56
|
+
TRB $displayModeFlags
|
|
57
|
+
COP [Die]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
dm40_trapped_slave_normal_str `[PRT:@dialogstring_05D819]I want to give you a[N]present. Here's 3 Red[N]Jewels for your trouble.[END]`
|
|
61
|
+
dm40_trapped_slave_full_str `[PRT:@dialogstring_05D819]I want to give you a[N]present. I'm sending 3[N]Red Jewels to[N]the Jeweler.[END]`
|
|
62
|
+
|
|
63
|
+
dm40_trapped_slave.dialogstring_05D819! `[DEF]Thank you.[N]I was buried in[N]the cave-in...[FIN]What would happen if[N]we took longer...[FIN]`
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Red Jewel sparkle helper actor
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: Child actor that toggles priority bit $2000 on $10 while the player has
|
|
5
|
+
; inventoryEquippedType == activator_type ($1C); animates one frame when equipped type
|
|
6
|
+
; matches, otherwise idles hidden. Dies when parent sets $0026,Y to $0001 after pickup.
|
|
7
|
+
; Vanilla behavior: (new actor; not in extracted ROM.)
|
|
8
|
+
; Adds: generic_sparkle init, generic_sparkle_normal_loop / _loop / _destroy entry points.
|
|
9
|
+
; Depends on: spriteset_pickups_effects metasprite; COP SetEntryHere, AnimOneFrame, Die.
|
|
10
|
+
; State: Reads inventoryEquippedType; uses actor fields $0E/$10/$26 per parent patches.
|
|
11
|
+
; Hazards/notes: X must remain actor slot ID across COP instructions in parent and here.
|
|
12
|
+
; ==============================================================================
|
|
13
|
+
|
|
14
|
+
!activator_type 001C
|
|
15
|
+
|
|
16
|
+
-----------------------------------
|
|
17
|
+
|
|
18
|
+
generic_sparkle {
|
|
19
|
+
LDA #$2000
|
|
20
|
+
STA $0E
|
|
21
|
+
LDA #$0402
|
|
22
|
+
STA $10
|
|
23
|
+
LDA #$0000
|
|
24
|
+
STA $26
|
|
25
|
+
COP [SetMetasprite] ( @spriteset_pickups_effects )
|
|
26
|
+
COP [StageSpriteFrame] ( #02 )
|
|
27
|
+
COP [SetSpritePriority] ( #30 )
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
generic_sparkle_normal_loop {
|
|
31
|
+
LDA #$2000
|
|
32
|
+
TSB $10
|
|
33
|
+
COP [SetEntryHere]
|
|
34
|
+
LDA $26
|
|
35
|
+
BNE generic_sparkle_destroy
|
|
36
|
+
LDA $inventoryEquippedType
|
|
37
|
+
CMP #$activator_type
|
|
38
|
+
BEQ generic_sparkle_loop
|
|
39
|
+
RTL
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
generic_sparkle_loop {
|
|
43
|
+
LDA #$2000
|
|
44
|
+
TRB $10
|
|
45
|
+
COP [SetEntryHere]
|
|
46
|
+
LDA $26
|
|
47
|
+
BNE generic_sparkle_destroy
|
|
48
|
+
LDA $inventoryEquippedType
|
|
49
|
+
CMP #$activator_type
|
|
50
|
+
BNE generic_sparkle_normal_loop
|
|
51
|
+
COP [AnimOneFrame]
|
|
52
|
+
RTL
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
generic_sparkle_destroy {
|
|
56
|
+
COP [Die]
|
|
57
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Run Button core - movement sprint from options setting
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: Each frame via PlayerInputHooks chain, sets run state $09B2/$09B4
|
|
5
|
+
; when D-pad held and gates match Run/Walk/Auto mode from options ($0B3A).
|
|
6
|
+
; Vanilla behavior: Sprint required Run button (joypad bit $0040) plus direction;
|
|
7
|
+
; no Walk/Auto modes.
|
|
8
|
+
; Hooks (overrides): PlayerInputHooks+ chain insert (patch-local hook list).
|
|
9
|
+
; Adds: run_button_main and direction helpers (JSL from hook).
|
|
10
|
+
; Depends on: PlayerInput.patch PlayerInputHooks anchor; joypadCurrent $0656.
|
|
11
|
+
; State: $0B3A bits 2-3; player motion $09AA/$09B2/$09B4/$09B8; playerFlags
|
|
12
|
+
; $09AE bits 11-13 ($0800/$1000/$2000) skip sprint when set.
|
|
13
|
+
; Hazards: RTL subroutines; reads joypad after remapping (action bit $0040 = Run).
|
|
14
|
+
; ==============================================================================
|
|
15
|
+
|
|
16
|
+
!run_button_setting 0B3A
|
|
17
|
+
|
|
18
|
+
---------------------------------
|
|
19
|
+
|
|
20
|
+
run_button_main:
|
|
21
|
+
LDA $09AA
|
|
22
|
+
BEQ run_button_end ;Skip if player has no actor
|
|
23
|
+
LDA $09B2
|
|
24
|
+
BNE run_button_end ;Skip if running already
|
|
25
|
+
LDA $09B4
|
|
26
|
+
BNE run_button_end ;Skip if running already
|
|
27
|
+
LDA $09AE
|
|
28
|
+
BIT #$3800
|
|
29
|
+
BNE run_button_end ;Skip if in a stance, on a slope or script/ability locked
|
|
30
|
+
LDA $run_button_setting
|
|
31
|
+
AND #$000C
|
|
32
|
+
BEQ run_mode_hold ;Run: sprint while the run button is held
|
|
33
|
+
CMP #$0008
|
|
34
|
+
BEQ run_button_dirs ;Auto: always sprint, the run button has no effect
|
|
35
|
+
LDA $joypadCurrent ;Walk: sprint unless the run button is held
|
|
36
|
+
BIT #$0040
|
|
37
|
+
BNE run_button_end
|
|
38
|
+
BRA run_button_dirs
|
|
39
|
+
|
|
40
|
+
run_mode_hold:
|
|
41
|
+
LDA $joypadCurrent
|
|
42
|
+
BIT #$0040
|
|
43
|
+
BEQ run_button_end ;Skip if not pressing run
|
|
44
|
+
|
|
45
|
+
run_button_dirs:
|
|
46
|
+
LDA $joypadCurrent
|
|
47
|
+
XBA
|
|
48
|
+
LSR
|
|
49
|
+
BCS run_button_e
|
|
50
|
+
LSR
|
|
51
|
+
BCS run_button_w
|
|
52
|
+
LSR
|
|
53
|
+
BCS run_button_s
|
|
54
|
+
LSR
|
|
55
|
+
BCS run_button_n
|
|
56
|
+
|
|
57
|
+
;Skip if not pressing a direction
|
|
58
|
+
run_button_end:
|
|
59
|
+
RTL
|
|
60
|
+
|
|
61
|
+
run_button_n:
|
|
62
|
+
LDA #$FFFD
|
|
63
|
+
BRA run_store_ns
|
|
64
|
+
|
|
65
|
+
run_button_s:
|
|
66
|
+
LDA #$0003
|
|
67
|
+
|
|
68
|
+
run_store_ns:
|
|
69
|
+
STA $09B4
|
|
70
|
+
STZ $09B8 ;Reset brake counter
|
|
71
|
+
RTL
|
|
72
|
+
|
|
73
|
+
run_button_w:
|
|
74
|
+
LDA #$FFFD
|
|
75
|
+
BRA run_store_ew
|
|
76
|
+
|
|
77
|
+
run_button_e:
|
|
78
|
+
LDA #$0003
|
|
79
|
+
|
|
80
|
+
run_store_ew:
|
|
81
|
+
STA $09B2
|
|
82
|
+
STZ $09B8 ;Reset brake counter
|
|
83
|
+
RTL
|
|
84
|
+
|
|
85
|
+
--------------------------------------------------
|
|
86
|
+
|
|
87
|
+
PlayerInputHooks+ {
|
|
88
|
+
JSL $@run_button_main
|
|
89
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Run Button option - menu strings and diary text updates
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: Registers Run/Walk/Auto in the options menu; rewrites diary
|
|
5
|
+
; Change Options / Start Journey dialog lines to describe sprint remapping.
|
|
6
|
+
; Vanilla behavior: Diary strings listed Attack/Talk, Item palette, unused row;
|
|
7
|
+
; run mode was fixed in engine (Y = sprint in default Type-1 layout).
|
|
8
|
+
; Hooks (overrides): sFA_diary_menu.dialogstring_0BF538 / dialogstring_0BF5AD.
|
|
9
|
+
; Adds: OptionSettingPreset- record (packed $0B3A bits 2-3, temp $0BE6).
|
|
10
|
+
; Depends on: options_menu_core registry; RunButtonCore.patch for gameplay effect.
|
|
11
|
+
; State: $0B3A bits 2-3 (0 Run, 1 Walk, 2 Auto); temp word $0BE6.
|
|
12
|
+
; Hazards: Strings only in this file; logic lives in run_button_main (bank 02).
|
|
13
|
+
; ==============================================================================
|
|
14
|
+
|
|
15
|
+
--------------------------------------
|
|
16
|
+
|
|
17
|
+
RunButtonChoices [
|
|
18
|
+
&run_button_run
|
|
19
|
+
&run_button_walk
|
|
20
|
+
&run_button_auto
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
run_button_run |Run|
|
|
24
|
+
run_button_walk |Walk|
|
|
25
|
+
run_button_auto |Auto|
|
|
26
|
+
|
|
27
|
+
optstr_run_button |[PAL:0]Run Button[N] [PAL:14][TBL:@RunButtonChoices,BE6][PAL:0]|
|
|
28
|
+
optstr_run_button_desc |[PAL:0][POS:96,5]Run: hold to run.[DBL]Walk: hold to walk.[DBL]Auto: always run.|
|
|
29
|
+
|
|
30
|
+
--------------------------------------
|
|
31
|
+
|
|
32
|
+
sFA_diary_menu.dialogstring_0BF538! `[DLG:6,8][SIZ:A,8][SKP:2]Change Snd/Buttons[N]End Changes[N]Sound[N][LU2:2]Type[N][SKP:5] :Attack/Talk[N][SKP:5] :Item/Cancel[N][SKP:5] :Item Menu[N][SKP:5] :Sprint`
|
|
33
|
+
sFA_diary_menu.dialogstring_0BF5AD! `[DLG:6,8][SIZ:A,8]Arrangement OK?[N]Start Journey[N]Sound[N][LU2:2]Type[N][SKP:5] :Attack/Talk[N][SKP:5] :Item/Cancel[N][SKP:5] :Item Menu[N][SKP:5] :Sprint`
|
|
34
|
+
|
|
35
|
+
--------------------------------------
|
|
36
|
+
;Registration of the Run Button setting (must stay after the overrides above)
|
|
37
|
+
|
|
38
|
+
OptionSettingPreset- [
|
|
39
|
+
@optstr_run_button ;+00 render
|
|
40
|
+
@optstr_run_button_desc ;+03 desc
|
|
41
|
+
#$0BE6 ;+06 temp
|
|
42
|
+
#$0B3A ;+08 store
|
|
43
|
+
#$0002 ;+0A shift
|
|
44
|
+
#$0003 ;+0C mask
|
|
45
|
+
#$0000 ;+0E xor
|
|
46
|
+
#$0003 ;+10 count
|
|
47
|
+
#$0000 ;+12 load (packed bits)
|
|
48
|
+
#$0000 ;+14 change
|
|
49
|
+
#$0000 ;+16 commit (packed bits)
|
|
50
|
+
]
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
; ==============================================================================
|
|
2
|
+
; Scene BG tile load (opcode $03) - uncompressed strips and priority interleave
|
|
3
|
+
; ==============================================================================
|
|
4
|
+
; What it does: Treats compressed-size word $0001 as raw tile data (no Quintet LZ
|
|
5
|
+
; before DMA/interleave); extends CheckInterleavedFlag and the interleave loop
|
|
6
|
+
; for that path; Load4bppPage skips decompress when size is $0001.
|
|
7
|
+
; Vanilla behavior: Only $0000 skipped decompression; non-zero sizes always ran
|
|
8
|
+
; QuintetLzDecompress; interleave path assumed LZ-expanded data at $7E:7000.
|
|
9
|
+
; Hooks (overrides): scene_script.loc_028503, CheckInterleavedFlag,
|
|
10
|
+
; InterleaveTilesPriority (+ inner loc_028608/616/62D/645), Load4bppPage.
|
|
11
|
+
; Depends on: ?INCLUDE scene_script; DeinterleavePlanarTiles, BuildAttributeTable,
|
|
12
|
+
; GraphicsCacheLookup, SceneDmaTileShim, QuintetLzDecompress.
|
|
13
|
+
; State: layerPriorityFlag $06EE bit $0800; cache slots $066C/$0671/$067D/$0680/$0683;
|
|
14
|
+
; staging $7E:7000 and $7E:A000; VRAM $0000 after interleave DMA.
|
|
15
|
+
; Hazards/notes: Bank $02; InterleaveTilesPriority clobbers B and uses DP $5E; inner
|
|
16
|
+
; loops use X/Y — not actor COP context here.
|
|
17
|
+
; ==============================================================================
|
|
18
|
+
?BANK 02
|
|
2
19
|
|
|
3
20
|
?INCLUDE 'scene_script'
|
|
4
21
|
|
|
5
|
-
-- Patch for bitmap loading which adds support for no compression
|
|
6
|
-
|
|
7
22
|
!LSAMPLE $10
|
|
8
23
|
!LOOPNUM $12
|
|
9
24
|
!SPTR $3E
|
|
@@ -16,7 +31,7 @@
|
|
|
16
31
|
--------------------------------------------
|
|
17
32
|
;Main bitmap handler
|
|
18
33
|
|
|
19
|
-
loc_028503! {
|
|
34
|
+
scene_script.loc_028503! {
|
|
20
35
|
LDA [$3E]
|
|
21
36
|
INC $3E
|
|
22
37
|
INC $3E
|
|
@@ -31,20 +46,20 @@ loc_028503! {
|
|
|
31
46
|
JMP $&DeinterleavePlanarTiles
|
|
32
47
|
}
|
|
33
48
|
|
|
34
|
-
CheckInterleavedFlag! {
|
|
49
|
+
scene_script.CheckInterleavedFlag! {
|
|
35
50
|
CPX #$066C
|
|
36
51
|
BNE DmaTileStripToVram
|
|
37
52
|
LDA $06EE
|
|
38
53
|
BIT #$0800
|
|
39
54
|
BEQ DmaTileStripToVram
|
|
40
|
-
JMP $&
|
|
55
|
+
JMP $&InterleaveTilesPriority
|
|
41
56
|
}
|
|
42
57
|
|
|
43
58
|
-------------------------------------------
|
|
44
59
|
;First pass, copy palette information into VRAM from tileset
|
|
45
60
|
|
|
46
61
|
|
|
47
|
-
|
|
62
|
+
scene_script.InterleaveTilesPriority! {
|
|
48
63
|
PHY -- Y will be our read offset
|
|
49
64
|
PHB -- data bank will be changed
|
|
50
65
|
|
|
@@ -70,7 +85,7 @@ code_0285F3! {
|
|
|
70
85
|
LDY #$0000 -- init read offset to 0. using Y because of long addressing. setting here because previous call clobbers it
|
|
71
86
|
|
|
72
87
|
--No change here
|
|
73
|
-
loc_028608!:
|
|
88
|
+
scene_script.loc_028608!:
|
|
74
89
|
LDA #$07 -- init sample counter
|
|
75
90
|
STA LOOPNUM
|
|
76
91
|
|
|
@@ -80,7 +95,7 @@ code_0285F3! {
|
|
|
80
95
|
BNE loc_028616
|
|
81
96
|
INC SPTR+1
|
|
82
97
|
|
|
83
|
-
loc_028616!:
|
|
98
|
+
scene_script.loc_028616!:
|
|
84
99
|
LDA [TPTR1], Y
|
|
85
100
|
STA $00
|
|
86
101
|
LDA [TPTR2], Y
|
|
@@ -95,7 +110,7 @@ code_0285F3! {
|
|
|
95
110
|
LDX #$0007 -- init rotate counter
|
|
96
111
|
|
|
97
112
|
--No change
|
|
98
|
-
loc_02862D!:
|
|
113
|
+
scene_script.loc_02862D!:
|
|
99
114
|
LDA #$00
|
|
100
115
|
ROL $06
|
|
101
116
|
ROL
|
|
@@ -112,7 +127,7 @@ code_0285F3! {
|
|
|
112
127
|
BNE loc_028645
|
|
113
128
|
INC DPTR+1
|
|
114
129
|
|
|
115
|
-
loc_028645!:
|
|
130
|
+
scene_script.loc_028645!:
|
|
116
131
|
DEX
|
|
117
132
|
BPL loc_02862D -- continue rotate (8 times)
|
|
118
133
|
|
|
@@ -160,7 +175,7 @@ code_0285F3! {
|
|
|
160
175
|
|
|
161
176
|
--------------------------------------------------
|
|
162
177
|
|
|
163
|
-
Load4bppPage! {
|
|
178
|
+
scene_script.Load4bppPage! {
|
|
164
179
|
LDA [$3E]
|
|
165
180
|
STA $78
|
|
166
181
|
INC $3E
|