Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts: # bookofmudora.asm
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
; Randomize Book of Mudora
|
; Randomize Book of Mudora
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
LoadLibraryItemGFX:
|
LoadLibraryItemGFX:
|
||||||
LDA.l LibraryItem_Player : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
LDA.l LibraryItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||||
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
||||||
JSL.l AttemptItemSubstitution
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
@@ -63,7 +63,7 @@ RTL
|
|||||||
GiveBonkItem:
|
GiveBonkItem:
|
||||||
JSR LoadBonkItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID
|
JSR LoadBonkItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID
|
||||||
JSR LoadBonkItem
|
JSR LoadBonkItem
|
||||||
CMP.b #$24 : BNE .notKey
|
JSR.w AbsorbKeyCheck : BCC .notKey
|
||||||
.key
|
.key
|
||||||
PHY : LDY.b #$24 : JSL.l AddInventory : PLY ; do inventory processing for a small key
|
PHY : LDY.b #$24 : JSL.l AddInventory : PLY ; do inventory processing for a small key
|
||||||
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys
|
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys
|
||||||
@@ -100,3 +100,19 @@ LoadBonkItem_Player:
|
|||||||
LDA.b #$00
|
LDA.b #$00
|
||||||
++
|
++
|
||||||
RTS
|
RTS
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
AbsorbKeyCheck:
|
||||||
|
PHA
|
||||||
|
CMP.b #$24 : BEQ .key
|
||||||
|
CMP.b #$A0 : BCC .not_key
|
||||||
|
CMP.b #$B0 : BCS .not_key
|
||||||
|
AND.b #$0F : ASL
|
||||||
|
CMP.w DungeonID : BNE .not_key
|
||||||
|
.key
|
||||||
|
PLA
|
||||||
|
SEC
|
||||||
|
RTS
|
||||||
|
.not_key
|
||||||
|
PLA
|
||||||
|
CLC
|
||||||
|
RTS
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ PalettesCustom:
|
|||||||
.master_sword
|
.master_sword
|
||||||
dw $0000, $7E4E, $6FF4, $1CF5, $7FFF, $1CE7, $7A10, $64A5
|
dw $0000, $7E4E, $6FF4, $1CF5, $7FFF, $1CE7, $7A10, $64A5
|
||||||
.tempered_sword
|
.tempered_sword
|
||||||
dw $0000, $7FFF, $1979, $14B6, $39DC, $14A5, $66F7, $45EF
|
dw $7FFF, $093B, $169F, $7E8D, $7FFF, $1CE7, $7A10, $64A5
|
||||||
.golden_sword
|
.golden_sword
|
||||||
dw $0000, $033F, $7FFF, $2640, $7FFF, $1CE7, $7A10, $64A5
|
dw $0000, $033F, $7FFF, $2640, $7FFF, $1CE7, $7A10, $64A5
|
||||||
.fighter_shield
|
.fighter_shield
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ SetCutsceneFlag:
|
|||||||
CLC
|
CLC
|
||||||
RTL
|
RTL
|
||||||
.dungeon_prize
|
.dungeon_prize
|
||||||
|
LDA.w ItemReceiptMethod : CMP.b #$01 : BEQ .no_cutscene
|
||||||
LDA.w ItemReceiptID : TAX
|
LDA.w ItemReceiptID : TAX
|
||||||
LDA.l InventoryTable_properties,X : BPL .no_cutscene
|
LDA.l InventoryTable_properties,X : BPL .no_cutscene
|
||||||
PLX
|
PLX
|
||||||
@@ -324,3 +325,4 @@ CheckDungeonWorld:
|
|||||||
.dark_world
|
.dark_world
|
||||||
SEP #$02
|
SEP #$02
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,19 @@ RTL
|
|||||||
OnDungeonBossExit:
|
OnDungeonBossExit:
|
||||||
JSL.l StatTransitionCounter
|
JSL.l StatTransitionCounter
|
||||||
LDX.w DungeonID : BMI +
|
LDX.w DungeonID : BMI +
|
||||||
|
LDA.w RoomIndex : CMP.b #$0D : BEQ .aga2
|
||||||
|
LDA.w RoomIndex : CMP.b #$20 : BEQ .aga
|
||||||
|
.set_completed
|
||||||
REP #$20
|
REP #$20
|
||||||
LDA.l DungeonItemMasks, X : ORA.l DungeonsCompleted : STA.l DungeonsCompleted
|
LDA.l DungeonItemMasks, X : ORA.l DungeonsCompleted : STA.l DungeonsCompleted
|
||||||
SEP #$20
|
SEP #$20
|
||||||
+
|
+
|
||||||
|
RTL
|
||||||
|
.aga2
|
||||||
|
CPX.b #$1A : BEQ .set_completed
|
||||||
|
RTL
|
||||||
|
.aga
|
||||||
|
CPX.b #$08 : BEQ .set_completed
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnPlayerDead:
|
OnPlayerDead:
|
||||||
|
|||||||
@@ -224,7 +224,10 @@ LoadIndoorValue:
|
|||||||
LDA.l StandingKey_Hera
|
LDA.l StandingKey_Hera
|
||||||
JMP .done
|
JMP .done
|
||||||
+
|
+
|
||||||
LDA.w #$0017 ; default to a normal hp
|
PHX
|
||||||
|
LDX.w CurrentSpriteSlot ; If we're on a different screen ID via glitches load the sprite
|
||||||
|
LDA.w SpriteID,X ; we can see and are interacting with
|
||||||
|
PLX
|
||||||
.done
|
.done
|
||||||
AND.w #$00FF ; the loads are words but the values are 1-byte so we need to clear the top half of the accumulator - no guarantee it was 8-bit before
|
AND.w #$00FF ; the loads are words but the values are 1-byte so we need to clear the top half of the accumulator - no guarantee it was 8-bit before
|
||||||
PLP
|
PLP
|
||||||
@@ -287,7 +290,10 @@ LoadOutdoorValue:
|
|||||||
%GetPossiblyEncryptedItem(HeartPiece_Zora, HeartPieceOutdoorValues)
|
%GetPossiblyEncryptedItem(HeartPiece_Zora, HeartPieceOutdoorValues)
|
||||||
JMP .done
|
JMP .done
|
||||||
+
|
+
|
||||||
LDA.w #$0017 ; default to a normal hp
|
PHX
|
||||||
|
LDX.w CurrentSpriteSlot ; If we're on a different screen ID via glitches load the sprite
|
||||||
|
LDA.w SpriteID,X ; we can see and are interacting with.
|
||||||
|
PLX
|
||||||
.done
|
.done
|
||||||
AND.w #$00FF ; the loads are words but the values are 1-byte so we need to clear the top half of the accumulator - no guarantee it was 8-bit before
|
AND.w #$00FF ; the loads are words but the values are 1-byte so we need to clear the top half of the accumulator - no guarantee it was 8-bit before
|
||||||
PLP
|
PLP
|
||||||
|
|||||||
@@ -1362,11 +1362,11 @@ OverworldMapChangePointers:
|
|||||||
|
|
||||||
dw !OWW_Stripe|!OWW_Vertical
|
dw !OWW_Stripe|!OWW_Vertical
|
||||||
dw $2422
|
dw $2422
|
||||||
dw $02F3, $00C9, $00E3
|
dw $02F3, $00C9, $00E3|!OWW_STOP
|
||||||
|
|
||||||
dw !OWW_Stripe|!OWW_Vertical
|
dw !OWW_Stripe|!OWW_Vertical
|
||||||
dw $2424
|
dw $2424
|
||||||
dw $02F3, $00C9, $00E3
|
dw $02F3, $00C9, $00E3|!OWW_STOP
|
||||||
|
|
||||||
dw !OWW_END
|
dw !OWW_END
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,6 @@
|
|||||||
; resolve to a different one, or to run some custom code on pickup, you will have to use
|
; resolve to a different one, or to run some custom code on pickup, you will have to use
|
||||||
; ItemSubstitutionRules in tables.asm or claim some free space in this bank to put your
|
; ItemSubstitutionRules in tables.asm or claim some free space in this bank to put your
|
||||||
; own code with vectors to it in the appropriate tables.
|
; own code with vectors to it in the appropriate tables.
|
||||||
;
|
|
||||||
; Currently our "skip" vectors are located at (SNES address, little-endian):
|
|
||||||
; ItemReceipts_behavior: $CDBB
|
|
||||||
; ItemReceipts_resolution: $D33F
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@@ -81,6 +77,8 @@
|
|||||||
; c = palette index | l = load palette from .palette_addr
|
; c = palette index | l = load palette from .palette_addr
|
||||||
; .palette_addr [0x02] - $A2BE00 (0x11CE00 PC)
|
; .palette_addr [0x02] - $A2BE00 (0x11CE00 PC)
|
||||||
; • Pointer to 8-color palette in bank $9B (see custompalettes.asm)
|
; • Pointer to 8-color palette in bank $9B (see custompalettes.asm)
|
||||||
|
; • If an item has two sprites, this should be the chest sprite for
|
||||||
|
; dark rooms.
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@@ -420,9 +418,9 @@ endmacro
|
|||||||
%SpriteProps($01, 0, 2, $05, $05, PalettesCustom_master_sword) ; 01 - Master sword
|
%SpriteProps($01, 0, 2, $05, $05, PalettesCustom_master_sword) ; 01 - Master sword
|
||||||
%SpriteProps($02, 0, 2, $05, $01, PalettesCustom_tempered_sword) ; 02 - Tempered sword
|
%SpriteProps($02, 0, 2, $05, $01, PalettesCustom_tempered_sword) ; 02 - Tempered sword
|
||||||
%SpriteProps($03, 0, 2, $05, $04, PalettesCustom_golden_sword) ; 03 - Golden sword
|
%SpriteProps($03, 0, 2, $05, $04, PalettesCustom_golden_sword) ; 03 - Golden sword
|
||||||
%SpriteProps($04, 0, 0, $80, $80, PalettesCustom_fighter_shield) ; 04 - Fighter shield
|
%SpriteProps($04, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 04 - Fighter shield
|
||||||
%SpriteProps($05, 2, 2, $80, $80, PalettesCustom_red_shield) ; 05 - Fire shield
|
%SpriteProps($05, 2, 2, $05, $80, PalettesCustom_red_shield) ; 05 - Fire shield
|
||||||
%SpriteProps($06, 2, 2, $80, $80, PalettesCustom_mirror_shield) ; 06 - Mirror shield
|
%SpriteProps($06, 2, 2, $05, $80, PalettesCustom_mirror_shield) ; 06 - Mirror shield
|
||||||
%SpriteProps($07, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 07 - Fire rod
|
%SpriteProps($07, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 07 - Fire rod
|
||||||
%SpriteProps($08, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 08 - Ice rod
|
%SpriteProps($08, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 08 - Ice rod
|
||||||
%SpriteProps($09, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 09 - Hammer
|
%SpriteProps($09, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 09 - Hammer
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Notice_CompassOf:
|
|||||||
; Oh look! it's
|
; Oh look! it's
|
||||||
; the big key of
|
; the big key of
|
||||||
Notice_BigKeyOf:
|
Notice_BigKeyOf:
|
||||||
db $74, $00, $B8, $00, $D7, $00, $FF, $00, $DB, $00, $DE, $00, $DE, $00, $DA, $00, $C7, $00, $FF, $00, $D8, $00, $E3, $00, $D8, $00, $E2
|
db $74, $00, $B8, $00, $D7, $00, $FF, $00, $DB, $00, $DE, $00, $DE, $00, $DA, $00, $C7, $00, $FF, $00, $D8, $00, $E3, $00, $9D, $00, $E2
|
||||||
db $75, $00, $E3, $00, $D7, $00, $D4, $00, $FF, $00, $D1, $00, $D8, $00, $D6, $00, $FF, $00, $DA, $00, $D4, $00, $E8, $00, $FF, $00, $DE, $00, $D5
|
db $75, $00, $E3, $00, $D7, $00, $D4, $00, $FF, $00, $D1, $00, $D8, $00, $D6, $00, $FF, $00, $DA, $00, $D4, $00, $E8, $00, $FF, $00, $DE, $00, $D5
|
||||||
dw #$7F7F
|
dw #$7F7F
|
||||||
|
|
||||||
|
|||||||
@@ -459,10 +459,10 @@ CreditsLineBlank:
|
|||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
%bigcredits("MATRETHEWEY IBAZLY")
|
%bigcredits(" MATRETHEWEY ")
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
%bigcredits("FISH_WAFFLE64 KRELBEL")
|
%bigcredits("FISH_WAFFLE64 IBAZLY")
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ LoadItemPalette:
|
|||||||
TXA : ASL : TAX
|
TXA : ASL : TAX
|
||||||
LDA.l SpriteProperties_palette_addr,X : STA.b Scrap0A
|
LDA.l SpriteProperties_palette_addr,X : STA.b Scrap0A
|
||||||
LDY.w #$000E
|
LDY.w #$000E
|
||||||
LDA.w RoomIndex : CMP.w #$008C : BEQ .aux
|
JSR.w GTTorchCheck : BCS .aux
|
||||||
LDA.w TransparencyFlag : BNE .SP05
|
LDA.w TransparencyFlag : BNE .SP05
|
||||||
-
|
-
|
||||||
LDA.b [Scrap0A], Y
|
LDA.b [Scrap0A], Y
|
||||||
@@ -463,3 +463,19 @@ ItemReceiptWidthCheck:
|
|||||||
PLX
|
PLX
|
||||||
LDA.l SpriteProperties_standing_width, X
|
LDA.l SpriteProperties_standing_width, X
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
GTTorchCheck:
|
||||||
|
PHX
|
||||||
|
SEP #$30
|
||||||
|
LDA.w RoomIndex : CMP.b #$8C : BNE .done
|
||||||
|
LDX.w CurrentSpriteSlot
|
||||||
|
LDA.w SpriteTypeTable,X : CMP.b #$3B : BNE .done; Bonk Item
|
||||||
|
SEC
|
||||||
|
REP #$30
|
||||||
|
PLX
|
||||||
|
RTS
|
||||||
|
.done
|
||||||
|
CLC
|
||||||
|
REP #$30
|
||||||
|
PLX
|
||||||
|
RTS
|
||||||
|
|||||||
Reference in New Issue
Block a user