Merge remote-tracking branch 'baserom/master' into DRMain

# Conflicts:
#	hooks.asm
#	newhud.asm
#	utilities.asm
This commit is contained in:
aerinon
2021-10-21 14:15:54 -06:00
12 changed files with 123 additions and 64 deletions

View File

@@ -24,8 +24,7 @@ GetSpriteID:
PHA : JSR.w CountBottles : CMP.l BottleLimit : !BLT +
LDA !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE +
PLA : LDA.l BottleLimitReplacement
JSL.l GetSpriteID
RTL
JMP GetSpriteID
+
PLA : BRA .normal
.server_F0
@@ -59,8 +58,7 @@ RTL
LDA !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE +
LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit
LDA.l ProgressiveArmorReplacement
JSL.l GetSpriteID
RTL
JMP GetSpriteID
+
LDA.b #$04 : RTL
++ CMP.b #$FE : BNE ++ ; Progressive Sword
@@ -68,8 +66,7 @@ RTL
LDA $7EF359
CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit
LDA.l ProgressiveSwordReplacement
JSL.l GetSpriteID
RTL
JMP GetSpriteID
.skipswordlimit : LDA $7EF359
+ : CMP.b #$FF : BNE + ; Swordless
LDA.b #$43 : RTL
@@ -87,8 +84,7 @@ RTL
LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6
CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
LDA.l ProgressiveShieldReplacement
JSL.l GetSpriteID
RTL
JMP GetSpriteID
.skipshieldlimit : LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6
+ : CMP.b #$00 : BNE + ; No Shield
LDA.b #$2D : RTL
@@ -101,8 +97,7 @@ RTL
LDA $7EF340 : INC : LSR
CMP.l ProgressiveBowLimit : !BLT +
LDA.l ProgressiveBowReplacement
JSL.l GetSpriteID
RTL
JMP GetSpriteID
.skipbowlimit : LDA $7EF340 : INC : LSR
+ : CMP.b #$00 : BNE + ; No Bow
LDA.b #$29 : RTL
@@ -187,8 +182,7 @@ GetSpritePalette:
.bottle
PHA : JSR.w CountBottles : CMP.l BottleLimit : !BLT +
PLA : LDA.l BottleLimitReplacement
JSL.l GetSpritePalette
RTL
JMP GetSpritePalette
+
PLA : .notBottle
PHX
@@ -203,8 +197,7 @@ RTL
LDA $7EF359
CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit
LDA.l ProgressiveSwordReplacement
JSL.l GetSpritePalette
RTL
JMP GetSpritePalette
+ : CMP.b #$00 : BNE + ; No Sword
LDA.b #$04 : RTL
+ : CMP.b #$01 : BNE + ; Fighter Sword
@@ -217,8 +210,7 @@ RTL
LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6
CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
LDA.l ProgressiveShieldReplacement
JSL.l GetSpritePalette
RTL
JMP GetSpritePalette
+ : CMP.b #$00 : BNE + ; No Shield
LDA.b #$04 : RTL
+ : CMP.b #$01 : BNE + ; Fighter Shield
@@ -228,8 +220,7 @@ RTL
++ : CMP.b #$FF : BNE ++ ; Progressive Armor
LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit
LDA.l ProgressiveArmorReplacement
JSL.l GetSpritePalette
RTL
JMP GetSpritePalette
+ : CMP.b #$00 : BNE + ; Green Tunic
LDA.b #$04 : RTL
+ ; Everything Else
@@ -243,8 +234,7 @@ RTL
LDA $7EF340 : INC : LSR
CMP.l ProgressiveBowLimit : !BLT +
LDA.l ProgressiveBowReplacement
JSL.l GetSpritePalette
RTL
JMP GetSpritePalette
+ : CMP.b #$00 : BNE + ; No Bow
LDA.b #$08 : RTL
+ ; Any Bow
@@ -326,35 +316,37 @@ IsNarrowSprite:
LDA.l BottleLimitReplacement
JSL.l IsNarrowSprite
JMP .done
+ : BRA .continue
+ : JMP .continue
.notBottle
CMP.b #$5E : BNE ++ ; Progressive Sword
LDA $7EF359 : CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit
LDA.l ProgressiveSwordReplacement
JSL.l IsNarrowSprite
BRA .done
+ : BRA .continue
++ : CMP.b #$5F : BNE ++ ; Progressive Shield
LDA !PROGRESSIVE_SHIELD : AND #$C0 : BNE + : SEC : BRA .done ; No Shield
LSR #6 : CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
JMP .done
+ : JMP .continue
++ CMP.b #$5F : BNE ++ ; Progressive Shield
LDA !PROGRESSIVE_SHIELD : AND #$C0 : BNE + : SEC : JMP .done ; No Shield
+ : LSR #6 : CMP.l ProgressiveShieldLimit : !BLT .continue
LDA.l ProgressiveShieldReplacement
JSL.l IsNarrowSprite
BRA .done
+
;LDA $7EF35A : BNE + : SEC : BRA .done : +; No Shield
BRA .false ; Everything Else
JMP .done
++ CMP.b #$60 : BNE ++ ; Progressive Armor
LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit
LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT .continue
LDA.l ProgressiveArmorReplacement
JSL.l IsNarrowSprite
BRA .done
JMP .done
+
++ CMP.b #$62 : BNE ++ ; RNG Item (Single)
JSL.l GetRNGItemSingle : BRA .continue
JSL.l GetRNGItemSingle : JMP .continue
++ CMP.b #$63 : BNE ++ ; RNG Item (Multi)
JSL.l GetRNGItemMulti
++
++ CMP.b #$64 : BEQ + ; Progressive Bow
CMP.b #$65 : BNE .continue ; Progressive Bow (alt)
+ : LDA $7EF340 : INC : LSR
CMP.l ProgressiveBowLimit : !BLT +
LDA.l ProgressiveBowReplacement
JSL.l IsNarrowSprite
JMP .done
.continue
;--------