let's dev aug 8 2017

fixed pyramid spawn issue (again)
fixed freedstanding display for progressive swords and progressive shields
This commit is contained in:
Karkat
2017-08-08 23:27:37 -04:00
parent 18531a3977
commit 4a17e97a2e
5 changed files with 48 additions and 14 deletions

View File

@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
db #$00 ; expand file to 2mb
org $1FFFF8 ; <- FFFF8 timestamp rom
db #$20, #$17, #$08, #$06 ; year/month/day
db #$20, #$17, #$08, #$08 ; year/month/day
;================================================================================

View File

@@ -17,7 +17,7 @@ RTL
;--------------------------------------------------------------------------------
DarkWorldFlagSet:
PHA
STA $FFFFFF
LDA !FORCE_PYRAMID : AND.b #$08 : BNE .pyramid
LDA Bugfix_PreAgaDWDungeonDeathToFakeDW : BEQ +
@@ -46,13 +46,13 @@ RTL
RTL
;--------------------------------------------------------------------------------
SetDeathWorldChecked:
PHA
PHA : STA $FFFFFF
LDA $1B : BEQ + ; skip this for indoors
LDA $040C : CMP #$FF : BNE .done ; unless it's a cave
+
LDA $7EF3C5 : CMP.b #$03 : !BGE .done; thing we originally did - skip if agahnim 1 is dead
LDA $1B : BNE + : LDA $A0 : BNE + ; check if we died in ganon's room
LDA $1B : BEQ + : LDA $A0 : BNE + ; check if we died in ganon's room
LDA !FORCE_PYRAMID : ORA.b #$08 : STA !FORCE_PYRAMID ; set pyramid flag
BRL DarkWorldFlagSet_pyramid
+

View File

@@ -43,7 +43,7 @@ CalculateCapeUsage:
+
SEP #$20 ; set 8-bit accumulator
PHX : TYX
LDA.l ByrnaCaveCapeUsage, X : STA $4C
LDA.l ByrnaCaveCapeUsage, X : STA $4C ; set cape decrement timer
PLX
++
LDA $7EF36E ; thing we wrote over

View File

@@ -10,7 +10,7 @@ HeartPiece_Lumberjack_Tree:
HeartPiece_Spectacle_Cave:
db #$17
HeartPiece_Circle_Bushes:
db #$61
db #$17
HeartPiece_Graveyard_Warp:
db #$17
HeartPiece_Mire_Warp:
@@ -677,6 +677,7 @@ db #$00 ; #00 = Never Locked - #$01 = Locked During Escape (default)
org $30816A ; PC 0x18016A
FreeItemText:
db #$01 ; #00 = Off - #$01 = On (default)
;================================================================================
org $30816B ; PC 0x18016B
ByrnaCaveCaneOfByrnaUsage:
db #$04, #$02, #$01 ; normal, 1/2, 1/4 magic

View File

@@ -21,18 +21,29 @@ RTL
++ CMP.b #$FB : BNE ++ ; RNG Item (Multi)
JSL.l GetRNGItemMulti : JMP GetSpriteID
++ CMP.b #$FE : BNE ++ ; Progressive Sword
LDA $7EF359 : BNE + ; No Sword
LDA $7EF359
CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit
LDA.l ProgressiveSwordReplacement
JSL.l GetSpriteID
RTL
+ : CMP.b #$00 : BNE + ; No Sword
LDA.b #$43 : RTL
+ : CMP.b #$01 : BNE + ; Fighter Sword
LDA.b #$44 : RTL
+ : CMP.b #$02 : BNE + ; Master Sword
LDA.b #$45 : RTL
+ ; Everything Else
+ ; CMP.b #$03 : BNE + ; Tempered Sword
LDA.b #$46 : RTL
+
++ : CMP.b #$FF : BNE ++ ; Progressive Shield
LDA !PROGRESSIVE_SHIELD : AND #$C0 : BNE + ; No Shield
LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6
CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
LDA.l ProgressiveShieldReplacement
JSL.l GetSpriteID
RTL
+ : CMP.b #$00 : BNE + ; No Shield
LDA.b #$2D : RTL
+ : CMP.b #$40 : BNE + ; Fighter Shield
+ : CMP.b #$01 : BNE + ; Fighter Shield
LDA.b #$20 : RTL
+ ; Everything Else
LDA.b #$2E : RTL
@@ -104,7 +115,12 @@ GetSpritePalette:
RTL
.specialHandling
CMP.b #$FD : BNE ++ ; Progressive Sword
LDA $7EF359 : BNE + ; No Sword
LDA $7EF359
CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit
LDA.l ProgressiveSwordReplacement
JSL.l GetSpritePalette
RTL
+ : CMP.b #$00 : BNE + ; No Sword
LDA.b #$04 : RTL
+ : CMP.b #$01 : BNE + ; Fighter Sword
LDA.b #$04 : RTL
@@ -113,7 +129,12 @@ RTL
+ ; Everything Else
LDA.b #$08 : RTL
++ : CMP.b #$FE : BNE ++ ; Progressive Shield
LDA $7EF35A : BNE + ; No Shield
LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6
CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
LDA.l ProgressiveShieldReplacement
JSL.l GetSpritePalette
RTL
+ : CMP.b #$00 : BNE + ; No Shield
LDA.b #$04 : RTL
+ : CMP.b #$01 : BNE + ; Fighter Shield
LDA.b #$02 : RTL
@@ -184,8 +205,20 @@ IsNarrowSprite:
PHB : PHK : PLB
;--------
CMP.b #$5F : BNE ++ ; Special Handler for Progressive Shield
LDA $7EF35A : BNE + : SEC : BRA .done : +; No Shield
CMP.b #$5E : BNE ++ ; Special Handler for 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 ++ ; Special Handler for Progressive Shield
LDA !PROGRESSIVE_SHIELD : AND #$C0 : BNE + : SEC : BRA .done ; No Shield
LSR #6 : CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit
LDA.l ProgressiveShieldReplacement
JSL.l IsNarrowSprite
BRA .done
+
;LDA $7EF35A : BNE + : SEC : BRA .done : +; No Shield
BRA .false ; Everything Else
++ CMP.b #$62 : BNE ++ ; RNG Item (Single)
JSL.l GetRNGItemSingle : BRA .continue