let's dev may 23rd 2017
stats fixes bomb pickup Y-item selection shame chest tracking agahnim crash fix
This commit is contained in:
@@ -35,14 +35,15 @@ db #$00 ; expand file to 2mb
|
|||||||
!NPC_FLAGS = "$7EF410"
|
!NPC_FLAGS = "$7EF410"
|
||||||
!NPC_FLAGS_2 = "$7EF411"
|
!NPC_FLAGS_2 = "$7EF411"
|
||||||
!INVENTORY_SWAP = "$7EF412"
|
!INVENTORY_SWAP = "$7EF412"
|
||||||
!HUD_FLAG = "$7EF416" ; --h- ----
|
|
||||||
!PROGRESSIVE_SHIELD = "$7EF416" ; ss-- ----
|
|
||||||
!INVENTORY_SWAP_2 = "$7EF414"
|
!INVENTORY_SWAP_2 = "$7EF414"
|
||||||
!MAP_ZOOM = "$7EF415"
|
!MAP_ZOOM = "$7EF415"
|
||||||
|
!PROGRESSIVE_SHIELD = "$7EF416" ; ss-- ----
|
||||||
|
!HUD_FLAG = "$7EF416" ; --h- ----
|
||||||
|
!SHAME_CHEST = "$7EF416" ; ---s ----
|
||||||
!HAS_GROVE_ITEM = "$7EF416" ; ---- ---g general flags, don't waste these
|
!HAS_GROVE_ITEM = "$7EF416" ; ---- ---g general flags, don't waste these
|
||||||
!HIGHEST_SWORD_LEVEL = "$7EF417" ; --- -sss
|
!HIGHEST_SWORD_LEVEL = "$7EF417" ; --- -sss
|
||||||
!FRESH_FILE_MARKER = "$7EF4F0" ; zero if fresh file
|
|
||||||
!SRAM_SINK = "$7EF41E" ; <- change this
|
!SRAM_SINK = "$7EF41E" ; <- change this
|
||||||
|
!FRESH_FILE_MARKER = "$7EF4F0" ; zero if fresh file
|
||||||
;$7EF41A[w] - Programmable Item #1
|
;$7EF41A[w] - Programmable Item #1
|
||||||
;$7EF41C[w] - Programmable Item #3
|
;$7EF41C[w] - Programmable Item #3
|
||||||
;$7EF41E[w] - Programmable Item #3
|
;$7EF41E[w] - Programmable Item #3
|
||||||
@@ -401,6 +402,9 @@ DrawProgressIcons: ; this returns short
|
|||||||
org $0DED29
|
org $0DED29
|
||||||
DrawEquipment: ; this returns short
|
DrawEquipment: ; this returns short
|
||||||
|
|
||||||
|
org $0DFA78
|
||||||
|
HUD_RebuildLong:
|
||||||
|
|
||||||
org $0EEE10
|
org $0EEE10
|
||||||
Messaging_Text:
|
Messaging_Text:
|
||||||
|
|
||||||
|
|||||||
@@ -369,8 +369,8 @@ LDA.w BottleListExpanded, X
|
|||||||
org $09895C ; 4895C - ancilla_init.asm:1344 (LDA PotionList, X)
|
org $09895C ; 4895C - ancilla_init.asm:1344 (LDA PotionList, X)
|
||||||
LDA.w PotionListExpanded, X
|
LDA.w PotionListExpanded, X
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
;org $06D1EB ; 351EB - sprite_absorbable.asm:364 (STA $7EF375) ; bugbug commented out until i figure out why it doesn't work
|
org $06D1EB ; 351EB - sprite_absorbable.asm:364 (STA $7EF375) ; bugbug commented out until i figure out why it doesn't work
|
||||||
;JSL HandleBombAbsorbtion
|
JSL HandleBombAbsorbtion
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
@@ -773,7 +773,7 @@ org $1ED577 ; <- F5577 - sprite_agahnim.asm:418 (PHX)
|
|||||||
JML.l GetAgahnimPalette
|
JML.l GetAgahnimPalette
|
||||||
GetAgahnimPaletteReturn:
|
GetAgahnimPaletteReturn:
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $1ED577 ; <- F5577 - sprite_agahnim.asm:587 (INC $0E30, X)
|
org $1ED678 ; <- F5678 - sprite_agahnim.asm:587 (INC $0E30, X)
|
||||||
NOP #2
|
NOP #2
|
||||||
JSL.l GetAgahnimLightning
|
JSL.l GetAgahnimLightning
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ FullInventoryExternal:
|
|||||||
LDA !LOCK_STATS : BEQ + : RTL : +
|
LDA !LOCK_STATS : BEQ + : RTL : +
|
||||||
PHA : PHX : PHP : JMP AddInventory_fullItemCounts
|
PHA : PHX : PHP : JMP AddInventory_fullItemCounts
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
!SHAME_CHEST = "$7EF416" ; ---s ----
|
||||||
AddInventory:
|
AddInventory:
|
||||||
PHA : PHX : PHP
|
PHA : PHX : PHP
|
||||||
|
|
||||||
@@ -258,6 +259,15 @@ AddInventory:
|
|||||||
|
|
||||||
.dungeonCounts
|
.dungeonCounts
|
||||||
LDA $1B : BNE + : BRL .fullItemCounts : +
|
LDA $1B : BNE + : BRL .fullItemCounts : +
|
||||||
|
; ==BEGIN INDOOR-ONLY SECTION
|
||||||
|
|
||||||
|
REP #$20 ; Set 16-bit Accumulator
|
||||||
|
LDA $A0 ; load room ID
|
||||||
|
CMP.w #$0010 : BNE + ; Ganon Fall Room
|
||||||
|
;!SHAME_CHEST = "$7EF416" ; ---s ----
|
||||||
|
LDA !SHAME_CHEST : ORA.w #$0010 : STA !SHAME_CHEST
|
||||||
|
+
|
||||||
|
SEP #$20 ; Set 8-bit Accumulator
|
||||||
|
|
||||||
LDA $040C ; get dungeon id
|
LDA $040C ; get dungeon id
|
||||||
|
|
||||||
@@ -315,6 +325,7 @@ AddInventory:
|
|||||||
;BRL .fullItemCounts
|
;BRL .fullItemCounts
|
||||||
+
|
+
|
||||||
|
|
||||||
|
; == END INDOOR-ONLY SECTION
|
||||||
.fullItemCounts
|
.fullItemCounts
|
||||||
|
|
||||||
CPY.b #$3B : BNE + ; Skip Total Counts for Repeat Silver Arrows
|
CPY.b #$3B : BNE + ; Skip Total Counts for Repeat Silver Arrows
|
||||||
@@ -459,13 +470,41 @@ AddInventory:
|
|||||||
+ CPY.b #$50 : BNE + ; Master Sword (Safe)
|
+ CPY.b #$50 : BNE + ; Master Sword (Safe)
|
||||||
JSR .incrementSword
|
JSR .incrementSword
|
||||||
BRL .done
|
BRL .done
|
||||||
+ CPY.b #$51 : !BLT + ; Items 4D - 4F - Capacity Upgrades
|
+ CPY.b #$51 : !BLT + ; Items 51 - 54 - Capacity Upgrades
|
||||||
CPY.b #$55 : !BGE +
|
CPY.b #$55 : !BGE +
|
||||||
JSR .incrementCapacity
|
JSR .incrementCapacity
|
||||||
BRL .done
|
BRL .done
|
||||||
+ CPY.b #$58 : BNE + ; Upgrade-Only Sivler Arrows
|
+ CPY.b #$58 : BNE + ; Upgrade-Only Sivler Arrows
|
||||||
JSR .incrementBow
|
JSR .incrementBow
|
||||||
BRL .done
|
BRL .done
|
||||||
|
+ CPY.b #$5E : BNE + ; Progressive Sword
|
||||||
|
JSR .incrementSword
|
||||||
|
BRL .done
|
||||||
|
+ CPY.b #$5F : BNE + ; Progressive Shield
|
||||||
|
JSR .incrementShield
|
||||||
|
BRL .done
|
||||||
|
+ CPY.b #$60 : BNE + ; Progressive Armor
|
||||||
|
JSR .incrementMail
|
||||||
|
BRL .done
|
||||||
|
+ CPY.b #$61 : BNE + ; Progressive Lifting Glove
|
||||||
|
JSR .incrementA
|
||||||
|
BRL .done
|
||||||
|
+ CPY.b #$70 : !BLT + ; Items 70 - 7F - Free Maps
|
||||||
|
CPY.b #$80 : !BGE +
|
||||||
|
JSR .incrementMap
|
||||||
|
BRL .done
|
||||||
|
+ CPY.b #$80 : !BLT + ; Items 80 - 8F - Free Compasses
|
||||||
|
CPY.b #$90 : !BGE +
|
||||||
|
JSR .incrementCompass
|
||||||
|
BRL .done
|
||||||
|
+ CPY.b #$90 : !BLT + ; Items 90 - 9F - Free Big Keys
|
||||||
|
CPY.b #$A0 : !BGE +
|
||||||
|
JSR .incrementBigKey
|
||||||
|
BRL .done
|
||||||
|
+ CPY.b #$A0 : !BLT + ; Items A0 - AF - Free Small Keys
|
||||||
|
CPY.b #$B0 : !BGE +
|
||||||
|
JSR .incrementKey
|
||||||
|
BRL .done
|
||||||
+
|
+
|
||||||
.done
|
.done
|
||||||
PLP : PLX : PLA
|
PLP : PLX : PLA
|
||||||
@@ -620,20 +659,14 @@ RTL
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; HandleBombAbsorbtion: ; NOTE CAREFULLY HOW THESE TWO FUNCTIONS ARE PARTIALLY COMMENTED OUT
|
; HandleBombAbsorbtion:
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
HandleBombAbsorbtion:
|
HandleBombAbsorbtion:
|
||||||
STA $7EF375 ; thing we wrote over
|
STA $7EF375 ; thing we wrote over
|
||||||
;RTL ; don't return, fall throgh to next function
|
LDA $0303 : BNE + ; skip if we already have some item selected
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
; Link_ReceiveItem_PreselectItems:
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
;Link_ReceiveItem_PreselectItems:
|
|
||||||
LDA $0202 : BNE + ; skip if we already have some item selected
|
|
||||||
; LDA $7EF343 : BEQ + ; skip if we have no bombs
|
|
||||||
LDA.b #$04 : STA $0202 ; set selected item to bombs
|
LDA.b #$04 : STA $0202 ; set selected item to bombs
|
||||||
|
LDA.b #$01 : STA $0303 ; set selected item to bombs
|
||||||
|
JSL.l HUD_RebuildLong
|
||||||
+
|
+
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user