Compare commits
68
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
506b0974ff | ||
|
|
a3bc7dea0e | ||
|
|
94ccbb70dc | ||
|
|
e2614b6f75 | ||
|
|
9e2b148a57 | ||
|
|
f8cc7d2ef8 | ||
|
|
d504e33d52 | ||
|
|
043a2d83b2 | ||
|
|
8f75b8ec71 | ||
|
|
32e7fe5454 | ||
|
|
2c601d2fc7 | ||
|
|
902e14b3f4 | ||
|
|
a011bc9f4a | ||
|
|
633453f386 | ||
|
|
831e6cc27f | ||
|
|
8e45ef1bd2 | ||
|
|
9c5f0dd5f5 | ||
|
|
17939339bc | ||
|
|
91fab07e5c | ||
|
|
cacc640a4f | ||
|
|
c38b3b6d0a | ||
|
|
fcf17a6dff | ||
|
|
06aa3cb10f | ||
|
|
970d1f5db0 | ||
|
|
e56b8a55fe | ||
|
|
78eb8916fc | ||
|
|
60c852bfa9 | ||
|
|
36a8eaee89 | ||
|
|
527041b81b | ||
|
|
5e7c4a65b8 | ||
|
|
6f2b68886f | ||
|
|
b1cc141154 | ||
|
|
4da41410db | ||
|
|
1776daa43d | ||
|
|
610607ece4 | ||
|
|
278e428658 | ||
|
|
63065e34b7 | ||
|
|
ba9f0c7555 | ||
|
|
aae220fb46 | ||
|
|
a7c7fc4394 | ||
|
|
b2b23b047f | ||
|
|
3964c34658 | ||
|
|
8cf0059f84 | ||
|
|
0a98db7025 | ||
|
|
bdb1272cb2 | ||
|
|
d5917afb64 | ||
|
|
e5523473d6 | ||
|
|
72e126a1b6 | ||
|
|
56dd5fbc01 | ||
|
|
7764682f95 | ||
|
|
b3f35f274b | ||
|
|
5574eea4c7 | ||
|
|
d918e571ab | ||
|
|
23edb9a3e6 | ||
|
|
21c6d0acfd | ||
|
|
f75db2cac8 | ||
|
|
fd8852d866 | ||
|
|
7fc7c8fe0b | ||
|
|
7a12032067 | ||
|
|
3489af82fa | ||
|
|
fecf9547a5 | ||
|
|
688300d21a | ||
|
|
9b4d79247f | ||
|
|
1b43799e6e | ||
|
|
58db28f8bf | ||
|
|
443080c482 | ||
|
|
10ced3c9c6 | ||
|
|
9a40f28a86 |
@@ -74,8 +74,6 @@ function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<
|
|||||||
!FLAG_OW_MIXED = $04
|
!FLAG_OW_MIXED = $04
|
||||||
!FLAG_OW_CROSSED = $02
|
!FLAG_OW_CROSSED = $02
|
||||||
!FLAG_OW_BONKDROP = $02
|
!FLAG_OW_BONKDROP = $02
|
||||||
!FLAG_OW_CUSTOM_MAP = $02
|
|
||||||
!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION = $04
|
|
||||||
|
|
||||||
incsrc hooks.asm
|
incsrc hooks.asm
|
||||||
incsrc spriteswap.asm
|
incsrc spriteswap.asm
|
||||||
@@ -205,24 +203,19 @@ incsrc menu/hudalpha.asm
|
|||||||
warnpc $A38000
|
warnpc $A38000
|
||||||
|
|
||||||
org $B98000
|
org $B98000
|
||||||
incsrc gk/crystalswitchbook.asm
|
incsrc crystalswitchbook.asm
|
||||||
incsrc gk/orange_potion.asm
|
incsrc mimicdash.asm
|
||||||
incsrc gk/mimicdash.asm
|
incsrc gloom.asm
|
||||||
incsrc gk/gloom.asm
|
incsrc special_weapons.asm
|
||||||
incsrc gk/special_weapons.asm
|
incsrc variable_ganon_vulnerability.asm
|
||||||
incsrc gk/variable_ganon_vulnerability.asm
|
incsrc pseudoflute.asm
|
||||||
incsrc gk/pseudoflute.asm
|
incsrc dungeon_map/main.asm
|
||||||
incsrc gk/fast_junk.asm
|
|
||||||
incsrc gk/dungeon_maps.asm
|
|
||||||
incsrc gk/dungeon_indicator.asm
|
|
||||||
print "End of B9: ", pc
|
print "End of B9: ", pc
|
||||||
|
|
||||||
warnpc $B9EE00
|
warnpc $B9E000 ; $E000 - EFFF reserved for custom door rando map data
|
||||||
org $B9EE00
|
|
||||||
incsrc gk_meta.asm
|
|
||||||
|
|
||||||
org $B9F000
|
org $B9F000
|
||||||
incsrc gk/settings.asm
|
incsrc dungeon_map/settings.asm
|
||||||
|
|
||||||
org $A38000
|
org $A38000
|
||||||
incsrc stats/credits.asm ; Statically mapped
|
incsrc stats/credits.asm ; Statically mapped
|
||||||
@@ -336,8 +329,6 @@ DungeonMapDoorConnectors:
|
|||||||
incbin "menu/door_connectors.3bppc"
|
incbin "menu/door_connectors.3bppc"
|
||||||
MapSheetD4:
|
MapSheetD4:
|
||||||
incbin "menu/map_sheet_d4.3bppc"
|
incbin "menu/map_sheet_d4.3bppc"
|
||||||
DRSheet14:
|
|
||||||
incbin "menu/dr_sheet_14.3bppc"
|
|
||||||
|
|
||||||
org $8CD7DF
|
org $8CD7DF
|
||||||
incsrc data/playernamecharmap.asm
|
incsrc data/playernamecharmap.asm
|
||||||
|
|||||||
@@ -28,19 +28,16 @@ AddBonkTremors:
|
|||||||
JSL AddDashTremor : JSL Player_ApplyRumbleToSprites ; things we wrote over
|
JSL AddDashTremor : JSL Player_ApplyRumbleToSprites ; things we wrote over
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
ValidDashCheck:
|
BonkBreakableWall:
|
||||||
PHP
|
PHX : PHP
|
||||||
SEP #$20
|
SEP #$30 ; set 8-bit accumulator and index registers
|
||||||
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
||||||
LDA.l BootsEquipment : BEQ .exit
|
LDA.l BootsEquipment : BNE + ; Check for Boots
|
||||||
+ LDA.w LinkDashing
|
PLP : PLX : LDA.w #$0000 : RTL
|
||||||
.exit
|
+
|
||||||
BEQ +
|
PLP : PLX
|
||||||
PLP : REP #$02
|
LDA.w LinkDashing : AND.w #$00FF ; things we wrote over
|
||||||
RTL
|
RTL
|
||||||
+
|
|
||||||
PLP : SEP #$02
|
|
||||||
RTL
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
BonkRockPile:
|
BonkRockPile:
|
||||||
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
||||||
@@ -51,7 +48,10 @@ BonkRockPile:
|
|||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
GravestoneHook:
|
GravestoneHook:
|
||||||
JSL ValidDashCheck : BEQ .done ; things we wrote over
|
LDA.l BootsModifier : CMP.b #$01 : BEQ +
|
||||||
|
LDA.l BootsEquipment : BEQ .done ; Check for Boots
|
||||||
|
+
|
||||||
|
LDA.w LinkDashing : BEQ .done ; things we wrote over
|
||||||
JML moveGravestone
|
JML moveGravestone
|
||||||
.done
|
.done
|
||||||
JML GravestoneHook_continue
|
JML GravestoneHook_continue
|
||||||
|
|||||||
+7
-6
@@ -17,14 +17,15 @@ DoDungeonMapBossIcon:
|
|||||||
ASL
|
ASL
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
; get sprite pointer table
|
|
||||||
LDA.l $89C298 : STA.b Scrap00
|
|
||||||
LDA.w #$0089 : STA.b Scrap02
|
|
||||||
TXY
|
|
||||||
; get sprite pointer for room
|
; get sprite pointer for room
|
||||||
LDA.b [Scrap00], Y
|
LDA.l UWSpritesPointers,X
|
||||||
STA.b Scrap00 ; pointer in $00
|
STA.b Scrap00 ; pointer in $00
|
||||||
LDA.w #bank(UWSpritesData) : STA.b Scrap02
|
if !FEATURE_FIX_BASEROM
|
||||||
|
LDA.w #$0089
|
||||||
|
else
|
||||||
|
LDA.w #$0028 ; set the bank to 28 for now
|
||||||
|
endif
|
||||||
|
STA.b Scrap02
|
||||||
LDY.w #$0001 ; to skip the "sort"
|
LDY.w #$0001 ; to skip the "sort"
|
||||||
|
|
||||||
; get first byte to make sure it isn't an empty room
|
; get first byte to make sure it isn't an empty room
|
||||||
|
|||||||
+73
-12
@@ -238,18 +238,6 @@ FixJingleGlitch:
|
|||||||
.exit
|
.exit
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
FixSwimBump:
|
|
||||||
LDA.b LinkIncapacitatedTimer : BEQ .normal
|
|
||||||
LDA.b LinkJumping : BNE .normal
|
|
||||||
INC.b LinkJumping
|
|
||||||
BRA .not_diving
|
|
||||||
.normal
|
|
||||||
LDA.b LinkJumping : BNE .continue ; what we wrote over
|
|
||||||
.not_diving
|
|
||||||
PLA : PLA : PEA.w $87964D ; skip ahead, not diving
|
|
||||||
.continue
|
|
||||||
RTL
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
; Fix spawning with more hearts than capacity when less than 3 heart containers
|
; Fix spawning with more hearts than capacity when less than 3 heart containers
|
||||||
pushpc
|
pushpc
|
||||||
org $09F4AC ; <- module_death.asm:331
|
org $09F4AC ; <- module_death.asm:331
|
||||||
@@ -290,3 +278,76 @@ ParadoxCaveGfxFix:
|
|||||||
LDX.w #$00C0 : STX.w DAS0L
|
LDX.w #$00C0 : STX.w DAS0L
|
||||||
BRA .uploadLine
|
BRA .uploadLine
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
SetItemRiseTimer:
|
||||||
|
LDA.w ItemReceiptMethod : CMP.b #$01 : BNE .not_from_chest
|
||||||
|
LDA.b #$38 : STA.w AncillaTimer, X
|
||||||
|
RTL
|
||||||
|
|
||||||
|
.not_from_chest
|
||||||
|
JSL.l ItemIsJunk
|
||||||
|
BEQ .default
|
||||||
|
|
||||||
|
.junk
|
||||||
|
LDA.l JunkItemTimer : AND.b #$3F : STA.w AncillaTimer, X
|
||||||
|
RTL
|
||||||
|
|
||||||
|
.default
|
||||||
|
TYA : STA.w AncillaTimer, X ; What we wrote over
|
||||||
|
RTL
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
ItemIsJunk:
|
||||||
|
PHX
|
||||||
|
LDA.l JunkItemTimer : BIT.b #$3F : BEQ .not_junk
|
||||||
|
BIT.b #$80 : BNE .check
|
||||||
|
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .check
|
||||||
|
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .check
|
||||||
|
BRA .not_junk
|
||||||
|
|
||||||
|
.check
|
||||||
|
LDA.l JunkItemTimer : AND.b #$40
|
||||||
|
BEQ +
|
||||||
|
LDA.b #JunkItems_triforce_end-JunkItems_end
|
||||||
|
+
|
||||||
|
CLC : ADC.b #JunkItems_end-JunkItems-1
|
||||||
|
LDA.w AncillaGet, X
|
||||||
|
TAX
|
||||||
|
-
|
||||||
|
CMP.l JunkItems, X : BEQ .junk
|
||||||
|
DEX : BPL -
|
||||||
|
.not_junk
|
||||||
|
PLX
|
||||||
|
LDA.b #$00
|
||||||
|
RTL
|
||||||
|
.junk
|
||||||
|
PLX
|
||||||
|
LDA.b #$01
|
||||||
|
RTL
|
||||||
|
RTL
|
||||||
|
|
||||||
|
JunkItems:
|
||||||
|
db $27 ; Bomb
|
||||||
|
db $28 ; 3 bombs
|
||||||
|
db $31 ; 10 bombs
|
||||||
|
db $34 ; 1 rupee
|
||||||
|
db $35 ; 5 rupees
|
||||||
|
db $36 ; 20 rupees
|
||||||
|
db $40 ; 100 rupees
|
||||||
|
db $41 ; 50 rupees
|
||||||
|
db $42 ; Heart
|
||||||
|
db $43 ; Arrow
|
||||||
|
db $44 ; 10 arrows
|
||||||
|
db $45 ; Small magic
|
||||||
|
db $46 ; 300 rupees
|
||||||
|
db $47 ; 20 rupees green
|
||||||
|
db $59 ; Rupoor
|
||||||
|
db $D1 ; Apples
|
||||||
|
db $D2 ; Fairy
|
||||||
|
db $D3 ; Chicken
|
||||||
|
db $D4 ; Big Magic
|
||||||
|
db $D5 ; 5 Arrows
|
||||||
|
db $D6 ; Good Bee
|
||||||
|
.end
|
||||||
|
db $6B ; Power Star
|
||||||
|
db $6C ; Triforce Piece
|
||||||
|
.triforce_end
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
+2
-2
@@ -49,14 +49,14 @@ InvertDPad_DPadLROnly:
|
|||||||
LDA.w JOY1L : STA.b Scrap00
|
LDA.w JOY1L : STA.b Scrap00
|
||||||
LDA.w JOY1H
|
LDA.w JOY1H
|
||||||
BIT.b #$03 : BEQ + : EOR.b #$03 : + ; swap left/right
|
BIT.b #$03 : BEQ + : EOR.b #$03 : + ; swap left/right
|
||||||
STA.b Scrap01
|
STA.b Scrap00
|
||||||
JML InvertDPadReturn
|
JML InvertDPadReturn
|
||||||
|
|
||||||
InvertDPad_DPadUDOnly:
|
InvertDPad_DPadUDOnly:
|
||||||
LDA.w JOY1L : STA.b Scrap00
|
LDA.w JOY1L : STA.b Scrap00
|
||||||
LDA.w JOY1H
|
LDA.w JOY1H
|
||||||
BIT.b #$0C : BEQ + : EOR.b #$0C : + ; swap up/down
|
BIT.b #$0C : BEQ + : EOR.b #$0C : + ; swap up/down
|
||||||
STA.b Scrap01
|
STA.b Scrap00
|
||||||
JML InvertDPadReturn
|
JML InvertDPadReturn
|
||||||
|
|
||||||
InvertDPad:
|
InvertDPad:
|
||||||
|
|||||||
+25
-50
@@ -146,57 +146,32 @@ macro SetMinimum(base,filler,compare)
|
|||||||
endmacro
|
endmacro
|
||||||
RefreshRainAmmo:
|
RefreshRainAmmo:
|
||||||
LDA.l ProgressIndicator : CMP.b #$01 : BEQ .rain ; check if we're in rain state
|
LDA.l ProgressIndicator : CMP.b #$01 : BEQ .rain ; check if we're in rain state
|
||||||
|
RTL
|
||||||
|
.rain
|
||||||
|
LDA.l StartingEntrance
|
||||||
|
+ CMP.b #$03 : BNE + ; Uncle
|
||||||
|
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Uncle)
|
||||||
|
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Uncle)
|
||||||
|
LDA.l ArrowMode : BEQ ++
|
||||||
|
LDA.l BowEquipment : BEQ +++
|
||||||
|
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Uncle)
|
||||||
|
+++ BRA .done
|
||||||
|
+ CMP.b #$02 : BNE + ; Cell
|
||||||
|
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Cell)
|
||||||
|
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Cell)
|
||||||
|
LDA.l ArrowMode : BEQ ++
|
||||||
|
LDA.l BowEquipment : BEQ .done
|
||||||
|
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Cell)
|
||||||
|
BRA .done
|
||||||
|
+ CMP.b #$04 : BNE + ; Mantle
|
||||||
|
%SetMinimum(CurrentMagic,MagicFiller,RainDeathRefillMagic_Mantle)
|
||||||
|
%SetMinimum(BombsEquipment,BombsFiller,RainDeathRefillBombs_Mantle)
|
||||||
|
LDA.l ArrowMode : BEQ ++
|
||||||
|
LDA.l BowEquipment : BEQ .done
|
||||||
|
++ %SetMinimum(CurrentArrows,ArrowsFiller,RainDeathRefillArrows_Mantle)
|
||||||
|
+
|
||||||
|
.done
|
||||||
RTL
|
RTL
|
||||||
.rain
|
|
||||||
LDA.l StartingEntrance : BEQ .uncle
|
|
||||||
CMP.b #$03 : BNE + ; Uncle
|
|
||||||
.uncle
|
|
||||||
LDA.l RainDeathRefillMagic_Uncle : JSR .refillMagic
|
|
||||||
LDA.l RainDeathRefillBombs_Uncle : JSR .refillBombs
|
|
||||||
LDA.l ArrowMode : BNE .rupeeBow
|
|
||||||
LDA.l RainDeathRefillArrows_Uncle : JSR .refillArrows
|
|
||||||
BRA .done
|
|
||||||
+ CMP.b #$02 : BNE + ; Cell
|
|
||||||
LDA.l RainDeathRefillMagic_Cell : JSR .refillMagic
|
|
||||||
LDA.l RainDeathRefillBombs_Cell : JSR .refillBombs
|
|
||||||
LDA.l ArrowMode : BNE .rupeeBow
|
|
||||||
LDA.l RainDeathRefillArrows_Cell : JSR .refillArrows
|
|
||||||
BRA .done
|
|
||||||
+ CMP.b #$04 : BNE + ; Mantle
|
|
||||||
LDA.l RainDeathRefillMagic_Mantle : JSR .refillMagic
|
|
||||||
LDA.l RainDeathRefillBombs_Mantle : JSR .refillBombs
|
|
||||||
LDA.l ArrowMode : BNE .rupeeBow
|
|
||||||
LDA.l RainDeathRefillArrows_Mantle : JSR .refillArrows
|
|
||||||
BRA .done
|
|
||||||
+ BRA .done
|
|
||||||
|
|
||||||
.rupeeBow
|
|
||||||
REP #$20
|
|
||||||
LDA.l RainDeathRefillRupeeBow : JSR .refillRupees
|
|
||||||
SEP #$20
|
|
||||||
|
|
||||||
.done
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.refillMagic
|
|
||||||
SEC : SBC.l CurrentMagic : BCC +
|
|
||||||
STA.l MagicFiller
|
|
||||||
+ RTS
|
|
||||||
|
|
||||||
.refillBombs
|
|
||||||
SEC : SBC.l BombsEquipment : BCC +
|
|
||||||
STA.l BombsFiller
|
|
||||||
+ RTS
|
|
||||||
|
|
||||||
.refillArrows
|
|
||||||
SEC : SBC.l CurrentArrows : BCC +
|
|
||||||
STA.l ArrowsFiller
|
|
||||||
+ RTS
|
|
||||||
|
|
||||||
.refillRupees
|
|
||||||
CMP.l CurrentRupees : BCC +
|
|
||||||
STA.l CurrentRupees
|
|
||||||
+ RTS
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SetEscapeAssist:
|
SetEscapeAssist:
|
||||||
LDA.l ProgressIndicator : CMP.b #$01 : BNE .no_train ; check if we're in rain state
|
LDA.l ProgressIndicator : CMP.b #$01 : BNE .no_train ; check if we're in rain state
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -29,4 +29,3 @@ Z=33
|
|||||||
'=35
|
'=35
|
||||||
-=36
|
-=36
|
||||||
.=37
|
.=37
|
||||||
*=FF
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+53
-71
@@ -61,84 +61,73 @@ LoadDialogAddressIndirect:
|
|||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
FreeDungeonItemNotice:
|
FreeDungeonItemNotice:
|
||||||
STA.l ScratchBufferV
|
STA.l ScratchBufferV
|
||||||
|
|
||||||
PHA : PHX : PHY
|
PHA : PHX : PHY
|
||||||
PHP
|
PHP
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
SEP #$20 ; set 8-bit accumulator
|
SEP #$20 ; set 8-bit accumulator
|
||||||
REP #$10 ; set 16-bit index registers
|
REP #$10 ; set 16-bit index registers
|
||||||
PEI.b (Scrap00)
|
PEI.b (Scrap00)
|
||||||
LDA.b Scrap02 : PHA
|
LDA.b Scrap02 : PHA
|
||||||
LDA.l ScratchBufferNV : PHA
|
LDA.l ScratchBufferNV : PHA
|
||||||
LDA.l ScratchBufferNV+1 : PHA
|
LDA.l ScratchBufferNV+1 : PHA
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BEQ +
|
LDA.l FreeItemText : BNE + : JMP .skip : +
|
||||||
LDA.b #$2F ; if not from our world, show all dungeon item and crystal notices
|
|
||||||
+ ORA.l FreeItemText : BNE + : JMP .skip : +
|
|
||||||
|
|
||||||
STA.b Scrap00
|
|
||||||
LDA.b #$00 : STA.l ScratchBufferNV ; initialize scratch
|
LDA.b #$00 : STA.l ScratchBufferNV ; initialize scratch
|
||||||
|
LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for general small key
|
||||||
LDA.b Scrap00 : AND.b #$01 : BEQ + ; show message for general small key
|
|
||||||
LDA.l ScratchBufferV : CMP.b #$24 : BNE + ; general small key
|
LDA.l ScratchBufferV : CMP.b #$24 : BNE + ; general small key
|
||||||
%CopyDialog(Notice_SmallKeyOf)
|
%CopyDialog(Notice_SmallKeyOf)
|
||||||
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
||||||
%CopyDialog(Notice_Self)
|
%CopyDialog(Notice_Self)
|
||||||
JMP .done
|
JMP .done
|
||||||
|
+ : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for general compass
|
||||||
+ LDA.b Scrap00 : AND.b #$02 : BEQ + ; show message for general compass
|
|
||||||
LDA.l ScratchBufferV : CMP.b #$25 : BNE + ; general compass
|
LDA.l ScratchBufferV : CMP.b #$25 : BNE + ; general compass
|
||||||
%CopyDialog(Notice_CompassOf)
|
%CopyDialog(Notice_CompassOf)
|
||||||
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
||||||
%CopyDialog(Notice_Self)
|
%CopyDialog(Notice_Self)
|
||||||
JMP .done
|
JMP .done
|
||||||
|
+ : LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for general map
|
||||||
+ LDA.b Scrap00 : AND.b #$04 : BEQ + ; show message for general map
|
|
||||||
LDA.l ScratchBufferV : CMP.b #$33 : BNE + ; general map
|
LDA.l ScratchBufferV : CMP.b #$33 : BNE + ; general map
|
||||||
%CopyDialog(Notice_MapOf)
|
%CopyDialog(Notice_MapOf)
|
||||||
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
||||||
%CopyDialog(Notice_Self)
|
%CopyDialog(Notice_Self)
|
||||||
JMP .done
|
JMP .done
|
||||||
|
+ : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for general big key
|
||||||
+ LDA.b Scrap00 : AND.b #$08 : BEQ + ; show message for general big key
|
|
||||||
LDA.l ScratchBufferV : CMP.b #$32 : BNE + ; general big key
|
LDA.l ScratchBufferV : CMP.b #$32 : BNE + ; general big key
|
||||||
%CopyDialog(Notice_BigKeyOf)
|
%CopyDialog(Notice_BigKeyOf)
|
||||||
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
||||||
%CopyDialog(Notice_Self)
|
%CopyDialog(Notice_Self)
|
||||||
JMP .done
|
JMP .done
|
||||||
|
+
|
||||||
+ LDA.b Scrap00 : AND.b #$04 : BEQ + ; show message for dungeon map
|
LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for dungeon map
|
||||||
LDA.l ScratchBufferV : AND.b #$F0 ; looking at high bits only
|
LDA.l ScratchBufferV : AND.b #$F0 ; looking at high bits only
|
||||||
CMP.b #$70 : BNE + ; map of...
|
CMP.b #$70 : BNE + ; map of...
|
||||||
%CopyDialog(Notice_MapOf)
|
%CopyDialog(Notice_MapOf)
|
||||||
JMP .dungeon
|
JMP .dungeon
|
||||||
|
+ : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for dungeon compass
|
||||||
+ LDA.b Scrap00 : AND.b #$02 : BEQ + ; show message for dungeon compass
|
|
||||||
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of...
|
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of...
|
||||||
%CopyDialog(Notice_CompassOf)
|
%CopyDialog(Notice_CompassOf)
|
||||||
JMP .dungeon
|
JMP .dungeon
|
||||||
|
+ : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for dungeon big key
|
||||||
+ LDA.b Scrap00 : AND.b #$08 : BEQ + ; show message for dungeon big key
|
|
||||||
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of...
|
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of...
|
||||||
%CopyDialog(Notice_BigKeyOf)
|
%CopyDialog(Notice_BigKeyOf)
|
||||||
JMP .dungeon
|
JMP .dungeon
|
||||||
|
+ : LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for dungeon small key
|
||||||
+ LDA.b Scrap00 : AND.b #$01 : BEQ + ; show message for dungeon small key
|
|
||||||
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of...
|
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of...
|
||||||
LDA.l ScratchBufferV : CMP.b #$AF : BNE ++ : JMP .skip : ++
|
LDA.l ScratchBufferV : CMP.b #$AF : BNE ++ : JMP .skip : ++
|
||||||
%CopyDialog(Notice_SmallKeyOf)
|
%CopyDialog(Notice_SmallKeyOf)
|
||||||
LDA.b #$01 : STA.l ScratchBufferNV ; set up a flip for small keys
|
LDA.b #$01 : STA.l ScratchBufferNV ; set up a flip for small keys
|
||||||
BRA .dungeon
|
BRA .dungeon
|
||||||
|
+ : LDA.l FreeItemText : AND.b #$20 : BEQ + ; show message for crystal
|
||||||
+ LDA.b Scrap00 : AND.b #$20 : BEQ + ; show message for crystal
|
|
||||||
LDA.l ScratchBufferV : CMP.b #$B0 : !BLT + ; crystal #
|
LDA.l ScratchBufferV : CMP.b #$B0 : !BLT + ; crystal #
|
||||||
CMP.b #$B7 : !BGE +
|
CMP.b #$B7 : !BGE +
|
||||||
%CopyDialog(Notice_Crystal)
|
%CopyDialog(Notice_Crystal)
|
||||||
JMP .crystal
|
JMP .crystal
|
||||||
|
+
|
||||||
+ JMP .skip ; it's not something we are going to give a notice for
|
JMP .skip ; it's not something we are going to give a notice for
|
||||||
|
|
||||||
.dungeon
|
.dungeon
|
||||||
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
||||||
@@ -150,26 +139,23 @@ FreeDungeonItemNotice:
|
|||||||
LDA.b #$0F : !SUB.l ScratchBufferNV+1 : STA.l ScratchBufferNV+1 ; flip the values for small keys
|
LDA.b #$0F : !SUB.l ScratchBufferNV+1 : STA.l ScratchBufferNV+1 ; flip the values for small keys
|
||||||
+
|
+
|
||||||
LDA.l ScratchBufferNV+1
|
LDA.l ScratchBufferNV+1
|
||||||
ASL : TAX
|
ASL : TAX
|
||||||
REP #$20
|
REP #$20
|
||||||
|
LDA.l DungeonItemIDMap,X : CMP.w #$0003 : BCC .hc_sewers
|
||||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : AND.w #$00FF : BNE +
|
CMP.w DungeonID : BNE +
|
||||||
|
BRA .self_notice
|
||||||
LDA.l DungeonItemIDMap, X : CMP.w #$0003 : BCC .hc_sewers
|
.hc_sewers
|
||||||
CMP.w DungeonID : BNE +
|
LDA.w DungeonID : CMP.w #$0003 : BCS +
|
||||||
BRA .self_notice
|
.self_notice
|
||||||
.hc_sewers
|
SEP #$20
|
||||||
LDA.w DungeonID : CMP.w #$0003 : BCS +
|
LDA.l FreeItemText : AND.b #$40 : BEQ ++
|
||||||
.self_notice
|
LDA.b #$00 : STA.l DialogOffsetPointer : STA.l DialogOffsetPointer+1
|
||||||
SEP #$20
|
JMP .skip
|
||||||
LDA.l FreeItemText : AND.b #$40 : BEQ ++
|
++
|
||||||
LDA.b #$00 : STA.l DialogOffsetPointer : STA.l DialogOffsetPointer+1
|
%CopyDialog(Notice_Self)
|
||||||
JMP .skip
|
JMP .done
|
||||||
++
|
+
|
||||||
%CopyDialog(Notice_Self)
|
SEP #$20
|
||||||
JMP .done
|
|
||||||
+
|
|
||||||
SEP #$20
|
|
||||||
LDA.l ScratchBufferNV+1
|
LDA.l ScratchBufferNV+1
|
||||||
CMP.b #$00 : BNE + ; ...light world
|
CMP.b #$00 : BNE + ; ...light world
|
||||||
%CopyDialog(Notice_LightWorld) : JMP .done
|
%CopyDialog(Notice_LightWorld) : JMP .done
|
||||||
@@ -204,9 +190,9 @@ FreeDungeonItemNotice:
|
|||||||
+ : CMP.b #$0F : BNE + ; ...sewers
|
+ : CMP.b #$0F : BNE + ; ...sewers
|
||||||
%CopyDialog(Notice_Sewers)
|
%CopyDialog(Notice_Sewers)
|
||||||
+
|
+
|
||||||
JMP .done
|
JMP .done
|
||||||
|
|
||||||
.crystal
|
.crystal
|
||||||
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
|
||||||
LDA.l ScratchBufferV
|
LDA.l ScratchBufferV
|
||||||
AND.b #$0F ; looking at low bits only
|
AND.b #$0F ; looking at low bits only
|
||||||
@@ -224,7 +210,7 @@ FreeDungeonItemNotice:
|
|||||||
%CopyDialog(Notice_Four) : JMP .done
|
%CopyDialog(Notice_Four) : JMP .done
|
||||||
+ : CMP.b #$06 : BNE +
|
+ : CMP.b #$06 : BNE +
|
||||||
%CopyDialog(Notice_Three) : JMP .done
|
%CopyDialog(Notice_Three) : JMP .done
|
||||||
+
|
+
|
||||||
|
|
||||||
.done
|
.done
|
||||||
|
|
||||||
@@ -234,14 +220,14 @@ FreeDungeonItemNotice:
|
|||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
.skip
|
.skip
|
||||||
PLA : STA.l ScratchBufferNV+1
|
PLA : STA.l ScratchBufferNV+1
|
||||||
PLA : STA.l ScratchBufferNV
|
PLA : STA.l ScratchBufferNV
|
||||||
PLA : STA.b Scrap02
|
PLA : STA.b Scrap02
|
||||||
REP #$20
|
REP #$20
|
||||||
PLA : STA.b Scrap00
|
PLA : STA.b Scrap00
|
||||||
PLB
|
PLB
|
||||||
PLP
|
PLP
|
||||||
PLY : PLX : PLA
|
PLY : PLX : PLA
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
@@ -252,14 +238,10 @@ RTL
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
DialogItemReceive:
|
DialogItemReceive:
|
||||||
BCS .nomessage ; if doubling the item value overflowed it must be a rando item
|
BCS .nomessage ; if doubling the item value overflowed it must be a rando item
|
||||||
CPY.b #$CC : BEQ .orange_potion
|
|
||||||
CPY.b #$98 : BCC ++ ;if the item is $4C or greater it must be a rando item
|
CPY.b #$98 : BCC ++ ;if the item is $4C or greater it must be a rando item
|
||||||
.nomessage
|
.nomessage
|
||||||
LDA.w #$FFFF
|
LDA.w #$FFFF
|
||||||
BRA .done
|
|
||||||
|
|
||||||
.orange_potion
|
|
||||||
LDA.w #$0198
|
|
||||||
BRA .done
|
BRA .done
|
||||||
|
|
||||||
++ LDA.w Ancilla_ReceiveItem_item_messages, Y
|
++ LDA.w Ancilla_ReceiveItem_item_messages, Y
|
||||||
@@ -308,7 +290,7 @@ DialogGanon2:
|
|||||||
BCS +
|
BCS +
|
||||||
LDA.w #$018D : JMP .done
|
LDA.w #$018D : JMP .done
|
||||||
+
|
+
|
||||||
LDA.l GanonVulnerabilityItem : AND.w #$007F
|
LDA.l GanonVulnerabilityItem : AND.w #$00FF
|
||||||
BEQ .silver_arrows
|
BEQ .silver_arrows
|
||||||
CMP.w #$0001 : BEQ .silver_arrows
|
CMP.w #$0001 : BEQ .silver_arrows
|
||||||
CMP.w #$0004 : BEQ .bombs
|
CMP.w #$0004 : BEQ .bombs
|
||||||
|
|||||||
@@ -599,7 +599,7 @@ skip $10
|
|||||||
BigKeyStatus: ;27f040 (status 2 indicate BnC guard)
|
BigKeyStatus: ;27f040 (status 2 indicate BnC guard)
|
||||||
dw $0002, $0002, $0001, $0001, $0000, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0000, $0000
|
dw $0002, $0002, $0001, $0001, $0000, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0000, $0000
|
||||||
DungeonReminderTable: ;27f060
|
DungeonReminderTable: ;27f060
|
||||||
dw $2DA4, $2DA4, $2DA5, $2DA6, $2DA8, $2DAA, $2DA9, $2DAE, $2DAB, $2DAD, $2DA7, $2DAC, $2DAF, $2DB0, $0000, $0000
|
dw $2D50, $2D50, $2D51, $2D52, $2D54, $2D56, $2D55, $2D5A, $2D57, $2D59, $2D53, $2D58, $2D5B, $2D5C, $0000, $0000
|
||||||
TotalLocationsLow: ;27f080
|
TotalLocationsLow: ;27f080
|
||||||
db $08, $08, $06, $06, $02, $00, $04, $08, $08, $08, $06, $08, $02, $07, $00, $00
|
db $08, $08, $06, $06, $02, $00, $04, $08, $08, $08, $06, $08, $02, $07, $00, $00
|
||||||
TotalLocationsHigh: ;27f090
|
TotalLocationsHigh: ;27f090
|
||||||
|
|||||||
+94
-156
@@ -1,12 +1,10 @@
|
|||||||
!BlankTile = $207F
|
!BlankTile = $207F
|
||||||
!SlashTile = $2830
|
!SlashTile = $2830
|
||||||
!PlusTile = $2404
|
|
||||||
!HyphenTile = $2405
|
!HyphenTile = $2405
|
||||||
!LTile = $2D68
|
!LTile = $2D68
|
||||||
!DTile = $2D60
|
!DTile = $2D60
|
||||||
|
!RedSquare = $345E
|
||||||
!BlueSquare = $2C5E
|
!BlueSquare = $2C5E
|
||||||
!BossIcon = $253C
|
|
||||||
!NPCIcon = $253B
|
|
||||||
|
|
||||||
DrHudOverride:
|
DrHudOverride:
|
||||||
PHB
|
PHB
|
||||||
@@ -31,13 +29,6 @@ DRHUD_DrawIndicators:
|
|||||||
LDA.b FrameCounter : AND.b #$10 : BEQ DRHUD_EnemyDropIndicator
|
LDA.b FrameCounter : AND.b #$10 : BEQ DRHUD_EnemyDropIndicator
|
||||||
|
|
||||||
DRHUD_BossIndicator:
|
DRHUD_BossIndicator:
|
||||||
LDA.w DungeonID : CMP.b #$FF : BNE .in_dungeon
|
|
||||||
LDA.w NpcItemIndicator : BEQ .early_exit
|
|
||||||
LDA.l HudItems_enabled : BEQ .early_exit
|
|
||||||
REP #$10
|
|
||||||
LDY.w #!NPCIcon : STY.w HUDMultiIndicator
|
|
||||||
JMP DRHUD_Finished
|
|
||||||
.in_dungeon
|
|
||||||
LDA.l DRMode : BNE .continue
|
LDA.l DRMode : BNE .continue
|
||||||
.early_exit
|
.early_exit
|
||||||
REP #$10
|
REP #$10
|
||||||
@@ -55,7 +46,7 @@ DRHUD_BossIndicator:
|
|||||||
SEP #$20
|
SEP #$20
|
||||||
BEQ .draw_indicator
|
BEQ .draw_indicator
|
||||||
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
|
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
|
||||||
LDY.w #!BossIcon
|
LDY.w #!RedSquare
|
||||||
.draw_indicator
|
.draw_indicator
|
||||||
STY.w HUDMultiIndicator
|
STY.w HUDMultiIndicator
|
||||||
BRA DRHUD_DrawCurrentDungeonIndicator
|
BRA DRHUD_DrawCurrentDungeonIndicator
|
||||||
@@ -80,12 +71,13 @@ DRHUD_DrawCurrentDungeonIndicator: ; mX
|
|||||||
CMP.b #$06 : BEQ .draw_indicator
|
CMP.b #$06 : BEQ .draw_indicator
|
||||||
|
|
||||||
.get_indicator
|
.get_indicator
|
||||||
LDY.w #$2C28
|
REP #$20 : LDA.l DungeonReminderTable,X : TAY
|
||||||
|
SEP #$20
|
||||||
.draw_indicator
|
.draw_indicator
|
||||||
STY.w HUDCurrentDungeonWorld
|
STY.w HUDCurrentDungeonWorld
|
||||||
|
|
||||||
DRHUD_DrawKeyCounter:
|
DRHUD_DrawKeyCounter:
|
||||||
LDA.l DRFlags : AND.b #$04 : BEQ .to_finished
|
LDA.l DRFlags : AND.b #$04 : BEQ DRHUD_Finished
|
||||||
LDA.l CompassMode : BIT.b #$03 : BEQ DRHUD_Finished
|
LDA.l CompassMode : BIT.b #$03 : BEQ DRHUD_Finished
|
||||||
REP #$20
|
REP #$20
|
||||||
BIT.w #$0002 : BNE .skip_map_check
|
BIT.w #$0002 : BNE .skip_map_check
|
||||||
@@ -98,17 +90,8 @@ DRHUD_DrawKeyCounter:
|
|||||||
LDA.l GenericKeys : LSR : BCS .total_only
|
LDA.l GenericKeys : LSR : BCS .total_only
|
||||||
LDA.w DungeonCollectedKeys, X : JSR ConvertToDisplay : STA.w HUDKeysObtained
|
LDA.w DungeonCollectedKeys, X : JSR ConvertToDisplay : STA.w HUDKeysObtained
|
||||||
LDA.w #!SlashTile : STA.w HUDKeysSlash
|
LDA.w #!SlashTile : STA.w HUDKeysSlash
|
||||||
|
|
||||||
LDA.l ExtraChestKeys, X : AND.w #$00FF : BEQ .total_only
|
|
||||||
JSR ConvertToDisplay : STA.w HUDKeysExtraCount
|
|
||||||
LDA.w #!PlusTile : STA.w HUDKeysExtraPlus
|
|
||||||
|
|
||||||
.total_only
|
.total_only
|
||||||
SEP #$20
|
LDA.l ChestKeys, x : JSR ConvertToDisplay : STA.w HUDKeysTotal
|
||||||
LDA.l ChestKeys, X : SEC : SBC.l ExtraChestKeys, X
|
|
||||||
REP #$20
|
|
||||||
JSR ConvertToDisplay : STA.w HUDKeysTotal
|
|
||||||
.to_finished
|
|
||||||
JMP DRHUD_Finished
|
JMP DRHUD_Finished
|
||||||
|
|
||||||
OWRHUD_DrawWorldIndicator:
|
OWRHUD_DrawWorldIndicator:
|
||||||
@@ -142,100 +125,101 @@ dw $0000, $0000, $0000, $0000, $000a, $000a, $000a, $0014, $000a, $0014, $0000,
|
|||||||
|
|
||||||
DrHudDungeonItemsAdditions:
|
DrHudDungeonItemsAdditions:
|
||||||
{
|
{
|
||||||
jsl DrawHUDDungeonItems
|
jsl DrawHUDDungeonItems
|
||||||
lda.l DRMode : cmp.b #$02 : beq + : rtl : +
|
lda.l DRMode : cmp.b #$02 : beq + : rtl : +
|
||||||
|
|
||||||
phx : phy : php
|
phx : phy : php
|
||||||
rep #$30
|
rep #$30
|
||||||
|
|
||||||
lda.w #$24f5 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
|
lda.w #$24f5 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
|
||||||
sta.w $1644 : sta.w $164a : sta.w $1652 : sta.w $1662 : sta.w $1684 : sta.w $16c4
|
sta.w $1644 : sta.w $164a : sta.w $1652 : sta.w $1662 : sta.w $1684 : sta.w $16c4
|
||||||
ldx.w #$0000
|
ldx.w #$0000
|
||||||
- sta.w $1704, x : sta.w $170e, x : sta.w $1718, x
|
- sta.w $1704, x : sta.w $170e, x : sta.w $1718, x
|
||||||
inx #2 : cpx.w #$0008 : !BLT -
|
inx #2 : cpx.w #$0008 : !BLT -
|
||||||
|
|
||||||
lda.l HudFlag : and.w #$0020 : beq + : JMP ++ : +
|
lda.l HudFlag : and.w #$0020 : beq + : JMP ++ : +
|
||||||
lda.l HUDDungeonItems : and.w #$001F : bne + : JMP ++ : +
|
lda.l HUDDungeonItems : and.w #$0007 : bne + : JMP ++ : +
|
||||||
; bk symbols
|
; bk symbols
|
||||||
lda.w #$2811 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
|
lda.w #$2811 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
|
||||||
; sm symbols
|
; sm symbols
|
||||||
lda.w #$2810 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
|
lda.w #$2810 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
|
||||||
; blank out stuff
|
; blank out stuff
|
||||||
lda.w #$24f5 : sta.w $1724
|
lda.w #$24f5 : sta.w $1724
|
||||||
|
|
||||||
ldx.w #$0002
|
ldx.w #$0002
|
||||||
- lda.w #$0000 : !ADD.l RowOffsets,x : !ADD.l ColumnOffsets, x : tay
|
- lda.w #$0000 : !ADD.l RowOffsets,x : !ADD.l ColumnOffsets, x : tay
|
||||||
JSR BossStatus : STA.w $1644, Y
|
lda.l DungeonReminderTable, x : sta.w $1644, y : iny #2
|
||||||
INY #2
|
lda.w #$24f5 : sta.w $1644, y
|
||||||
lda.w #$24f5 : sta.w $1644, y
|
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
|
||||||
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
|
jsr BkStatus : sta.w $1644, y : bra .smallKey ; big key status
|
||||||
jsr BkStatus : sta.w $1644, y : bra .smallKey ; big key status
|
+ lda.l BigKeyField : and.l DungeonMask, x : beq .smallKey
|
||||||
+ lda.l BigKeyField : and.l DungeonMask, x : beq .smallKey
|
lda.w #$2826 : sta.w $1644, y
|
||||||
lda.w #$2826 : sta.w $1644, y
|
.smallKey
|
||||||
.smallKey
|
+ iny #2
|
||||||
+ iny #2
|
|
||||||
cpx.w #$001a : bne +
|
cpx.w #$001a : bne +
|
||||||
tya : !ADD.w #$003c : tay
|
tya : !ADD.w #$003c : tay
|
||||||
+ stx.b Scrap00
|
+ stx.b Scrap00
|
||||||
txa : lsr : tax
|
txa : lsr : tax
|
||||||
lda.w #$24f5 : sta.w $1644, y
|
lda.w #$24f5 : sta.w $1644, y
|
||||||
lda.l GenericKeys : and.w #$00FF : bne +
|
lda.l GenericKeys : and.w #$00FF : bne +
|
||||||
lda.l DungeonKeys, x : and.w #$00FF : beq +
|
lda.l DungeonKeys, x : and.w #$00FF : beq +
|
||||||
jsr ConvertToDisplay2 : sta.w $1644, y
|
jsr ConvertToDisplay2 : sta.w $1644, y
|
||||||
+ iny #2 : lda.w #$24f5 : sta.w $1644, y
|
+ iny #2 : lda.w #$24f5 : sta.w $1644, y
|
||||||
phx : ldx.b Scrap00
|
phx : ldx.b Scrap00
|
||||||
LDA.l MapField : ORA.l MapCountDisplay : AND.l DungeonMask, x : BEQ .key_info_done ; must have map
|
LDA.l CompassMode : BIT.w #$0002 : BNE .skip_map_check
|
||||||
|
LDA.l MapField : AND.l DungeonMask, x : BEQ .key_info_done ; must have map
|
||||||
|
.skip_map_check
|
||||||
plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02
|
plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02
|
||||||
lda.l GenericKeys : bne +++
|
lda.l GenericKeys : bne +++
|
||||||
lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02
|
lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02
|
||||||
+++ lda.b Scrap02
|
+++ lda.b Scrap02
|
||||||
rep #$30
|
rep #$30
|
||||||
jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals
|
jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals
|
||||||
bra .skipStack
|
bra .skipStack
|
||||||
.key_info_done
|
.key_info_done
|
||||||
plx
|
plx
|
||||||
.skipStack iny #2
|
.skipStack iny #2
|
||||||
cpx.w #$000d : beq +
|
cpx.w #$000d : beq +
|
||||||
lda.w #$24f5 : sta.w $1644, y
|
lda.w #$24f5 : sta.w $1644, y
|
||||||
+
|
+
|
||||||
ldx.b Scrap00
|
ldx.b Scrap00
|
||||||
+ inx #2 : cpx.w #$001b : bcs ++ : JMP -
|
+ inx #2 : cpx.w #$001b : bcs ++ : JMP -
|
||||||
++
|
++
|
||||||
lda.l HudFlag : and.w #$0020 : bne + : JMP ++ : +
|
lda.l HudFlag : and.w #$0020 : bne + : JMP ++ : +
|
||||||
; map symbols
|
; map symbols
|
||||||
lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a
|
lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a
|
||||||
; compass symbols
|
; compass symbols
|
||||||
lda.w #$2c20 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
|
lda.w #$2c20 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
|
||||||
; blank out a couple thing from old hud
|
; blank out a couple thing from old hud
|
||||||
lda.w #$24f5 : sta.w $1624 : sta.w $1724
|
lda.w #$24f5 : sta.w $1624 : sta.w $1724
|
||||||
ldx.w #$0002
|
ldx.w #$0002
|
||||||
- lda.w #$0000 ; start of hud area
|
- lda.w #$0000 ; start of hud area
|
||||||
!ADD.l RowOffsets, x : !ADD.l ColumnOffsets, x : tay
|
!ADD.l RowOffsets, x : !ADD.l ColumnOffsets, x : tay
|
||||||
JSR BossStatus : STA.w $1644, Y
|
lda.l DungeonReminderTable, x : sta.w $1644, y
|
||||||
INY #2
|
iny #2
|
||||||
lda.w #$24f5 : sta.w $1644, y ; blank out map spot
|
lda.w #$24f5 : sta.w $1644, y ; blank out map spot
|
||||||
lda.l MapField : ora.l MapCountDisplay : ora.l MapOverlay
|
lda.l MapField : ora.l MapCountDisplay : ora.l MapOverlay
|
||||||
and.l DungeonMask, x : beq + ; must have map
|
and.l DungeonMask, x : beq + ; must have map
|
||||||
JSR MapIndicatorShort : STA.w $1644, Y
|
JSR MapIndicatorShort : STA.w $1644, Y
|
||||||
+ iny #2
|
+ iny #2
|
||||||
cpx.w #$001a : bne +
|
cpx.w #$001a : bne +
|
||||||
tya : !ADD.w #$003c : tay
|
tya : !ADD.w #$003c : tay
|
||||||
+ lda.l CompassField : ora.l CompassCountDisplay
|
+ lda.l CompassField : ora.l CompassCountDisplay
|
||||||
and.l DungeonMask, x : beq + ; must have compass
|
and.l DungeonMask, x : beq + ; must have compass
|
||||||
phx ; total chest counts
|
phx ; total chest counts
|
||||||
LDA.l CompassTotalsWRAM, x : !SUB.l DungeonLocationsChecked, x
|
LDA.l CompassTotalsWRAM, x : !SUB.l DungeonLocationsChecked, x
|
||||||
SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30
|
SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30
|
||||||
lda.b Scrap06 : jsr ConvertToDisplay2 : sta.w $1644, y : iny #2
|
lda.b Scrap06 : jsr ConvertToDisplay2 : sta.w $1644, y : iny #2
|
||||||
lda.b Scrap07 : jsr ConvertToDisplay2 : sta.w $1644, y
|
lda.b Scrap07 : jsr ConvertToDisplay2 : sta.w $1644, y
|
||||||
plx
|
plx
|
||||||
bra .skipBlanks
|
bra .skipBlanks
|
||||||
+ lda.w #$24f5 : sta.w $1644, y : iny #2 : sta.w $1644, y
|
+ lda.w #$24f5 : sta.w $1644, y : iny #2 : sta.w $1644, y
|
||||||
.skipBlanks iny #2
|
.skipBlanks iny #2
|
||||||
cpx.w #$001a : beq +
|
cpx.w #$001a : beq +
|
||||||
lda.w #$24f5 : sta.w $1644, y ; blank out spot
|
lda.w #$24f5 : sta.w $1644, y ; blank out spot
|
||||||
+ inx #2 : cpx.w #$001b : !BGE ++ : JMP -
|
+ inx #2 : cpx.w #$001b : !BGE ++ : JMP -
|
||||||
++
|
++
|
||||||
plp : ply : plx : rtl
|
plp : ply : plx : rtl
|
||||||
}
|
}
|
||||||
|
|
||||||
MapIndicatorLong:
|
MapIndicatorLong:
|
||||||
@@ -275,63 +259,17 @@ BkStatus:
|
|||||||
+ lda.w #$24f5 : rts ; black otherwise
|
+ lda.w #$24f5 : rts ; black otherwise
|
||||||
+++ lda.w #$2826 : rts ; check mark
|
+++ lda.w #$2826 : rts ; check mark
|
||||||
|
|
||||||
BossStatus:
|
ConvertToDisplay:
|
||||||
LDA.l HUDDungeonItems : BIT.w #$0010 : BEQ .normal
|
and.w #$00ff : cmp.w #$000a : !BLT +
|
||||||
PHX
|
!ADD.w #$2519 : rts
|
||||||
LDA.l DungeonMapBossRooms, X
|
+ !ADD.w #$2490 : rts
|
||||||
CMP.w #$000F
|
|
||||||
BEQ .no_boss
|
|
||||||
ASL A
|
|
||||||
TAX
|
|
||||||
LDA.l SaveDataWRAM, X
|
|
||||||
PLX
|
|
||||||
BIT.w #$0800
|
|
||||||
BEQ .boss_alive
|
|
||||||
|
|
||||||
.boss_dead
|
ConvertToDisplay2:
|
||||||
LDA.l HudFlag : BIT.w #$0020 : BNE .skull
|
and.w #$00ff : beq ++
|
||||||
; palette 3 - white
|
cmp.w #$000a : !BLT +
|
||||||
LDA.l DungeonReminderTable, X : AND.w #$E3FF : ORA.w #$0C00 : RTS
|
!ADD.w #$2517 : rts ; 2580 with 258A as "A" for non transparent digits
|
||||||
|
+ !ADD.w #$2816 : rts
|
||||||
.skull
|
++ lda.w #$2827 : rts ; 0/O for 0 or placeholder digit ;2483
|
||||||
LDA.w #$280F : RTS
|
|
||||||
|
|
||||||
.no_boss
|
|
||||||
PLX
|
|
||||||
; palette 0 - light gray
|
|
||||||
LDA.l DungeonReminderTable, X : AND.w #$E3FF : RTS
|
|
||||||
|
|
||||||
.boss_alive
|
|
||||||
; palette 4 - gray
|
|
||||||
LDA.l DungeonReminderTable, X : AND.w #$E3FF : ORA.w #$1000 : RTS
|
|
||||||
|
|
||||||
.normal
|
|
||||||
; default palette 3 - white
|
|
||||||
LDA.l DungeonReminderTable, X : RTS
|
|
||||||
|
|
||||||
ConvertToDisplay: ; transparent background
|
|
||||||
AND.w #$00FF
|
|
||||||
CMP.w #$000A : BCC .under10
|
|
||||||
CMP.w #$000C : BCC .under12
|
|
||||||
.over11
|
|
||||||
CLC : ADC.w #$2553 : RTS
|
|
||||||
.under12
|
|
||||||
CLC : ADC.w #$2519 : RTS
|
|
||||||
.under10
|
|
||||||
CLC : ADC.w #$2490 : RTS
|
|
||||||
|
|
||||||
ConvertToDisplay2: ; solid background
|
|
||||||
AND.w #$00FF : BEQ .zero
|
|
||||||
CMP.w #$000A : BCC .under10
|
|
||||||
CMP.w #$000C : BCC .under12
|
|
||||||
.over11
|
|
||||||
CLC : ADC.w #$2580 : RTS
|
|
||||||
.under12
|
|
||||||
CLC : ADC.w #$2517 : RTS
|
|
||||||
.under10
|
|
||||||
CLC : ADC.w #$2816 : RTS
|
|
||||||
.zero
|
|
||||||
LDA.w #$2827 : RTS
|
|
||||||
|
|
||||||
CountAbsorbedKeys:
|
CountAbsorbedKeys:
|
||||||
JML IncrementSmallKeysNoPrimary
|
JML IncrementSmallKeysNoPrimary
|
||||||
|
|||||||
+4
-10
@@ -21,18 +21,14 @@ SpiralWarp: {
|
|||||||
lda.w $045e : cmp.b #$5e : beq .gtg ; abort if not spiral - intended room is in A!
|
lda.w $045e : cmp.b #$5e : beq .gtg ; abort if not spiral - intended room is in A!
|
||||||
cmp.b #$5f : beq .gtg
|
cmp.b #$5f : beq .gtg
|
||||||
cmp.b #$26 : beq .inroom
|
cmp.b #$26 : beq .inroom
|
||||||
.abort
|
.abort
|
||||||
SEP #$30
|
SEP #$30 : stz.w $045e : lda.b PreviousRoom : and.b #$0f : rtl ; clear,run hijacked code and get out
|
||||||
stz.w $045e
|
.inroom
|
||||||
lda.b PreviousRoom : and.b #$0f
|
|
||||||
rtl ; clear,run hijacked code and get out
|
|
||||||
|
|
||||||
.inroom
|
|
||||||
jsr InroomStairsWarp
|
jsr InroomStairsWarp
|
||||||
lda.b PreviousRoom : and.b #$0f ; this is the code we are hijacking
|
lda.b PreviousRoom : and.b #$0f ; this is the code we are hijacking
|
||||||
rtl
|
rtl
|
||||||
|
|
||||||
.gtg
|
.gtg
|
||||||
phb : phk : plb : phx : phy ; push stuff
|
phb : phk : plb : phx : phy ; push stuff
|
||||||
jsr LookupSpiralOffset
|
jsr LookupSpiralOffset
|
||||||
rep #$30 : and.w #$00FF : asl #2 : tax
|
rep #$30 : and.w #$00FF : asl #2 : tax
|
||||||
@@ -85,7 +81,6 @@ SpiralWarp: {
|
|||||||
ldy.b #$01 : jsr SetCamera
|
ldy.b #$01 : jsr SetCamera
|
||||||
|
|
||||||
jsr StairCleanup
|
jsr StairCleanup
|
||||||
|
|
||||||
ply : plx : plb ; pull the stuff we pushed
|
ply : plx : plb ; pull the stuff we pushed
|
||||||
lda.b PreviousRoom : and.b #$0f ; this is the code we are hijacking
|
lda.b PreviousRoom : and.b #$0f ; this is the code we are hijacking
|
||||||
rtl
|
rtl
|
||||||
@@ -266,7 +261,6 @@ InroomStairsWarp: {
|
|||||||
.skipCamera
|
.skipCamera
|
||||||
|
|
||||||
jsr StairCleanup
|
jsr StairCleanup
|
||||||
|
|
||||||
ply : plx : plb ; pull the stuff we pushed
|
ply : plx : plb ; pull the stuff we pushed
|
||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ StartDoubleWrite:
|
|||||||
; what we wrote over
|
; what we wrote over
|
||||||
LDA.l DRMode
|
LDA.l DRMode
|
||||||
BEQ .draw
|
BEQ .draw
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BNE .draw
|
||||||
|
|
||||||
INC.w $020D ; next subsubmode
|
INC.w $020D ; next subsubmode
|
||||||
PLA : PLA : PLA ; pull our jump to here off the stack
|
PLA : PLA : PLA ; pull our jump to here off the stack
|
||||||
@@ -1,43 +1,42 @@
|
|||||||
; A = room_id
|
; A = room_id
|
||||||
; out A = level of loot
|
; out A = level of loot
|
||||||
CheckMapLoot:
|
CheckLoot:
|
||||||
PHP
|
PHP
|
||||||
REP #$30
|
REP #$30
|
||||||
PHX
|
PHB : PHX : PHY
|
||||||
|
|
||||||
STA.b $CA
|
STA.b $CA
|
||||||
|
|
||||||
|
LDA.b $06 : PHA
|
||||||
LDA.b $0E : PHA
|
LDA.b $0E : PHA
|
||||||
|
|
||||||
LDA.l MapItems_default
|
STZ.b $02 ; best item class found
|
||||||
|
|
||||||
|
LDA.l ShowItems_default
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
STA.b $0E
|
STA.b $0E
|
||||||
|
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
LDA.l SaveDataWRAM, X
|
LDA.l SaveDataWRAM, X
|
||||||
AND.w #$000F
|
AND.w #$000F
|
||||||
BEQ +
|
BEQ +
|
||||||
LDA.l MapItems_visited_tile
|
LDA.l ShowItems_visited_tile
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
CMP.b $0E
|
CMP.b $0E
|
||||||
BCC +
|
BCC +
|
||||||
STA.b $0E
|
STA.b $0E
|
||||||
|
|
||||||
+ LDA.w DungeonID
|
+ LDA.w DungeonID
|
||||||
AND.w #$00FF
|
|
||||||
CMP.w #$00FF
|
|
||||||
BEQ .skip_dungeon_checks
|
|
||||||
|
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
LDA.l MapField
|
LDA.l MapField
|
||||||
AND.l DungeonMask, X
|
AND.l DungeonMask, X
|
||||||
BEQ +
|
BEQ +
|
||||||
LDA.l MapItems_have_map
|
LDA.l ShowItems_have_map
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
CMP.b $0E
|
CMP.b $0E
|
||||||
BCC +
|
BCC +
|
||||||
@@ -46,93 +45,13 @@ CheckMapLoot:
|
|||||||
+ LDA.l CompassField
|
+ LDA.l CompassField
|
||||||
AND.l DungeonMask, X
|
AND.l DungeonMask, X
|
||||||
BEQ +
|
BEQ +
|
||||||
LDA.l MapItems_have_compass
|
LDA.l ShowItems_have_compass
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
CMP.b $0E
|
CMP.b $0E
|
||||||
BCC +
|
BCC +
|
||||||
STA.b $0E
|
STA.b $0E
|
||||||
+
|
+
|
||||||
|
|
||||||
.skip_dungeon_checks
|
|
||||||
JMP GetLootLevelAndCleanUp
|
|
||||||
|
|
||||||
; A = room_id
|
|
||||||
; out A = level of loot
|
|
||||||
CheckHudLoot:
|
|
||||||
PHP
|
|
||||||
REP #$30
|
|
||||||
PHX
|
|
||||||
|
|
||||||
STA.b $CA
|
|
||||||
|
|
||||||
LDA.b $0E : PHA
|
|
||||||
|
|
||||||
+ LDA.w DungeonID
|
|
||||||
AND.w #$00FF
|
|
||||||
CMP.w #$00FF
|
|
||||||
BEQ .cave
|
|
||||||
|
|
||||||
TAX
|
|
||||||
|
|
||||||
LDA.l HudItems_default_dungeon
|
|
||||||
AND.w #$00FF
|
|
||||||
STA.b $0E
|
|
||||||
|
|
||||||
LDA.l MapField
|
|
||||||
AND.l DungeonMask, X
|
|
||||||
BEQ +
|
|
||||||
LDA.l HudItems_have_map
|
|
||||||
AND.w #$00FF
|
|
||||||
CMP.b $0E
|
|
||||||
BCC +
|
|
||||||
STA.b $0E
|
|
||||||
|
|
||||||
+ LDA.l CompassField
|
|
||||||
AND.l DungeonMask, X
|
|
||||||
BEQ +
|
|
||||||
LDA.l HudItems_have_compass
|
|
||||||
AND.w #$00FF
|
|
||||||
CMP.b $0E
|
|
||||||
BCC +
|
|
||||||
STA.b $0E
|
|
||||||
+
|
|
||||||
|
|
||||||
BRA GetLootLevelAndCleanUp
|
|
||||||
|
|
||||||
.cave
|
|
||||||
LDA.l HudItems_cave
|
|
||||||
AND.w #$00FF
|
|
||||||
STA.b $0E
|
|
||||||
; intentional fall-through
|
|
||||||
|
|
||||||
GetLootLevelAndCleanUp:
|
|
||||||
STZ.b $02
|
|
||||||
|
|
||||||
LDA.b $0E
|
|
||||||
AND.w #$00FF
|
|
||||||
BEQ +
|
|
||||||
JSL GetLootLevel
|
|
||||||
+
|
|
||||||
|
|
||||||
PLA : STA.b $0E
|
|
||||||
PLX
|
|
||||||
PLP
|
|
||||||
|
|
||||||
LDA.b $02
|
|
||||||
RTL
|
|
||||||
|
|
||||||
; $CA = room_id
|
|
||||||
; $0E = level of details to return
|
|
||||||
; (1 - presence, 2 - compass or presence, 3 - value)
|
|
||||||
; out $02 = level of loot
|
|
||||||
GetLootLevel:
|
|
||||||
PHP
|
|
||||||
REP #$30
|
|
||||||
PHB : PHX : PHY
|
|
||||||
LDA.b $06 : PHA
|
|
||||||
|
|
||||||
STZ.b $02 ; best item class found
|
|
||||||
|
|
||||||
LDA.l ItemSources : BIT.w #$0001 : BEQ +
|
LDA.l ItemSources : BIT.w #$0001 : BEQ +
|
||||||
JSR CheckChests
|
JSR CheckChests
|
||||||
+
|
+
|
||||||
@@ -146,25 +65,24 @@ GetLootLevel:
|
|||||||
+
|
+
|
||||||
|
|
||||||
LDA.l ItemSources : BIT.w #$0008 : BEQ +
|
LDA.l ItemSources : BIT.w #$0008 : BEQ +
|
||||||
JSR CheckMisc
|
JSR CheckBoss
|
||||||
JSR CheckMisc2
|
|
||||||
+
|
+
|
||||||
|
|
||||||
LDA.l ItemSources : BIT.w #$0010 : BEQ +
|
LDA.l ItemSources : BIT.w #$0010 : BEQ +
|
||||||
JSR CheckPrize
|
JSR CheckPrize
|
||||||
+
|
+
|
||||||
|
|
||||||
JSR CheckNpcs
|
|
||||||
|
|
||||||
.done
|
.done
|
||||||
|
PLA : STA.b $0E
|
||||||
PLA : STA.b $06
|
PLA : STA.b $06
|
||||||
PLY : PLX : PLB
|
PLY : PLX : PLB
|
||||||
PLP
|
PLP
|
||||||
|
LDA.b $02
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
CheckChests:
|
CheckChests:
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
STA.b $00
|
STA.b $00
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
@@ -209,22 +127,25 @@ CheckChests:
|
|||||||
.done
|
.done
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
CheckMisc:
|
CheckBoss:
|
||||||
; this includes bosses, bonk torches, and standing items (in caves + hera cage key)
|
; we assume all bosses are in section 1 of split sections
|
||||||
; all dungeon items in this section are in section 1 of split sections
|
; mainly to simplify hera cage key and GT torch
|
||||||
; for cave items we'll always know what section we're in
|
; which use the same flow
|
||||||
; but for dungeon items, we won't have a section specified in door rando
|
; and bosses are always in their own section anyway
|
||||||
; so if we don't have a section, assume it's 1, and it'll match all the dungeon items anyway
|
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
BIT.w #$F000
|
AND.w #$F000
|
||||||
BNE +
|
XBA
|
||||||
ORA.w #$1000
|
CMP.w #$0020
|
||||||
|
BCC +
|
||||||
|
RTS
|
||||||
|
|
||||||
+
|
+
|
||||||
AND.w #$F1FF
|
LDA.b $CA
|
||||||
|
AND.w #$00FF
|
||||||
STA.b $04
|
STA.b $04
|
||||||
|
|
||||||
LDX.w #$FFFA
|
LDX.w #$FFFA
|
||||||
.next_misc
|
.next_boss
|
||||||
INX #6
|
INX #6
|
||||||
LDA.l MiscLocations, X
|
LDA.l MiscLocations, X
|
||||||
BPL .check
|
BPL .check
|
||||||
@@ -232,10 +153,9 @@ CheckMisc:
|
|||||||
|
|
||||||
.check
|
.check
|
||||||
CMP.b $04
|
CMP.b $04
|
||||||
BNE .next_misc
|
BNE .next_boss
|
||||||
|
|
||||||
TXY
|
TXY
|
||||||
AND.w #$01FF
|
|
||||||
CMP.b RoomIndex
|
CMP.b RoomIndex
|
||||||
BEQ .current_room
|
BEQ .current_room
|
||||||
|
|
||||||
@@ -260,7 +180,7 @@ CheckMisc:
|
|||||||
|
|
||||||
TYX
|
TYX
|
||||||
BIT.b $04
|
BIT.b $04
|
||||||
BNE .next_misc ; continue checking if we already got the item
|
BNE .next_boss ; continue checking if we already got the item
|
||||||
|
|
||||||
LDA.l MiscLocations+4, X
|
LDA.l MiscLocations+4, X
|
||||||
STA.b $05
|
STA.b $05
|
||||||
@@ -272,28 +192,11 @@ CheckMisc:
|
|||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
JSR GetLootClass
|
JSR GetLootClass
|
||||||
|
|
||||||
BRA .next_misc
|
BRA .next_boss
|
||||||
|
|
||||||
CheckMisc2:
|
|
||||||
; this currently only includes the library and Uncle
|
|
||||||
; so let's just hard-code them for now
|
|
||||||
LDA.b $CA
|
|
||||||
CMP.w #$2107 : BNE +
|
|
||||||
LDA.l NpcFlags : AND.w #$0080 : BNE +
|
|
||||||
LDA.l LibraryItem : AND.w #$00FF : JSR GetLootClass
|
|
||||||
+
|
|
||||||
|
|
||||||
LDA.b $CA
|
|
||||||
CMP.w #$1055 : BNE +
|
|
||||||
LDA.l ProgressFlags : AND.w #$0001 : BNE +
|
|
||||||
LDA.l UncleItem : AND.w #$00FF : JSR GetLootClass
|
|
||||||
+
|
|
||||||
|
|
||||||
RTS
|
|
||||||
|
|
||||||
CheckPrize:
|
CheckPrize:
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
STA.b $04
|
STA.b $04
|
||||||
|
|
||||||
LDX.w #$FFFD
|
LDX.w #$FFFD
|
||||||
@@ -327,44 +230,9 @@ CheckPrize:
|
|||||||
|
|
||||||
BRA .next_prize
|
BRA .next_prize
|
||||||
|
|
||||||
CheckNpcs:
|
|
||||||
LDA.b $CA
|
|
||||||
|
|
||||||
LDX.w #$FFFA
|
|
||||||
.next_npc
|
|
||||||
INX #6
|
|
||||||
LDA.l NpcItems, X
|
|
||||||
BMI .nope
|
|
||||||
|
|
||||||
CMP.b $CA
|
|
||||||
BNE .next_npc
|
|
||||||
|
|
||||||
LDA.l NpcItems+3, X ; get location of data to check
|
|
||||||
STA.b $05
|
|
||||||
|
|
||||||
LDA.l NpcItems+2, X
|
|
||||||
STA.b $04
|
|
||||||
|
|
||||||
LDA.b [$04]
|
|
||||||
AND.w #$00FF
|
|
||||||
AND.l NpcItems+5, X
|
|
||||||
BNE .next_npc
|
|
||||||
|
|
||||||
.yep
|
|
||||||
LDA.w NpcItemIndicator
|
|
||||||
ORA.w #$0001
|
|
||||||
STA.w NpcItemIndicator
|
|
||||||
RTS
|
|
||||||
|
|
||||||
.nope
|
|
||||||
LDA.w NpcItemIndicator
|
|
||||||
AND.w #$FF00
|
|
||||||
STA.w NpcItemIndicator
|
|
||||||
RTS
|
|
||||||
|
|
||||||
CheckPots:
|
CheckPots:
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
@@ -379,7 +247,6 @@ CheckPots:
|
|||||||
LDA.b [$04], Y
|
LDA.b [$04], Y
|
||||||
CMP.w #$FFFF : BEQ .done
|
CMP.w #$FFFF : BEQ .done
|
||||||
INX : INY : INY
|
INX : INY : INY
|
||||||
BIT.w #$4000 : BNE .multi_item ; marked as multi item
|
|
||||||
BIT.w #$8000 : BNE .major_item ; marked as major item
|
BIT.w #$8000 : BNE .major_item ; marked as major item
|
||||||
LDA.b [$04], Y
|
LDA.b [$04], Y
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
@@ -399,19 +266,8 @@ CheckPots:
|
|||||||
INY
|
INY
|
||||||
BRA .mask_set
|
BRA .mask_set
|
||||||
|
|
||||||
.multi_item
|
|
||||||
LDA.b [$04], Y
|
|
||||||
PHX
|
|
||||||
AND.w #$00FF
|
|
||||||
ASL A
|
|
||||||
TAX
|
|
||||||
LDA.l PotMultiWorldTable, X
|
|
||||||
PLX
|
|
||||||
BRA .item_id_set
|
|
||||||
|
|
||||||
.major_item
|
.major_item
|
||||||
LDA.b [$04], Y
|
LDA.b [$04], Y
|
||||||
.item_id_set
|
|
||||||
PHA
|
PHA
|
||||||
PHX
|
PHX
|
||||||
INY
|
INY
|
||||||
@@ -430,7 +286,7 @@ CheckPots:
|
|||||||
+
|
+
|
||||||
|
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
if !FEATURE_FIX_BASEROM
|
if !FEATURE_FIX_BASEROM
|
||||||
@@ -468,7 +324,7 @@ CheckJunkPot:
|
|||||||
+
|
+
|
||||||
|
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
LDA.l PotCollectionRateTable, X
|
LDA.l PotCollectionRateTable, X
|
||||||
@@ -496,17 +352,11 @@ endif
|
|||||||
|
|
||||||
CheckEnemies:
|
CheckEnemies:
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
|
LDA.l UWSpritesPointers, X
|
||||||
; get sprite pointer table
|
|
||||||
LDA.l $89C298 : STA.b $04
|
|
||||||
LDA.w #$0089 : STA.b $06
|
|
||||||
TXY
|
|
||||||
; get sprite pointer for room
|
|
||||||
LDA.b [$04], Y
|
|
||||||
INC A ; skip the layered/unlayered indicator
|
INC A ; skip the layered/unlayered indicator
|
||||||
STA.b $04
|
STA.b $04
|
||||||
LDA.w #bank(UWSpritesData)
|
LDA.w #bank(UWSpritesData)
|
||||||
@@ -586,7 +436,7 @@ CheckEnemies:
|
|||||||
+
|
+
|
||||||
|
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
@@ -616,19 +466,13 @@ GetLootClass:
|
|||||||
CMP.w #$0080 : BNE .not_compass
|
CMP.w #$0080 : BNE .not_compass
|
||||||
|
|
||||||
.compass
|
.compass
|
||||||
LDA.b $0E
|
LDA.l AlwaysShowCompass : BNE .check_value
|
||||||
AND.w #$00FF
|
|
||||||
CMP.w #$0002
|
|
||||||
BEQ .check_value
|
|
||||||
|
|
||||||
.not_compass
|
.not_compass
|
||||||
LDA.b $0E
|
LDA.b $0E
|
||||||
BEQ .done
|
BEQ .done
|
||||||
CMP.w #$0003
|
CMP.w #$0001
|
||||||
BCS .check_value
|
BEQ .value_set
|
||||||
|
|
||||||
LDA.w #$0001
|
|
||||||
BRA .value_set
|
|
||||||
|
|
||||||
.check_value
|
.check_value
|
||||||
LDA.l LootTypeMapping, X
|
LDA.l LootTypeMapping, X
|
||||||
@@ -651,13 +495,9 @@ GetPotJunkClass:
|
|||||||
|
|
||||||
LDA.b $0E
|
LDA.b $0E
|
||||||
BEQ .done
|
BEQ .done
|
||||||
CMP.w #$0003
|
CMP.w #$0001
|
||||||
BCS .check_value
|
BEQ .value_set
|
||||||
|
|
||||||
LDA.w #$0001
|
|
||||||
BRA .value_set
|
|
||||||
|
|
||||||
.check_value
|
|
||||||
; hardcode as junk for now
|
; hardcode as junk for now
|
||||||
LDA.w #$0002
|
LDA.w #$0002
|
||||||
|
|
||||||
@@ -674,7 +514,7 @@ macro DefineGetFooSection(type, offset)
|
|||||||
Get<type>Section:
|
Get<type>Section:
|
||||||
PHX
|
PHX
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$01FF
|
AND.w #$00FF
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
LDA.l SplitRooms, X
|
LDA.l SplitRooms, X
|
||||||
@@ -722,13 +562,13 @@ Check<type>Section:
|
|||||||
STA.b $CC
|
STA.b $CC
|
||||||
|
|
||||||
LDA.b $CB
|
LDA.b $CB
|
||||||
AND.w #$00F0
|
AND.w #$00FF
|
||||||
BEQ .yes
|
BEQ .yes
|
||||||
|
|
||||||
JSR Get<type>Section
|
JSR Get<type>Section
|
||||||
|
|
||||||
LDA.b $CB
|
LDA.b $CB
|
||||||
AND.w #$00F0
|
AND.w #$00FF
|
||||||
LSR A : LSR A : LSR A : LSR A
|
LSR A : LSR A : LSR A : LSR A
|
||||||
DEC A
|
DEC A
|
||||||
CMP.b $CE
|
CMP.b $CE
|
||||||
@@ -150,10 +150,7 @@ DrawFullRoomTile:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
DrawSingleRoomLoot:
|
DrawSingleRoomLoot:
|
||||||
LDA.l MapItems_enabled : AND.w #$00FF : BNE +
|
PHX : PHY
|
||||||
RTL
|
|
||||||
|
|
||||||
+ PHX : PHY
|
|
||||||
|
|
||||||
TYX
|
TYX
|
||||||
|
|
||||||
@@ -175,8 +172,7 @@ DrawSingleRoomLoot:
|
|||||||
STA.w GFXStripes+$0C, Y
|
STA.w GFXStripes+$0C, Y
|
||||||
|
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$F0FF
|
JSL CheckLoot
|
||||||
JSL CheckMapLoot
|
|
||||||
|
|
||||||
ASL A : ASL A : ASL A
|
ASL A : ASL A : ASL A
|
||||||
|
|
||||||
@@ -545,9 +541,7 @@ DrawStairs:
|
|||||||
LDA.w SpiralProps, Y
|
LDA.w SpiralProps, Y
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
STA.b $06
|
STA.b $06
|
||||||
BNE +
|
BEQ .done
|
||||||
JMP .done
|
|
||||||
+
|
|
||||||
|
|
||||||
STZ.b $02
|
STZ.b $02
|
||||||
INY
|
INY
|
||||||
@@ -584,14 +578,11 @@ DrawStairs:
|
|||||||
STA.b $CA
|
STA.b $CA
|
||||||
|
|
||||||
JSR GetSpecificRoomVisibility
|
JSR GetSpecificRoomVisibility
|
||||||
AND.w #$00FF
|
|
||||||
BNE +
|
BNE +
|
||||||
LDA.b $0E
|
LDA.b $0E
|
||||||
AND.w #$000F
|
AND.w #$000F
|
||||||
BEQ .ply_skip
|
BNE +
|
||||||
LDA.b $0B
|
BRA .ply_skip
|
||||||
AND.w #$00FF
|
|
||||||
BEQ .ply_skip
|
|
||||||
+
|
+
|
||||||
|
|
||||||
TYX
|
TYX
|
||||||
@@ -628,77 +619,32 @@ GetCurrentRoomVisibility:
|
|||||||
|
|
||||||
GetSpecificRoomVisibility:
|
GetSpecificRoomVisibility:
|
||||||
PHX
|
PHX
|
||||||
|
|
||||||
; figure out if room is dark without lamp
|
|
||||||
LDA.b $CA
|
|
||||||
AND.w #$00FF
|
|
||||||
ASL A
|
|
||||||
TAX
|
|
||||||
LDA.l RoomHeaderPointers, X
|
|
||||||
TAX
|
|
||||||
LDA.l bank(RoomHeaders)<<16, X
|
|
||||||
AND.w #$0001
|
|
||||||
BEQ .not_dark
|
|
||||||
|
|
||||||
SEP #$20
|
|
||||||
JSL LampCheck
|
|
||||||
REP #$20
|
|
||||||
BNE .not_dark
|
|
||||||
|
|
||||||
LDA.l LampCone
|
|
||||||
BIT.w #$0020 ; all rooms are lit
|
|
||||||
BNE .not_dark
|
|
||||||
|
|
||||||
LDA.l ShowRooms_dark_room_cap
|
|
||||||
AND.w #$00FF
|
|
||||||
CMP.w #$0006
|
|
||||||
BCS .not_dark
|
|
||||||
|
|
||||||
XBA
|
|
||||||
STA.b $0A
|
|
||||||
BRA .check_visibility
|
|
||||||
|
|
||||||
.not_dark
|
|
||||||
LDA.w #$0600
|
|
||||||
STA.b $0A
|
|
||||||
|
|
||||||
.check_visibility
|
|
||||||
SEP #$20
|
|
||||||
LDA.l ShowRooms_default
|
LDA.l ShowRooms_default
|
||||||
|
AND.w #$00FF
|
||||||
STA.b $0A
|
STA.b $0A
|
||||||
|
|
||||||
REP #$20
|
|
||||||
LDX.w DungeonID
|
LDX.w DungeonID
|
||||||
LDA.l MapField
|
LDA.l MapField
|
||||||
AND.l DungeonMask, X
|
AND.l DungeonMask, X
|
||||||
BEQ +
|
BEQ +
|
||||||
SEP #$20
|
|
||||||
LDA.l ShowRooms_have_map
|
LDA.l ShowRooms_have_map
|
||||||
|
AND.w #$00FF
|
||||||
CMP.b $0A
|
CMP.b $0A
|
||||||
BCC +
|
BCC +
|
||||||
STA.b $0A
|
STA.b $0A
|
||||||
+
|
+
|
||||||
|
|
||||||
REP #$20
|
|
||||||
LDX.w DungeonID
|
LDX.w DungeonID
|
||||||
LDA.l CompassField
|
LDA.l CompassField
|
||||||
AND.l DungeonMask, X
|
AND.l DungeonMask, X
|
||||||
BEQ +
|
BEQ +
|
||||||
SEP #$20
|
|
||||||
LDA.l ShowRooms_have_compass
|
LDA.l ShowRooms_have_compass
|
||||||
|
AND.w #$00FF
|
||||||
CMP.b $0A
|
CMP.b $0A
|
||||||
BCC +
|
BCC +
|
||||||
STA.b $0A
|
STA.b $0A
|
||||||
+
|
+
|
||||||
|
|
||||||
SEP #$20
|
|
||||||
LDA.b $0A
|
|
||||||
CMP.b $0B
|
|
||||||
BCC +
|
|
||||||
STA.b $0B
|
|
||||||
+
|
|
||||||
|
|
||||||
REP #$20
|
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
ASL A
|
ASL A
|
||||||
@@ -707,20 +653,13 @@ GetSpecificRoomVisibility:
|
|||||||
AND.w #$000F
|
AND.w #$000F
|
||||||
STA.b $0E
|
STA.b $0E
|
||||||
BEQ +
|
BEQ +
|
||||||
SEP #$20
|
|
||||||
LDA.l ShowRooms_visited_tile
|
LDA.l ShowRooms_visited_tile
|
||||||
|
AND.w #$00FF
|
||||||
CMP.b $0A
|
CMP.b $0A
|
||||||
BCC +
|
BCC +
|
||||||
CMP.b $0B
|
|
||||||
BCS .too_dark
|
|
||||||
STA.b $0A
|
|
||||||
BRA +
|
|
||||||
.too_dark
|
|
||||||
LDA.b $0B
|
|
||||||
STA.b $0A
|
STA.b $0A
|
||||||
+
|
+
|
||||||
|
|
||||||
REP #$20
|
|
||||||
PLX
|
PLX
|
||||||
LDA.b $0A
|
LDA.b $0A
|
||||||
RTS
|
RTS
|
||||||
@@ -766,7 +705,6 @@ DrawDropOrWarp:
|
|||||||
STA.b $CA
|
STA.b $CA
|
||||||
|
|
||||||
JSR GetSpecificRoomVisibility
|
JSR GetSpecificRoomVisibility
|
||||||
AND.w #$00FF
|
|
||||||
BNE +
|
BNE +
|
||||||
LDA.b $0E
|
LDA.b $0E
|
||||||
AND.w #$000F
|
AND.w #$000F
|
||||||
@@ -1240,7 +1178,7 @@ DrawDoorsMapBlinker:
|
|||||||
AND.w #$01E0
|
AND.w #$01E0
|
||||||
ASL A : ASL A : ASL A
|
ASL A : ASL A : ASL A
|
||||||
XBA
|
XBA
|
||||||
CLC : ADC.w #$00A5
|
CLC : ADC.w #$00A4
|
||||||
STA.w OAMBuffer, X
|
STA.w OAMBuffer, X
|
||||||
|
|
||||||
LDA.b LinkPosY
|
LDA.b LinkPosY
|
||||||
@@ -1464,8 +1402,8 @@ MoveDoorsMapCursor:
|
|||||||
BRA .done
|
BRA .done
|
||||||
|
|
||||||
.no_move
|
.no_move
|
||||||
; LDA.b #$3C
|
LDA.b #$3C
|
||||||
; STA.w $012E
|
STA.w $012E
|
||||||
|
|
||||||
.done
|
.done
|
||||||
PLP
|
PLP
|
||||||
@@ -1553,9 +1491,8 @@ DoorsMapNextEntrance:
|
|||||||
STA.b $CA
|
STA.b $CA
|
||||||
|
|
||||||
JSR GetSpecificRoomVisibility
|
JSR GetSpecificRoomVisibility
|
||||||
AND.w #$00FF
|
|
||||||
BNE .acceptable
|
BNE .acceptable
|
||||||
JMP .done
|
BEQ .done
|
||||||
|
|
||||||
+
|
+
|
||||||
TYX
|
TYX
|
||||||
@@ -1572,7 +1509,6 @@ DoorsMapNextEntrance:
|
|||||||
STA.b $CA
|
STA.b $CA
|
||||||
|
|
||||||
JSR GetSpecificRoomVisibility
|
JSR GetSpecificRoomVisibility
|
||||||
AND.w #$00FF
|
|
||||||
BNE .acceptable
|
BNE .acceptable
|
||||||
|
|
||||||
LDA.w #$0001
|
LDA.w #$0001
|
||||||
@@ -1602,9 +1538,6 @@ DoorsMapNextEntrance:
|
|||||||
LDA.b $00
|
LDA.b $00
|
||||||
AND.b $0E
|
AND.b $0E
|
||||||
BEQ .check_next
|
BEQ .check_next
|
||||||
LDA.b $0B
|
|
||||||
AND.w #$00FF
|
|
||||||
BEQ .check_next
|
|
||||||
|
|
||||||
.acceptable
|
.acceptable
|
||||||
PHX
|
PHX
|
||||||
@@ -1664,7 +1597,6 @@ FindFirstEntrance:
|
|||||||
STA.b $CA
|
STA.b $CA
|
||||||
|
|
||||||
JSR GetSpecificRoomVisibility
|
JSR GetSpecificRoomVisibility
|
||||||
AND.w #$00FF
|
|
||||||
BNE .acceptable
|
BNE .acceptable
|
||||||
|
|
||||||
LDA.w #$0001
|
LDA.w #$0001
|
||||||
@@ -1694,9 +1626,6 @@ FindFirstEntrance:
|
|||||||
LDA.b $00
|
LDA.b $00
|
||||||
AND.b $0E
|
AND.b $0E
|
||||||
BEQ .check_next
|
BEQ .check_next
|
||||||
LDA.b $0B
|
|
||||||
AND.w #$00FF
|
|
||||||
BEQ .check_next
|
|
||||||
|
|
||||||
.acceptable
|
.acceptable
|
||||||
PLP
|
PLP
|
||||||
@@ -1718,13 +1647,10 @@ DoorsMapChangeDungeon:
|
|||||||
BNE +
|
BNE +
|
||||||
INX
|
INX
|
||||||
+ LDA.l DungeonMapData.prev, X
|
+ LDA.l DungeonMapData.prev, X
|
||||||
STA.w DungeonID
|
|
||||||
CMP.b $00
|
CMP.b $00
|
||||||
BEQ .done
|
BEQ .done
|
||||||
|
|
||||||
JSL IsValidDungeonToSwapTo
|
STA.w DungeonID
|
||||||
BCC .next
|
|
||||||
|
|
||||||
JSL FindFirstEntrance
|
JSL FindFirstEntrance
|
||||||
CPY.b #$FF
|
CPY.b #$FF
|
||||||
BEQ .next
|
BEQ .next
|
||||||
@@ -1941,7 +1867,6 @@ DrawDoorsEntrances:
|
|||||||
BMI .check_dropdown
|
BMI .check_dropdown
|
||||||
|
|
||||||
JSR GetSpecificRoomVisibility
|
JSR GetSpecificRoomVisibility
|
||||||
AND.w #$00FF
|
|
||||||
BNE .draw_entrance
|
BNE .draw_entrance
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
@@ -1951,9 +1876,6 @@ DrawDoorsEntrances:
|
|||||||
PLX
|
PLX
|
||||||
AND.b $0E
|
AND.b $0E
|
||||||
BEQ .check_dropdown
|
BEQ .check_dropdown
|
||||||
LDA.b $0B
|
|
||||||
AND.w #$00FF
|
|
||||||
BEQ .check_dropdown
|
|
||||||
|
|
||||||
.draw_entrance
|
.draw_entrance
|
||||||
SEP #$30
|
SEP #$30
|
||||||
@@ -1984,7 +1906,6 @@ DrawDoorsEntrances:
|
|||||||
BMI .next_room
|
BMI .next_room
|
||||||
|
|
||||||
JSR GetSpecificRoomVisibility
|
JSR GetSpecificRoomVisibility
|
||||||
AND.w #$00FF
|
|
||||||
BNE .draw_dropdown
|
BNE .draw_dropdown
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
@@ -1993,13 +1914,7 @@ DrawDoorsEntrances:
|
|||||||
LDA.l DropdownQuadrantMasks, X
|
LDA.l DropdownQuadrantMasks, X
|
||||||
PLX
|
PLX
|
||||||
AND.b $0E
|
AND.b $0E
|
||||||
BEQ .goto_next_room
|
BEQ .next_room
|
||||||
LDA.b $0B
|
|
||||||
AND.w #$00FF
|
|
||||||
BNE .draw_dropdown
|
|
||||||
|
|
||||||
.goto_next_room
|
|
||||||
JMP .next_room
|
|
||||||
|
|
||||||
.draw_dropdown
|
.draw_dropdown
|
||||||
SEP #$30
|
SEP #$30
|
||||||
@@ -2049,6 +1964,7 @@ DrawDoorsStairs:
|
|||||||
INX : INX
|
INX : INX
|
||||||
LDA.l SpiralProps, X
|
LDA.l SpiralProps, X
|
||||||
|
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
@@ -2080,10 +1996,6 @@ DrawDoorsStairs:
|
|||||||
AND.b $0E
|
AND.b $0E
|
||||||
BEQ .skip
|
BEQ .skip
|
||||||
|
|
||||||
LDA.b $0B
|
|
||||||
CMP.b #$04
|
|
||||||
BCC .skip
|
|
||||||
|
|
||||||
.draw
|
.draw
|
||||||
LDY.b $00
|
LDY.b $00
|
||||||
LDA.b #$00
|
LDA.b #$00
|
||||||
@@ -2119,13 +2031,6 @@ DrawDoorsStairs:
|
|||||||
|
|
||||||
DetectLinksSection:
|
DetectLinksSection:
|
||||||
LDA.b RoomIndex
|
LDA.b RoomIndex
|
||||||
CMP.w #$0128
|
|
||||||
BCC +
|
|
||||||
|
|
||||||
LDA.w #$0000
|
|
||||||
RTL
|
|
||||||
+
|
|
||||||
|
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
LDA.l SplitRooms, X
|
LDA.l SplitRooms, X
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
File.open("supertile_shapes.asm", "r") do |file|
|
||||||
|
bytes = []
|
||||||
|
while line = file.gets
|
||||||
|
m = line.match(/dw \$(\h+), \$(\h+), \$(\h+), \$(\h+)/)
|
||||||
|
bytes += m.captures if m
|
||||||
|
break if bytes.length >= 4 * 0xE0
|
||||||
|
end
|
||||||
|
|
||||||
|
counts = []
|
||||||
|
for byte in bytes do
|
||||||
|
value = byte.to_i(16)
|
||||||
|
next if value == 0xFFFF
|
||||||
|
value = (value & 0x03FF) - 0x340
|
||||||
|
if not counts[value]
|
||||||
|
counts[value] = 0
|
||||||
|
end
|
||||||
|
counts[value] += 1
|
||||||
|
end
|
||||||
|
|
||||||
|
print(" ")
|
||||||
|
for col in 0...16
|
||||||
|
printf(" x%X", col)
|
||||||
|
end
|
||||||
|
puts
|
||||||
|
|
||||||
|
for row in 0...0xC
|
||||||
|
printf("%Xx", row + 4)
|
||||||
|
for col in 0...16
|
||||||
|
printf("%4d", counts[row * 16 + col] || 0)
|
||||||
|
end
|
||||||
|
puts
|
||||||
|
end
|
||||||
|
|
||||||
|
printf("Unused:")
|
||||||
|
for i in 0...0x80
|
||||||
|
printf(" %2X", i) unless counts[i]
|
||||||
|
end
|
||||||
|
puts
|
||||||
|
end
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
!TIER_LOW_KEY = $03
|
!TIER_LOW_KEY = $03
|
||||||
!TIER_HEALTH = $05
|
!TIER_HEALTH = $05
|
||||||
!TIER_MINOR = $06
|
!TIER_MINOR = $06
|
||||||
!TIER_COMPASS = $07
|
!TIER_MAP = $07
|
||||||
!TIER_MAP = $08
|
!TIER_COMPASS = $08
|
||||||
!TIER_SM_KEY = $09
|
!TIER_SM_KEY = $09
|
||||||
!TIER_BIG_KEY = $0A
|
!TIER_BIG_KEY = $0A
|
||||||
!TIER_MAJOR = $0B
|
!TIER_MAJOR = $0B
|
||||||
@@ -49,7 +49,7 @@ db !TIER_CRYSTAL ; 20 - Crystal
|
|||||||
db !TIER_MINOR ; 21 - Net
|
db !TIER_MINOR ; 21 - Net
|
||||||
db !TIER_MINOR ; 22 - Blue Mail
|
db !TIER_MINOR ; 22 - Blue Mail
|
||||||
db !TIER_MINOR ; 23 - Red Mail
|
db !TIER_MINOR ; 23 - Red Mail
|
||||||
db !TIER_SM_KEY ; 24 - Small Key
|
db !TIER_LOW_KEY ; 24 - Small Key
|
||||||
db !TIER_COMPASS ; 25 - Compass
|
db !TIER_COMPASS ; 25 - Compass
|
||||||
db !TIER_HEALTH ; 26 - Heart Container from 4/4
|
db !TIER_HEALTH ; 26 - Heart Container from 4/4
|
||||||
db !TIER_JUNK ; 27 - Bomb
|
db !TIER_JUNK ; 27 - Bomb
|
||||||
@@ -116,7 +116,7 @@ db !TIER_JUNK ; 62 - RNG pool item (single)
|
|||||||
db !TIER_JUNK ; 63 - RNG pool item (multi)
|
db !TIER_JUNK ; 63 - RNG pool item (multi)
|
||||||
db !TIER_MAJOR ; 64 - Progressive bow
|
db !TIER_MAJOR ; 64 - Progressive bow
|
||||||
db !TIER_MAJOR ; 65 - Progressive bow
|
db !TIER_MAJOR ; 65 - Progressive bow
|
||||||
db !TIER_HEALTH ; 66 - Potion refill (orange)
|
db !TIER_JUNK ; 66 -
|
||||||
db !TIER_JUNK ; 67 -
|
db !TIER_JUNK ; 67 -
|
||||||
db !TIER_JUNK ; 68 -
|
db !TIER_JUNK ; 68 -
|
||||||
db !TIER_JUNK ; 69 -
|
db !TIER_JUNK ; 69 -
|
||||||
@@ -26,7 +26,7 @@ db $01, $00, $05 ; ($0A) Single Staircase at Top of Bottom Left Quadrant
|
|||||||
db $01, $00, $04 ; ($0D) Moldorm
|
db $01, $00, $04 ; ($0D) Moldorm
|
||||||
db $02, $01, $00, $00, $02 ; ($10) Pod Basement
|
db $02, $01, $00, $00, $02 ; ($10) Pod Basement
|
||||||
db $03, $01, $0A, $02, $01, $00, $0B ; ($15) GT Entrance
|
db $03, $01, $0A, $02, $01, $00, $0B ; ($15) GT Entrance
|
||||||
db $02, $01, $03, $00, $04 ; ($1C) Hera Below Moldorm
|
db $02, $00, $03, $01, $04 ; ($1C) Hera Below Moldorm
|
||||||
db $02, $00, $01, $01, $0B ; ($21) PoD Bridge
|
db $02, $00, $01, $01, $0B ; ($21) PoD Bridge
|
||||||
db $01, $00, $08 ; ($26) GT Ice Armos
|
db $01, $00, $08 ; ($26) GT Ice Armos
|
||||||
db $03, $00, $01, $01, $0B, $02, $09 ; ($29) Swamp Statue
|
db $03, $00, $01, $01, $0B, $02, $09 ; ($29) Swamp Statue
|
||||||
@@ -39,7 +39,7 @@ SplitRooms:
|
|||||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||||
%d(.no) : %d(.no) : %d(.6a) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
%d(.no) : %d(.no) : %d(.6a) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||||
|
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.74) : %d(.75) : %d(.no) : %d(.no)
|
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.75) : %d(.no) : %d(.no)
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.7b) : %d(.7c) : %d(.7d) : %d(.no) : %d(.no)
|
%d(.no) : %d(.no) : %d(.no) : %d(.7b) : %d(.7c) : %d(.7d) : %d(.no) : %d(.no)
|
||||||
|
|
||||||
; 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F
|
; 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F
|
||||||
@@ -61,24 +61,7 @@ SplitRooms:
|
|||||||
%d(.no) : %d(.d1) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.d6) : %d(.no)
|
%d(.no) : %d(.d1) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.d6) : %d(.no)
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.db) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
%d(.no) : %d(.no) : %d(.no) : %d(.db) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||||
|
|
||||||
; E0
|
%d(.no)
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
|
||||||
|
|
||||||
; F0
|
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
|
||||||
|
|
||||||
; 100
|
|
||||||
%d(.no) : %d(.101) : %d(.no) : %d(.103) : %d(.no) : %d(.no) : %d(.106) : %d(.107)
|
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.10c) : %d(.no) : %d(.10e) : %d(.no)
|
|
||||||
|
|
||||||
; 110
|
|
||||||
%d(.no) : %d(.no) : %d(.112) : %d(.no) : %d(.114) : %d(.115) : %d(.no) : %d(.no)
|
|
||||||
%d(.no) : %d(.no) : %d(.no) : %d(.11b) : %d(.11c) : %d(.no) : %d(.11e) : %d(.11f)
|
|
||||||
|
|
||||||
; 120
|
|
||||||
%d(.120) : %d(.no) : %d(.122) : %d(.no) : %d(.124) : %d(.125) : %d(.126) : %d(.127)
|
|
||||||
|
|
||||||
.no
|
.no
|
||||||
db $00
|
db $00
|
||||||
@@ -452,7 +435,7 @@ db $01
|
|||||||
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(.no_items) : %d(.no_items)
|
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(.no_items) : %d(.no_items)
|
||||||
..areas
|
..areas
|
||||||
db $02, $00, $80, $00, $FF
|
db $02, $00, $80, $00, $FF
|
||||||
db $01, $34, $44, $B4, $FF
|
db $01, $34, $D4, $B8, $FF
|
||||||
db $FF
|
db $FF
|
||||||
..doors
|
..doors
|
||||||
db $03, $06
|
db $03, $06
|
||||||
@@ -586,344 +569,3 @@ db $FF
|
|||||||
..chests
|
..chests
|
||||||
db $01
|
db $01
|
||||||
db $FF
|
db $FF
|
||||||
|
|
||||||
.101 ; East Snitch House (2) // West Snitch House (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..pots
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.103 ; Man With Beds (3) // Front of Tavern (2) // Back of Tavern (1)
|
|
||||||
db $02
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas3) : %d(..doors3) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies3)
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas2) : %d(..doors2) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(..pots2) : %d(..enemies2)
|
|
||||||
..areas3
|
|
||||||
db $03, $80, $FF, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors3
|
|
||||||
db $08
|
|
||||||
db $FF
|
|
||||||
..enemies3
|
|
||||||
db $02
|
|
||||||
db $FF
|
|
||||||
..areas2
|
|
||||||
db $03, $00, $7F, $50, $FF
|
|
||||||
db $FF
|
|
||||||
..doors2
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..pots2
|
|
||||||
db $02
|
|
||||||
db $FF
|
|
||||||
..enemies2
|
|
||||||
db $00
|
|
||||||
db $01
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.106 ; VoO Chest Game (2) // Brewery (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.107 ; Library (2) // Bomb Refill Hut (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(.no_items)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.10c ; Mimic Cave (2) // Hookshot Fairy Pot (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(..chests) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..chests
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $04
|
|
||||||
db $05
|
|
||||||
db $06
|
|
||||||
db $07
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.10e ; Storyteller (2) // Storyteller (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..chests
|
|
||||||
db $FF
|
|
||||||
..pots
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.112 ; Dark Chapel (2) // Store (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.114 ; Waterfall Fairy (2) // Hint NPC (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(..chests) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..chests
|
|
||||||
db $00
|
|
||||||
db $01
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.115 ; Capacity Fairy (1) // Healing Fairy (2)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $80, $FF, $80, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $08
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.11b ; Cave 45 (2) // Graveyard Ledge (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..pots
|
|
||||||
db $00
|
|
||||||
db $01
|
|
||||||
db $02
|
|
||||||
db $03
|
|
||||||
db $04
|
|
||||||
db $05
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $01
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.11c ; Bomb Shop (2) // C-Shaped House (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.11e ; Long Fairy Cave (2) // Hype Cave (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $01
|
|
||||||
db $02
|
|
||||||
db $03
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.11f ; Lumberjack House (1) // Store (2)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $80, $FF, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $08
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.120 ; Ice Rod Cave (1) // Cool Bee Cave (2)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $80, $FF, $00, $FF
|
|
||||||
db $03, $80, $FF, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $08
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $01
|
|
||||||
db $02
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.122 ; Fortune Teller (2) // Other Fortune Teller (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.124 ; 50-Rupee Cave (1) // Bonk Rocks (2)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(..chests) : %d(.no_items) : %d(.no_items)
|
|
||||||
..areas
|
|
||||||
db $03, $80, $FF, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $08
|
|
||||||
db $FF
|
|
||||||
..chests
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.125 ; 20-Rupee Cave (2) // Spiky Hint Cave (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..pots
|
|
||||||
db $00
|
|
||||||
db $01
|
|
||||||
db $02
|
|
||||||
db $03
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $00
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.126 ; Bonk Fairy Pool (2) // Checkerboard Cave (1)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
|
||||||
..areas
|
|
||||||
db $03, $00, $7F, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $06
|
|
||||||
db $FF
|
|
||||||
..enemies
|
|
||||||
db $01
|
|
||||||
db $02
|
|
||||||
db $03
|
|
||||||
db $04
|
|
||||||
db $FF
|
|
||||||
|
|
||||||
.127 ; Hammer Pegs Cave (1) // Fake Dark Lake Hylia Spike Hint Cave (2)
|
|
||||||
db $01
|
|
||||||
%sq($00)
|
|
||||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
|
||||||
%d(.no_items) : %d(..pots) : %d(.no_items)
|
|
||||||
..areas
|
|
||||||
db $03, $80, $FF, $00, $FF
|
|
||||||
db $FF
|
|
||||||
..doors
|
|
||||||
db $08
|
|
||||||
db $FF
|
|
||||||
..pots
|
|
||||||
db $04
|
|
||||||
db $05
|
|
||||||
db $06
|
|
||||||
db $07
|
|
||||||
db $FF
|
|
||||||
@@ -112,7 +112,7 @@ dw $FFFF, $838E, $FFFF, $FFFF ; 6E
|
|||||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 6F - unused
|
dw $FFFF, $FFFF, $FFFF, $FFFF ; 6F - unused
|
||||||
dw $43BA, $FFFF, $FFFF, $FFFF ; 70
|
dw $43BA, $FFFF, $FFFF, $FFFF ; 70
|
||||||
dw $039A, $FFFF, $4365, $438D ; 71
|
dw $039A, $FFFF, $4365, $438D ; 71
|
||||||
dw $437A, $037A, $03C1, $0342 ; 72 - slight cheating I guess...
|
dw $437A, $037A, $8386, $0342 ; 72 - slight cheating I guess...
|
||||||
dw $038F, $038F, $839B, $0366 ; 73
|
dw $038F, $038F, $839B, $0366 ; 73
|
||||||
dw $43B2, $03B2, $43A8, $03A8 ; 74
|
dw $43B2, $03B2, $43A8, $03A8 ; 74
|
||||||
dw $038F, $83B4, $0365, $03B5 ; 75
|
dw $038F, $83B4, $0365, $03B5 ; 75
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
RedrawLoot:
|
RedrawLoot:
|
||||||
SEP #$20
|
|
||||||
JSL DrawLoot
|
JSL DrawLoot
|
||||||
|
|
||||||
; what we wrote over
|
; what we wrote over
|
||||||
@@ -31,18 +30,18 @@ DrawLoot:
|
|||||||
STA.w $021B
|
STA.w $021B
|
||||||
|
|
||||||
LDA.l DRMode
|
LDA.l DRMode
|
||||||
BNE .skip
|
BEQ +
|
||||||
|
LDA.l DungeonMapMode
|
||||||
LDA.l MapItems_enabled
|
BNE +
|
||||||
BEQ .skip
|
BRA .skip
|
||||||
|
+
|
||||||
REP #$30
|
REP #$30
|
||||||
PHX : PHY
|
PHX : PHY
|
||||||
|
|
||||||
STZ.b $0E
|
STZ.b $0E
|
||||||
|
|
||||||
LDX.w DungeonID
|
LDX.w DungeonID
|
||||||
LDA.l DungeonMapRoomPointers, X
|
JSL LoadDungeonMapRoomPointer
|
||||||
STA.b $72
|
STA.b $72
|
||||||
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
@@ -74,52 +73,65 @@ DrawLoot:
|
|||||||
DrawSingleFloorLoot:
|
DrawSingleFloorLoot:
|
||||||
REP #$20
|
REP #$20
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
|
INC A
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
%ADD_MapMode()
|
||||||
|
|
||||||
LDA.l DungeonMapFloorToDataOffset, X
|
LDA.l MapDrawingData_floor_data_offset, X
|
||||||
CLC : ADC.w #$0018 ; get to end of floor
|
DEC A
|
||||||
TAY
|
TAY
|
||||||
|
|
||||||
|
%LDX_MapMode()
|
||||||
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.b #$04
|
LDA.l MapDrawingData_column_count, X
|
||||||
|
DEC A
|
||||||
STA.b $06
|
STA.b $06
|
||||||
|
|
||||||
LDA.b #$04
|
LDA.l MapDrawingData_row_count, X
|
||||||
|
DEC A
|
||||||
STA.b $07
|
STA.b $07
|
||||||
|
|
||||||
.next_row
|
.next_row
|
||||||
REP #$20
|
REP #$20
|
||||||
LDA.w GFXStripes
|
LDA.w GFXStripes
|
||||||
TAX
|
TAX
|
||||||
CLC : ADC.w #$0030
|
CLC : ADC.w #$0034
|
||||||
STA.w GFXStripes
|
STA.w GFXStripes
|
||||||
|
|
||||||
|
PHX
|
||||||
|
%LDX_MapMode()
|
||||||
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.b $07
|
LDA.b $07
|
||||||
|
CPX.w #$0002
|
||||||
|
BNE +
|
||||||
|
ASL A
|
||||||
|
+
|
||||||
CLC : ADC.b $07
|
CLC : ADC.b $07
|
||||||
REP #$20
|
REP #$20
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
ASL #5
|
ASL #5
|
||||||
|
|
||||||
CLC : ADC.w #$1092
|
CLC : ADC.l MapDrawingData_bg1_grid_start, X
|
||||||
ADC.b $0E
|
ADC.b $0E
|
||||||
XBA
|
XBA
|
||||||
|
PLX
|
||||||
STA.w GFXStripes+$02, X
|
STA.w GFXStripes+$02, X
|
||||||
CLC : ADC.w #$2000
|
CLC : ADC.w #$2000
|
||||||
STA.w GFXStripes+$1A, X
|
|
||||||
|
|
||||||
LDA.w #$1300
|
|
||||||
STA.w GFXStripes+$04, X
|
|
||||||
STA.w GFXStripes+$1C, X
|
STA.w GFXStripes+$1C, X
|
||||||
|
|
||||||
|
LDA.w #$1500
|
||||||
|
STA.w GFXStripes+$04, X
|
||||||
|
STA.w GFXStripes+$1E, X
|
||||||
|
|
||||||
TXA
|
TXA
|
||||||
CLC : ADC.w #$0016
|
CLC : ADC.w #$0018
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
.next_room
|
.next_room
|
||||||
REP #$20
|
REP #$20
|
||||||
LDA.b ($72), Y ; get room id
|
LDA.b [$72], Y ; get room id
|
||||||
PHY
|
PHY
|
||||||
|
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
@@ -129,7 +141,7 @@ DrawSingleFloorLoot:
|
|||||||
LDA.w #$0000
|
LDA.w #$0000
|
||||||
BRA +
|
BRA +
|
||||||
.valid_room
|
.valid_room
|
||||||
JSL CheckMapLoot
|
JSL CheckLoot
|
||||||
+
|
+
|
||||||
ASL A : ASL A : ASL A
|
ASL A : ASL A : ASL A
|
||||||
|
|
||||||
@@ -141,24 +153,49 @@ DrawSingleFloorLoot:
|
|||||||
LDA.l LootTypeIcons+2, X
|
LDA.l LootTypeIcons+2, X
|
||||||
STA.w GFXStripes+$02, Y
|
STA.w GFXStripes+$02, Y
|
||||||
LDA.l LootTypeIcons+4, X
|
LDA.l LootTypeIcons+4, X
|
||||||
STA.w GFXStripes+$18, Y
|
|
||||||
LDA.l LootTypeIcons+6, X
|
|
||||||
STA.w GFXStripes+$1A, Y
|
STA.w GFXStripes+$1A, Y
|
||||||
|
LDA.l LootTypeIcons+6, X
|
||||||
|
STA.w GFXStripes+$1C, Y
|
||||||
|
|
||||||
TYX
|
TYX
|
||||||
PLY
|
PLY
|
||||||
DEY : DEX #4
|
DEY : DEX #4
|
||||||
|
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BEQ +
|
||||||
|
LDA.b $06
|
||||||
|
AND.w #$00FF
|
||||||
|
BEQ +
|
||||||
|
|
||||||
|
; skip a column if in 4x3 mode and it's not the last column
|
||||||
|
LDA.w #$0300
|
||||||
|
STA.w GFXStripes+$02, X
|
||||||
|
STA.w GFXStripes+$1C, X
|
||||||
|
DEX : DEX
|
||||||
|
+
|
||||||
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
DEC.b $06
|
DEC.b $06
|
||||||
BPL .next_room
|
BPL .next_room
|
||||||
|
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BNE +
|
||||||
|
; draw an extra empty tile at the end to make up for width differences between modes
|
||||||
|
LDA.b #$03
|
||||||
|
STZ.w GFXStripes+$02, X
|
||||||
|
STA.w GFXStripes+$03, X
|
||||||
|
STZ.w GFXStripes+$1C, X
|
||||||
|
STA.w GFXStripes+$1D, X
|
||||||
|
+
|
||||||
|
|
||||||
DEC.b $07
|
DEC.b $07
|
||||||
BMI .done
|
BMI .done
|
||||||
|
|
||||||
LDA.b #$00
|
LDA.b #$00
|
||||||
XBA
|
XBA
|
||||||
LDA.b #$04
|
%LDX_MapMode()
|
||||||
|
LDA.l MapDrawingData_column_count, X
|
||||||
|
DEC A
|
||||||
STA.b $06
|
STA.b $06
|
||||||
|
|
||||||
JMP .next_row
|
JMP .next_row
|
||||||
@@ -5,49 +5,18 @@ DrawNonexistentRoom:
|
|||||||
STA.l $7F0002, X
|
STA.l $7F0002, X
|
||||||
STA.l $7F0040, X
|
STA.l $7F0040, X
|
||||||
STA.l $7F0042, X
|
STA.l $7F0042, X
|
||||||
JML $8AE7F2
|
|
||||||
|
|
||||||
GetVisibilityProps:
|
FinishRoom:
|
||||||
PHX
|
PHX
|
||||||
ASL A : ASL A
|
%LDX_MapMode()
|
||||||
|
PLA
|
||||||
|
CLC : ADC.l MapDrawingData_column_spacing, X
|
||||||
TAX
|
TAX
|
||||||
LDA.b $0C
|
JML $8AE7F6
|
||||||
AND.l .visibility_props, X
|
|
||||||
ORA.l .visibility_props+2, X
|
|
||||||
STA.b $0C
|
|
||||||
PLX
|
|
||||||
RTS
|
|
||||||
|
|
||||||
.visibility_props:
|
|
||||||
dw $0000, $0F00
|
|
||||||
dw $C000, $174F
|
|
||||||
dw $C000, $174F
|
|
||||||
dw $0000, $1400
|
|
||||||
dw $0000, $1000
|
|
||||||
dw $0000, $0C00
|
|
||||||
dw $0000, $0800
|
|
||||||
|
|
||||||
; A = room shape
|
|
||||||
; $0C = visibility props
|
|
||||||
GetQuadrantTile:
|
|
||||||
PHA
|
|
||||||
|
|
||||||
LDA.b $0C
|
|
||||||
AND.w #$03FF
|
|
||||||
BNE .square
|
|
||||||
|
|
||||||
PLA
|
|
||||||
ORA.b $0C
|
|
||||||
RTS
|
|
||||||
|
|
||||||
.square
|
|
||||||
PLA
|
|
||||||
LDA.b $0C
|
|
||||||
RTS
|
|
||||||
|
|
||||||
NormalDrawDungeonMapRoom:
|
NormalDrawDungeonMapRoom:
|
||||||
JSL DrawDungeonMapRoom
|
JSL DrawDungeonMapRoom
|
||||||
JML $8AE7F2
|
JMP FinishRoom
|
||||||
|
|
||||||
; $CA has room_id
|
; $CA has room_id
|
||||||
; $0E has quadrant flags
|
; $0E has quadrant flags
|
||||||
@@ -57,7 +26,62 @@ DrawDungeonMapRoom:
|
|||||||
PHB : PHK : PLB ; need to keep this in same bank as data, or else specify bank
|
PHB : PHK : PLB ; need to keep this in same bank as data, or else specify bank
|
||||||
LDA.b $0A : PHA
|
LDA.b $0A : PHA
|
||||||
|
|
||||||
JSR GetSpecificRoomVisibility
|
LDA.l ShowRooms_default
|
||||||
|
AND.w #$00FF
|
||||||
|
STA.b $0A
|
||||||
|
|
||||||
|
PHX
|
||||||
|
|
||||||
|
LDX.w DungeonID
|
||||||
|
LDA.l MapField
|
||||||
|
AND.l DungeonMask, X
|
||||||
|
BEQ +
|
||||||
|
LDA.l ShowRooms_have_map
|
||||||
|
AND.w #$00FF
|
||||||
|
CMP.b $0A
|
||||||
|
BCC +
|
||||||
|
STA.b $0A
|
||||||
|
+
|
||||||
|
|
||||||
|
LDX.w DungeonID
|
||||||
|
LDA.l CompassField
|
||||||
|
AND.l DungeonMask, X
|
||||||
|
BEQ +
|
||||||
|
LDA.l ShowRooms_have_compass
|
||||||
|
AND.w #$00FF
|
||||||
|
CMP.b $0A
|
||||||
|
BCC +
|
||||||
|
STA.b $0A
|
||||||
|
+
|
||||||
|
|
||||||
|
LDA.b $0E
|
||||||
|
AND.w #$000F
|
||||||
|
BEQ +
|
||||||
|
LDA.l ShowRooms_visited_tile
|
||||||
|
AND.w #$00FF
|
||||||
|
CMP.b $0A
|
||||||
|
BCC +
|
||||||
|
STA.b $0A
|
||||||
|
+
|
||||||
|
|
||||||
|
PLX
|
||||||
|
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BEQ +
|
||||||
|
LDA.b $0A
|
||||||
|
CMP.w #$0003
|
||||||
|
BCS +
|
||||||
|
JSL ClearAdjacentConnections
|
||||||
|
+
|
||||||
|
|
||||||
|
LDA.b $0A : BNE + : LDA.w #$0F00 : BRA ++
|
||||||
|
+ DEC A : BNE + : LDA.w #$174F : BRA ++
|
||||||
|
+ DEC A : BNE + : LDA.w #$174F : BRA ++
|
||||||
|
+ DEC A : BNE + : LDA.w #$1400 : BRA ++
|
||||||
|
+ DEC A : BNE + : LDA.w #$1000 : BRA ++
|
||||||
|
+ DEC A : BNE + : LDA.w #$0C00 : BRA ++
|
||||||
|
+ LDA.w #$0800
|
||||||
|
++ STA.b $0C
|
||||||
|
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
@@ -65,44 +89,49 @@ DrawDungeonMapRoom:
|
|||||||
TAY
|
TAY
|
||||||
|
|
||||||
macro DrawQuadrant(quadrant, writeOffset)
|
macro DrawQuadrant(quadrant, writeOffset)
|
||||||
.draw_quadrant_<quadrant>:
|
?DrawQuadrant:
|
||||||
LDA.w #(3-<quadrant>)<<14
|
LDA.w SupertileRoomShapes+(2*<quadrant>), Y
|
||||||
STA.b $0C
|
CMP.w #$FFFF : BEQ ?.empty
|
||||||
|
PHA
|
||||||
|
LDA.b $0E
|
||||||
|
AND.w #1<<(3-<quadrant>)
|
||||||
|
BNE ?.visited
|
||||||
|
|
||||||
LDA.b $0E
|
?.unvisited
|
||||||
BIT.w #1<<(3-<quadrant>)
|
LDA.b $0A
|
||||||
BNE ..visited
|
CMP.w #$0003
|
||||||
|
BCS ?.shape
|
||||||
|
|
||||||
LDA.b $0A
|
?.square
|
||||||
BRA ..continue
|
PLA
|
||||||
|
LDA.b $0C
|
||||||
|
EOR.w #(3-<quadrant>)<<14
|
||||||
|
BRA ?.write
|
||||||
|
|
||||||
..visited
|
?.shape
|
||||||
LDA.b $0B
|
PLA
|
||||||
|
ORA.b $0C
|
||||||
|
BRA ?.write
|
||||||
|
|
||||||
..continue
|
?.visited
|
||||||
AND.w #$00FF
|
PLA
|
||||||
JSR GetVisibilityProps
|
ORA.w #$0800
|
||||||
|
BRA ?.write
|
||||||
|
|
||||||
LDA.w SupertileRoomShapes+(2*<quadrant>), Y
|
?.empty
|
||||||
CMP.w #$FFFF : BNE ..get_quadrant
|
LDA.b $0A
|
||||||
LDA.b $0A
|
CMP.w #$0001
|
||||||
AND.w #$00FF
|
BEQ ?.full_square
|
||||||
CMP.w #$0001
|
LDA.w #$0F00
|
||||||
BNE ..empty
|
BRA ?.write
|
||||||
|
|
||||||
..full_square
|
?.full_square
|
||||||
LDA.b $0C
|
LDA.w #$174F
|
||||||
BRA ..write
|
EOR.w #(3-<quadrant>)<<14
|
||||||
|
|
||||||
..get_quadrant
|
?.write
|
||||||
JSR GetQuadrantTile
|
STA.l $7F0000+<writeOffset>, X
|
||||||
BRA ..write
|
?.done
|
||||||
|
|
||||||
..empty
|
|
||||||
LDA.w #$0F00
|
|
||||||
|
|
||||||
..write
|
|
||||||
STA.l $7F0000+<writeOffset>, X
|
|
||||||
endmacro
|
endmacro
|
||||||
|
|
||||||
%DrawQuadrant(0, $00)
|
%DrawQuadrant(0, $00)
|
||||||
@@ -121,7 +150,7 @@ DrawEntrances:
|
|||||||
LDA.b $06 : PHA
|
LDA.b $06 : PHA
|
||||||
|
|
||||||
LDX.w DungeonID
|
LDX.w DungeonID
|
||||||
LDA.l DungeonMapRoomPointers, X
|
JSL LoadDungeonMapRoomPointer
|
||||||
STA.b $72
|
STA.b $72
|
||||||
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
@@ -152,18 +181,23 @@ DrawSingleFloorEntrances:
|
|||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
LDA.l DungeonMapFloorToDataOffset, X
|
%ADD_MapMode()
|
||||||
|
LDA.l MapDrawingData_floor_data_offset, X
|
||||||
TAY
|
TAY
|
||||||
STZ.b $06
|
STZ.b $06
|
||||||
|
|
||||||
|
%LDX_MapMode()
|
||||||
|
|
||||||
.next_room
|
.next_room
|
||||||
REP #$20
|
REP #$20
|
||||||
LDA.b ($72), Y ; get room id
|
LDA.b [$72], Y ; get room id
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
CMP.w #$000F ; $0F = empty room
|
CMP.w #$000F ; $0F = empty room
|
||||||
|
|
||||||
BEQ +
|
BEQ +
|
||||||
|
PHX
|
||||||
JSR DrawSingleRoomEntrances
|
JSR DrawSingleRoomEntrances
|
||||||
|
PLX
|
||||||
+
|
+
|
||||||
|
|
||||||
INY
|
INY
|
||||||
@@ -171,13 +205,13 @@ DrawSingleFloorEntrances:
|
|||||||
SEP #$20
|
SEP #$20
|
||||||
INC.b $06
|
INC.b $06
|
||||||
LDA.b $06
|
LDA.b $06
|
||||||
CMP.b #$05
|
CMP.l MapDrawingData_column_count, X
|
||||||
BCC .next_room
|
BCC .next_room
|
||||||
|
|
||||||
STZ.b $06
|
STZ.b $06
|
||||||
- INC.b $07
|
- INC.b $07
|
||||||
LDA.b $07
|
LDA.b $07
|
||||||
CMP.b #$05
|
CMP.l MapDrawingData_row_count, X
|
||||||
BCC .next_room
|
BCC .next_room
|
||||||
|
|
||||||
.done
|
.done
|
||||||
@@ -199,7 +233,8 @@ macro DrawSingleEntrance(offset)
|
|||||||
?+
|
?+
|
||||||
CLC : ADC.b $06
|
CLC : ADC.b $06
|
||||||
ASL #3
|
ASL #3
|
||||||
CLC : ADC.b #$90+<offset>
|
CLC : ADC.b #<offset>
|
||||||
|
CLC : ADC.l MapDrawingData_sprite_offset_x_base, X
|
||||||
STA.w OAMBuffer+0, Y
|
STA.w OAMBuffer+0, Y
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
@@ -210,10 +245,13 @@ macro DrawSingleEntrance(offset)
|
|||||||
?+
|
?+
|
||||||
CLC : ADC.b $07
|
CLC : ADC.b $07
|
||||||
ASL #3
|
ASL #3
|
||||||
|
PHA
|
||||||
|
|
||||||
LDX.b $02
|
LDA.b $02
|
||||||
|
%ADD_MapMode()
|
||||||
|
|
||||||
CLC : ADC.l DungeonMapRoomMarkerYBase, X
|
PLA
|
||||||
|
CLC : ADC.l MapDrawingData_sprite_offset_y_base, X
|
||||||
PLX
|
PLX
|
||||||
CLC : ADC.b #$08
|
CLC : ADC.b #$08
|
||||||
CLC : ADC.w $0213
|
CLC : ADC.w $0213
|
||||||
@@ -233,6 +271,8 @@ DrawSingleRoomEntrances:
|
|||||||
STA.b $0E
|
STA.b $0E
|
||||||
PHY
|
PHY
|
||||||
|
|
||||||
|
%LDY_MapMode()
|
||||||
|
|
||||||
SEP #$10
|
SEP #$10
|
||||||
|
|
||||||
LDX.b #$FE
|
LDX.b #$FE
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
CheckSwitchMap:
|
CheckSwitchMap:
|
||||||
LDA.l DRMode
|
LDA.l DRMode
|
||||||
BEQ .not_fancy_door_map
|
BEQ .not_fancy_door_map
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BNE .not_fancy_door_map
|
||||||
|
|
||||||
; fancy door map
|
; fancy door map
|
||||||
SEP #$20
|
SEP #$20
|
||||||
@@ -42,8 +44,6 @@ CheckSwitchMap:
|
|||||||
BRA .doors_done
|
BRA .doors_done
|
||||||
|
|
||||||
.change_dungeon
|
.change_dungeon
|
||||||
LDA.l MapSwapping
|
|
||||||
BEQ .doors_done
|
|
||||||
JSL DoorsMapChangeDungeon
|
JSL DoorsMapChangeDungeon
|
||||||
BRA .doors_done
|
BRA .doors_done
|
||||||
|
|
||||||
@@ -61,14 +61,10 @@ CheckSwitchMap:
|
|||||||
|
|
||||||
.not_fancy_door_map
|
.not_fancy_door_map
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.l MapSwapping
|
|
||||||
BEQ .no_swap
|
|
||||||
|
|
||||||
LDA.b $F6
|
LDA.b $F6
|
||||||
AND.b #$30
|
AND.b #$30
|
||||||
BNE .do_swap
|
BNE +
|
||||||
|
|
||||||
.no_swap
|
|
||||||
; what we wrote over
|
; what we wrote over
|
||||||
REP #$20
|
REP #$20
|
||||||
LDA.w DungeonMapFloorCountData, X
|
LDA.w DungeonMapFloorCountData, X
|
||||||
@@ -76,20 +72,15 @@ CheckSwitchMap:
|
|||||||
CLC : ADC.b $00
|
CLC : ADC.b $00
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
.do_swap
|
+ PHA
|
||||||
TXA
|
TXA
|
||||||
.try_next
|
|
||||||
ASL A
|
ASL A
|
||||||
TAX
|
TAX
|
||||||
LDA.b $F6
|
PLA
|
||||||
BIT.b #$20
|
BIT.b #$20
|
||||||
BNE +
|
BNE +
|
||||||
INX
|
INX
|
||||||
+
|
+ LDA.l DungeonMapData.prev, X
|
||||||
|
|
||||||
LDA.l DungeonMapData.prev, X
|
|
||||||
JSL IsValidDungeonToSwapTo
|
|
||||||
BCC .try_next
|
|
||||||
STA.w DungeonID
|
STA.w DungeonID
|
||||||
|
|
||||||
LDA.b #$04
|
LDA.b #$04
|
||||||
@@ -98,58 +89,6 @@ CheckSwitchMap:
|
|||||||
LDA.w #$0000
|
LDA.w #$0000
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
; in A = dungeon ID to check
|
|
||||||
; out C - CC = not valid, CS = valid
|
|
||||||
IsValidDungeonToSwapTo:
|
|
||||||
CMP.l CachedDungeonID ; dungeon we're in is always valid
|
|
||||||
BNE +
|
|
||||||
SEC
|
|
||||||
RTL
|
|
||||||
+
|
|
||||||
|
|
||||||
PHP
|
|
||||||
REP #$20
|
|
||||||
PHX : PHA
|
|
||||||
TAX
|
|
||||||
|
|
||||||
LDA.l MapSwapping
|
|
||||||
BIT.w #$0080
|
|
||||||
BNE .yes
|
|
||||||
|
|
||||||
BIT.w #$0001
|
|
||||||
BEQ +
|
|
||||||
; check visited flag
|
|
||||||
LDA.l SwapMasks, X
|
|
||||||
AND.l DungeonVisited
|
|
||||||
BNE .yes
|
|
||||||
+
|
|
||||||
|
|
||||||
LDA.l MapSwapping : BIT.w #$0002
|
|
||||||
BEQ +
|
|
||||||
; check map flag
|
|
||||||
LDA.l SwapMasks, X
|
|
||||||
AND.l MapField
|
|
||||||
BNE .yes
|
|
||||||
+
|
|
||||||
|
|
||||||
.no
|
|
||||||
PLA : PLX
|
|
||||||
PLP
|
|
||||||
CLC
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.yes
|
|
||||||
PLA : PLX
|
|
||||||
PLP
|
|
||||||
SEC
|
|
||||||
RTL
|
|
||||||
|
|
||||||
SwapMasks:
|
|
||||||
dw $C000, $C000, $2000, $1000
|
|
||||||
dw $0800, $0400, $0200, $0100
|
|
||||||
dw $0080, $0040, $0020, $0010
|
|
||||||
dw $0008, $0004, $0002, $0001
|
|
||||||
|
|
||||||
DungeonMapSwitch_Submodule:
|
DungeonMapSwitch_Submodule:
|
||||||
JSL $80893D
|
JSL $80893D
|
||||||
JSL $80833F
|
JSL $80833F
|
||||||
@@ -221,6 +160,10 @@ SkipMapSprites:
|
|||||||
|
|
||||||
LDA.l DRMode
|
LDA.l DRMode
|
||||||
BEQ +
|
BEQ +
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BEQ .no_vanilla_draw
|
||||||
|
JML $8AEADE
|
||||||
|
.no_vanilla_draw
|
||||||
JSL DrawDoorsMapSprites
|
JSL DrawDoorsMapSprites
|
||||||
JML $8AEAFC
|
JML $8AEAFC
|
||||||
+
|
+
|
||||||
@@ -238,6 +181,19 @@ CacheCurrentDungeon:
|
|||||||
STA.l CachedDungeonID
|
STA.l CachedDungeonID
|
||||||
LDA.b CurrentFloor
|
LDA.b CurrentFloor
|
||||||
STA.l CachedCurrentFloor
|
STA.l CachedCurrentFloor
|
||||||
|
|
||||||
|
LDA.l DRMode
|
||||||
|
BEQ +
|
||||||
|
|
||||||
|
LDA.w DungeonID
|
||||||
|
PHX
|
||||||
|
ASL A
|
||||||
|
TAX
|
||||||
|
LDA.l DungeonMapData.floor, X
|
||||||
|
STA.b $A4
|
||||||
|
PLX
|
||||||
|
|
||||||
|
+
|
||||||
REP #$20
|
REP #$20
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
@@ -287,35 +243,45 @@ DrawDungeonLabel:
|
|||||||
CLC : ADC.w #$0008
|
CLC : ADC.w #$0008
|
||||||
TAY
|
TAY
|
||||||
|
|
||||||
LDA.l MapSwapping
|
|
||||||
BEQ +
|
|
||||||
; L/R switch indicators
|
; L/R switch indicators
|
||||||
LDA.w #$E360
|
LDA.w #$E310
|
||||||
STA.w GFXStripes+$02, Y
|
STA.w GFXStripes+$02, Y
|
||||||
LDA.w #$E960
|
LDA.w #$E910
|
||||||
STA.w GFXStripes+$0A, Y
|
STA.w GFXStripes+$0A, Y
|
||||||
|
LDA.w #$E318
|
||||||
|
STA.w GFXStripes+$12, Y
|
||||||
|
LDA.w #$E918
|
||||||
|
STA.w GFXStripes+$1A, Y
|
||||||
|
|
||||||
LDA.w #$0300
|
LDA.w #$0300
|
||||||
STA.w GFXStripes+$04, Y
|
STA.w GFXStripes+$04, Y
|
||||||
STA.w GFXStripes+$0C, Y
|
STA.w GFXStripes+$0C, Y
|
||||||
|
STA.w GFXStripes+$14, Y
|
||||||
|
STA.w GFXStripes+$1C, Y
|
||||||
|
|
||||||
LDA.w #$65BF
|
LDA.w #$49AF
|
||||||
STA.w GFXStripes+$06, Y
|
STA.w GFXStripes+$06, Y
|
||||||
LDA.w #$25BD
|
STA.w GFXStripes+$16, Y
|
||||||
|
LDA.w #$099E
|
||||||
STA.w GFXStripes+$08, Y
|
STA.w GFXStripes+$08, Y
|
||||||
|
STA.w GFXStripes+$18, Y
|
||||||
|
|
||||||
LDA.w #$25BE
|
LDA.w #$099F
|
||||||
STA.w GFXStripes+$0E, Y
|
STA.w GFXStripes+$0E, Y
|
||||||
LDA.w #$25BF
|
STA.w GFXStripes+$1E, Y
|
||||||
|
LDA.w #$09AF
|
||||||
STA.w GFXStripes+$10, Y
|
STA.w GFXStripes+$10, Y
|
||||||
|
STA.w GFXStripes+$20, Y
|
||||||
|
|
||||||
TYA
|
TYA
|
||||||
CLC : ADC.w #$0010
|
CLC : ADC.w #$0020
|
||||||
TAY
|
TAY
|
||||||
+
|
|
||||||
|
|
||||||
LDA.l DRMode
|
LDA.l DRMode
|
||||||
BNE .doors
|
BEQ .not_doors
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BEQ .doors
|
||||||
|
.not_doors
|
||||||
JMP .skip_doors
|
JMP .skip_doors
|
||||||
|
|
||||||
.doors
|
.doors
|
||||||
@@ -394,25 +360,30 @@ StartCurrentRoomSearch:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
FindCurrentRoom:
|
FindCurrentRoom:
|
||||||
LDA.w DungeonMapFloorToDataOffset, Y
|
PHX
|
||||||
|
TYA
|
||||||
|
%ADD_MapMode()
|
||||||
|
LDA.l MapDrawingData_floor_data_offset, X
|
||||||
STA.b $0C
|
STA.b $0C
|
||||||
LDY.w #$0000
|
LDY.w #$0000
|
||||||
|
|
||||||
|
%LDX_MapMode()
|
||||||
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
|
|
||||||
.next_room_check
|
.next_room_check
|
||||||
CPY.b $0C
|
CPY.b $0C
|
||||||
BCS .not_found
|
BCS .not_found
|
||||||
|
|
||||||
LDA.b ($04), Y
|
LDA.b [$72], Y
|
||||||
INY
|
INY
|
||||||
CMP.b $0E
|
CMP.b $0E
|
||||||
BEQ .found
|
BEQ .found
|
||||||
|
|
||||||
LDA.b $00
|
LDA.b $00
|
||||||
CMP.b #$40
|
CMP.l MapDrawingData_floor_pixel_column_wrap, X
|
||||||
BCS .next_row
|
BCS .next_row
|
||||||
|
CLC : ADC.l MapDrawingData_supertile_pixel_spacing, X
|
||||||
CLC : ADC.b #$10
|
|
||||||
STA.b $00
|
STA.b $00
|
||||||
BRA .next_room_check
|
BRA .next_room_check
|
||||||
|
|
||||||
@@ -420,9 +391,9 @@ FindCurrentRoom:
|
|||||||
STZ.b $00
|
STZ.b $00
|
||||||
|
|
||||||
LDA.b $02
|
LDA.b $02
|
||||||
CMP.b #$40
|
CMP.l MapDrawingData_floor_pixel_row_wrap, X
|
||||||
BCS .next_floor
|
BCS .next_floor
|
||||||
CLC : ADC.b #$10
|
CLC : ADC.l MapDrawingData_supertile_pixel_spacing, X
|
||||||
STA.b $02
|
STA.b $02
|
||||||
BRA .next_room_check
|
BRA .next_room_check
|
||||||
|
|
||||||
@@ -431,7 +402,9 @@ FindCurrentRoom:
|
|||||||
BRA .next_room_check
|
BRA .next_room_check
|
||||||
|
|
||||||
.found
|
.found
|
||||||
|
PLX
|
||||||
JML $8AE891
|
JML $8AE891
|
||||||
|
|
||||||
.not_found
|
.not_found
|
||||||
|
PLX
|
||||||
JML $8AE8CD
|
JML $8AE8CD
|
||||||
@@ -14,13 +14,23 @@ org $8AE12B
|
|||||||
LDA.b #$20
|
LDA.b #$20
|
||||||
|
|
||||||
; dungeon map sheets
|
; dungeon map sheets
|
||||||
org $80DDD3 ; slot $8F
|
org $80DD97
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
|
db $61, $56, $57, $62
|
||||||
db $61, $56, $57, $62
|
db $61, $56, $57, $62
|
||||||
|
|
||||||
; always use $8F in dungeon map
|
|
||||||
org $8AE122
|
|
||||||
NOP #4
|
|
||||||
LDA.b #$8F
|
|
||||||
|
|
||||||
; unused chest data
|
; unused chest data
|
||||||
org $81E9A5
|
org $81E9A5
|
||||||
@@ -167,16 +177,61 @@ org $8AE21C
|
|||||||
JSL DrawMountain
|
JSL DrawMountain
|
||||||
BRA + : NOP #9 : +
|
BRA + : NOP #9 : +
|
||||||
|
|
||||||
|
;================================================================================
|
||||||
|
; Custom Door Rando Maps
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
org $8AE590
|
||||||
|
JSL PrepDrawRow
|
||||||
|
BRA + : NOP #5 : +
|
||||||
|
|
||||||
|
org $8AE5F2
|
||||||
|
JSR LoadDungeonMapRoomPointer_0A
|
||||||
|
STA.b $72
|
||||||
|
|
||||||
|
org $8AE600
|
||||||
|
LDA.b [$72], Y
|
||||||
|
|
||||||
|
org $8AE634
|
||||||
|
JSR LoadDungeonMapRoomPointer_0A
|
||||||
|
STA.b $72
|
||||||
|
|
||||||
|
org $8AE63B
|
||||||
|
LDA.b [$72], Y
|
||||||
|
|
||||||
|
org $8AE867
|
||||||
|
JSR LoadDungeonMapRoomPointer_0A
|
||||||
|
STA.b $72
|
||||||
|
|
||||||
|
org $8AE872
|
||||||
|
LDA.b [$72], Y
|
||||||
|
|
||||||
|
org $8AE8DD
|
||||||
|
JSR LoadDungeonMapRoomPointer_0A
|
||||||
|
|
||||||
|
org $8AE8E4
|
||||||
|
STA.b $72
|
||||||
|
|
||||||
|
org $8AE8F9
|
||||||
|
LDA.b [$72], Y
|
||||||
|
|
||||||
|
org $8AEBC6
|
||||||
|
JSL GetLocationMarkerLeft
|
||||||
|
NOP
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
; Draw Wacky Door Rando Layouts
|
; Draw Wacky Door Rando Layouts
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $8AE3D7
|
org $8AE3D7
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BNE .normal
|
||||||
LDA.l DRMode
|
LDA.l DRMode
|
||||||
BEQ +
|
BEQ .normal
|
||||||
JSL DrawWackyDoorRandoStuff
|
|
||||||
JMP.w $8AE422
|
JSL DrawWackyDoorRandoStuff
|
||||||
NOP
|
JMP.w $8AE422
|
||||||
+
|
NOP
|
||||||
|
|
||||||
|
.normal
|
||||||
warnpc $8AE3EB
|
warnpc $8AE3EB
|
||||||
|
|
||||||
org $8AE439
|
org $8AE439
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
pushpc
|
pushpc
|
||||||
incsrc dungeon_map_hooks.asm
|
incsrc hooks.asm
|
||||||
|
|
||||||
macro WriteGFXSheetPointer(sheet, location)
|
macro WriteGFXSheetPointer(sheet, location)
|
||||||
pushpc
|
pushpc
|
||||||
@@ -24,20 +24,17 @@ endmacro
|
|||||||
%WriteGFXSheetPointer($62, DungeonMapIcons5)
|
%WriteGFXSheetPointer($62, DungeonMapIcons5)
|
||||||
%WriteGFXSheetPointer($63, DungeonMapIcons6)
|
%WriteGFXSheetPointer($63, DungeonMapIcons6)
|
||||||
|
|
||||||
%WriteGFXSheetPointer($14, DRSheet14)
|
|
||||||
|
|
||||||
pullpc
|
pullpc
|
||||||
|
|
||||||
incsrc doors_dungeon_map.asm
|
incsrc mappable_doors.asm
|
||||||
|
incsrc current_room_map.asm
|
||||||
incsrc draw_rooms.asm
|
incsrc draw_rooms.asm
|
||||||
incsrc map_bg3.asm
|
incsrc map_bg3.asm
|
||||||
incsrc dungeon_switch.asm
|
incsrc dungeon_switch.asm
|
||||||
incsrc draw_loot.asm
|
incsrc draw_loot.asm
|
||||||
incsrc check_loot.asm
|
incsrc check_loot.asm
|
||||||
incsrc loot_hud.asm
|
|
||||||
incsrc blink_loot.asm
|
incsrc blink_loot.asm
|
||||||
incsrc data/doors_display.asm
|
incsrc data/doors_display.asm
|
||||||
incsrc data/spiral_stairs.asm
|
incsrc data/spiral_stairs.asm
|
||||||
incsrc data/fall_warps.asm
|
incsrc data/fall_warps.asm
|
||||||
incsrc data/split_room.asm
|
incsrc data/split_room.asm
|
||||||
incsrc data/doors_connections.asm
|
|
||||||
@@ -11,6 +11,8 @@ LoadStripes:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
.dungeon_map
|
.dungeon_map
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BNE .4x3
|
||||||
LDA.l DRMode
|
LDA.l DRMode
|
||||||
BNE .6x6
|
BNE .6x6
|
||||||
|
|
||||||
@@ -23,6 +25,15 @@ LoadStripes:
|
|||||||
STA.b $02
|
STA.b $02
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
.4x3
|
||||||
|
LDA.b #BG3DungeonMap4x3Stripes>>0
|
||||||
|
STA.b $00
|
||||||
|
LDA.b #BG3DungeonMap4x3Stripes>>8
|
||||||
|
STA.b $01
|
||||||
|
LDA.b #BG3DungeonMap4x3Stripes>>16
|
||||||
|
STA.b $02
|
||||||
|
RTL
|
||||||
|
|
||||||
.6x6
|
.6x6
|
||||||
LDA.b #BG3DungeonMap6x6Stripes>>0
|
LDA.b #BG3DungeonMap6x6Stripes>>0
|
||||||
STA.b $00
|
STA.b $00
|
||||||
@@ -46,30 +57,33 @@ LoadLastHUDPalette:
|
|||||||
SEP #$20
|
SEP #$20
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
BG3DungeonMap5x5Stripes:
|
macro VanillaCommonMapStripes()
|
||||||
; vanilla stuff
|
dw $4260, $0100, $2100
|
||||||
dw $4260, $0100, $2100
|
dw $4360, $0E40, $2101
|
||||||
dw $4360, $0E40, $2101
|
dw $4B60, $0100, $6100
|
||||||
dw $4B60, $0100, $6100
|
dw $6260, $2EC0, $2110
|
||||||
dw $6260, $2EC0, $2110
|
dw $6B60, $2EC0, $6110
|
||||||
dw $6B60, $2EC0, $6110
|
dw $6263, $0100, $A100
|
||||||
dw $6263, $0100, $A100
|
dw $6363, $0E40, $A101
|
||||||
dw $6363, $0E40, $A101
|
dw $6B63, $0100, $E100
|
||||||
dw $6B63, $0100, $E100
|
dw $8460, $0B00, $2102, $2103, $2104, $2105, $2106, $2107
|
||||||
dw $8460, $0B00, $2102, $2103, $2104, $2105, $2106, $2107
|
dw $A460, $0B00, $2112, $2113, $2114, $2115, $2116, $2117
|
||||||
dw $A460, $0B00, $2112, $2113, $2114, $2115, $2116, $2117
|
dw $5D60, $0100, $6100
|
||||||
dw $5D60, $0100, $6100
|
dw $7D60, $2EC0, $6110
|
||||||
dw $7D60, $2EC0, $6110
|
dw $7D63, $0100, $E100
|
||||||
dw $7D63, $0100, $E100
|
dw $0060, $7E40, $2111
|
||||||
dw $0060, $7E40, $2111
|
dw $8063, $3E41, $2111
|
||||||
dw $8063, $3E41, $2111
|
dw $0060, $3EC0, $2111
|
||||||
dw $0060, $3EC0, $2111
|
dw $0160, $3EC0, $2111
|
||||||
dw $0160, $3EC0, $2111
|
dw $0C60, $3EC0, $2111
|
||||||
dw $0C60, $3EC0, $2111
|
dw $0D60, $3EC0, $2111
|
||||||
dw $0D60, $3EC0, $2111
|
dw $1E60, $3EC0, $2111
|
||||||
dw $1E60, $3EC0, $2111
|
dw $1F60, $3EC0, $2111
|
||||||
dw $1F60, $3EC0, $2111
|
endmacro
|
||||||
|
|
||||||
|
|
||||||
|
BG3DungeonMap5x5Stripes:
|
||||||
|
%VanillaCommonMapStripes()
|
||||||
; left edge of map border, from vanilla
|
; left edge of map border, from vanilla
|
||||||
dw $4E60, $0100, $2100
|
dw $4E60, $0100, $2100
|
||||||
dw $4F60, $1A40, $2101
|
dw $4F60, $1A40, $2101
|
||||||
@@ -119,6 +133,59 @@ endmacro
|
|||||||
|
|
||||||
db $FF
|
db $FF
|
||||||
|
|
||||||
|
BG3DungeonMap4x3Stripes:
|
||||||
|
%VanillaCommonMapStripes()
|
||||||
|
; left edge of map border, adjusted from vanilla
|
||||||
|
dw $4D60, $0100, $2100
|
||||||
|
dw $4E60, $1C40, $2101
|
||||||
|
dw $6D60, $2EC0, $2110
|
||||||
|
dw $6D63, $0100, $A100
|
||||||
|
dw $6E63, $1C40, $A101
|
||||||
|
|
||||||
|
; horizontal borders
|
||||||
|
dw $B160, $1440, $1D11
|
||||||
|
dw $1161, $1440, $1D11
|
||||||
|
dw $7161, $1440, $1D11
|
||||||
|
dw $D161, $1440, $1D11
|
||||||
|
dw $3162, $1440, $1D11
|
||||||
|
dw $9162, $1440, $1D11
|
||||||
|
dw $F162, $1440, $1D11
|
||||||
|
dw $5163, $1440, $1D11
|
||||||
|
|
||||||
|
; vertical borders
|
||||||
|
dw $B060, $12C0, $1D11
|
||||||
|
dw $BC60, $12C0, $1D11
|
||||||
|
dw $3062, $12C0, $1D11
|
||||||
|
dw $3C62, $12C0, $1D11
|
||||||
|
|
||||||
|
macro TopOfDoorSquares(start)
|
||||||
|
; silly Big Endian
|
||||||
|
db <start>>>8, <start>, $00, $15
|
||||||
|
dw $5D4C, $1D4C, $1D11, $5D4C, $1D4C, $1D11, $5D4C, $1D4C, $1D11, $5D4C, $1D4C
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro BottomOfDoorSquares(start)
|
||||||
|
; silly Big Endian
|
||||||
|
db <start>>>8, <start>, $00, $15
|
||||||
|
dw $DD4C, $9D4C, $1D11, $DD4C, $9D4C, $1D11, $DD4C, $9D4C, $1D11, $DD4C, $9D4C
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro FullDoorRow(start)
|
||||||
|
%TopOfDoorSquares(<start>)
|
||||||
|
%BottomOfDoorSquares(<start>+$20)
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
; top grid
|
||||||
|
%FullDoorRow($60D1)
|
||||||
|
%FullDoorRow($6131)
|
||||||
|
%FullDoorRow($6191)
|
||||||
|
|
||||||
|
%FullDoorRow($6251)
|
||||||
|
%FullDoorRow($62B1)
|
||||||
|
%FullDoorRow($6311)
|
||||||
|
|
||||||
|
db $FF
|
||||||
|
|
||||||
BG3DungeonMap6x6Stripes:
|
BG3DungeonMap6x6Stripes:
|
||||||
; vanilla
|
; vanilla
|
||||||
dw $4260, $0100, $2100
|
dw $4260, $0100, $2100
|
||||||
@@ -0,0 +1,474 @@
|
|||||||
|
MapDrawingData:
|
||||||
|
.floor_data_offset
|
||||||
|
dw $0000, $0000
|
||||||
|
dw $0019, $000C
|
||||||
|
dw $0032, $0018
|
||||||
|
dw $004B, $0024
|
||||||
|
dw $0064, $0030
|
||||||
|
dw $007D, $003C
|
||||||
|
dw $0096, $0048
|
||||||
|
dw $00AF, $0054
|
||||||
|
dw $00C8, $0060
|
||||||
|
|
||||||
|
.row_data_offset
|
||||||
|
dw $0000, $0000
|
||||||
|
dw $0005, $0004
|
||||||
|
dw $000A, $0008
|
||||||
|
dw $000F, $000C
|
||||||
|
dw $0014, $0010
|
||||||
|
|
||||||
|
.corner_tile_address
|
||||||
|
dw $00E2, $0160
|
||||||
|
dw $00F8, $0178
|
||||||
|
dw $03A2, $03A0
|
||||||
|
dw $03B8, $03B8
|
||||||
|
|
||||||
|
.row_tile_address
|
||||||
|
dw $00E4, $0162
|
||||||
|
dw $03A4, $03A2
|
||||||
|
|
||||||
|
.row_tile_length
|
||||||
|
dw $0014, $0016
|
||||||
|
|
||||||
|
.column_tile_address
|
||||||
|
dw $0122, $01A0
|
||||||
|
dw $0138, $01B8
|
||||||
|
|
||||||
|
.column_tile_length
|
||||||
|
dw $0280, $0200
|
||||||
|
|
||||||
|
.floor_label_address
|
||||||
|
dw $035E, $035C
|
||||||
|
|
||||||
|
.row_start_address
|
||||||
|
dw $0124, $01A2
|
||||||
|
dw $01A4, $0262
|
||||||
|
dw $0224, $0322
|
||||||
|
dw $02A4, $03D2
|
||||||
|
dw $0324, $04A2
|
||||||
|
|
||||||
|
.column_count
|
||||||
|
dw $0005, $0004
|
||||||
|
|
||||||
|
.column_spacing
|
||||||
|
dw $0004, $0006
|
||||||
|
|
||||||
|
.row_count
|
||||||
|
dw $0005, $0003
|
||||||
|
|
||||||
|
.bg1_grid_start
|
||||||
|
dw $1091, $10D1
|
||||||
|
|
||||||
|
.sprite_offset_x_base
|
||||||
|
dw $0090, $0088
|
||||||
|
|
||||||
|
.sprite_offset_y_base
|
||||||
|
dw $001F, $002F
|
||||||
|
dw $007F, $008F
|
||||||
|
|
||||||
|
.entrance_sprite_offset_y_base
|
||||||
|
dw $0087, $0097
|
||||||
|
|
||||||
|
.supertile_pixel_spacing
|
||||||
|
dw $0010, $0018
|
||||||
|
|
||||||
|
.floor_pixel_column_wrap
|
||||||
|
dw $0040, $0048
|
||||||
|
|
||||||
|
.floor_pixel_row_wrap
|
||||||
|
dw $0040, $0030
|
||||||
|
|
||||||
|
CustomMapDrawingData:
|
||||||
|
.column_wrap
|
||||||
|
dw $0003
|
||||||
|
.column_count
|
||||||
|
dw $0004
|
||||||
|
.row_wrap
|
||||||
|
dw $0002
|
||||||
|
|
||||||
|
.floor_connection_data_offset
|
||||||
|
dw $0000
|
||||||
|
dw $0011
|
||||||
|
dw $0022
|
||||||
|
dw $0033
|
||||||
|
dw $0044
|
||||||
|
dw $0055
|
||||||
|
dw $0066
|
||||||
|
dw $0077
|
||||||
|
dw $0088
|
||||||
|
|
||||||
|
.row_connection_data_offset
|
||||||
|
dw $0000
|
||||||
|
dw $0007
|
||||||
|
dw $000E
|
||||||
|
dw $0015
|
||||||
|
|
||||||
|
macro LDA_MapMode()
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
ASL A
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro LDX_MapMode()
|
||||||
|
%LDA_MapMode()
|
||||||
|
TAX
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro LDY_MapMode()
|
||||||
|
%LDA_MapMode()
|
||||||
|
TAY
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro ADD_MapMode()
|
||||||
|
CLC : ADC.l DungeonMapMode
|
||||||
|
ASL A
|
||||||
|
TAX
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro Map_LDA(addr, label)
|
||||||
|
pushpc
|
||||||
|
org <addr>
|
||||||
|
JSR LDA_<label>
|
||||||
|
pullpc
|
||||||
|
|
||||||
|
if not(defined("LDA_<label>"))
|
||||||
|
!LDA_<label> = 1
|
||||||
|
LDA_<label>:
|
||||||
|
PHX
|
||||||
|
%LDX_MapMode()
|
||||||
|
LDA.l MapDrawingData_<label>, X
|
||||||
|
PLX
|
||||||
|
RTS
|
||||||
|
endif
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro Map_LDAY(addr, label)
|
||||||
|
pushpc
|
||||||
|
org <addr>
|
||||||
|
JSR LDA_Y_<label>
|
||||||
|
pullpc
|
||||||
|
|
||||||
|
if not(defined("LDA_Y_<label>"))
|
||||||
|
!LDA_Y_<label> = 1
|
||||||
|
LDA_Y_<label>:
|
||||||
|
PHX
|
||||||
|
TYA
|
||||||
|
%ADD_MapMode()
|
||||||
|
LDA.l MapDrawingData_<label>, X
|
||||||
|
PLX
|
||||||
|
RTS
|
||||||
|
endif
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro Map_LDAX(addr, label)
|
||||||
|
pushpc
|
||||||
|
org <addr>
|
||||||
|
JSR LDA_X_<label>
|
||||||
|
pullpc
|
||||||
|
|
||||||
|
if not(defined("LDA_X_<label>"))
|
||||||
|
!LDA_X_<label> = 1
|
||||||
|
LDA_X_<label>:
|
||||||
|
PHX
|
||||||
|
TXA
|
||||||
|
%ADD_MapMode()
|
||||||
|
LDA.l MapDrawingData_<label>, X
|
||||||
|
PLX
|
||||||
|
RTS
|
||||||
|
endif
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro Map_CMP(addr, label)
|
||||||
|
pushpc
|
||||||
|
org <addr>
|
||||||
|
JSR CMP_<label>
|
||||||
|
pullpc
|
||||||
|
|
||||||
|
if not(defined("CMP_<label>"))
|
||||||
|
!CMP_<label> = 1
|
||||||
|
CMP_<label>:
|
||||||
|
PHX
|
||||||
|
PHA
|
||||||
|
%LDX_MapMode()
|
||||||
|
PLA
|
||||||
|
CMP.l MapDrawingData_<label>, X
|
||||||
|
BEQ .z_flag_set
|
||||||
|
.z_flag_clear
|
||||||
|
PLX
|
||||||
|
REP #$02
|
||||||
|
RTS
|
||||||
|
.z_flag_set
|
||||||
|
PLX
|
||||||
|
SEP #$02
|
||||||
|
RTS
|
||||||
|
endif
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro Map_ADD(addr, label)
|
||||||
|
pushpc
|
||||||
|
org <addr>
|
||||||
|
JSR ADD_<label>
|
||||||
|
pullpc
|
||||||
|
|
||||||
|
if not(defined("ADD_<label>"))
|
||||||
|
!ADD_<label> = 1
|
||||||
|
ADD_<label>:
|
||||||
|
PHX
|
||||||
|
PHA
|
||||||
|
%LDX_MapMode()
|
||||||
|
PLA
|
||||||
|
CLC : ADC.l MapDrawingData_<label>, X
|
||||||
|
PLX
|
||||||
|
RTS
|
||||||
|
endif
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
macro Map_ADDY(addr, label)
|
||||||
|
pushpc
|
||||||
|
org <addr>
|
||||||
|
JSR ADD_Y_<label>
|
||||||
|
pullpc
|
||||||
|
|
||||||
|
if not(defined("ADD_Y_<label>"))
|
||||||
|
!ADD_Y_<label> = 1
|
||||||
|
ADD_Y_<label>:
|
||||||
|
PHX
|
||||||
|
PHA
|
||||||
|
TYA
|
||||||
|
%ADD_MapMode()
|
||||||
|
PLA
|
||||||
|
CLC : ADC.l MapDrawingData_<label>, X
|
||||||
|
PLX
|
||||||
|
RTS
|
||||||
|
endif
|
||||||
|
endmacro
|
||||||
|
|
||||||
|
pushpc
|
||||||
|
|
||||||
|
org $8AE5DA
|
||||||
|
ADC.b $02 ; swap position of load and add for ease
|
||||||
|
|
||||||
|
org $8AE652 ; steal some space from the old map-drawing code we're no longer using
|
||||||
|
|
||||||
|
LoadDungeonMapRoomPointer_0A:
|
||||||
|
JSL LoadDungeonMapRoomPointer
|
||||||
|
RTS
|
||||||
|
|
||||||
|
%Map_LDAY($8AE45F, corner_tile_address)
|
||||||
|
%Map_LDAY($8AE489, row_tile_address)
|
||||||
|
%Map_CMP($8AE4B0, row_tile_length)
|
||||||
|
%Map_LDAY($8AE4C1, column_tile_address)
|
||||||
|
%Map_CMP($8AE4EA, column_tile_length)
|
||||||
|
%Map_LDA($8AE54A, floor_label_address)
|
||||||
|
%Map_LDAX($8AE5D7, row_data_offset)
|
||||||
|
%Map_LDAY($8AE5F7, floor_data_offset)
|
||||||
|
%Map_CMP($8AE5A2, row_count)
|
||||||
|
%Map_CMP($8AE7FA, column_count)
|
||||||
|
%Map_ADD($8AE896, sprite_offset_x_base)
|
||||||
|
%Map_ADDY($8AE8B5, sprite_offset_y_base)
|
||||||
|
%Map_ADD($8AE952, sprite_offset_y_base)
|
||||||
|
%Map_ADDY($8AEBDB, sprite_offset_y_base)
|
||||||
|
|
||||||
|
warnpc $8AE7F6
|
||||||
|
padbyte $EA
|
||||||
|
pad $8AE7F6
|
||||||
|
|
||||||
|
pullpc
|
||||||
|
|
||||||
|
incsrc data/doors_connections.asm
|
||||||
|
|
||||||
|
LoadDungeonMapRoomPointer:
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BEQ .normal
|
||||||
|
LDA.w #bank(CustomMapPointers)
|
||||||
|
STA.b $74
|
||||||
|
LDA.l CustomMapPointers, X
|
||||||
|
RTL
|
||||||
|
|
||||||
|
.normal
|
||||||
|
LDA.w #bank(DungeonMapRoomPointers)
|
||||||
|
STA.b $74
|
||||||
|
LDA.l DungeonMapRoomPointers, X
|
||||||
|
RTL
|
||||||
|
|
||||||
|
PrepDrawRow:
|
||||||
|
%ADD_MapMode()
|
||||||
|
LDA.l MapDrawingData_row_start_address, X
|
||||||
|
CLC : ADC.b $06
|
||||||
|
AND.w #$0FFF
|
||||||
|
TAX
|
||||||
|
|
||||||
|
LDA.l DungeonMapMode
|
||||||
|
BEQ .done
|
||||||
|
|
||||||
|
JSR DrawRowOfRoomConnections
|
||||||
|
|
||||||
|
.done
|
||||||
|
RTL
|
||||||
|
|
||||||
|
ClearAdjacentConnections:
|
||||||
|
; Left
|
||||||
|
LDA.b $02
|
||||||
|
BEQ +
|
||||||
|
LDA.b $0E
|
||||||
|
BIT.w #$000A
|
||||||
|
BNE +
|
||||||
|
LDA.w #$0F00
|
||||||
|
STA.l $7F0000-$02, X
|
||||||
|
STA.l $7F0040-$02, X
|
||||||
|
+
|
||||||
|
|
||||||
|
; Top
|
||||||
|
LDA.b $00
|
||||||
|
BEQ +
|
||||||
|
LDA.b $0E
|
||||||
|
BIT.w #$000C
|
||||||
|
BNE +
|
||||||
|
LDA.w #$0F00
|
||||||
|
STA.l $7F0000-$40, X
|
||||||
|
STA.l $7F0002-$40, X
|
||||||
|
+
|
||||||
|
|
||||||
|
; Right
|
||||||
|
LDA.b $02
|
||||||
|
CMP.l CustomMapDrawingData_column_wrap
|
||||||
|
BCS +
|
||||||
|
LDA.b $0E
|
||||||
|
BIT.w #$0005
|
||||||
|
BNE +
|
||||||
|
LDA.w #$0F00
|
||||||
|
STA.l $7F0000+$04, X
|
||||||
|
STA.l $7F0040+$04, X
|
||||||
|
+
|
||||||
|
|
||||||
|
; Bottom
|
||||||
|
LDA.b $00
|
||||||
|
CMP.l CustomMapDrawingData_row_wrap
|
||||||
|
BCS +
|
||||||
|
LDA.b $0E
|
||||||
|
BIT.w #$0003
|
||||||
|
BNE +
|
||||||
|
LDA.w #$0F00
|
||||||
|
STA.l $7F0000+$80, X
|
||||||
|
STA.l $7F0002+$80, X
|
||||||
|
+
|
||||||
|
RTL
|
||||||
|
|
||||||
|
DrawRowOfRoomConnections:
|
||||||
|
PHB : PHK : PLB
|
||||||
|
PHX
|
||||||
|
|
||||||
|
LDX.w DungeonID
|
||||||
|
LDA.l DoorConnectionPointers, X
|
||||||
|
STA.b $04
|
||||||
|
|
||||||
|
LDA.l DungeonMapFloorCountData, X
|
||||||
|
AND.w #$000F
|
||||||
|
CLC : ADC.w DungeonMapCurrentFloor
|
||||||
|
AND.w #$00FF
|
||||||
|
ASL A
|
||||||
|
TAX
|
||||||
|
LDA.l CustomMapDrawingData_floor_connection_data_offset, X
|
||||||
|
CLC : ADC.b $04
|
||||||
|
STA.b $04
|
||||||
|
|
||||||
|
LDA.b $00
|
||||||
|
ASL A
|
||||||
|
TAX
|
||||||
|
LDA.l CustomMapDrawingData_row_connection_data_offset, X
|
||||||
|
CLC : ADC.b $04
|
||||||
|
STA.b $04
|
||||||
|
|
||||||
|
STZ.b $02
|
||||||
|
|
||||||
|
PLX : PHX
|
||||||
|
LDY.w #$0000
|
||||||
|
|
||||||
|
.next_horizontal
|
||||||
|
LDA.b ($04), Y
|
||||||
|
AND.w #$00FF
|
||||||
|
JSR DrawHorizontalConnector
|
||||||
|
INY
|
||||||
|
INX #6
|
||||||
|
|
||||||
|
INC.b $02
|
||||||
|
LDA.b $02
|
||||||
|
CMP.l CustomMapDrawingData_column_wrap
|
||||||
|
BCC .next_horizontal
|
||||||
|
|
||||||
|
LDA.b $00
|
||||||
|
CMP.l CustomMapDrawingData_row_wrap
|
||||||
|
BCS .done
|
||||||
|
|
||||||
|
PLX : PHX
|
||||||
|
|
||||||
|
STZ.b $02
|
||||||
|
|
||||||
|
.next_vertical
|
||||||
|
LDA.b ($04), Y
|
||||||
|
AND.w #$00FF
|
||||||
|
JSR DrawVerticalConnector
|
||||||
|
INY
|
||||||
|
INX #6
|
||||||
|
|
||||||
|
INC.b $02
|
||||||
|
LDA.b $02
|
||||||
|
CMP.l CustomMapDrawingData_column_count
|
||||||
|
BCC .next_vertical
|
||||||
|
|
||||||
|
.done
|
||||||
|
PLX
|
||||||
|
PLB
|
||||||
|
RTS
|
||||||
|
|
||||||
|
; A = connector index
|
||||||
|
; X = address
|
||||||
|
DrawHorizontalConnector:
|
||||||
|
PHY
|
||||||
|
ASL A : ASL A
|
||||||
|
TAY
|
||||||
|
|
||||||
|
LDA.w DoorConnectionTiles+0, Y
|
||||||
|
BEQ +
|
||||||
|
ORA.w #$1404
|
||||||
|
STA.l $7F0004, X
|
||||||
|
+
|
||||||
|
|
||||||
|
LDA.w DoorConnectionTiles+2, Y
|
||||||
|
BEQ +
|
||||||
|
ORA.w #$1404
|
||||||
|
STA.l $7F0044, X
|
||||||
|
+
|
||||||
|
|
||||||
|
PLY
|
||||||
|
RTS
|
||||||
|
|
||||||
|
; A = connector index
|
||||||
|
; X = address
|
||||||
|
DrawVerticalConnector:
|
||||||
|
PHY
|
||||||
|
ASL A : ASL A
|
||||||
|
TAY
|
||||||
|
|
||||||
|
LDA.w DoorConnectionTiles+0, Y
|
||||||
|
BEQ +
|
||||||
|
ORA.w #$1400
|
||||||
|
STA.l $7F0080, X
|
||||||
|
+
|
||||||
|
|
||||||
|
LDA.w DoorConnectionTiles+2, Y
|
||||||
|
BEQ +
|
||||||
|
ORA.w #$1400
|
||||||
|
STA.l $7F0082, X
|
||||||
|
+
|
||||||
|
|
||||||
|
PLY
|
||||||
|
RTS
|
||||||
|
|
||||||
|
GetLocationMarkerLeft:
|
||||||
|
LDA.b LinkQuadrantH
|
||||||
|
BEQ +
|
||||||
|
LDA.b #$F8
|
||||||
|
+
|
||||||
|
CLC : ADC.w $0215
|
||||||
|
AND.b #$F8
|
||||||
|
RTL
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
org $B9F000
|
; $B9F000
|
||||||
SupertileRoomShapes:
|
SupertileRoomShapes:
|
||||||
incsrc data/supertile_shapes.asm
|
incsrc data/supertile_shapes.asm
|
||||||
warnpc $B9F800
|
warnpc $B9F800
|
||||||
@@ -52,17 +52,17 @@ dw $2DCB, $6DCB, $ADCB, $EDCB ; 01 - unknown - dot
|
|||||||
dw $29EB, $69EB, $29FB, $69FB ; 02 - junk - pot
|
dw $29EB, $69EB, $29FB, $69FB ; 02 - junk - pot
|
||||||
dw $29CA, $69CA, $29DA, $29DB ; 03 - small key
|
dw $29CA, $69CA, $29DA, $29DB ; 03 - small key
|
||||||
dw $29E9, $69E9, $29F9, $69F9 ; 04 - triforce piece
|
dw $29E9, $69E9, $29F9, $69F9 ; 04 - triforce piece
|
||||||
dw $29DD, $69DD, $A9DD, $E9DD ; 05 - health - plus
|
dw $29DD, $69DD, $A9DD, $E9DD ; 05 - safety - plus
|
||||||
dw $29EC, $69EC, $29FC, $69FC ; 06 - less important item - small chest
|
dw $29EC, $69EC, $29FC, $69FC ; 06 - less important item - small chest
|
||||||
dw $29E8, $69E8, $29F8, $69F8 ; 07 - compass
|
dw $29CE, $29CF, $29DE, $29DF ; 07 - map
|
||||||
dw $29CE, $29CF, $29DE, $29DF ; 08 - map
|
dw $29E8, $69E8, $29F8, $69F8 ; 08 - compass
|
||||||
dw $29CA, $69CA, $29DA, $29DB ; 09 - small key
|
dw $29CA, $69CA, $29DA, $29DB ; 09 - small key
|
||||||
dw $29C8, $69C8, $29D8, $29D9 ; 0A - big key
|
dw $29C8, $69C8, $29D8, $29D9 ; 0A - big key
|
||||||
dw $29ED, $69ED, $29FD, $69FD ; 0B - important inventory item - big chest
|
dw $29ED, $69ED, $29FD, $69FD ; 0B - important inventory item - big chest
|
||||||
dw $29CC, $29CD, $29DC, $69DC ; 0C - pendant
|
dw $29CC, $29CD, $29DC, $69DC ; 0C - pendant
|
||||||
dw $2DC9, $69C9, $A9C9, $EDC9 ; 0D - crystal
|
dw $2DC9, $69C9, $A9C9, $EDC9 ; 0D - crystal
|
||||||
dw $29E9, $69E9, $29F9, $69F9 ; 0E - triforce piece
|
dw $29E9, $69E9, $29F9, $69F9 ; 0E - triforce piece
|
||||||
dw $29EA, $69EA, $29FA, $69FA ; 0F - triforce
|
dw $29EA, $69EA, $29EB, $69EB ; 0F - triforce
|
||||||
|
|
||||||
warnpc $B9F900
|
warnpc $B9F900
|
||||||
org $B9F900
|
org $B9F900
|
||||||
@@ -73,32 +73,29 @@ warnpc $B9FA00
|
|||||||
org $B9FA00
|
org $B9FA00
|
||||||
; Room ID mappings to bit to check for presence and address of item drop
|
; Room ID mappings to bit to check for presence and address of item drop
|
||||||
MiscLocations:
|
MiscLocations:
|
||||||
dw $10C8 : db $04 : dl HeartContainer_ArmosKnights
|
dw $00C8 : db $04 : dl HeartContainer_ArmosKnights
|
||||||
dw $1033 : db $04 : dl HeartContainer_Lanmolas
|
dw $0033 : db $04 : dl HeartContainer_Lanmolas
|
||||||
dw $1007 : db $04 : dl HeartContainer_Moldorm
|
dw $0007 : db $04 : dl HeartContainer_Moldorm
|
||||||
|
|
||||||
dw $105A : db $04 : dl HeartContainer_HelmasaurKing
|
dw $005A : db $04 : dl HeartContainer_HelmasaurKing
|
||||||
dw $1006 : db $04 : dl HeartContainer_Arrghus
|
dw $0006 : db $04 : dl HeartContainer_Arrghus
|
||||||
dw $1029 : db $04 : dl HeartContainer_Mothula
|
dw $0029 : db $04 : dl HeartContainer_Mothula
|
||||||
dw $10AC : db $04 : dl HeartContainer_Blind
|
dw $00AC : db $04 : dl HeartContainer_Blind
|
||||||
dw $10DE : db $04 : dl HeartContainer_Kholdstare
|
dw $00DE : db $04 : dl HeartContainer_Kholdstare
|
||||||
dw $1090 : db $04 : dl HeartContainer_Vitreous
|
dw $0090 : db $04 : dl HeartContainer_Vitreous
|
||||||
dw $10A4 : db $04 : dl HeartContainer_Trinexx
|
dw $00A4 : db $04 : dl HeartContainer_Trinexx
|
||||||
|
|
||||||
dw $1073 : db $05 : dl BonkKey_Desert ; torch
|
dw $0073 : db $05 : dl BonkKey_Desert ; torch
|
||||||
dw $108C : db $05 : dl BonkKey_GTower ; torch
|
dw $008C : db $05 : dl BonkKey_GTower ; torch
|
||||||
dw $1087 : db $05 : dl StandingKey_Hera
|
dw $0087 : db $05 : dl StandingKey_Hera
|
||||||
|
|
||||||
dw $10E1 : db $06 : dl HeartPiece_Forest_Thieves
|
|
||||||
dw $10E2 : db $06 : dl HeartPiece_Lumberjack_Tree
|
|
||||||
dw $10EA : db $05 : dl HeartPiece_Spectacle_Cave
|
|
||||||
dw $111B : db $06 : dl HeartPiece_Graveyard_Warp
|
|
||||||
dw $211B : db $05 : dl HeartPiece_Circle_Bushes
|
|
||||||
dw $111E : db $05 : dl RupeeNPC_NortheastDarkSwampCave
|
|
||||||
dw $1123 : db $05 : dl RupeeNPC_MoldormCave
|
|
||||||
dw $1126 : db $06 : dl HeartPiece_Mire_Warp
|
|
||||||
dw $1127 : db $05 : dl HeartPiece_Smith_Pegs
|
|
||||||
|
|
||||||
|
dw $FFFF : db $FF : dl $FFFFFF ; Placeholders
|
||||||
|
dw $FFFF : db $FF : dl $FFFFFF
|
||||||
|
dw $FFFF : db $FF : dl $FFFFFF ; Aga 1? ($0020)
|
||||||
|
dw $FFFF : db $FF : dl $FFFFFF ; Ice Armos? ($001C)
|
||||||
|
dw $FFFF : db $FF : dl $FFFFFF ; Lanmolas 2? ($0033)
|
||||||
|
dw $FFFF : db $FF : dl $FFFFFF ; Moldorm 2? ($004D)
|
||||||
|
dw $FFFF : db $FF : dl $FFFFFF ; Aga 2? ($000D)
|
||||||
dw $FFFF
|
dw $FFFF
|
||||||
|
|
||||||
warnpc $B9FA9A
|
warnpc $B9FA9A
|
||||||
@@ -131,7 +128,7 @@ pad $B9FB00
|
|||||||
|
|
||||||
; $B9FB00
|
; $B9FB00
|
||||||
DungeonLabels:
|
DungeonLabels:
|
||||||
dw $25A4, $2579 ; Sewers
|
dw $2550, $2579 ; Sewers
|
||||||
dw $2564, $255F ; Hyrule Castle
|
dw $2564, $255F ; Hyrule Castle
|
||||||
dw $2561, $256C ; Eastern Palace
|
dw $2561, $256C ; Eastern Palace
|
||||||
dw $2560, $256C ; Desert Palace
|
dw $2560, $256C ; Desert Palace
|
||||||
@@ -149,51 +146,9 @@ dw $25A4, $25A4 ; Reserved
|
|||||||
dw $25A4, $25A4 ; Reserved
|
dw $25A4, $25A4 ; Reserved
|
||||||
|
|
||||||
; $B9FB40
|
; $B9FB40
|
||||||
HUDLootTypeIcons:
|
|
||||||
dw $287F ; 00 - nothing
|
|
||||||
dw $295C ; 01 - unknown - dot
|
|
||||||
dw $2954 ; 02 - junk - pot
|
|
||||||
dw $2950 ; 03 - small key
|
|
||||||
dw $2952 ; 04 - triforce piece
|
|
||||||
dw $2955 ; 05 - health - plus
|
|
||||||
dw $2953 ; 06 - less important item - small chest
|
|
||||||
dw $2D56 ; 07 - compass
|
|
||||||
dw $2957 ; 08 - map
|
|
||||||
dw $2950 ; 09 - small key
|
|
||||||
dw $2951 ; 0A - big key
|
|
||||||
dw $295A ; 0B - important inventory item - big chest
|
|
||||||
dw $2D58 ; 0C - pendant
|
|
||||||
dw $2D59 ; 0D - crystal
|
|
||||||
dw $2952 ; 0E - triforce piece
|
|
||||||
dw $295B ; 0F - triforce
|
|
||||||
|
|
||||||
; $B9FB60
|
|
||||||
NpcItems:
|
|
||||||
dw $10E3 : dl $7EF411 : db $80 ; Magic Bat
|
|
||||||
dw $1102 : dl $7EF410 : db $04 ; Sick Kid
|
|
||||||
dw $1105 : dl $7EF410 : db $10 ; Sahasrahla
|
|
||||||
dw $1109 : dl $7EF411 : db $20 ; Potion Shop
|
|
||||||
dw $1121 : dl $7EF411 : db $04 ; Blacksmith
|
|
||||||
dw $FFFF
|
|
||||||
|
|
||||||
warnpc $B9FBA0
|
|
||||||
padbyte $FF
|
|
||||||
pad $B9FBA0
|
|
||||||
|
|
||||||
; $B9FBA0
|
|
||||||
; Currently these two are hard-coded checks
|
|
||||||
; but maybe that will change if more show up someday?
|
|
||||||
MiscLocations2:
|
|
||||||
dw $1055 : dw $7EF3C6 : db $01 : dl UncleItem
|
|
||||||
dw $2107 : dw $7EF410 : db $80 : dl LibraryItem
|
|
||||||
dw $FFFF
|
|
||||||
|
|
||||||
warnpc $B9FE00
|
|
||||||
org $B9FE00
|
|
||||||
JunkTable:
|
|
||||||
incsrc data/junk_items.asm
|
|
||||||
|
|
||||||
warnpc $B9FF00
|
warnpc $B9FF00
|
||||||
|
|
||||||
org $B9FF00
|
org $B9FF00
|
||||||
; $00 - do not show anything
|
; $00 - do not show anything
|
||||||
; $01 - show presence of supertile as dark square
|
; $01 - show presence of supertile as dark square
|
||||||
@@ -212,61 +167,42 @@ ShowRooms:
|
|||||||
.visited_tile
|
.visited_tile
|
||||||
db $04
|
db $04
|
||||||
.reserved
|
.reserved
|
||||||
skip 3
|
skip 4
|
||||||
.dark_room_cap
|
|
||||||
db $01
|
|
||||||
warnpc $B9FF08
|
warnpc $B9FF08
|
||||||
|
|
||||||
org $B9FF08
|
org $B9FF08
|
||||||
; $00 - do not show anything
|
; $00 - do not show anything
|
||||||
; $01 - show presence of unobtained items
|
; $01 - show presence of unobtained items
|
||||||
; $02 - show compass if presence, otherwise presence of unobtained items
|
; $02 - show category of item
|
||||||
; $03 - show category of item
|
ShowItems:
|
||||||
MapItems:
|
|
||||||
.default
|
.default
|
||||||
db $00
|
db $00
|
||||||
.have_map
|
.have_map
|
||||||
db $00
|
db $00
|
||||||
.have_compass
|
.have_compass
|
||||||
db $03
|
|
||||||
.visited_tile
|
|
||||||
db $02
|
db $02
|
||||||
.reserved
|
.visited_tile
|
||||||
skip 3
|
|
||||||
.enabled
|
|
||||||
db $01
|
db $01
|
||||||
|
.reserved
|
||||||
|
skip 4
|
||||||
warnpc $B9FF10
|
warnpc $B9FF10
|
||||||
|
|
||||||
org $B9FF10
|
org $B9FF10
|
||||||
HudItems:
|
; ---P bepc
|
||||||
.cave
|
|
||||||
db $00
|
|
||||||
.default_dungeon
|
|
||||||
db $00
|
|
||||||
.have_map
|
|
||||||
db $01
|
|
||||||
.have_compass
|
|
||||||
db $03
|
|
||||||
.reserved
|
|
||||||
skip 3
|
|
||||||
.enabled
|
|
||||||
db $01
|
|
||||||
warnpc $B9FF18
|
|
||||||
|
|
||||||
org $B9FF20
|
|
||||||
; ---P sepc
|
|
||||||
; P - dungeon prizes
|
; P - dungeon prizes
|
||||||
; s - standing items (plus torches in GT and desert and bosses)
|
; b - bosses (and torches in GT and desert, plus hera basement standing item)
|
||||||
; e - enemy drops
|
; e - enemy drops
|
||||||
; p - pots
|
; p - pots
|
||||||
; c - chests
|
; c - chests
|
||||||
ItemSources:
|
ItemSources:
|
||||||
db $09
|
db $09
|
||||||
|
|
||||||
; B9FF21
|
; $B9FF11
|
||||||
; a--- --mv
|
AlwaysShowCompass:
|
||||||
; a - always
|
|
||||||
; m - have map
|
|
||||||
; v - have visited dungeon
|
|
||||||
MapSwapping:
|
|
||||||
db $01
|
db $01
|
||||||
|
|
||||||
|
; $B9FF12
|
||||||
|
; $0000 - vanilla 5x5 maps
|
||||||
|
; $0001 - special DR 4x3 maps
|
||||||
|
DungeonMapMode:
|
||||||
|
dw $0000
|
||||||
+58
-52
@@ -1,14 +1,14 @@
|
|||||||
OnPrepFileSelect:
|
OnPrepFileSelect:
|
||||||
LDA.b GameSubMode : CMP.b #$03 : BNE +
|
LDA.b GameSubMode : CMP.b #$03 : BNE +
|
||||||
LDA.b #$06 : STA.b NMISTRIPES ; thing we wrote over
|
LDA.b #$06 : STA.b NMISTRIPES ; thing we wrote over
|
||||||
RTL
|
RTL
|
||||||
+
|
+
|
||||||
PHA : PHX
|
PHA : PHX
|
||||||
REP #$10
|
REP #$10
|
||||||
JSL LoadAlphabetTilemap
|
JSL LoadAlphabetTilemap
|
||||||
JSL LoadFullItemTiles
|
JSL LoadFullItemTiles
|
||||||
SEP #$10
|
SEP #$10
|
||||||
PLX : PLA
|
PLX : PLA
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnDrawHud:
|
OnDrawHud:
|
||||||
@@ -22,81 +22,87 @@ JML ReturnFromOnDrawHud
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnDungeonEntrance:
|
OnDungeonEntrance:
|
||||||
STA.l PegColor ; thing we wrote over
|
STA.l PegColor ; thing we wrote over
|
||||||
JSL MaybeFlagDungeonTotalsEntrance
|
JSL MaybeFlagDungeonTotalsEntrance
|
||||||
LDA.w #$0001 : STA.l UpdateHUDFlag
|
LDA.w #$0001 : STA.l UpdateHUDFlag
|
||||||
SEP #$30
|
SEP #$30
|
||||||
JSL DynamicDropGFXClear
|
JSL DynamicDropGFXClear
|
||||||
REP #$30
|
REP #$30
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnDungeonBossExit:
|
OnDungeonBossExit:
|
||||||
JSL StatTransitionCounter
|
JSL StatTransitionCounter
|
||||||
JSL ClearMultiworldText
|
JSL ClearMultiworldText
|
||||||
JSL DynamicDropGFXClear
|
JSL DynamicDropGFXClear
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnPlayerDead:
|
OnPlayerDead:
|
||||||
PHA
|
PHA
|
||||||
JSL SetDeathWorldChecked
|
JSL SetDeathWorldChecked
|
||||||
JSL DynamicDropGFXClear
|
JSL DynamicDropGFXClear
|
||||||
JSL SetSilverBowMode
|
JSL SetSilverBowMode
|
||||||
JSL RefreshRainAmmo
|
JSL RefreshRainAmmo
|
||||||
LDA.b #$00
|
|
||||||
STA.l InfiniteMagic
|
|
||||||
PLA
|
PLA
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnDungeonExit:
|
OnDungeonExit:
|
||||||
PHA : PHP
|
PHA : PHP
|
||||||
SEP #$20 ; set 8-bit accumulator
|
SEP #$20 ; set 8-bit accumulator
|
||||||
JSL SQEGFix
|
JSL SQEGFix
|
||||||
JSL DynamicDropGFXClear
|
JSL DynamicDropGFXClear
|
||||||
PLP : PLA
|
PLP : PLA
|
||||||
|
|
||||||
STA.w DungeonID : STZ.w Map16ChangeIndex ; thing we wrote over
|
STA.w DungeonID : STZ.w Map16ChangeIndex ; thing we wrote over
|
||||||
|
|
||||||
PHA : PHP
|
PHA : PHP
|
||||||
LDA.w #$0001 : STA.l UpdateHUDFlag
|
LDA.w #$0001 : STA.l UpdateHUDFlag
|
||||||
JSL HUD_RebuildLong
|
JSL HUD_RebuildLong
|
||||||
JSL FloodGateResetInner
|
JSL FloodGateResetInner
|
||||||
JSL SetSilverBowMode
|
JSL SetSilverBowMode
|
||||||
PLP : PLA
|
PLP : PLA
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnSave:
|
OnSave:
|
||||||
LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change
|
LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change
|
||||||
JSL DarkWorldSaveFix
|
JSL DarkWorldSaveFix
|
||||||
JML MSUResumeReset
|
JML MSUResumeReset
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnQuit:
|
OnQuit:
|
||||||
JSL SQEGFix
|
JSL SQEGFix
|
||||||
LDA.b #$00 : STA.l AltTextFlag ; bandaid patch bug with mirroring away from text
|
LDA.b #$00 : STA.l AltTextFlag ; bandaid patch bug with mirroring away from text
|
||||||
LDA.b #$10 : STA.b MAINDESQ ; thing we wrote over
|
LDA.b #$10 : STA.b MAINDESQ ; thing we wrote over
|
||||||
LDA.b #$00
|
|
||||||
STA.l InfiniteMagic
|
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnDeathNoSave:
|
OnDeathNoSave:
|
||||||
JSL MSUResumeReset
|
JSL MSUResumeReset
|
||||||
LDA.b #$05 : STA.b $10 ; what we wrote over
|
LDA.b #$05 : STA.b $10 ; what we wrote over
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnUncleItemGet:
|
OnUncleItemGet:
|
||||||
PHA
|
PHA
|
||||||
|
|
||||||
|
LDA.l EscapeAssist
|
||||||
|
BIT.b #$04 : BEQ + : STA.l InfiniteMagic : +
|
||||||
|
BIT.b #$02 : BEQ + : STA.l InfiniteBombs : +
|
||||||
|
BIT.b #$01 : BEQ + : STA.l InfiniteArrows : +
|
||||||
|
|
||||||
LDA.l UncleItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
LDA.l UncleItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||||
PLA
|
PLA
|
||||||
JSL Link_ReceiveItem
|
JSL Link_ReceiveItem
|
||||||
|
|
||||||
LDA.l ProgressIndicator : BNE +
|
LDA.l UncleRefill : BIT.b #$04 : BEQ + : LDA.b #$80 : STA.l MagicFiller : + ; refill magic
|
||||||
LDA.b #$01 : STA.l ProgressIndicator ; set rain state
|
LDA.l UncleRefill : BIT.b #$02 : BEQ + : LDA.b #50 : STA.l BombsFiller : + ; refill bombs
|
||||||
JSL SetEscapeAssist
|
LDA.l UncleRefill : BIT.b #$01 : BEQ + ; refill arrows
|
||||||
JSL RefreshRainAmmo
|
LDA.b #70 : STA.l ArrowsFiller
|
||||||
|
|
||||||
; grant arrows if we started with a bow in retro mode
|
|
||||||
LDA.l ArrowMode : BEQ +
|
LDA.l ArrowMode : BEQ +
|
||||||
LDA.l RainDeathRefillRupeeBow : ORA.l RainDeathRefillRupeeBow+1 : BEQ +
|
LDA.l BowTracking : ORA.b #$80 : STA.l BowTracking ; enable bow toggle
|
||||||
LDA.b #$01 : STA.l ArrowsFiller
|
REP #$20 ; set 16-bit accumulator
|
||||||
|
LDA.l CurrentRupees : !ADD.l FreeUncleItemAmount : STA.l CurrentRupees ; rupee arrows, so also give the player some money to start
|
||||||
|
SEP #$20 ; set 8-bit accumulator
|
||||||
+
|
+
|
||||||
|
LDA.l ProgressIndicator : BNE +
|
||||||
|
LDA.b #$01 : STA.l ProgressIndicator ; handle rain state
|
||||||
|
+
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnAga1Defeated:
|
OnAga1Defeated:
|
||||||
@@ -195,12 +201,12 @@ OnNewFile:
|
|||||||
STZ.w TreePullKills
|
STZ.w TreePullKills
|
||||||
STZ.w TreePullHits
|
STZ.w TreePullHits
|
||||||
STZ.w PrizePackIndexes
|
STZ.w PrizePackIndexes
|
||||||
STZ.w PrizePackIndexes+1
|
STZ.w PrizePackIndexes+1
|
||||||
STZ.w PrizePackIndexes+2
|
STZ.w PrizePackIndexes+2
|
||||||
STZ.w PrizePackIndexes+3
|
STZ.w PrizePackIndexes+3
|
||||||
STZ.w PrizePackIndexes+4
|
STZ.w PrizePackIndexes+4
|
||||||
STZ.w PrizePackIndexes+5
|
STZ.w PrizePackIndexes+5
|
||||||
STZ.w PrizePackIndexes+6
|
STZ.w PrizePackIndexes+6
|
||||||
LDA.b #$00 : STA.l MosaicLevel
|
LDA.b #$00 : STA.l MosaicLevel
|
||||||
JSL InitRNGPointerTable
|
JSL InitRNGPointerTable
|
||||||
PLP : PLX
|
PLP : PLX
|
||||||
|
|||||||
+1
-6
@@ -82,10 +82,7 @@ DrawBottle:
|
|||||||
AND.w #$00FF : BNE +
|
AND.w #$00FF : BNE +
|
||||||
LDX.w #FileSelectItems_empty_bottle
|
LDX.w #FileSelectItems_empty_bottle
|
||||||
JMP DrawItemGray
|
JMP DrawItemGray
|
||||||
+ : DEC : BNE +
|
+ : DEC #2 : BNE +
|
||||||
LDX.w #FileSelectItems_orange_potion
|
|
||||||
JMP DrawItem
|
|
||||||
+ : DEC : BNE +
|
|
||||||
LDX.w #FileSelectItems_empty_bottle
|
LDX.w #FileSelectItems_empty_bottle
|
||||||
JMP DrawItem
|
JMP DrawItem
|
||||||
+ : DEC : BNE +
|
+ : DEC : BNE +
|
||||||
@@ -622,8 +619,6 @@ FileSelectItems:
|
|||||||
dw #$0282|!FS_COLOR_GREEN, #$0282|!FS_COLOR_GREEN|!FS_HFLIP, #$0292|!FS_COLOR_GREEN, #$0284|!FS_COLOR_GREEN
|
dw #$0282|!FS_COLOR_GREEN, #$0282|!FS_COLOR_GREEN|!FS_HFLIP, #$0292|!FS_COLOR_GREEN, #$0284|!FS_COLOR_GREEN
|
||||||
.blue_potion
|
.blue_potion
|
||||||
dw #$0282|!FS_COLOR_BLUE, #$0282|!FS_COLOR_BLUE|!FS_HFLIP, #$0292|!FS_COLOR_BLUE, #$0285|!FS_COLOR_BLUE
|
dw #$0282|!FS_COLOR_BLUE, #$0282|!FS_COLOR_BLUE|!FS_HFLIP, #$0292|!FS_COLOR_BLUE, #$0285|!FS_COLOR_BLUE
|
||||||
.orange_potion
|
|
||||||
dw #$0282|!FS_COLOR_BROWN, #$0282|!FS_COLOR_BROWN|!FS_HFLIP, #$0292|!FS_COLOR_BROWN, #$0286|!FS_COLOR_BROWN
|
|
||||||
.fairy_bottle
|
.fairy_bottle
|
||||||
dw #$0287|!FS_COLOR_YELLOW|!FS_HFLIP, #$0287|!FS_COLOR_YELLOW, #$0296|!FS_COLOR_BLUE, #$0297|!FS_COLOR_BLUE
|
dw #$0287|!FS_COLOR_YELLOW|!FS_HFLIP, #$0287|!FS_COLOR_YELLOW, #$0296|!FS_COLOR_BLUE, #$0297|!FS_COLOR_BLUE
|
||||||
.bee_bottle
|
.bee_bottle
|
||||||
|
|||||||
+1
-11
@@ -23,7 +23,7 @@ JSL SpritePrep_OldManFollower : NOP #2 : db $F0 ; BEQ
|
|||||||
org $9DFF18
|
org $9DFF18
|
||||||
JSL SpriteDraw_OldManFollower
|
JSL SpriteDraw_OldManFollower
|
||||||
org $9EE9BC
|
org $9EE9BC
|
||||||
JSL OldMan_WaitForCollision
|
JSL Follower_CheckMessageCollision
|
||||||
org $9EE9CC
|
org $9EE9CC
|
||||||
JSL OldMan_BecomeFollower : NOP #2
|
JSL OldMan_BecomeFollower : NOP #2
|
||||||
|
|
||||||
@@ -631,15 +631,6 @@ SpriteDraw_OldManFollower:
|
|||||||
dw 0, 0 : db $AC, $00, $00, $02
|
dw 0, 0 : db $AC, $00, $00, $02
|
||||||
dw 0, 8 : db $AE, $00, $00, $02
|
dw 0, 8 : db $AE, $00, $00, $02
|
||||||
|
|
||||||
OldMan_WaitForCollision:
|
|
||||||
PHA
|
|
||||||
LDA.w LinkIFrames : BEQ +
|
|
||||||
PLA : CLC
|
|
||||||
RTL
|
|
||||||
+
|
|
||||||
PLA
|
|
||||||
JML Follower_CheckMessageCollision
|
|
||||||
|
|
||||||
OldMan_BecomeFollower:
|
OldMan_BecomeFollower:
|
||||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BCC .set_follower_and_despawn
|
LDA.l FollowerTravelAllowed : CMP.b #$02 : BCC .set_follower_and_despawn
|
||||||
PLA : PLA
|
PLA : PLA
|
||||||
@@ -857,7 +848,6 @@ RTL
|
|||||||
Kiki_DontScareTheMonke:
|
Kiki_DontScareTheMonke:
|
||||||
LDA.b LinkJumping : BEQ .return
|
LDA.b LinkJumping : BEQ .return
|
||||||
CMP.b #$02 : BEQ .no_spook ; needed for quake usage
|
CMP.b #$02 : BEQ .no_spook ; needed for quake usage
|
||||||
LDA.b GameMode : CMP.b #$0F : BEQ .no_spook ; needed for entrance transitions
|
|
||||||
LDA.w NoDamage : BNE .no_spook
|
LDA.w NoDamage : BNE .no_spook
|
||||||
LDA.w LinkThud : BNE .no_spook
|
LDA.w LinkThud : BNE .no_spook
|
||||||
.spook
|
.spook
|
||||||
|
|||||||
+41
-48
@@ -2,28 +2,21 @@
|
|||||||
; Frame Hook
|
; Frame Hook
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
FrameHookAction:
|
FrameHookAction:
|
||||||
JSL Module_MainRouting
|
JSL Module_MainRouting
|
||||||
JSL CheckMusicLoadRequest
|
JSL CheckMusicLoadRequest
|
||||||
PHP : REP #$30 : PHA
|
PHP : REP #$30 : PHA
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.l StatsLocked : BNE ++
|
LDA.l StatsLocked : BNE ++
|
||||||
REP #$20 ; set 16-bit accumulator
|
REP #$20 ; set 16-bit accumulator
|
||||||
LDA.l LoopFrames : INC : STA.l LoopFrames : BNE +
|
LDA.l LoopFrames : INC : STA.l LoopFrames : BNE +
|
||||||
LDA.l LoopFrames+2 : INC : STA.l LoopFrames+2
|
LDA.l LoopFrames+2 : INC : STA.l LoopFrames+2
|
||||||
+
|
+
|
||||||
; move this to nmi hook?
|
LDA.l GameMode : CMP.w #$010E : BNE ++ ; move this to nmi hook?
|
||||||
LDA.l GameMode : CMP.w #$010E : BNE +
|
LDA.l MenuFrames : INC : STA.l MenuFrames : BNE ++
|
||||||
; item select menu
|
LDA.l MenuFrames+2 : INC : STA.l MenuFrames+2
|
||||||
LDA.l MenuFrames : INC : STA.l MenuFrames : BNE ++
|
++
|
||||||
LDA.l MenuFrames+2 : INC : STA.l MenuFrames+2
|
REP #$30 : PLA : PLP
|
||||||
+
|
|
||||||
LDA.l GameMode : CMP.w #$030E : BEQ .map ; underworld map
|
|
||||||
LDA.l GameMode : CMP.w #$070E : BNE ++ ; overworld map
|
|
||||||
.map
|
|
||||||
LDA.l MapFrames : INC : STA.l MapFrames : BNE ++
|
|
||||||
LDA.l MapFrames+2 : INC : STA.l MapFrames+2
|
|
||||||
++
|
|
||||||
REP #$30 : PLA : PLP
|
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
!NMI_MW = "$7F5047"
|
!NMI_MW = "$7F5047"
|
||||||
@@ -54,37 +47,37 @@ JML NMIHookReturn
|
|||||||
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
PostNMIHookAction:
|
PostNMIHookAction:
|
||||||
LDA.w NMIAux : BEQ +
|
LDA.w NMIAux : BEQ +
|
||||||
PHK : PEA.w .return-1 ; push stack for RTL return
|
PHK : PEA.w .return-1 ; push stack for RTL return
|
||||||
JMP.w [NMIAux]
|
JMP.w [NMIAux]
|
||||||
.return
|
.return
|
||||||
STZ.w NMIAux ; zero bank byte of NMI hook pointer
|
STZ.w NMIAux ; zero bank byte of NMI hook pointer
|
||||||
+
|
+
|
||||||
JSR TransferItemGFX
|
JSR TransferItemGFX
|
||||||
LDA.b INIDISPQ : STA.w INIDISP ; thing we wrote over, turn screen back on
|
LDA.b INIDISPQ : STA.w INIDISP ; thing we wrote over, turn screen back on
|
||||||
|
|
||||||
JML PostNMIHookReturn
|
JML PostNMIHookReturn
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
TransferItemGFX:
|
TransferItemGFX:
|
||||||
; Only used for shops now but could be used for anything. We should look at how door rando does this
|
; Only used for shops now but could be used for anything. We should look at how door rando does this
|
||||||
; and try to unify one approach.
|
; and try to unify one approach.
|
||||||
REP #$30
|
REP #$30
|
||||||
LDX.w ItemStackPtr : BEQ .done
|
LDX.w ItemStackPtr : BEQ .done
|
||||||
TXA : BIT.w #$0040 : BNE .fail ; Crash if we have more than 16 queued (should never happen.)
|
TXA : BIT.w #$0040 : BNE .fail ; Crash if we have more than 16 queued (should never happen.)
|
||||||
DEX #2
|
DEX #2
|
||||||
-
|
-
|
||||||
LDA.l ItemGFXStack,X : STA.w ItemGFXPtr
|
LDA.l ItemGFXStack,X : STA.w ItemGFXPtr
|
||||||
LDA.l ItemTargetStack,X : STA.w ItemGFXTarget
|
LDA.l ItemTargetStack,X : STA.w ItemGFXTarget
|
||||||
PHX
|
PHX
|
||||||
JSL TransferItemToVRAM
|
JSL TransferItemToVRAM
|
||||||
REP #$10
|
REP #$10
|
||||||
PLX
|
PLX
|
||||||
DEX #2
|
DEX #2
|
||||||
BPL -
|
BPL -
|
||||||
|
|
||||||
STZ.w ItemStackPtr
|
STZ.w ItemStackPtr
|
||||||
.done
|
.done
|
||||||
SEP #$30
|
SEP #$30
|
||||||
RTS
|
RTS
|
||||||
.fail
|
.fail
|
||||||
BRK #$00
|
BRK #$00
|
||||||
|
|||||||
@@ -1,261 +0,0 @@
|
|||||||
db $00 ; 00 - Fighter Sword and Shield
|
|
||||||
db $00 ; 01 - Master Sword
|
|
||||||
db $00 ; 02 - Tempered Sword
|
|
||||||
db $00 ; 03 - Butter Sword
|
|
||||||
db $00 ; 04 - Fighter Shield
|
|
||||||
db $00 ; 05 - Fire Shield
|
|
||||||
db $00 ; 06 - Mirror Shield
|
|
||||||
db $00 ; 07 - Fire Rod
|
|
||||||
db $00 ; 08 - Ice Rod
|
|
||||||
db $00 ; 09 - Hammer
|
|
||||||
db $00 ; 0A - Hookshot
|
|
||||||
db $00 ; 0B - Bow
|
|
||||||
db $00 ; 0C - Boomerang
|
|
||||||
db $00 ; 0D - Powder
|
|
||||||
db $00 ; 0E - Bottle Refill (bee)
|
|
||||||
db $00 ; 0F - Bombos
|
|
||||||
db $00 ; 10 - Ether
|
|
||||||
db $00 ; 11 - Quake
|
|
||||||
db $00 ; 12 - Lamp
|
|
||||||
db $00 ; 13 - Shovel
|
|
||||||
db $00 ; 14 - Flute
|
|
||||||
db $00 ; 15 - Somaria
|
|
||||||
db $00 ; 16 - Bottle
|
|
||||||
db $00 ; 17 - Heartpiece
|
|
||||||
db $00 ; 18 - Byrna
|
|
||||||
db $00 ; 19 - Cape
|
|
||||||
db $00 ; 1A - Mirror
|
|
||||||
db $00 ; 1B - Glove
|
|
||||||
db $00 ; 1C - Mitts
|
|
||||||
db $00 ; 1D - Book
|
|
||||||
db $00 ; 1E - Flippers
|
|
||||||
db $00 ; 1F - Pearl
|
|
||||||
db $00 ; 20 - Crystal
|
|
||||||
db $00 ; 21 - Net
|
|
||||||
db $00 ; 22 - Blue Mail
|
|
||||||
db $00 ; 23 - Red Mail
|
|
||||||
db $00 ; 24 - Small Key
|
|
||||||
db $00 ; 25 - Compass
|
|
||||||
db $00 ; 26 - Heart Container from 4/4
|
|
||||||
db $01 ; 27 - Bomb
|
|
||||||
db $01 ; 28 - 3 bombs
|
|
||||||
db $00 ; 29 - Mushroom
|
|
||||||
db $00 ; 2A - Red boomerang
|
|
||||||
db $00 ; 2B - Full bottle (red)
|
|
||||||
db $00 ; 2C - Full bottle (green)
|
|
||||||
db $00 ; 2D - Full bottle (blue)
|
|
||||||
db $00 ; 2E - Potion refill (red)
|
|
||||||
db $00 ; 2F - Potion refill (green)
|
|
||||||
db $00 ; 30 - Potion refill (blue)
|
|
||||||
db $01 ; 31 - 10 bombs
|
|
||||||
db $00 ; 32 - Big key
|
|
||||||
db $00 ; 33 - Map
|
|
||||||
db $01 ; 34 - 1 rupee
|
|
||||||
db $01 ; 35 - 5 rupees
|
|
||||||
db $01 ; 36 - 20 rupees
|
|
||||||
db $00 ; 37 - Green pendant
|
|
||||||
db $00 ; 38 - Blue pendant
|
|
||||||
db $00 ; 39 - Red pendant
|
|
||||||
db $00 ; 3A - Tossed bow
|
|
||||||
db $00 ; 3B - Silvers
|
|
||||||
db $00 ; 3C - Full bottle (bee)
|
|
||||||
db $00 ; 3D - Full bottle (fairy)
|
|
||||||
db $00 ; 3E - Boss heart
|
|
||||||
db $00 ; 3F - Sanc heart
|
|
||||||
db $01 ; 40 - 100 rupees
|
|
||||||
db $01 ; 41 - 50 rupees
|
|
||||||
db $01 ; 42 - Heart
|
|
||||||
db $01 ; 43 - Arrow
|
|
||||||
db $01 ; 44 - 10 arrows
|
|
||||||
db $01 ; 45 - Small magic
|
|
||||||
db $01 ; 46 - 300 rupees
|
|
||||||
db $01 ; 47 - 20 rupees green
|
|
||||||
db $00 ; 48 - Full bottle (good bee)
|
|
||||||
db $00 ; 49 - Tossed fighter sword
|
|
||||||
db $00 ; 4A - Active Flute
|
|
||||||
db $00 ; 4B - Boots
|
|
||||||
|
|
||||||
db $00 ; 4C - Bomb capacity (50)
|
|
||||||
db $00 ; 4D - Arrow capacity (70)
|
|
||||||
db $00 ; 4E - 1/2 magic
|
|
||||||
db $00 ; 4F - 1/4 magic
|
|
||||||
db $00 ; 50 - Safe master sword
|
|
||||||
db $00 ; 51 - Bomb capacity (+5)
|
|
||||||
db $00 ; 52 - Bomb capacity (+10)
|
|
||||||
db $00 ; 53 - Arrow capacity (+5)
|
|
||||||
db $00 ; 54 - Arrow capacity (+10)
|
|
||||||
db $00 ; 55 - Programmable item 1
|
|
||||||
db $00 ; 56 - Programmable item 2
|
|
||||||
db $00 ; 57 - Programmable item 3
|
|
||||||
db $00 ; 58 - Upgrade-only silver arrows
|
|
||||||
db $01 ; 59 - Rupoor
|
|
||||||
db $01 ; 5A - Nothing
|
|
||||||
db $00 ; 5B - Red clock
|
|
||||||
db $00 ; 5C - Blue clock
|
|
||||||
db $00 ; 5D - Green clock
|
|
||||||
db $00 ; 5E - Progressive sword
|
|
||||||
db $00 ; 5F - Progressive shield
|
|
||||||
db $00 ; 60 - Progressive armor
|
|
||||||
db $00 ; 61 - Progressive glove
|
|
||||||
db $00 ; 62 - RNG pool item (single)
|
|
||||||
db $00 ; 63 - RNG pool item (multi)
|
|
||||||
db $00 ; 64 - Progressive bow
|
|
||||||
db $00 ; 65 - Progressive bow
|
|
||||||
db $00 ; 66 - Potion refill (orange)
|
|
||||||
db $00 ; 67 -
|
|
||||||
db $00 ; 68 -
|
|
||||||
db $00 ; 69 -
|
|
||||||
db $00 ; 6A - Triforce
|
|
||||||
db $01 ; 6B - Power star
|
|
||||||
db $01 ; 6C - Triforce Piece
|
|
||||||
db $00 ; 6D - Server request item
|
|
||||||
db $00 ; 6E - Server request item (dungeon drop)
|
|
||||||
db $00 ; 6F -
|
|
||||||
|
|
||||||
db $00 ; 70 - Map of Light World
|
|
||||||
db $00 ; 71 - Map of Dark World
|
|
||||||
db $00 ; 72 - Map of Ganon's Tower
|
|
||||||
db $00 ; 73 - Map of Turtle Rock
|
|
||||||
db $00 ; 74 - Map of Thieves' Town
|
|
||||||
db $00 ; 75 - Map of Tower of Hera
|
|
||||||
db $00 ; 76 - Map of Ice Palace
|
|
||||||
db $00 ; 77 - Map of Skull Woods
|
|
||||||
db $00 ; 78 - Map of Misery Mire
|
|
||||||
db $00 ; 79 - Map of Dark Palace
|
|
||||||
db $00 ; 7A - Map of Swamp Palace
|
|
||||||
db $00 ; 7B - Map of Agahnim's Tower
|
|
||||||
db $00 ; 7C - Map of Desert Palace
|
|
||||||
db $00 ; 7D - Map of Eastern Palace
|
|
||||||
db $00 ; 7E - Map of Hyrule Castle
|
|
||||||
db $00 ; 7F - Map of Sewers
|
|
||||||
|
|
||||||
db $00 ; 80 - Compass of Light World
|
|
||||||
db $00 ; 81 - Compass of Dark World
|
|
||||||
db $00 ; 82 - Compass of Ganon's Tower
|
|
||||||
db $00 ; 83 - Compass of Turtle Rock
|
|
||||||
db $00 ; 84 - Compass of Thieves' Town
|
|
||||||
db $00 ; 85 - Compass of Tower of Hera
|
|
||||||
db $00 ; 86 - Compass of Ice Palace
|
|
||||||
db $00 ; 87 - Compass of Skull Woods
|
|
||||||
db $00 ; 88 - Compass of Misery Mire
|
|
||||||
db $00 ; 89 - Compass of Dark Palace
|
|
||||||
db $00 ; 8A - Compass of Swamp Palace
|
|
||||||
db $00 ; 8B - Compass of Agahnim's Tower
|
|
||||||
db $00 ; 8C - Compass of Desert Palace
|
|
||||||
db $00 ; 8D - Compass of Eastern Palace
|
|
||||||
db $00 ; 8E - Compass of Hyrule Castle
|
|
||||||
db $00 ; 8F - Compass of Sewers
|
|
||||||
|
|
||||||
db $00 ; 90 - Skull key
|
|
||||||
db $00 ; 91 - Reserved
|
|
||||||
db $00 ; 92 - Big key of Ganon's Tower
|
|
||||||
db $00 ; 93 - Big key of Turtle Rock
|
|
||||||
db $00 ; 94 - Big key of Thieves' Town
|
|
||||||
db $00 ; 95 - Big key of Tower of Hera
|
|
||||||
db $00 ; 96 - Big key of Ice Palace
|
|
||||||
db $00 ; 97 - Big key of Skull Woods
|
|
||||||
db $00 ; 98 - Big key of Misery Mire
|
|
||||||
db $00 ; 99 - Big key of Dark Palace
|
|
||||||
db $00 ; 9A - Big key of Swamp Palace
|
|
||||||
db $00 ; 9B - Big key of Agahnim's Tower
|
|
||||||
db $00 ; 9C - Big key of Desert Palace
|
|
||||||
db $00 ; 9D - Big key of Eastern Palace
|
|
||||||
db $00 ; 9E - Big key of Hyrule Castle
|
|
||||||
db $00 ; 9F - Big key of Sewers
|
|
||||||
|
|
||||||
db $00 ; A0 - Small key of Sewers
|
|
||||||
db $00 ; A1 - Small key of Hyrule Castle
|
|
||||||
db $00 ; A2 - Small key of Eastern Palace
|
|
||||||
db $00 ; A3 - Small key of Desert Palace
|
|
||||||
db $00 ; A4 - Small key of Agahnim's Tower
|
|
||||||
db $00 ; A5 - Small key of Swamp Palace
|
|
||||||
db $00 ; A6 - Small key of Dark Palace
|
|
||||||
db $00 ; A7 - Small key of Misery Mire
|
|
||||||
db $00 ; A8 - Small key of Skull Woods
|
|
||||||
db $00 ; A9 - Small key of Ice Palace
|
|
||||||
db $00 ; AA - Small key of Tower of Hera
|
|
||||||
db $00 ; AB - Small key of Thieves' Town
|
|
||||||
db $00 ; AC - Small key of Turtle Rock
|
|
||||||
db $00 ; AD - Small key of Ganon's Tower
|
|
||||||
db $00 ; AE - Reserved
|
|
||||||
db $00 ; AF - Generic small key
|
|
||||||
db $00 ; B0 - Crystal 6
|
|
||||||
db $00 ; B1 - Crystal 1
|
|
||||||
db $00 ; B2 - Crystal 5
|
|
||||||
db $00 ; B3 - Crystal 7
|
|
||||||
db $00 ; B4 - Crystal 2
|
|
||||||
db $00 ; B5 - Crystal 4
|
|
||||||
db $00 ; B6 - Crystal 3
|
|
||||||
db $00 ; B7 - Reserved
|
|
||||||
db $00 ; B8 -
|
|
||||||
db $00 ; B9 -
|
|
||||||
db $00 ; BA -
|
|
||||||
db $00 ; BB -
|
|
||||||
db $00 ; BC -
|
|
||||||
db $00 ; BD -
|
|
||||||
db $00 ; BE -
|
|
||||||
db $00 ; BF -
|
|
||||||
db $00 ; C0 -
|
|
||||||
db $00 ; C1 -
|
|
||||||
db $00 ; C2 -
|
|
||||||
db $00 ; C3 -
|
|
||||||
db $00 ; C4 -
|
|
||||||
db $00 ; C5 -
|
|
||||||
db $00 ; C6 -
|
|
||||||
db $00 ; C7 -
|
|
||||||
db $00 ; C8 -
|
|
||||||
db $00 ; C9 -
|
|
||||||
db $00 ; CA -
|
|
||||||
db $00 ; CB -
|
|
||||||
db $00 ; CC -
|
|
||||||
db $00 ; CD -
|
|
||||||
db $00 ; CE -
|
|
||||||
db $00 ; CF -
|
|
||||||
db $01 ; D0 - Bee trap
|
|
||||||
db $01 ; D1 - Apples
|
|
||||||
db $01 ; D2 - Fairy
|
|
||||||
db $01 ; D3 - Chicken
|
|
||||||
db $01 ; D4 - Big Magic
|
|
||||||
db $01 ; D5 - 5 Arrows
|
|
||||||
db $01 ; D6 - Good Bee
|
|
||||||
db $00 ; D7 -
|
|
||||||
db $00 ; D8 -
|
|
||||||
db $00 ; D9 -
|
|
||||||
db $00 ; DA -
|
|
||||||
db $00 ; DB -
|
|
||||||
db $00 ; DC -
|
|
||||||
db $00 ; DD -
|
|
||||||
db $00 ; DE -
|
|
||||||
db $00 ; DF -
|
|
||||||
db $00 ; E0 -
|
|
||||||
db $00 ; E1 -
|
|
||||||
db $00 ; E2 -
|
|
||||||
db $00 ; E3 -
|
|
||||||
db $00 ; E4 -
|
|
||||||
db $00 ; E5 -
|
|
||||||
db $00 ; E6 -
|
|
||||||
db $00 ; E7 -
|
|
||||||
db $00 ; E8 -
|
|
||||||
db $00 ; E9 -
|
|
||||||
db $00 ; EA -
|
|
||||||
db $00 ; EB -
|
|
||||||
db $00 ; EC -
|
|
||||||
db $00 ; ED -
|
|
||||||
db $00 ; EE -
|
|
||||||
db $00 ; EF -
|
|
||||||
db $00 ; F0 -
|
|
||||||
db $00 ; F1 -
|
|
||||||
db $00 ; F2 -
|
|
||||||
db $00 ; F3 -
|
|
||||||
db $00 ; F4 -
|
|
||||||
db $00 ; F5 -
|
|
||||||
db $00 ; F6 -
|
|
||||||
db $00 ; F7 -
|
|
||||||
db $00 ; F8 -
|
|
||||||
db $00 ; F9 -
|
|
||||||
db $00 ; FA -
|
|
||||||
db $00 ; FB -
|
|
||||||
db $00 ; FC -
|
|
||||||
db $00 ; FD -
|
|
||||||
db $00 ; FE - Server request (async)
|
|
||||||
db $00 ; FF -
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
LoadDungeonIndicator:
|
|
||||||
; what we wrote over
|
|
||||||
JSL InitializeTilesets
|
|
||||||
|
|
||||||
LDA.w DungeonID
|
|
||||||
CMP.b #DungeonIndicatorMap_end-DungeonIndicatorMap : BCS .done
|
|
||||||
TAX
|
|
||||||
|
|
||||||
; mark dungeon as entered
|
|
||||||
REP #$20
|
|
||||||
LDA.w DungeonMask, X
|
|
||||||
ORA.l DungeonVisited
|
|
||||||
STA.l DungeonVisited
|
|
||||||
SEP #$20
|
|
||||||
|
|
||||||
; load indicator
|
|
||||||
LDA.l DungeonIndicatorMap, X
|
|
||||||
TAX
|
|
||||||
|
|
||||||
LDA.b #$80
|
|
||||||
STA.w $2115
|
|
||||||
|
|
||||||
REP #$20
|
|
||||||
LDA.w #$7140
|
|
||||||
STA.w $2116
|
|
||||||
|
|
||||||
LDY.b #$10
|
|
||||||
|
|
||||||
- LDA.l DungeonIndicatorGfx, X
|
|
||||||
STA.w $2118
|
|
||||||
INX #2
|
|
||||||
DEY #2
|
|
||||||
BNE -
|
|
||||||
|
|
||||||
SEP #$20
|
|
||||||
.done
|
|
||||||
RTL
|
|
||||||
|
|
||||||
DungeonIndicatorMap:
|
|
||||||
dw $0000
|
|
||||||
dw $0000
|
|
||||||
dw $0010
|
|
||||||
dw $0020
|
|
||||||
dw $0040
|
|
||||||
dw $0060
|
|
||||||
dw $0050
|
|
||||||
dw $00A0
|
|
||||||
dw $0070
|
|
||||||
dw $0090
|
|
||||||
dw $0030
|
|
||||||
dw $0080
|
|
||||||
dw $00B0
|
|
||||||
dw $00C0
|
|
||||||
.end
|
|
||||||
|
|
||||||
DungeonIndicatorGfx:
|
|
||||||
incbin "menu/dr_dungeon_indicators.2bpp"
|
|
||||||
.end
|
|
||||||
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
;--------------------------------------------------------------------------------
|
|
||||||
SetItemRiseTimer:
|
|
||||||
LDA.w ItemReceiptMethod : CMP.b #$01 : BNE .not_from_chest
|
|
||||||
LDA.b #$38 : STA.w AncillaTimer, X
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.not_from_chest
|
|
||||||
JSL ItemIsJunk
|
|
||||||
BEQ .default
|
|
||||||
|
|
||||||
.junk
|
|
||||||
LDA.l JunkItemTimer : AND.b #$3F : STA.w AncillaTimer, X
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.default
|
|
||||||
TYA : STA.w AncillaTimer, X ; What we wrote over
|
|
||||||
RTL
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
ItemIsJunk:
|
|
||||||
PHX
|
|
||||||
LDA.l JunkItemTimer : BIT.b #$3F : BEQ .not_junk
|
|
||||||
BIT.b #$80 : BNE .check
|
|
||||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .check
|
|
||||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .check
|
|
||||||
BRA .not_junk
|
|
||||||
|
|
||||||
.check
|
|
||||||
LDA.w AncillaGet, X
|
|
||||||
TAX
|
|
||||||
LDA.l JunkTable, X
|
|
||||||
PLX
|
|
||||||
CMP.b #$00
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.not_junk
|
|
||||||
PLX
|
|
||||||
LDA.b #$00
|
|
||||||
RTL
|
|
||||||
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
; A = item id being collected
|
|
||||||
ItemGetAlternateSFX:
|
|
||||||
PEA.w $C567 ; SNES to RTS to in bank 08
|
|
||||||
LDA.w AncillaGet, X : CMP.b #$4A : BNE +
|
|
||||||
; collecting pre-activated flute
|
|
||||||
LDA.b #$13 : JML Ancilla_SFX2_Near
|
|
||||||
+
|
|
||||||
JSL ItemIsJunk : BEQ .normal
|
|
||||||
LDA.b #$3B : JML Ancilla_SFX3_Near
|
|
||||||
.normal
|
|
||||||
LDA.b #$0F : JML Ancilla_SFX3_Near
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
; A = item id being collected
|
|
||||||
ItemGetOverworldAlternateSFX:
|
|
||||||
CPY.b #$4A : BNE +
|
|
||||||
; pre-activated flute
|
|
||||||
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$13 : STA.w SFX2
|
|
||||||
RTL
|
|
||||||
+
|
|
||||||
JSL ItemIsJunk : BEQ .normal
|
|
||||||
.junk
|
|
||||||
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$3B : STA.w SFX3
|
|
||||||
RTL
|
|
||||||
.normal
|
|
||||||
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$0F : STA.w SFX3
|
|
||||||
RTL
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
-101
@@ -1,101 +0,0 @@
|
|||||||
pushpc
|
|
||||||
org $828C73
|
|
||||||
JSL EnterRoom
|
|
||||||
NOP
|
|
||||||
|
|
||||||
org $86C0AB
|
|
||||||
JSL CollectHeartPieceAndUpdate
|
|
||||||
|
|
||||||
org $86D1A8
|
|
||||||
JSL SetDeathFlagAndUpdate
|
|
||||||
|
|
||||||
pullpc
|
|
||||||
|
|
||||||
SetDeathFlagAndUpdate:
|
|
||||||
JSL UpdateLootHUD
|
|
||||||
JSL Sprite_ManuallySetDeathFlagUW
|
|
||||||
RTL
|
|
||||||
|
|
||||||
CollectHeartPieceAndUpdate:
|
|
||||||
JSL $85F018
|
|
||||||
JSL UpdateLootHUD
|
|
||||||
RTL
|
|
||||||
|
|
||||||
ClearLootHUD:
|
|
||||||
LDA.b GameMode
|
|
||||||
CMP.b #$07
|
|
||||||
BNE UpdateLootHUD
|
|
||||||
;
|
|
||||||
PHP
|
|
||||||
REP #$20
|
|
||||||
LDA.w #!BlankTile : STA.w EnemyDropIndicator
|
|
||||||
PLP
|
|
||||||
RTL
|
|
||||||
|
|
||||||
EnterRoom:
|
|
||||||
; what we wrote over
|
|
||||||
STZ.w $0200
|
|
||||||
STZ.b $B0
|
|
||||||
|
|
||||||
; fall into UpdateLootHUD
|
|
||||||
|
|
||||||
UpdateLootHUD:
|
|
||||||
PHP
|
|
||||||
REP #$30
|
|
||||||
PHX : PHY
|
|
||||||
SEP #$30
|
|
||||||
|
|
||||||
LDA.l HudItems_enabled : BEQ .setting_off
|
|
||||||
LDA.b IndoorsFlag : BEQ .done
|
|
||||||
|
|
||||||
REP #$30
|
|
||||||
LDA.b $00 : PHA
|
|
||||||
LDA.b $02 : PHA
|
|
||||||
LDA.b $04 : PHA
|
|
||||||
LDA.b $06 : PHA
|
|
||||||
LDA.b $08 : PHA
|
|
||||||
LDA.b $0E : PHA
|
|
||||||
|
|
||||||
; if if door rando, check for section of supertile
|
|
||||||
LDA.l DRMode
|
|
||||||
BNE +
|
|
||||||
|
|
||||||
; if not in door rando, check for section of supertile if we're not in a dungeon
|
|
||||||
LDA.w DungeonID
|
|
||||||
AND.w #$00FF
|
|
||||||
CMP.w #$00FF
|
|
||||||
BEQ +
|
|
||||||
|
|
||||||
; just load the room id, we don't care about sections
|
|
||||||
LDA.b RoomIndex
|
|
||||||
BRA .check
|
|
||||||
|
|
||||||
+ ; figure out section before checking
|
|
||||||
JSL DetectLinksSection
|
|
||||||
INC A
|
|
||||||
XBA
|
|
||||||
ASL A : ASL A : ASL A : ASL A
|
|
||||||
ORA.b RoomIndex
|
|
||||||
.check
|
|
||||||
JSL CheckHudLoot
|
|
||||||
|
|
||||||
ASL A : TAX
|
|
||||||
LDA.l HUDLootTypeIcons, X
|
|
||||||
STA.w EnemyDropIndicator
|
|
||||||
|
|
||||||
PLA : STA.b $0E
|
|
||||||
PLA : STA.b $08
|
|
||||||
PLA : STA.b $06
|
|
||||||
PLA : STA.b $04
|
|
||||||
PLA : STA.b $02
|
|
||||||
PLA : STA.b $00
|
|
||||||
BRA .done
|
|
||||||
|
|
||||||
.setting_off
|
|
||||||
JSL SetupEnemyDropIndicator
|
|
||||||
|
|
||||||
.done
|
|
||||||
REP #$30
|
|
||||||
PLY : PLX
|
|
||||||
PLP
|
|
||||||
RTL
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
CheckOrangePotion:
|
|
||||||
LDA.l BottleContents, X
|
|
||||||
CMP.b #$01
|
|
||||||
BEQ .orange
|
|
||||||
|
|
||||||
; return to vanilla behavior
|
|
||||||
CMP.b #$00
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.orange
|
|
||||||
LDA.l InfiniteMagic
|
|
||||||
BNE .nope
|
|
||||||
|
|
||||||
LDA.b #$02
|
|
||||||
STA.l BottleContents, X
|
|
||||||
|
|
||||||
STZ.w $0301
|
|
||||||
|
|
||||||
LDA.b #$01
|
|
||||||
STA.l InfiniteMagic
|
|
||||||
|
|
||||||
JSL RebuildHUD_update_long
|
|
||||||
LDA.b #$00
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.nope
|
|
||||||
JSL Sound_SetSfxPanWithPlayerCoords
|
|
||||||
ORA.b #$3C
|
|
||||||
STA.w SFX2
|
|
||||||
LDA.b #$00
|
|
||||||
RTL
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
org $B9EE00
|
|
||||||
|
|
||||||
;================================================================================
|
|
||||||
warnpc $B9EEE0
|
|
||||||
org $B9EEE0
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
B9Source:
|
|
||||||
; $01 = GK Baserom
|
|
||||||
; $FF = GK Adjuster Patch
|
|
||||||
db $01
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
GKRomVersion:
|
|
||||||
; $01 = Dungeon Maps
|
|
||||||
; .., $01 = Dark rooms don't show on map from visition
|
|
||||||
; .., $02 = OW Fog and Grid modes
|
|
||||||
; .., $03 = Loot level of current supertile in HUD
|
|
||||||
db $01, $03, $00
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
;================================================================================
|
|
||||||
warnpc $B9EEF0
|
|
||||||
org $B9EEF0
|
|
||||||
GKRandomizerVersion:
|
|
||||||
padbyte $00
|
|
||||||
pad $B9EF00
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
+21
-55
@@ -1,8 +1,5 @@
|
|||||||
GoalItemGanonCheck:
|
GoalItemGanonCheck:
|
||||||
LDA.w SpriteTypeTable, X : CMP.b #$D6 : BNE .success ; skip if not ganon
|
LDA.w SpriteTypeTable, X : CMP.b #$D6 : BNE .success ; skip if not ganon
|
||||||
LDA.l GanonVulnerabilityItem : BPL +
|
|
||||||
LDA.w SpriteActivity, X : CMP.b #$12 : BEQ .fail
|
|
||||||
+
|
|
||||||
LDA.b #$01 : JSL CheckConditionPass
|
LDA.b #$01 : JSL CheckConditionPass
|
||||||
BCS .success
|
BCS .success
|
||||||
|
|
||||||
@@ -43,14 +40,14 @@ RTL
|
|||||||
dw .crystals
|
dw .crystals
|
||||||
dw .pendant_bosses
|
dw .pendant_bosses
|
||||||
dw .crystal_bosses
|
dw .crystal_bosses
|
||||||
dw .prize_bosses
|
dw .bosses
|
||||||
dw .agahnim_defeated
|
dw .agahnim_defeated
|
||||||
dw .agahnim2_defeated
|
dw .agahnim2_defeated
|
||||||
dw .goal_item
|
dw .goal_item
|
||||||
dw .collection_rate
|
dw .collection_rate
|
||||||
dw .custom_goal
|
dw .custom_goal
|
||||||
dw .bingo
|
dw .bingo
|
||||||
dw .all_bosses
|
dw .success
|
||||||
dw .success
|
dw .success
|
||||||
dw .success
|
dw .success
|
||||||
dw .success
|
dw .success
|
||||||
@@ -73,24 +70,19 @@ RTL
|
|||||||
CMP.b #$07 : RTS
|
CMP.b #$07 : RTS
|
||||||
.pendant_bosses
|
.pendant_bosses
|
||||||
PHP
|
PHP
|
||||||
LDA.b #$20
|
LDA.b #$02
|
||||||
JSR CheckForBossesDefeated : PLP : BCC +
|
JSR CheckForBossesDefeated : PLP : BCC +
|
||||||
CMP.b #$03 : RTS
|
CMP.b #$03 : RTS
|
||||||
.crystal_bosses
|
.crystal_bosses
|
||||||
PHP
|
PHP
|
||||||
LDA.b #$10
|
LDA.b #$01
|
||||||
JSR CheckForBossesDefeated : PLP : BCC +
|
JSR CheckForBossesDefeated : PLP : BCC +
|
||||||
CMP.b #$07 : RTS
|
CMP.b #$07 : RTS
|
||||||
.all_bosses
|
.bosses
|
||||||
PHP
|
|
||||||
LDA.b #$30
|
|
||||||
JSR CheckForBossesDefeated : PLP : BCC +
|
|
||||||
CMP.b #$10 : RTS
|
|
||||||
.prize_bosses
|
|
||||||
PHP
|
PHP
|
||||||
LDA.b #$00
|
LDA.b #$00
|
||||||
JSR CheckForBossesDefeated : PLP : BCC +
|
JSR CheckForBossesDefeated : PLP : BCC +
|
||||||
CMP.b #$0A : RTS
|
CMP.b #$10 : RTS
|
||||||
+ CMP.b [Scrap00], Y : INY : RTS
|
+ CMP.b [Scrap00], Y : INY : RTS
|
||||||
.agahnim_defeated
|
.agahnim_defeated
|
||||||
LDA.l ProgressIndicator : CMP.b #$03 : RTS
|
LDA.l ProgressIndicator : CMP.b #$03 : RTS
|
||||||
@@ -354,7 +346,7 @@ CheckTowerOpen:
|
|||||||
;---------------------------------------------------------------------------------------------------
|
;---------------------------------------------------------------------------------------------------
|
||||||
CheckAgaForPed:
|
CheckAgaForPed:
|
||||||
REP #$20
|
REP #$20
|
||||||
; seems light_speed option to force blue balls is unused for now
|
; seems light_speed option to force blue balls is unused for now
|
||||||
BRA .vanilla
|
BRA .vanilla
|
||||||
|
|
||||||
.light_speed
|
.light_speed
|
||||||
@@ -376,38 +368,12 @@ CheckAgaForPed:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
;---------------------------------------------------------------------------------------------------
|
;---------------------------------------------------------------------------------------------------
|
||||||
BossPrizeFlags:
|
|
||||||
; $00 = all prize bosses
|
|
||||||
db $00
|
|
||||||
db $01, $01, $01, $01, $01, $01, $01 ; crystals
|
|
||||||
db $01, $01, $01 ; pendants
|
|
||||||
db $00, $00, $00, $00, $00 ; padding
|
|
||||||
; $10 = all crystal bosses
|
|
||||||
db $00
|
|
||||||
db $01, $01, $01, $01, $01, $01, $01 ; crystals
|
|
||||||
db $00, $00, $00 ; pendants
|
|
||||||
db $00, $00, $00, $00, $00 ; padding
|
|
||||||
; $20 = all pendant bosses
|
|
||||||
db $00
|
|
||||||
db $00, $00, $00, $00, $00, $00, $00 ; crystals
|
|
||||||
db $01, $01, $01 ; pendants
|
|
||||||
db $00, $00, $00, $00, $00 ; padding
|
|
||||||
; $30 = all bosses
|
|
||||||
db $01 ; agas
|
|
||||||
db $01, $01, $01, $01, $01, $01, $01 ; crystals
|
|
||||||
db $01, $01, $01 ; pendants
|
|
||||||
db $00, $00, $00, $00, $00 ; padding
|
|
||||||
|
|
||||||
CheckForBossesDefeated:
|
CheckForBossesDefeated:
|
||||||
PHB : PHX : PHY
|
PHB : PHX : PHY
|
||||||
|
|
||||||
; $00 = check prize bosses
|
STA.b Scrap04 ; 0 = check all, 1 = check crystals, 2 = check pendants
|
||||||
; $10 = check crystal bosses
|
|
||||||
; $20 = check pendant bosses
|
|
||||||
; $30 = check all bosses
|
|
||||||
STA.b Scrap04
|
|
||||||
|
|
||||||
LDA.b #bank(CrystalPendantFlags_3)
|
LDA.b #CrystalPendantFlags_3>>16
|
||||||
PHA : PLB
|
PHA : PLB
|
||||||
|
|
||||||
STZ.b Scrap03 ; count of number of bosses killed
|
STZ.b Scrap03 ; count of number of bosses killed
|
||||||
@@ -415,22 +381,22 @@ CheckForBossesDefeated:
|
|||||||
|
|
||||||
REP #$30
|
REP #$30
|
||||||
|
|
||||||
LDY.w #11
|
LDY.w #10
|
||||||
|
|
||||||
.next_check
|
.next_check
|
||||||
SEP #$30
|
LDA.w CrystalPendantFlags_3+2,Y : AND.w #$00FF : BEQ .skip
|
||||||
LDA.w CrystalPendantFlags_3+2, Y
|
CMP.w #$0008 ; C set = pendant, C clear = crystal
|
||||||
CLC : ADC.b Scrap04
|
LDA.b Scrap04 : BEQ .proceed
|
||||||
TAX
|
PHP : ROR : BCC +
|
||||||
LDA.l BossPrizeFlags, X
|
PLP : BCS .skip : BRA .proceed
|
||||||
REP #$30
|
+ PLP : BCC .skip
|
||||||
BEQ .skip
|
|
||||||
|
|
||||||
TYA : ASL A : TAX
|
.proceed
|
||||||
|
TYA : ASL : TAX
|
||||||
|
|
||||||
LDA.l DungeonMapBossRooms+4, X
|
LDA.l DungeonMapBossRooms+4,X
|
||||||
ASL A : TAX
|
ASL : TAX
|
||||||
LDA.l RoomDataWRAM.l, X
|
LDA.l RoomDataWRAM.l,X
|
||||||
|
|
||||||
AND.w #$0800 : BEQ .skip
|
AND.w #$0800 : BEQ .skip
|
||||||
INC.b Scrap03
|
INC.b Scrap03
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ JSL AddBonkTremors : NOP #4
|
|||||||
; Bonk Breakable Walls
|
; Bonk Breakable Walls
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $81CF8E ; CF8E <- Bank01.asm : 11641 (LDA $0372 : AND.w #$00FF)
|
org $81CF8E ; CF8E <- Bank01.asm : 11641 (LDA $0372 : AND.w #$00FF)
|
||||||
JSL ValidDashCheck : NOP #2
|
JSL BonkBreakableWall : NOP #2
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
@@ -139,11 +139,6 @@ GravestoneHook_continue:
|
|||||||
org $87C106
|
org $87C106
|
||||||
moveGravestone:
|
moveGravestone:
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $899A30
|
|
||||||
JSL ValidDashCheck : NOP #2
|
|
||||||
org $899A3A
|
|
||||||
JSL ValidDashCheck : NOP #2
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
; Jump Down Ledge
|
; Jump Down Ledge
|
||||||
@@ -997,15 +992,6 @@ LDA.w BottleListExpanded, X
|
|||||||
|
|
||||||
org $89895C ; 4895C - ancilla_init.asm:1344 (LDA PotionList, X)
|
org $89895C ; 4895C - ancilla_init.asm:1344 (LDA PotionList, X)
|
||||||
LDA.w PotionListExpanded, X
|
LDA.w PotionListExpanded, X
|
||||||
|
|
||||||
org $898946
|
|
||||||
CMP.b #$00 : BNE + : skip 9 : +
|
|
||||||
|
|
||||||
org $89895A
|
|
||||||
LDX.b #$06
|
|
||||||
|
|
||||||
org $89896A
|
|
||||||
ADC.b #$01
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $86D1EB ; 351EB - sprite_absorbable.asm:364 (STA $7EF375) ; bugbug commented out until i figure out why it doesn't work
|
org $86D1EB ; 351EB - sprite_absorbable.asm:364 (STA $7EF375) ; bugbug commented out until i figure out why it doesn't work
|
||||||
JSL HandleBombAbsorbtion
|
JSL HandleBombAbsorbtion
|
||||||
@@ -1038,7 +1024,6 @@ JSL RefillHealth
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $80F922 ; <- 7922 - Bank00.asm:8543 - (JSL HUD.RefillMagicPower : BCC .beta)
|
org $80F922 ; <- 7922 - Bank00.asm:8543 - (JSL HUD.RefillMagicPower : BCC .beta)
|
||||||
JSL RefillMagic
|
JSL RefillMagic
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
; Early Bottle Fix
|
; Early Bottle Fix
|
||||||
@@ -1127,8 +1112,7 @@ JSL CompareBombsToMax : NOP #11
|
|||||||
org $85FC7E ; <- 2FC7E - sprite_dash_item.asm : 118 (LDA $7EF36F : INC A : STA $7EF36F)
|
org $85FC7E ; <- 2FC7E - sprite_dash_item.asm : 118 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||||
JSL GiveBonkItem : NOP #5
|
JSL GiveBonkItem : NOP #5
|
||||||
org $85FC97 ; <- 2FC97 - sprite_dash_item.asm : 126 (LDA.b #$2F : JSL Sound_SetSfx3PanLong)
|
org $85FC97 ; <- 2FC97 - sprite_dash_item.asm : 126 (LDA.b #$2F : JSL Sound_SetSfx3PanLong)
|
||||||
JSL UpdateLootHUD
|
NOP #6
|
||||||
NOP #2
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $868D39 ; <- 30D39 - sprite_prep.asm : 1435 - (LDA.b #$08 : STA $0F50, X)
|
org $868D39 ; <- 30D39 - sprite_prep.asm : 1435 - (LDA.b #$08 : STA $0F50, X)
|
||||||
JSL LoadBonkItemGFX
|
JSL LoadBonkItemGFX
|
||||||
@@ -1175,8 +1159,6 @@ ORA.w #$8000 : STA.w $007E, Y
|
|||||||
ORA.w #$4000 : STA.w $0084, Y
|
ORA.w #$4000 : STA.w $0084, Y
|
||||||
JSL AddYMarker : NOP #2
|
JSL AddYMarker : NOP #2
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $8DF779 ; <- 6F779 (not in disassembly) - mushroom bottle hud tile
|
|
||||||
dw $20D2, $60D2, $20E2, $202D ; (Orig: $2044, $2045, $2046, $2047)
|
|
||||||
org $8DF789+6 ; <- 6F789+6 (not in disassembly) - red bottle hud tile, lower right
|
org $8DF789+6 ; <- 6F789+6 (not in disassembly) - red bottle hud tile, lower right
|
||||||
dw $2413 ; (Orig: #$24E3)
|
dw $2413 ; (Orig: #$24E3)
|
||||||
org $8DF789+6+8 ; green bottle hud tile, lower right
|
org $8DF789+6+8 ; green bottle hud tile, lower right
|
||||||
@@ -1656,8 +1638,7 @@ JSL FixAga2Bunny : NOP
|
|||||||
; Open Mode Fixes
|
; Open Mode Fixes
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $85DF65 ; <- 2DF65 - sprite_uncle_and_priest.asm:994 - (LDA.b #$01 : STA $7EF3C5)
|
org $85DF65 ; <- 2DF65 - sprite_uncle_and_priest.asm:994 - (LDA.b #$01 : STA $7EF3C5)
|
||||||
JSL UpdateLootHUD
|
NOP #6
|
||||||
NOP #2
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $85EDDF ; <- 2EDDF - sprite_zelda.asm:398 - (LDA.b #$02 : STA $7EF3C5)
|
org $85EDDF ; <- 2EDDF - sprite_zelda.asm:398 - (LDA.b #$02 : STA $7EF3C5)
|
||||||
JSL EndRainState : NOP #2
|
JSL EndRainState : NOP #2
|
||||||
@@ -2121,11 +2102,6 @@ JSL FlipperScrollWarp
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
;org $878F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM)
|
;org $878F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM)
|
||||||
;JSL OnEnterWater : NOP
|
;JSL OnEnterWater : NOP
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
; Fixes getting bumped while swimming, unable to screen transition
|
|
||||||
org $879632
|
|
||||||
LinkState_Swimming:
|
|
||||||
JSL FixSwimBump
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
; Floodgate Softlock Fix
|
; Floodgate Softlock Fix
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
@@ -2772,23 +2748,6 @@ JSL MimicDirection
|
|||||||
org $828068
|
org $828068
|
||||||
JSL AdjustDefaultGraphics
|
JSL AdjustDefaultGraphics
|
||||||
|
|
||||||
;================================================================================
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
; Remove Overwriting HUD gfx on game over
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
org $809038
|
|
||||||
RTS
|
|
||||||
|
|
||||||
;================================================================================
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
; Dungeon Indicator VRAM overwrite
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
org $828190
|
|
||||||
JSL LoadDungeonIndicator
|
|
||||||
|
|
||||||
org $829AA2
|
|
||||||
JSL LoadDungeonIndicator
|
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
; Special Weapons Modes
|
; Special Weapons Modes
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
@@ -2859,10 +2818,3 @@ org $8DFB63 ; bank_0D.asm@18092 (LDA.l $7EF33F, X : AND.w #$00FF)
|
|||||||
JSL CheckFluteInHUD
|
JSL CheckFluteInHUD
|
||||||
NOP #3
|
NOP #3
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|
||||||
;================================================================================
|
|
||||||
; Orange Potion (Chateau Romani)
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
org $87A15C ; bank_07.asm@6963 (LDA.l $7EF35C, X)
|
|
||||||
JSL CheckOrangePotion
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
|
|||||||
+41
-10
@@ -165,7 +165,6 @@ AddInventory:
|
|||||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .done
|
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .done
|
||||||
REP #$30
|
REP #$30
|
||||||
LDA.l TotalItemCounter : INC : TAY
|
LDA.l TotalItemCounter : INC : TAY
|
||||||
JSL UpdateLootHUD
|
|
||||||
LDA.l BootsEquipment : AND.w #$00FF : BNE +
|
LDA.l BootsEquipment : AND.w #$00FF : BNE +
|
||||||
TYA : STA.l PreBootsLocations
|
TYA : STA.l PreBootsLocations
|
||||||
+
|
+
|
||||||
@@ -793,13 +792,45 @@ RTL
|
|||||||
}
|
}
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
MaybePlaySelectSFX:
|
MaybePlaySelectSFX:
|
||||||
LDA.w DungeonID : BMI .not_dungeon
|
LDA.w DungeonID : BMI .not_dungeon
|
||||||
.play
|
.play
|
||||||
LDA.b #$20 : STA.w SFX3 ; menu select sound
|
LDA.b #$20 : STA.w SFX3 ; menu select sound
|
||||||
RTL
|
RTL
|
||||||
.not_dungeon
|
.not_dungeon
|
||||||
LDA.l HUDDungeonItems : BIT.b #$13 : BEQ .dont_play
|
LDA.l HUDDungeonItems : BIT.b #$13 : BEQ .dont_play
|
||||||
BIT.b #$0C : BEQ .dont_play
|
BIT.b #$0C : BEQ .dont_play
|
||||||
BRA .play
|
BRA .play
|
||||||
.dont_play
|
.dont_play
|
||||||
RTL
|
RTL
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
; A = item id being collected
|
||||||
|
ItemGetAlternateSFX:
|
||||||
|
PEA.w $C567 ; SNES to RTS to in bank 08
|
||||||
|
LDA.w AncillaGet, X : CMP.b #$4A : BNE +
|
||||||
|
; collecting pre-activated flute
|
||||||
|
LDA.b #$13 : JML Ancilla_SFX2_Near
|
||||||
|
+ ; not pre-activated flute
|
||||||
|
JSL.l ItemIsJunk : BEQ .normal
|
||||||
|
|
||||||
|
.junk
|
||||||
|
LDA.b #$3B : JML Ancilla_SFX3_Near ; what we wrote over
|
||||||
|
|
||||||
|
.normal
|
||||||
|
LDA.b #$0F : JML Ancilla_SFX3_Near ; what we wrote over
|
||||||
|
|
||||||
|
; A = item id being collected
|
||||||
|
ItemGetOverworldAlternateSFX:
|
||||||
|
CPY.b #$4A : BNE +
|
||||||
|
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$13 : STA.w SFX2
|
||||||
|
RTL
|
||||||
|
+ ; normal itemget sfx
|
||||||
|
JSL.l ItemIsJunk : BEQ .normal
|
||||||
|
|
||||||
|
.junk
|
||||||
|
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$3B : STA.w SFX3
|
||||||
|
RTL
|
||||||
|
|
||||||
|
.normal
|
||||||
|
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$0F : STA.w SFX3 ; what we wrote over
|
||||||
|
RTL
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
+6
-6
@@ -239,7 +239,7 @@ endmacro
|
|||||||
%ReceiptProps($63, -4, 0, $FF, $F36A, $FF, skip, rng_multi) ; 63 - RNG pool item (multi)
|
%ReceiptProps($63, -4, 0, $FF, $F36A, $FF, skip, rng_multi) ; 63 - RNG pool item (multi)
|
||||||
%ReceiptProps($64, -4, 0, $FF, $F340, $FF, skip, progressive_bow) ; 64 - Progressive bow
|
%ReceiptProps($64, -4, 0, $FF, $F340, $FF, skip, progressive_bow) ; 64 - Progressive bow
|
||||||
%ReceiptProps($65, -4, 0, $FF, $F340, $FF, skip, progressive_bow_2) ; 65 - Progressive bow
|
%ReceiptProps($65, -4, 0, $FF, $F340, $FF, skip, progressive_bow_2) ; 65 - Progressive bow
|
||||||
%ReceiptProps($66, -4, 0, $51, $F36E, $FF, skip, skip) ; 66 - Potion refill (yellow)
|
%ReceiptProps($66, -4, 0, $FF, $F36A, $FF, skip, skip) ; 66 -
|
||||||
%ReceiptProps($67, -4, 0, $FF, $F36A, $FF, skip, skip) ; 67 -
|
%ReceiptProps($67, -4, 0, $FF, $F36A, $FF, skip, skip) ; 67 -
|
||||||
%ReceiptProps($68, -4, 0, $FF, $F36A, $FF, skip, skip) ; 68 -
|
%ReceiptProps($68, -4, 0, $FF, $F36A, $FF, skip, skip) ; 68 -
|
||||||
%ReceiptProps($69, -4, 0, $FF, $F36A, $FF, skip, skip) ; 69 -
|
%ReceiptProps($69, -4, 0, $FF, $F36A, $FF, skip, skip) ; 69 -
|
||||||
@@ -518,7 +518,7 @@ endmacro
|
|||||||
%SpriteProps($63, 2, 2, $FF, $FF, $0000) ; 63 - RNG pool item (multi)
|
%SpriteProps($63, 2, 2, $FF, $FF, $0000) ; 63 - RNG pool item (multi)
|
||||||
%SpriteProps($64, 2, 2, $FF, $FF, $0000) ; 64 - Progressive bow
|
%SpriteProps($64, 2, 2, $FF, $FF, $0000) ; 64 - Progressive bow
|
||||||
%SpriteProps($65, 2, 2, $FF, $FF, $0000) ; 65 - Progressive bow
|
%SpriteProps($65, 2, 2, $FF, $FF, $0000) ; 65 - Progressive bow
|
||||||
%SpriteProps($66, 2, 2, $02, $02, $0000) ; 66 - Potion refill (yellow)
|
%SpriteProps($66, 2, 2, $00, $00, $0000) ; 66 -
|
||||||
%SpriteProps($67, 2, 2, $00, $00, $0000) ; 67 -
|
%SpriteProps($67, 2, 2, $00, $00, $0000) ; 67 -
|
||||||
%SpriteProps($68, 2, 2, $00, $00, $0000) ; 68 -
|
%SpriteProps($68, 2, 2, $00, $00, $0000) ; 68 -
|
||||||
%SpriteProps($69, 2, 2, $00, $00, $0000) ; 69 -
|
%SpriteProps($69, 2, 2, $00, $00, $0000) ; 69 -
|
||||||
@@ -794,7 +794,7 @@ endmacro
|
|||||||
%InventoryItem($63, $0001, $0000, $0000) ; 63 - RNG pool item (multi)
|
%InventoryItem($63, $0001, $0000, $0000) ; 63 - RNG pool item (multi)
|
||||||
%InventoryItem($64, $00A5, $0000, $0000) ; 64 - Progressive bow
|
%InventoryItem($64, $00A5, $0000, $0000) ; 64 - Progressive bow
|
||||||
%InventoryItem($65, $00A5, $0000, $0000) ; 65 - Progressive bow
|
%InventoryItem($65, $00A5, $0000, $0000) ; 65 - Progressive bow
|
||||||
%InventoryItem($66, $0081, $0000, $0000) ; 66 - Potion refill (yellow)
|
%InventoryItem($66, $0001, $0000, $0000) ; 66 -
|
||||||
%InventoryItem($67, $0001, $0000, $0000) ; 67 -
|
%InventoryItem($67, $0001, $0000, $0000) ; 67 -
|
||||||
%InventoryItem($68, $0001, $0000, $0000) ; 68 -
|
%InventoryItem($68, $0001, $0000, $0000) ; 68 -
|
||||||
%InventoryItem($69, $0001, $0000, $0000) ; 69 -
|
%InventoryItem($69, $0001, $0000, $0000) ; 69 -
|
||||||
@@ -1054,7 +1054,7 @@ ItemReceiptGraphicsOffsets:
|
|||||||
dw $0 ; 63 - RNG pool item (multi)
|
dw $0 ; 63 - RNG pool item (multi)
|
||||||
dw $0 ; 64 - Progressive bow
|
dw $0 ; 64 - Progressive bow
|
||||||
dw $0 ; 65 - Progressive bow
|
dw $0 ; 65 - Progressive bow
|
||||||
dw $0CE0 ; 66 - Potion refill (yellow)
|
dw $0 ; 66 -
|
||||||
dw $0 ; 67 -
|
dw $0 ; 67 -
|
||||||
dw $0 ; 68 -
|
dw $0 ; 68 -
|
||||||
dw $0 ; 69 -
|
dw $0 ; 69 -
|
||||||
@@ -1324,7 +1324,7 @@ StandingItemGraphicsOffsets:
|
|||||||
dw $0 ; 63 - RNG pool item (multi)
|
dw $0 ; 63 - RNG pool item (multi)
|
||||||
dw $0 ; 64 - Progressive bow
|
dw $0 ; 64 - Progressive bow
|
||||||
dw $0 ; 65 - Progressive bow
|
dw $0 ; 65 - Progressive bow
|
||||||
dw $0CA0 ; 66 - Potion refill (yellow)
|
dw $0 ; 66 -
|
||||||
dw $0 ; 67 -
|
dw $0 ; 67 -
|
||||||
dw $0 ; 68 -
|
dw $0 ; 68 -
|
||||||
dw $0 ; 69 -
|
dw $0 ; 69 -
|
||||||
@@ -1590,7 +1590,7 @@ VRAMAddressOffset:
|
|||||||
dw $0024 ; 63 - RNG pool item (multi)
|
dw $0024 ; 63 - RNG pool item (multi)
|
||||||
dw $0024 ; 64 - Progressive bow
|
dw $0024 ; 64 - Progressive bow
|
||||||
dw $0024 ; 65 - Progressive bow
|
dw $0024 ; 65 - Progressive bow
|
||||||
dw $0024 ; 66 - Potion refill (yellow)
|
dw $0024 ; 66 -
|
||||||
dw $0024 ; 67 -
|
dw $0024 ; 67 -
|
||||||
dw $0024 ; 68 -
|
dw $0024 ; 68 -
|
||||||
dw $0024 ; 69 -
|
dw $0024 ; 69 -
|
||||||
|
|||||||
+2
-2
@@ -46,7 +46,7 @@ dw $7F7F
|
|||||||
|
|
||||||
; Ganons Tower
|
; Ganons Tower
|
||||||
Notice_GTower:
|
Notice_GTower:
|
||||||
db $76 : dw "Ganon's Tower"
|
db $76 : dw "Ganons Tower"
|
||||||
dw $7F7F
|
dw $7F7F
|
||||||
|
|
||||||
; Turtle Rock
|
; Turtle Rock
|
||||||
@@ -81,7 +81,7 @@ dw $7F7F
|
|||||||
|
|
||||||
; Dark Palace
|
; Dark Palace
|
||||||
Notice_PoD:
|
Notice_PoD:
|
||||||
db $76 : dw "Palace of Darkness"
|
db $76 : dw "Dark Palace"
|
||||||
dw $7F7F
|
dw $7F7F
|
||||||
|
|
||||||
; Swamp Palace
|
; Swamp Palace
|
||||||
|
|||||||
@@ -89,8 +89,7 @@ org $80FDEE
|
|||||||
InitializeMirrorHDMA:
|
InitializeMirrorHDMA:
|
||||||
|
|
||||||
org $89D62E
|
org $89D62E
|
||||||
;commenting out since this address can move
|
UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
|
||||||
;UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
|
|
||||||
|
|
||||||
if !FEATURE_FIX_BASEROM
|
if !FEATURE_FIX_BASEROM
|
||||||
org $81DB67
|
org $81DB67
|
||||||
@@ -221,8 +220,7 @@ RevealPotItem:
|
|||||||
STZ.w SpawnedItemIsMultiWorld
|
STZ.w SpawnedItemIsMultiWorld
|
||||||
BIT.b Scrap08
|
BIT.b Scrap08
|
||||||
BVS LoadMultiWorldPotItem
|
BVS LoadMultiWorldPotItem
|
||||||
BPL .normal_secret
|
BMI LoadMajorPotItem
|
||||||
JMP LoadMajorPotItem
|
|
||||||
|
|
||||||
.normal_secret
|
.normal_secret
|
||||||
STA.b Scrap08
|
STA.b Scrap08
|
||||||
@@ -243,7 +241,6 @@ RevealPotItem:
|
|||||||
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now
|
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now
|
||||||
+ REP #$10
|
+ REP #$10
|
||||||
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter ; Increment Item Total
|
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter ; Increment Item Total
|
||||||
JSL UpdateLootHUD
|
|
||||||
LDA.w #$0001 : STA.l UpdateHUDFlag
|
LDA.w #$0001 : STA.l UpdateHUDFlag
|
||||||
.obtained
|
.obtained
|
||||||
PLY : PLX
|
PLY : PLX
|
||||||
@@ -343,7 +340,6 @@ IncrementCountsForSubstitute:
|
|||||||
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now
|
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now
|
||||||
+
|
+
|
||||||
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter ; Increment Item Total
|
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter ; Increment Item Total
|
||||||
JSL UpdateLootHUD
|
|
||||||
LDA.w #$0001 : STA.l UpdateHUDFlag
|
LDA.w #$0001 : STA.l UpdateHUDFlag
|
||||||
.obtained
|
.obtained
|
||||||
SEP #$30 : PLX
|
SEP #$30 : PLX
|
||||||
@@ -360,7 +356,7 @@ ClearSpriteData:
|
|||||||
STZ.w SprSourceItemId, X : STZ.w SprItemReceipt, X : STZ.w SprItemMWPlayer, X
|
STZ.w SprSourceItemId, X : STZ.w SprItemReceipt, X : STZ.w SprItemMWPlayer, X
|
||||||
STZ.w SprRedrawFlag, X
|
STZ.w SprRedrawFlag, X
|
||||||
DEX : BPL .loop
|
DEX : BPL .loop
|
||||||
JSL ClearLootHUD
|
JSR SetupEnemyDropIndicator
|
||||||
PLX
|
PLX
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
@@ -407,7 +403,7 @@ SetupEnemyDropIndicator:
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
SEP #$20
|
SEP #$20
|
||||||
RTL
|
RTS
|
||||||
|
|
||||||
|
|
||||||
; Runs during sprite load of the room
|
; Runs during sprite load of the room
|
||||||
@@ -574,7 +570,7 @@ IncrementCountForMinor:
|
|||||||
LDA.l SpriteDropData, X : BIT.b Scrap0A : BNE .obtained
|
LDA.l SpriteDropData, X : BIT.b Scrap0A : BNE .obtained
|
||||||
ORA.b Scrap0A : STA.l SpriteDropData, X
|
ORA.b Scrap0A : STA.l SpriteDropData, X
|
||||||
SEP #$10
|
SEP #$10
|
||||||
JSL UpdateLootHUD
|
JSR SetupEnemyDropIndicator
|
||||||
REP #$20
|
REP #$20
|
||||||
LDX.w DungeonID : CPX.b #$FF : BEQ +
|
LDX.w DungeonID : CPX.b #$FF : BEQ +
|
||||||
CPX.b #$00 : BNE ++
|
CPX.b #$00 : BNE ++
|
||||||
@@ -630,10 +626,10 @@ MarkSRAMForItem:
|
|||||||
TYX
|
TYX
|
||||||
LDA.w SpawnedItemFlag : CMP.w #$0001 : BEQ +
|
LDA.w SpawnedItemFlag : CMP.w #$0001 : BEQ +
|
||||||
LDA.l SpriteDropData, X : ORA.b Scrap00 : STA.l SpriteDropData, X
|
LDA.l SpriteDropData, X : ORA.b Scrap00 : STA.l SpriteDropData, X
|
||||||
|
SEP #$10 : JSR SetupEnemyDropIndicator
|
||||||
BRA .end
|
BRA .end
|
||||||
+ LDA.l RoomPotData, X : ORA.b Scrap00 : STA.l RoomPotData, X
|
+ LDA.l RoomPotData, X : ORA.b Scrap00 : STA.l RoomPotData, X
|
||||||
.end
|
.end
|
||||||
JSL UpdateLootHUD
|
|
||||||
SEP #$30 : PLY : PLX
|
SEP #$30 : PLY : PLX
|
||||||
LDA.w RoomItemsTaken
|
LDA.w RoomItemsTaken
|
||||||
RTL
|
RTL
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ RTL
|
|||||||
;================================================================================
|
;================================================================================
|
||||||
SetOverlayIfLamp:
|
SetOverlayIfLamp:
|
||||||
JSL LampCheck
|
JSL LampCheck
|
||||||
|
CMP.b #$00
|
||||||
BEQ +
|
BEQ +
|
||||||
LDA.b #$01
|
LDA.b #$01
|
||||||
+
|
+
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -9,7 +9,7 @@ UploadMenuOnlyIcons:
|
|||||||
REP #$20
|
REP #$20
|
||||||
LDA.w #MenuOnlyIcons : STA.w $4342
|
LDA.w #MenuOnlyIcons : STA.w $4342
|
||||||
LDA.w #$1801 : STA.w $4340
|
LDA.w #$1801 : STA.w $4340
|
||||||
LDA.w #$0400 : STA.w $4345
|
LDA.w #$0240 : STA.w $4345
|
||||||
LDA.w #$0F800>>1 : STA.w $2116
|
LDA.w #$0F800>>1 : STA.w $2116
|
||||||
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+23
-145
@@ -40,7 +40,7 @@ dw $0000
|
|||||||
|
|
||||||
warnpc $8ABE2E
|
warnpc $8ABE2E
|
||||||
org $8ABE2E
|
org $8ABE2E
|
||||||
; located posx/posy, dislocated posx/posy, prize posx/posy
|
; located posx/posy, dislocated posx/posy, prize pox/posy
|
||||||
; located = proper location of icon (default: if you have map)
|
; located = proper location of icon (default: if you have map)
|
||||||
; dislocated = location of icon if proper location is hidden from player
|
; dislocated = location of icon if proper location is hidden from player
|
||||||
; highest bit on first posx indicates which world it should show in
|
; highest bit on first posx indicates which world it should show in
|
||||||
@@ -49,27 +49,27 @@ WorldMapIcon_pos:
|
|||||||
.hc
|
.hc
|
||||||
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
|
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
|
||||||
.ep
|
.ep
|
||||||
dw $0F40, $0660, $FF00, $FF00, $0F40, $0660
|
dw $0F31, $0620, $FF00, $FF00, $0F31, $0620
|
||||||
.dp
|
.dp
|
||||||
dw $0140, $0D00, $FF00, $FF00, $0140, $0D00
|
dw $0108, $0D70, $FF00, $FF00, $0108, $0D70
|
||||||
.at
|
.at
|
||||||
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
|
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
|
||||||
.sp
|
.sp
|
||||||
dw $8778, $0F50, $FF00, $FF00, $8778, $0F50
|
dw $8759, $0ED0, $FF00, $FF00, $8759, $0ED0
|
||||||
.pod
|
.pod
|
||||||
dw $8F40, $0660, $FF00, $FF00, $8F40, $0660
|
dw $8F40, $0620, $FF00, $FF00, $8F40, $0620
|
||||||
.mm
|
.mm
|
||||||
dw $8148, $0D00, $FF00, $FF00, $8148, $0D00
|
dw $8100, $0CA0, $FF00, $FF00, $8100, $0CA0
|
||||||
.sw
|
.sw
|
||||||
dw $80B0, $00C0, $FF00, $FF00, $80B0, $00C0
|
dw $8082, $00B0, $FF00, $FF00, $8082, $00B0
|
||||||
.ip
|
.ip
|
||||||
dw $8CA0, $0E00, $FF00, $FF00, $8CA0, $0E00
|
dw $8CA0, $0DA0, $FF00, $FF00, $8CA0, $0DA0
|
||||||
.toh
|
.toh
|
||||||
dw $0900, $0100, $FF00, $FF00, $0900, $0100
|
dw $08D0, $0080, $FF00, $FF00, $08D0, $0080
|
||||||
.tt
|
.tt
|
||||||
dw $81F8, $0800, $FF00, $FF00, $81F8, $0800
|
dw $81D0, $0780, $FF00, $FF00, $81D0, $0780
|
||||||
.tr
|
.tr
|
||||||
dw $8F20, $0100, $FF00, $FF00, $8F20, $0100
|
dw $8F11, $0103, $FF00, $FF00, $8F11, $0103
|
||||||
.gt
|
.gt
|
||||||
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
|
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
|
||||||
|
|
||||||
@@ -262,8 +262,8 @@ DrawPrizesOverride:
|
|||||||
|
|
||||||
; determine if draw and/or continue
|
; determine if draw and/or continue
|
||||||
JSR WorldMap_ValidateCoords : BCS .advance
|
JSR WorldMap_ValidateCoords : BCS .advance
|
||||||
JSR WorldMap_DrawTile
|
|
||||||
JSR WorldMap_DrawTileOverlay
|
JSR WorldMap_DrawTileOverlay
|
||||||
|
JSR WorldMap_DrawTile
|
||||||
.advance
|
.advance
|
||||||
LDY.b Scrap05 : DEY #2 : BMI + : JMP .next_dungeon : +
|
LDY.b Scrap05 : DEY #2 : BMI + : JMP .next_dungeon : +
|
||||||
PLB
|
PLB
|
||||||
@@ -321,35 +321,24 @@ RTS
|
|||||||
|
|
||||||
WorldMap_DrawTile:
|
WorldMap_DrawTile:
|
||||||
LDA.b Scrap00 : PHA
|
LDA.b Scrap00 : PHA
|
||||||
LDA.l $7EC10A : BIT.w #$4000 : SEP #$20 : BNE .raw_coords ; use raw OAM coordinates
|
SEP #$20
|
||||||
JSR WorldMap_CalculateOAMCoordinates
|
|
||||||
BCS .apply_offsets
|
|
||||||
REP #$20
|
|
||||||
BRA .exit
|
|
||||||
.raw_coords
|
|
||||||
STA.b Scrap0E
|
|
||||||
LDA.l $7EC108 : STA.b Scrap0F
|
|
||||||
.apply_offsets
|
|
||||||
LDX.b Scrap0A : BNE .aligned ; prize number/overlay: no offset
|
|
||||||
LDX.b Scrap0B : BEQ +
|
|
||||||
; 16x16 sprite: -8 pixels
|
|
||||||
LDA.b Scrap0E : SEC : SBC.b #$08 : STA.b Scrap0E
|
|
||||||
LDA.b Scrap0F : SBC.b #$08 : STA.b Scrap0F
|
|
||||||
BRA .aligned
|
|
||||||
+
|
|
||||||
; 8x8 sprite: -4 pixels
|
|
||||||
LDA.b Scrap0E : SEC : SBC.b #$04 : STA.b Scrap0E
|
|
||||||
LDA.b Scrap0F : SBC.b #$04 : STA.b Scrap0F
|
|
||||||
.aligned
|
|
||||||
LDX.b Scrap0B : TXA : STA.b (OAMPtr+2)
|
LDX.b Scrap0B : TXA : STA.b (OAMPtr+2)
|
||||||
INC.b OAMPtr+2
|
INC.b OAMPtr+2
|
||||||
|
JSR WorldMap_CalculateOAMCoordinates
|
||||||
|
LDX.b Scrap0A : BEQ +
|
||||||
|
LDA.b Scrap0E : CLC : ADC.b #$04 : STA.b Scrap0E
|
||||||
|
LDA.b Scrap0F : CLC : ADC.b #$04 : STA.b Scrap0F
|
||||||
|
+
|
||||||
|
LDX.b Scrap0B : BEQ +
|
||||||
|
LDA.b Scrap0E : SEC : SBC.b #$04 : STA.b Scrap0E
|
||||||
|
LDA.b Scrap0F : SEC : SBC.b #$04 : STA.b Scrap0F
|
||||||
|
+
|
||||||
REP #$20
|
REP #$20
|
||||||
|
PLA : STA.b Scrap00
|
||||||
LDA.b Scrap0E : STA.b (OAMPtr)
|
LDA.b Scrap0E : STA.b (OAMPtr)
|
||||||
INC.b OAMPtr : INC.b OAMPtr
|
INC.b OAMPtr : INC.b OAMPtr
|
||||||
LDA.b Scrap0C : STA.b (OAMPtr)
|
LDA.b Scrap0C : STA.b (OAMPtr)
|
||||||
INC.b OAMPtr : INC.b OAMPtr
|
INC.b OAMPtr : INC.b OAMPtr
|
||||||
.exit
|
|
||||||
PLA : STA.b Scrap00
|
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
; Y - dungeon index
|
; Y - dungeon index
|
||||||
@@ -434,117 +423,6 @@ WorldMap_CheckPrizeCollected:
|
|||||||
RTS
|
RTS
|
||||||
|
|
||||||
warnpc $8AC3B1
|
warnpc $8AC3B1
|
||||||
|
|
||||||
org $8AC3B6
|
|
||||||
; ---------------------------------------------------------------------------------------------------
|
|
||||||
; Y coordinate calculation: Quadratic approximation
|
|
||||||
; Formula: Y_oam = 0x16 + (Y * 118 >> 12) + ((Y>>4)^2 * 49 >> 8)
|
|
||||||
; Accurate to within ±1.5 pixels across entire range
|
|
||||||
; ---------------------------------------------------------------------------------------------------
|
|
||||||
REP #$20
|
|
||||||
LDA.l $7EC108 : ASL #4 ; world Y coordinate
|
|
||||||
PHA
|
|
||||||
; calculate linear term: (Y * 118) >> 12
|
|
||||||
SEP #$20
|
|
||||||
LDA.b #$76
|
|
||||||
JSR WorldMap_MultiplyAxB ; (Y>>4) * 118
|
|
||||||
REP #$20
|
|
||||||
STA.b Scrap00 ; linear term stored at high byte (Scrap01)
|
|
||||||
|
|
||||||
; calculate quadratic term: ((Y>>4)^2 * 49) >> 8
|
|
||||||
LDA.b 1,S
|
|
||||||
SEP #$20
|
|
||||||
XBA : TAX : XBA : TXA
|
|
||||||
JSR WorldMap_MultiplyAxB ; (Y>>4) ^ 2
|
|
||||||
LDA.b #$31
|
|
||||||
JSR WorldMap_MultiplyAxB ; multiply by 49
|
|
||||||
XBA ; quadratic term
|
|
||||||
|
|
||||||
; combine: 0x16 + linear_term + quadratic_term
|
|
||||||
CLC : ADC.b Scrap01 ; add linear term
|
|
||||||
ADC.b #$16 ; add fixed offset
|
|
||||||
STA.b Scrap0F
|
|
||||||
REP #$20
|
|
||||||
PLA ; world Y coordinate
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------------------------------
|
|
||||||
; Calculate half_width for perspective: 91 + (Y_shifted * 28 / 256)
|
|
||||||
; The world map appears wider at the bottom than at the top, simulating perspective
|
|
||||||
; Top (Y=0): X range 0x26-0xDC (half-width: 91), Bottom (Y=FFF): X range 0x08-0xF6 (half-width: 119)
|
|
||||||
; ---------------------------------------------------------------------------------------------------
|
|
||||||
SEP #$20
|
|
||||||
LDA.b #$1C ; width increase factor
|
|
||||||
JSR WorldMap_MultiplyAxB
|
|
||||||
XBA : CLC : ADC.b #$5B ; add fixed half-width
|
|
||||||
STA.b Scrap00
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------------------------------
|
|
||||||
; Calculate X offset: X_offset = (X_from_center * half_width * 2) / 256
|
|
||||||
; where X_from_center = (world_X >> 4) - 128
|
|
||||||
; The center X is at 129 (0x81)
|
|
||||||
; ---------------------------------------------------------------------------------------------------
|
|
||||||
REP #$20
|
|
||||||
LDA.l $7EC10A : LSR #4 ; world X coordinate
|
|
||||||
SEP #$20
|
|
||||||
SEC : SBC.b #$80 ; subtract 128 (center point)
|
|
||||||
PHP ; preserve carry
|
|
||||||
BPL + : EOR.b #$FF : INC : + ; absolute value
|
|
||||||
PHA
|
|
||||||
LDA.b Scrap00 : ASL : XBA ; half-width x 2
|
|
||||||
PLA
|
|
||||||
JSR WorldMap_MultiplyAxB
|
|
||||||
XBA
|
|
||||||
PLP : BCS +
|
|
||||||
STA.b Scrap00
|
|
||||||
LDA.b #$81 : SEC : SBC.b Scrap00 ; center X position - offset
|
|
||||||
BRA .store_and_exit
|
|
||||||
+ CLC : ADC.b #$81 ; center X position + offset
|
|
||||||
|
|
||||||
.store_and_exit
|
|
||||||
STA.b Scrap0E
|
|
||||||
SEP #$30
|
|
||||||
JMP WorldMap_CalculateOAMCoordinates_exit_successfully
|
|
||||||
|
|
||||||
warnpc $8AC433
|
|
||||||
|
|
||||||
; most of this function is copied from the original, but rearranged
|
|
||||||
org $8AB7F3
|
|
||||||
FluteMenu_HandleSprites:
|
|
||||||
LDA.l $7EC108 : PHA
|
|
||||||
LDA.l $7EC109 : PHA
|
|
||||||
LDA.l $7EC10A : PHA
|
|
||||||
LDA.l $7EC10B : PHA
|
|
||||||
JSL FluteMenu_MoveLinkSprite ; override vanilla (LDA.b $1A : AND.b #$10)
|
|
||||||
BEQ .continue
|
|
||||||
JSR WorldMap_CalculateOAMCoordinates : BCC .continue
|
|
||||||
LDA.b Scrap0E : SEC : SBC.b #$04 : STA.b Scrap0E
|
|
||||||
LDA.b Scrap0F : SEC : SBC.b #$04 : STA.b Scrap0F
|
|
||||||
LDA.b #$00 : STA.b Scrap0D
|
|
||||||
LDA.b #$3E : STA.b Scrap0C
|
|
||||||
JSL OWMapFluteCancelIcon ; override vanilla (LDA.b #$02 : STA.b Scrap0B)
|
|
||||||
LDX.b #$10 : JSR WorldMap_HandleSpriteBlink
|
|
||||||
.continue
|
|
||||||
warnpc $8AB831
|
|
||||||
|
|
||||||
; most of this function is copied from the original, but rearranged
|
|
||||||
org $8ABF78
|
|
||||||
WorldMap_HandleSprites:
|
|
||||||
LDA.l $7EC108 : PHA
|
|
||||||
LDA.l $7EC109 : PHA
|
|
||||||
LDA.l $7EC10A : PHA
|
|
||||||
LDA.l $7EC10B : PHA
|
|
||||||
JSL WorldMap_SkipHandleSprites ; override vanilla (LDA.b $1A : AND.b #$10)
|
|
||||||
BEQ .continue
|
|
||||||
JSR WorldMap_CalculateOAMCoordinates : BCC .continue
|
|
||||||
LDA.b Scrap0E : SEC : SBC.b #$04 : STA.b Scrap0E
|
|
||||||
LDA.b Scrap0F : SEC : SBC.b #$04 : STA.b Scrap0F
|
|
||||||
LDA.b #$00 : STA.b Scrap0D
|
|
||||||
LDA.b #$3E : STA.b Scrap0C
|
|
||||||
LDA.b #$02 : STA.b Scrap0B
|
|
||||||
LDX.b #$00 : JSR WorldMap_HandleSpriteBlink
|
|
||||||
.continue
|
|
||||||
warnpc $8ABFB6
|
|
||||||
|
|
||||||
pullpc
|
pullpc
|
||||||
|
|
||||||
WorldMap_LoadChrHalfSlot:
|
WorldMap_LoadChrHalfSlot:
|
||||||
|
|||||||
@@ -123,11 +123,6 @@ GetMultiworldItem:
|
|||||||
BRL .return
|
BRL .return
|
||||||
+
|
+
|
||||||
|
|
||||||
LDA.b LinkPushDirection
|
|
||||||
BEQ +
|
|
||||||
BRL .return
|
|
||||||
+
|
|
||||||
|
|
||||||
LDA.l !MULTIWORLD_ITEM : BNE +
|
LDA.l !MULTIWORLD_ITEM : BNE +
|
||||||
BRL .return
|
BRL .return
|
||||||
+
|
+
|
||||||
|
|||||||
+13
-19
@@ -273,15 +273,10 @@ NewHUD_DrawMagicMeter:
|
|||||||
STA.w CurrentMagic
|
STA.w CurrentMagic
|
||||||
TAY
|
TAY
|
||||||
|
|
||||||
|
LDA.b FrameCounter
|
||||||
REP #$30
|
REP #$30
|
||||||
LDA.w #$0002
|
AND.w #$000C
|
||||||
|
LSR
|
||||||
; ; cycle through colors
|
|
||||||
; LDA.b FrameCounter
|
|
||||||
; REP #$30
|
|
||||||
; AND.w #$000C
|
|
||||||
; LSR
|
|
||||||
|
|
||||||
BRA .recolor
|
BRA .recolor
|
||||||
|
|
||||||
.set_index ; this branch is always 0000 when taken
|
.set_index ; this branch is always 0000 when taken
|
||||||
@@ -314,16 +309,16 @@ MagicMeterColorMasks:
|
|||||||
;================================================================================
|
;================================================================================
|
||||||
PrizeIconTiles_Transparent:
|
PrizeIconTiles_Transparent:
|
||||||
dw $0000 ; no icon
|
dw $0000 ; no icon
|
||||||
dw $2891 ; crystal 1
|
dw $2978 ; crystal 1
|
||||||
dw $2892 ; crystal 2
|
dw $2979 ; crystal 2
|
||||||
dw $2893 ; crystal 3
|
dw $297A ; crystal 3
|
||||||
dw $2894 ; crystal 4
|
dw $297B ; crystal 4
|
||||||
dw $2895 ; crystal 5
|
dw $297C ; crystal 5
|
||||||
dw $2896 ; crystal 6
|
dw $297D ; crystal 6
|
||||||
dw $2897 ; crystal 7
|
dw $297E ; crystal 7
|
||||||
dw $2935 ; green pendant
|
dw $2963 ; green pendant
|
||||||
dw $2936 ; blue pendant
|
dw $295E ; blue pendant
|
||||||
dw $2937 ; red pendant
|
dw $296E ; red pendant
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
DrawCompassCounts:
|
DrawCompassCounts:
|
||||||
@@ -391,7 +386,6 @@ RTS
|
|||||||
;================================================================================
|
;================================================================================
|
||||||
DrawMapCounts:
|
DrawMapCounts:
|
||||||
LDA.l MapHUDMode : BEQ .done
|
LDA.l MapHUDMode : BEQ .done
|
||||||
LDA.l GenericKeys : BNE .done ; generator don't have an accurrate count of key doors in this case
|
|
||||||
|
|
||||||
; no map needed if this bit is set
|
; no map needed if this bit is set
|
||||||
BIT.b #$02 : BNE .draw_map_count
|
BIT.b #$02 : BNE .draw_map_count
|
||||||
|
|||||||
+98
-98
@@ -155,8 +155,8 @@ AddReceivedItemExpandedGetItem:
|
|||||||
PHA : LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BEQ +
|
PHA : LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BEQ +
|
||||||
PLA : BRA .done
|
PLA : BRA .done
|
||||||
+ PLA
|
+ PLA
|
||||||
JSR ItemBehavior
|
JSR ItemBehavior
|
||||||
SEP #$30
|
SEP #$30
|
||||||
.done
|
.done
|
||||||
PLB : PLX
|
PLB : PLX
|
||||||
LDA.w ItemReceiptMethod : CMP.b #$01 ; thing we wrote over
|
LDA.w ItemReceiptMethod : CMP.b #$01 ; thing we wrote over
|
||||||
@@ -229,13 +229,13 @@ ItemBehavior:
|
|||||||
JSR .increment_sword
|
JSR .increment_sword
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.fighter_shield
|
.fighter_shield
|
||||||
.red_shield
|
.red_shield
|
||||||
.mirror_shield
|
.mirror_shield
|
||||||
SEP #$10
|
SEP #$10
|
||||||
LDA.l ProgressiveFlag : BEQ +
|
LDA.l ProgressiveFlag : BEQ +
|
||||||
LDA.l HighestShield : INC : TAX
|
LDA.l HighestShield : INC : TAX
|
||||||
JSR .increment_shield
|
JSR .increment_shield
|
||||||
+ RTS
|
+ RTS
|
||||||
|
|
||||||
.blue_mail
|
.blue_mail
|
||||||
@@ -269,7 +269,7 @@ ItemBehavior:
|
|||||||
.prog_shield
|
.prog_shield
|
||||||
SEP #$10
|
SEP #$10
|
||||||
LDA.l HighestShield : INC : TAX
|
LDA.l HighestShield : INC : TAX
|
||||||
JSR .increment_shield
|
JSR .increment_shield
|
||||||
REP #$10
|
REP #$10
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
@@ -282,13 +282,13 @@ ItemBehavior:
|
|||||||
|
|
||||||
.bow
|
.bow
|
||||||
BIT.b #$40 : BNE .silversbow
|
BIT.b #$40 : BNE .silversbow
|
||||||
LDA.b #$01 : STA.l BowEquipment
|
LDA.b #$01 : STA.l BowEquipment
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.silversbow
|
.silversbow
|
||||||
LDA.l BowTracking : ORA.b #$40 : STA.l BowTracking
|
LDA.l BowTracking : ORA.b #$40 : STA.l BowTracking
|
||||||
LDA.l SilverArrowsUseRestriction : BNE +
|
LDA.l SilverArrowsUseRestriction : BNE +
|
||||||
LDA.b #03 : STA.l BowEquipment ; set bow to silver
|
LDA.b #03 : STA.l BowEquipment ; set bow to silver
|
||||||
+
|
+
|
||||||
LDA.b #$01 : STA.l BowEquipment
|
LDA.b #$01 : STA.l BowEquipment
|
||||||
RTS
|
RTS
|
||||||
@@ -331,16 +331,16 @@ ItemBehavior:
|
|||||||
.bow_and_arrows
|
.bow_and_arrows
|
||||||
LDA.l BowTracking : BIT.b #$40 : BEQ .no_silvers
|
LDA.l BowTracking : BIT.b #$40 : BEQ .no_silvers
|
||||||
LDA.l SilverArrowsUseRestriction : BNE .no_silvers
|
LDA.l SilverArrowsUseRestriction : BNE .no_silvers
|
||||||
LDA.l CurrentArrows : BEQ +
|
LDA.l CurrentArrows : BEQ +
|
||||||
LDA.b #04 : STA.l BowEquipment
|
LDA.b #04 : STA.l BowEquipment
|
||||||
|
BRA .store_bow
|
||||||
|
+
|
||||||
|
LDA.b #$03
|
||||||
BRA .store_bow
|
BRA .store_bow
|
||||||
+
|
|
||||||
LDA.b #$03
|
|
||||||
BRA .store_bow
|
|
||||||
.no_silvers
|
.no_silvers
|
||||||
LDA.l CurrentArrows : BEQ +
|
LDA.l CurrentArrows : BEQ +
|
||||||
LDA.b #02
|
LDA.b #02
|
||||||
BRA .store_bow
|
BRA .store_bow
|
||||||
+
|
+
|
||||||
LDA.b #$01
|
LDA.b #$01
|
||||||
.store_bow
|
.store_bow
|
||||||
@@ -350,13 +350,13 @@ ItemBehavior:
|
|||||||
.silver_bow
|
.silver_bow
|
||||||
LDA.b #$40 : ORA.l BowTracking : STA.l BowTracking
|
LDA.b #$40 : ORA.l BowTracking : STA.l BowTracking
|
||||||
LDA.l SilverArrowsUseRestriction : BNE .noequip
|
LDA.l SilverArrowsUseRestriction : BNE .noequip
|
||||||
LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ .noequip
|
LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ .noequip
|
||||||
LDA.l CurrentArrows : BNE + ; check arrows
|
LDA.l CurrentArrows : BNE + ; check arrows
|
||||||
LDA.b #$03 : BRA ++ ; bow without arrow
|
LDA.b #$03 : BRA ++ ; bow without arrow
|
||||||
+
|
+
|
||||||
LDA.b #$04 ; bow with arrow
|
LDA.b #$04 ; bow with arrow
|
||||||
++
|
++
|
||||||
STA.l BowEquipment
|
STA.l BowEquipment
|
||||||
.noequip
|
.noequip
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
@@ -385,7 +385,7 @@ ItemBehavior:
|
|||||||
.master_sword_safe
|
.master_sword_safe
|
||||||
SEP #$10
|
SEP #$10
|
||||||
LDA.l SwordEquipment : CMP.b #$02 : !BGE + ; skip if we have a better sword
|
LDA.l SwordEquipment : CMP.b #$02 : !BGE + ; skip if we have a better sword
|
||||||
LDA.b #$02 : STA.l SwordEquipment ; set master sword
|
LDA.b #$02 : STA.l SwordEquipment ; set master sword
|
||||||
+
|
+
|
||||||
LDX.b #$02
|
LDX.b #$02
|
||||||
JSR .increment_sword
|
JSR .increment_sword
|
||||||
@@ -426,20 +426,20 @@ ItemBehavior:
|
|||||||
.silver_arrows
|
.silver_arrows
|
||||||
LDA.l BowTracking : ORA.b #$40 : STA.l BowTracking
|
LDA.l BowTracking : ORA.b #$40 : STA.l BowTracking
|
||||||
LDA.l SilverArrowsUseRestriction : BNE ++
|
LDA.l SilverArrowsUseRestriction : BNE ++
|
||||||
LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ ++
|
LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ ++
|
||||||
LDA.l BowEquipment : BEQ ++ : CMP.b #$03 : !BGE +
|
LDA.l BowEquipment : BEQ ++ : CMP.b #$03 : !BGE +
|
||||||
!ADD.b #$02 : STA.l BowEquipment ; switch to silver bow
|
!ADD.b #$02 : STA.l BowEquipment ; switch to silver bow
|
||||||
+
|
+
|
||||||
++
|
++
|
||||||
LDA.l ArrowMode : BEQ +
|
LDA.l ArrowMode : BEQ +
|
||||||
LDA.b #$01 : STA.l ArrowsFiller
|
LDA.b #$01 : STA.l ArrowsFiller
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.single_arrow
|
.single_arrow
|
||||||
LDA.l ArrowMode : BEQ +
|
LDA.l ArrowMode : BEQ +
|
||||||
LDA.l CurrentArrows : INC : STA.l CurrentArrows ; Should be sole write to this address
|
LDA.l CurrentArrows : INC : STA.l CurrentArrows ; Should be sole write to this address
|
||||||
LDA.b #$01 : STA.l UpdateHUDFlag ; in retro/rupee bow mode.
|
LDA.b #$01 : STA.l UpdateHUDFlag ; in retro/rupee bow mode.
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
@@ -474,7 +474,7 @@ ItemBehavior:
|
|||||||
.triforce
|
.triforce
|
||||||
LDA.b OverworldIndex : CMP.b #$80 : BNE +
|
LDA.b OverworldIndex : CMP.b #$80 : BNE +
|
||||||
LDA.b LinkPosX+1 : BNE +
|
LDA.b LinkPosX+1 : BNE +
|
||||||
JSL ActivateGoal
|
JSL ActivateGoal
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
@@ -484,10 +484,10 @@ ItemBehavior:
|
|||||||
LDA.l GoalCounter : INC : STA.l GoalCounter
|
LDA.l GoalCounter : INC : STA.l GoalCounter
|
||||||
CMP.w GoalItemRequirement : BCC +
|
CMP.w GoalItemRequirement : BCC +
|
||||||
LDA.l TurnInGoalItems : AND.w #$00FF : BNE +
|
LDA.l TurnInGoalItems : AND.w #$00FF : BNE +
|
||||||
SEP #$20 ; set 8-bit accumulator
|
SEP #$20 ; set 8-bit accumulator
|
||||||
LDA.b OverworldIndex : CMP.b #$80 : BNE +
|
LDA.b OverworldIndex : CMP.b #$80 : BNE +
|
||||||
LDA.b LinkPosX+1 : BNE +
|
LDA.b LinkPosX+1 : BNE +
|
||||||
JSL ActivateGoal
|
JSL ActivateGoal
|
||||||
+
|
+
|
||||||
SEP #$20 ; set 8-bit accumulator
|
SEP #$20 ; set 8-bit accumulator
|
||||||
RTS
|
RTS
|
||||||
@@ -559,8 +559,8 @@ ItemBehavior:
|
|||||||
LSR
|
LSR
|
||||||
AND.w #$000F : TAX
|
AND.w #$000F : TAX
|
||||||
ASL : CMP.w DungeonID : BEQ .same_dungeon
|
ASL : CMP.w DungeonID : BEQ .same_dungeon
|
||||||
LDA.l DungeonKeys,X : INC : STA.l DungeonKeys,X
|
LDA.l DungeonKeys,X : INC : STA.l DungeonKeys,X
|
||||||
RTS
|
RTS
|
||||||
.same_dungeon
|
.same_dungeon
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys : STA.l DungeonKeys,X
|
LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys : STA.l DungeonKeys,X
|
||||||
@@ -575,69 +575,69 @@ ItemBehavior:
|
|||||||
|
|
||||||
.hc_smallkey
|
.hc_smallkey
|
||||||
LDA.w DungeonID : CMP.b #$03 : BCC .same_dungeon_hc
|
LDA.w DungeonID : CMP.b #$03 : BCC .same_dungeon_hc
|
||||||
LDA.l HyruleCastleKeys : INC : STA.l HyruleCastleKeys
|
LDA.l HyruleCastleKeys : INC : STA.l HyruleCastleKeys
|
||||||
LDA.l SewerKeys : INC : STA.l SewerKeys
|
LDA.l SewerKeys : INC : STA.l SewerKeys
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.generic_smallkey
|
.generic_smallkey
|
||||||
LDA.l GenericKeys : BEQ .normal
|
LDA.l GenericKeys : BEQ .normal
|
||||||
LDA.l CurrentSmallKeys : INC
|
LDA.l CurrentSmallKeys : INC
|
||||||
STA.l CurrentGenericKeys : STA.l CurrentSmallKeys
|
STA.l CurrentGenericKeys : STA.l CurrentSmallKeys
|
||||||
RTS
|
RTS
|
||||||
.normal
|
.normal
|
||||||
LDA.w DungeonID : BMI +
|
LDA.w DungeonID : BMI +
|
||||||
LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys
|
LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys
|
||||||
RTS
|
RTS
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.increment_sword
|
.increment_sword
|
||||||
LDA.l HighestSword
|
LDA.l HighestSword
|
||||||
INC : STA.b Scrap04 : CPX.b Scrap04 : BCC + ; don't increment unless we're getting a better sword
|
INC : STA.b Scrap04 : CPX.b Scrap04 : BCC + ; don't increment unless we're getting a better sword
|
||||||
TXA : STA.l HighestSword
|
TXA : STA.l HighestSword
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.increment_shield
|
.increment_shield
|
||||||
LDA.l HighestShield
|
LDA.l HighestShield
|
||||||
INC : STA.b Scrap04 : CPX.b Scrap04 : BCC + ; don't increment unless we're getting a better shield
|
INC : STA.b Scrap04 : CPX.b Scrap04 : BCC + ; don't increment unless we're getting a better shield
|
||||||
TXA : STA.l HighestShield
|
TXA : STA.l HighestShield
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.increment_mail
|
.increment_mail
|
||||||
LDA.l HighestMail
|
LDA.l HighestMail
|
||||||
INC : STA.b Scrap04 : CPX.b Scrap04 : BCC + ; don't increment unless we're getting a better mail
|
INC : STA.b Scrap04 : CPX.b Scrap04 : BCC + ; don't increment unless we're getting a better mail
|
||||||
TXA : STA.l HighestMail
|
TXA : STA.l HighestMail
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.increment_bigkey
|
.increment_bigkey
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.l StatsLocked : BNE +
|
LDA.l StatsLocked : BNE +
|
||||||
LDA.l BigKeysBigChests
|
LDA.l BigKeysBigChests
|
||||||
CLC : ADC.b #$10
|
CLC : ADC.b #$10
|
||||||
STA.l BigKeysBigChests
|
STA.l BigKeysBigChests
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.increment_map
|
.increment_map
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.l StatsLocked : BNE +
|
LDA.l StatsLocked : BNE +
|
||||||
LDA.l MapsCompasses
|
LDA.l MapsCompasses
|
||||||
CLC : ADC.b #$10
|
CLC : ADC.b #$10
|
||||||
STA.l MapsCompasses
|
STA.l MapsCompasses
|
||||||
JSL MaybeFlagMapTotalPickup
|
JSL MaybeFlagMapTotalPickup
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.increment_compass
|
.increment_compass
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.l StatsLocked : BNE +
|
LDA.l StatsLocked : BNE +
|
||||||
LDA.l MapsCompasses : INC : AND.b #$0F : TAX
|
LDA.l MapsCompasses : INC : AND.b #$0F : TAX
|
||||||
LDA.l MapsCompasses : AND.b #$F0 : STA.l MapsCompasses
|
LDA.l MapsCompasses : AND.b #$F0 : STA.l MapsCompasses
|
||||||
TXA : ORA.l MapsCompasses : STA.l MapsCompasses
|
TXA : ORA.l MapsCompasses : STA.l MapsCompasses
|
||||||
JSL MaybeFlagCompassTotalPickup
|
JSL MaybeFlagCompassTotalPickup
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
@@ -647,7 +647,7 @@ ItemBehavior:
|
|||||||
SEC : SBC.b #$37
|
SEC : SBC.b #$37
|
||||||
TAX
|
TAX
|
||||||
LDA.w PendantMasks,X : AND.l PendantsField : BNE +
|
LDA.w PendantMasks,X : AND.l PendantsField : BNE +
|
||||||
LDA.l PendantCounter : INC : STA.l PendantCounter
|
LDA.l PendantCounter : INC : STA.l PendantCounter
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
@@ -663,15 +663,15 @@ ItemBehavior:
|
|||||||
LDA.w #$0000
|
LDA.w #$0000
|
||||||
SEC
|
SEC
|
||||||
-
|
-
|
||||||
ROL
|
ROL
|
||||||
DEX
|
DEX
|
||||||
BPL -
|
BPL -
|
||||||
SEP #$20
|
SEP #$20
|
||||||
TAX
|
TAX
|
||||||
AND.l CrystalsField : BNE +
|
AND.l CrystalsField : BNE +
|
||||||
TXA
|
TXA
|
||||||
ORA.l CrystalsField : STA.l CrystalsField
|
ORA.l CrystalsField : STA.l CrystalsField
|
||||||
LDA.l CrystalCounter : INC : STA.l CrystalCounter
|
LDA.l CrystalCounter : INC : STA.l CrystalCounter
|
||||||
+
|
+
|
||||||
.done
|
.done
|
||||||
RTS
|
RTS
|
||||||
@@ -682,56 +682,56 @@ ItemBehavior:
|
|||||||
.bee_trap
|
.bee_trap
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA.b #$79 : JSL Sprite_SpawnDynamically : BMI + ; DashBeeHive_SpawnBee
|
LDA.b #$79 : JSL Sprite_SpawnDynamically : BMI + ; DashBeeHive_SpawnBee
|
||||||
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
||||||
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
||||||
LDA.b LinkPosY : STA.w SpritePosYLow, Y : LDA.b LinkPosY+1 : STA.w SpritePosYHigh, Y
|
LDA.b LinkPosY : STA.w SpritePosYLow, Y : LDA.b LinkPosY+1 : STA.w SpritePosYHigh, Y
|
||||||
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.good_bee
|
.good_bee
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA.b #$79 : JSL Sprite_SpawnDynamically : BMI + ; DashBeeHive_SpawnBee
|
LDA.b #$79 : JSL Sprite_SpawnDynamically : BMI + ; DashBeeHive_SpawnBee
|
||||||
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
||||||
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
||||||
LDA.b LinkPosY : STA.w SpritePosYLow, Y : LDA.b LinkPosY+1 : STA.w SpritePosYHigh, Y
|
LDA.b LinkPosY : STA.w SpritePosYLow, Y : LDA.b LinkPosY+1 : STA.w SpritePosYHigh, Y
|
||||||
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
||||||
JSL GoldBee_SpawnSelf_SetProperties
|
JSL GoldBee_SpawnSelf_SetProperties
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.apples
|
.apples
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA.b #$AC : JSL Sprite_SpawnDynamically : BMI +
|
LDA.b #$AC : JSL Sprite_SpawnDynamically : BMI +
|
||||||
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
||||||
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
||||||
LDA.b LinkPosY : SEC : SBC.b #$10 : STA.w SpritePosYLow,Y
|
LDA.b LinkPosY : SEC : SBC.b #$10 : STA.w SpritePosYLow,Y
|
||||||
LDA.b LinkPosY+1 : SBC.b #$00 : STA.w SpritePosYHigh,Y ; move up 16 pixels
|
LDA.b LinkPosY+1 : SBC.b #$00 : STA.w SpritePosYHigh,Y ; move up 16 pixels
|
||||||
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
||||||
LDA.b #$FF : STA.w EnemyStunTimer,Y ; allows them to expire
|
LDA.b #$FF : STA.w EnemyStunTimer,Y ; allows them to expire
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.fairy
|
.fairy
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA.b #$E3 : JSL Sprite_SpawnDynamically : BMI +
|
LDA.b #$E3 : JSL Sprite_SpawnDynamically : BMI +
|
||||||
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
||||||
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
||||||
LDA.b LinkPosY : SEC : SBC.b #$10 : STA.w SpritePosYLow,Y
|
LDA.b LinkPosY : SEC : SBC.b #$10 : STA.w SpritePosYLow,Y
|
||||||
LDA.b LinkPosY+1 : SBC.b #$00 : STA.w SpritePosYHigh,Y ; move up 16 pixels
|
LDA.b LinkPosY+1 : SBC.b #$00 : STA.w SpritePosYHigh,Y ; move up 16 pixels
|
||||||
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
||||||
LDA.b #$FF : STA.w EnemyStunTimer,Y ; allows them to expire
|
LDA.b #$FF : STA.w EnemyStunTimer,Y ; allows them to expire
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.chicken
|
.chicken
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA.b #$0B : JSL Sprite_SpawnDynamically : BMI +
|
LDA.b #$0B : JSL Sprite_SpawnDynamically : BMI +
|
||||||
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
LDA.b LinkPosX : CLC : ADC.b #$03 : AND.b #$F8 : STA.w SpritePosXLow,Y
|
||||||
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
LDA.b LinkPosX+1 : ADC.b #$00 : STA.w SpritePosXHigh,Y ; round X to nearest 8
|
||||||
LDA.b LinkPosY : SEC : SBC.b #$08 : STA.w SpritePosYLow,Y
|
LDA.b LinkPosY : SEC : SBC.b #$08 : STA.w SpritePosYLow,Y
|
||||||
LDA.b LinkPosY+1 : SBC.b #$00 : STA.w SpritePosYHigh,Y ; move up 8 pixels
|
LDA.b LinkPosY+1 : SBC.b #$00 : STA.w SpritePosYHigh,Y ; move up 8 pixels
|
||||||
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
LDA.b LinkLayer : STA.w SpriteLayer,Y ; spawns on same layer as link
|
||||||
+
|
+
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
@@ -804,7 +804,7 @@ ResolveLootID:
|
|||||||
CMP.l ProgressiveSwordLimit : BCC +
|
CMP.l ProgressiveSwordLimit : BCC +
|
||||||
LDA.l ProgressiveSwordReplacement
|
LDA.l ProgressiveSwordReplacement
|
||||||
JMP .get_item
|
JMP .get_item
|
||||||
++ LDA.l SwordEquipment
|
++ LDA.l SwordEquipment
|
||||||
+
|
+
|
||||||
TAX
|
TAX
|
||||||
LDA.w .prog_sword_ids,X
|
LDA.w .prog_sword_ids,X
|
||||||
@@ -820,7 +820,7 @@ ResolveLootID:
|
|||||||
CMP.l ProgressiveShieldLimit : BCC +
|
CMP.l ProgressiveShieldLimit : BCC +
|
||||||
LDA.l ProgressiveShieldReplacement
|
LDA.l ProgressiveShieldReplacement
|
||||||
JMP .get_item
|
JMP .get_item
|
||||||
++ LDA.l HighestShield
|
++ LDA.l HighestShield
|
||||||
+
|
+
|
||||||
TAX
|
TAX
|
||||||
LDA.w .shields_ids,X
|
LDA.w .shields_ids,X
|
||||||
@@ -836,7 +836,7 @@ ResolveLootID:
|
|||||||
LDA.l ProgressiveArmorReplacement
|
LDA.l ProgressiveArmorReplacement
|
||||||
JMP .get_item
|
JMP .get_item
|
||||||
+
|
+
|
||||||
++ LDA.l ArmorEquipment
|
++ LDA.l ArmorEquipment
|
||||||
TAX
|
TAX
|
||||||
LDA.w .armor_ids,X
|
LDA.w .armor_ids,X
|
||||||
JMP .have_item
|
JMP .have_item
|
||||||
@@ -935,7 +935,7 @@ BottleListExpanded:
|
|||||||
db $16, $2B, $2C, $2D, $3D, $3C, $48
|
db $16, $2B, $2C, $2D, $3D, $3C, $48
|
||||||
|
|
||||||
PotionListExpanded:
|
PotionListExpanded:
|
||||||
db $66, $FF, $2E, $2F, $30, $FF, $0E
|
db $2E, $2F, $30, $FF, $0E
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
HandleBowTracking:
|
HandleBowTracking:
|
||||||
; In: A - Item Receipt ID
|
; In: A - Item Receipt ID
|
||||||
@@ -1190,7 +1190,7 @@ MaybeFlagCompassTotalPickup:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
MaybeFlagMapTotalPickup:
|
MaybeFlagMapTotalPickup:
|
||||||
LDA.l MapHUDMode : AND.b #$0F : BEQ .done
|
; LDA.l MapHUDMode : AND.b #$0F : BEQ .done
|
||||||
LDA.w DungeonID : BMI .done
|
LDA.w DungeonID : BMI .done
|
||||||
LDA.w ItemReceiptID : CMP.b #$33 : BEQ .set_flag
|
LDA.w ItemReceiptID : CMP.b #$33 : BEQ .set_flag
|
||||||
REP #$20
|
REP #$20
|
||||||
@@ -1212,7 +1212,7 @@ MaybeFlagDungeonTotalsEntrance:
|
|||||||
LDA.l CompassMode : AND.w #$000F : BEQ .maps ; Skip if we're not showing compass counts
|
LDA.l CompassMode : AND.w #$000F : BEQ .maps ; Skip if we're not showing compass counts
|
||||||
JSR FlagCompassCount
|
JSR FlagCompassCount
|
||||||
.maps
|
.maps
|
||||||
LDA.l MapHUDMode : AND.w #$000F : BEQ .done
|
LDA.l MapHUDMode : AND.w #$000F
|
||||||
LDX.w DungeonID
|
LDX.w DungeonID
|
||||||
JSR FlagMapCount
|
JSR FlagMapCount
|
||||||
.done
|
.done
|
||||||
|
|||||||
+6
-24
@@ -90,17 +90,11 @@ ItemSet_FairySword:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
ItemSet_SmithSword:
|
ItemSet_SmithSword:
|
||||||
PHA
|
PHA : LDA.l NpcFlags+1 : ORA.b #$04 : STA.l NpcFlags+1 : PLA
|
||||||
LDA.l NpcFlags+1 : ORA.b #$04 : STA.l NpcFlags+1
|
|
||||||
JSL UpdateLootHUD
|
|
||||||
PLA
|
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
ItemSet_MagicBat:
|
ItemSet_MagicBat:
|
||||||
PHA
|
PHA : LDA.l NpcFlags+1 : ORA.b #$80 : STA.l NpcFlags+1 : PLA
|
||||||
LDA.l NpcFlags+1 : ORA.b #$80 : STA.l NpcFlags+1
|
|
||||||
JSL UpdateLootHUD
|
|
||||||
PLA
|
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
ItemSet_OldMan:
|
ItemSet_OldMan:
|
||||||
@@ -116,10 +110,7 @@ RTL
|
|||||||
ItemSet_SickKid:
|
ItemSet_SickKid:
|
||||||
PHA : LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
PHA : LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||||
JSL Link_ReceiveItem ; thing we wrote over
|
JSL Link_ReceiveItem ; thing we wrote over
|
||||||
PHA
|
PHA : LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags : PLA
|
||||||
LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags
|
|
||||||
JSL UpdateLootHUD
|
|
||||||
PLA
|
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
ItemSet_TreeKid:
|
ItemSet_TreeKid:
|
||||||
@@ -131,10 +122,7 @@ RTL
|
|||||||
ItemSet_Sahasrala:
|
ItemSet_Sahasrala:
|
||||||
PHA : LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
PHA : LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||||
JSL Link_ReceiveItem ; thing we wrote over
|
JSL Link_ReceiveItem ; thing we wrote over
|
||||||
PHA
|
PHA : LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags : PLA
|
||||||
LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags
|
|
||||||
JSL UpdateLootHUD
|
|
||||||
PLA
|
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
ItemSet_Catfish:
|
ItemSet_Catfish:
|
||||||
@@ -144,10 +132,7 @@ RTL
|
|||||||
ItemSet_Library:
|
ItemSet_Library:
|
||||||
PHA : LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
PHA : LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||||
JSL Link_ReceiveItem ; thing we wrote over
|
JSL Link_ReceiveItem ; thing we wrote over
|
||||||
PHA
|
PHA : LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags : PLA
|
||||||
LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags
|
|
||||||
JSL UpdateLootHUD
|
|
||||||
PLA
|
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
ItemSet_Mushroom:
|
ItemSet_Mushroom:
|
||||||
@@ -164,10 +149,7 @@ ItemSet_Mushroom:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
ItemSet_Powder:
|
ItemSet_Powder:
|
||||||
PHA
|
PHA : LDA.l NpcFlags+1 : ORA.b #$20 : STA.l NpcFlags+1 : PLA
|
||||||
LDA.l NpcFlags+1 : ORA.b #$20 : STA.l NpcFlags+1
|
|
||||||
JSL UpdateLootHUD
|
|
||||||
PLA
|
|
||||||
RTL
|
RTL
|
||||||
;================================================================================
|
;================================================================================
|
||||||
|
|
||||||
|
|||||||
+78
-330
@@ -6,18 +6,18 @@ OWFlags:
|
|||||||
dw 0
|
dw 0
|
||||||
OWReserved:
|
OWReserved:
|
||||||
dw 0
|
dw 0
|
||||||
OWFog:
|
|
||||||
db 0 ; 0: disabled - 1: fog clears after visiting either world version of a screen - 2: fog clears after visiting the current world version of a screen
|
|
||||||
org $aa8010
|
org $aa8010
|
||||||
OWVersionInfo:
|
OWVersionInfo:
|
||||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
||||||
|
|
||||||
;Hooks
|
;Hooks
|
||||||
org $82a92C
|
org $82a929
|
||||||
JSL OWDetectEdgeTransition ; JSL Link_CheckForEdgeScreenTransition
|
OWDetectTransitionReturn:
|
||||||
|
|
||||||
org $82a936
|
org $82a939
|
||||||
OverworldHandleTransitions_PerformEdgeTransition:
|
OverworldHandleTransitions_SpecialTrigger:
|
||||||
|
JSL OWDetectEdgeTransition
|
||||||
|
BCS OWDetectTransitionReturn
|
||||||
|
|
||||||
org $82a999
|
org $82a999
|
||||||
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
|
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
|
||||||
@@ -78,6 +78,8 @@ org $8ab7af ;LDA $F2 : ORA $F0 : AND #$C0
|
|||||||
jml OWFluteCancel2 : nop
|
jml OWFluteCancel2 : nop
|
||||||
org $8ab90d ;JSL $02E99D
|
org $8ab90d ;JSL $02E99D
|
||||||
jsl OWFluteCancel
|
jsl OWFluteCancel
|
||||||
|
org $8ab816
|
||||||
|
JSL OWMapFluteCancelIcon
|
||||||
|
|
||||||
; allows Frog sprite to spawn in LW and also allows his friend to spawn in their house
|
; allows Frog sprite to spawn in LW and also allows his friend to spawn in their house
|
||||||
org $868a76 ; < 30a76 - sprite_prep.asm:785 (LDA $7EF3CA : AND.w #$40)
|
org $868a76 ; < 30a76 - sprite_prep.asm:785 (LDA $7EF3CA : AND.w #$40)
|
||||||
@@ -104,36 +106,20 @@ jsl OWOldManSpeed
|
|||||||
org $8aba6c ; < ? - Bank0a.asm:474 ()
|
org $8aba6c ; < ? - Bank0a.asm:474 ()
|
||||||
jsl OWMapWorldCheck16 : nop
|
jsl OWMapWorldCheck16 : nop
|
||||||
|
|
||||||
; Custom Overworld Map
|
; Mixed Overworld Map
|
||||||
org $8ABA52
|
|
||||||
JSL OverworldMap_InitGfx_InitScrap
|
|
||||||
|
|
||||||
org $8ABA99
|
org $8ABA99
|
||||||
WorldMap_LoadDarkWorldMap:
|
WorldMap_LoadDarkWorldMap:
|
||||||
LDA.b GameMode : CMP.b #$14 ; attract module
|
LDA.b GameMode : CMP.b #$14 ; attract module
|
||||||
BEQ .vanilla_light
|
BEQ .vanilla_light
|
||||||
LDA.l OWFlags : AND.b #!FLAG_OW_CUSTOM_MAP : BNE .custom
|
LDA.l OWMode+1 : AND.b #!FLAG_OW_MIXED : BNE .mixed
|
||||||
LDA.b OverworldIndex : AND.b #$40
|
LDA.b OverworldIndex : AND.b #$40
|
||||||
BEQ .vanilla_light
|
BEQ .vanilla_light
|
||||||
.custom
|
.mixed
|
||||||
STZ.b ScrapBuffer72 ; clear tile swap flag
|
PHB : PHK : PLB
|
||||||
JSL LoadMapDarkOrCustom_long
|
JSL LoadMapDarkOrMixed
|
||||||
NOP #2
|
PLB
|
||||||
warnpc $8ABAB5
|
|
||||||
.vanilla_light ; $0ABAB5
|
.vanilla_light ; $0ABAB5
|
||||||
|
|
||||||
org $8ABD12
|
|
||||||
JSL MoveZoomedInPositionY
|
|
||||||
org $8ABD2F
|
|
||||||
JSL MoveZoomedInPositionX
|
|
||||||
|
|
||||||
org $8ABB32
|
|
||||||
JSL LoadMapOppositeWorld
|
|
||||||
|
|
||||||
org $8ABFF0
|
|
||||||
JSL MoveMirrorPortalMapSprite
|
|
||||||
; Could insert similar hooks at $8AB860 and $8AB8AC for flute spots
|
|
||||||
|
|
||||||
;(replacing -> LDA $8A : AND.b #$40)
|
;(replacing -> LDA $8A : AND.b #$40)
|
||||||
org $80d8c4 ; < ? - Bank00.asm:4068 ()
|
org $80d8c4 ; < ? - Bank00.asm:4068 ()
|
||||||
jsl OWWorldCheck
|
jsl OWWorldCheck
|
||||||
@@ -241,7 +227,6 @@ OWMapWorldCheck16:
|
|||||||
{
|
{
|
||||||
lda.b GameMode : cmp.w #$0014 : beq .return ; attract module, return with Z flag cleared
|
lda.b GameMode : cmp.w #$0014 : beq .return ; attract module, return with Z flag cleared
|
||||||
jsl OWWorldCheck16
|
jsl OWWorldCheck16
|
||||||
eor.b ScrapBuffer72 ; apply tile swap flag
|
|
||||||
.return
|
.return
|
||||||
rtl
|
rtl
|
||||||
}
|
}
|
||||||
@@ -356,7 +341,7 @@ OWFluteCancel2:
|
|||||||
}
|
}
|
||||||
OWMapFluteCancelIcon:
|
OWMapFluteCancelIcon:
|
||||||
{
|
{
|
||||||
LDA.b #$02 : STA.b Scrap0B ; what we wrote over
|
STA.b Scrap0B : LDX.b #$10 ; what we wrote over
|
||||||
LDA.l OWFlags+1 : AND.b #$01 : BEQ .return
|
LDA.l OWFlags+1 : AND.b #$01 : BEQ .return
|
||||||
LDA.b GameSubMode : CMP.b #$0A : BNE .return
|
LDA.b GameSubMode : CMP.b #$0A : BNE .return
|
||||||
LDA.b FrameCounter : AND.b #$10 : BNE .return
|
LDA.b FrameCounter : AND.b #$10 : BNE .return
|
||||||
@@ -402,110 +387,51 @@ OWMarkVisited:
|
|||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadMapDarkOrCustom:
|
LoadMapDarkOrMixed:
|
||||||
{
|
{
|
||||||
CMP.b #!FLAG_OW_CUSTOM_MAP : REP #$30 : BEQ .custom
|
CMP.b #!FLAG_OW_MIXED : REP #$30 : BEQ .mixed
|
||||||
LDX.w #$03FE ; draw vanilla Dark World (what we wrote over)
|
LDX.w #$03FE ; draw vanilla Dark World (what we wrote over)
|
||||||
.copy_next
|
.copy_next
|
||||||
LDA.w WorldMap_DarkWorldTilemap,X : STA.w GFXStripes,X
|
LDA.w WorldMap_DarkWorldTilemap,X : STA.w GFXStripes,X
|
||||||
DEX : DEX : BPL .copy_next
|
DEX : DEX : BPL .copy_next
|
||||||
BRL .end
|
BRL .end
|
||||||
.custom
|
.mixed
|
||||||
LDX.b OverworldIndex
|
LDX.b OverworldIndex
|
||||||
LDA.l OWTileWorldAssoc,X
|
LDA.l OWTileWorldAssoc,X
|
||||||
AND.w #$0040
|
|
||||||
EOR.b ScrapBuffer72 ; apply tile swap flag
|
|
||||||
BEQ .draw_lw
|
|
||||||
LDA.w #OWMapGridDark
|
|
||||||
BRA .draw_dw
|
|
||||||
.draw_lw
|
|
||||||
LDA.w #OWMapGridLight
|
|
||||||
.draw_dw
|
|
||||||
STA.b Scrap00
|
STA.b Scrap00
|
||||||
LDA.w #OWMapGridLight>>16 ; current program bank
|
LDY.w #$139C
|
||||||
STA.b Scrap02
|
LDX.w #$003F
|
||||||
LDX.w #$139C
|
.next_screen
|
||||||
LDY.w #$003F
|
PHX
|
||||||
.next_cell
|
LDA.l OWTileWorldAssoc,X
|
||||||
PHY
|
EOR.b Scrap00
|
||||||
JSR GetOWMapTilemapOffsetToCopy
|
AND.w #$0040
|
||||||
.copy_cell ; more efficient to have X on the right side
|
BEQ .light
|
||||||
TAY
|
TYX : BRA .copy_screen
|
||||||
LDA.w WorldMap_LightWorldTilemap+$00,Y : STA.b $00,X
|
.light
|
||||||
LDA.w WorldMap_LightWorldTilemap+$02,Y : STA.b $02,X
|
TXA : AND.w #$0024 : LSR : TAX
|
||||||
LDA.w WorldMap_LightWorldTilemap+$20,Y : STA.b $20,X
|
TYA : SEC : SBC.l LWQuadrantOffsets,X
|
||||||
LDA.w WorldMap_LightWorldTilemap+$22,Y : STA.b $22,X
|
TYX : TAY
|
||||||
LDA.w WorldMap_LightWorldTilemap+$40,Y : STA.b $40,X
|
.copy_screen ; more efficient to have X on the right side
|
||||||
LDA.w WorldMap_LightWorldTilemap+$42,Y : STA.b $42,X
|
LDA.w $C739+$00,Y : STA.b $00,X
|
||||||
LDA.w WorldMap_LightWorldTilemap+$60,Y : STA.b $60,X
|
LDA.w $C739+$02,Y : STA.b $02,X
|
||||||
LDA.w WorldMap_LightWorldTilemap+$62,Y : STA.b $62,X
|
LDA.w $C739+$20,Y : STA.b $20,X
|
||||||
PLY
|
LDA.w $C739+$22,Y : STA.b $22,X
|
||||||
DEX : DEX : DEX : DEX ; move one screen left
|
LDA.w $C739+$40,Y : STA.b $40,X
|
||||||
TYA : AND.w #$0007 : BNE .same_row
|
LDA.w $C739+$42,Y : STA.b $42,X
|
||||||
TXA : SEC : SBC.w #$0060 : TAX ; move one screen row up
|
LDA.w $C739+$60,Y : STA.b $60,X
|
||||||
|
LDA.w $C739+$62,Y : STA.b $62,X
|
||||||
|
TXY : PLX
|
||||||
|
DEY : DEY : DEY : DEY ; move one screen left
|
||||||
|
TXA : AND.w #$0007 : BNE .same_row
|
||||||
|
TYA : SEC : SBC.w #$0060 : TAY ; move one screen row up
|
||||||
.same_row
|
.same_row
|
||||||
DEY
|
DEX
|
||||||
BPL .next_cell
|
BPL .next_screen
|
||||||
.end
|
.end
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA.b #$15 : STA.b NMIINCR ; what we wrote over
|
LDA.b #$15 : STA.b NMIINCR ; what we wrote over
|
||||||
RTS
|
RTL
|
||||||
}
|
|
||||||
|
|
||||||
GetOWMapTilemapOffsetToCopy:
|
|
||||||
{
|
|
||||||
LDA.l OWFog : AND.w #$00FF
|
|
||||||
CMP.w #$0001 : BEQ .parallel_fog
|
|
||||||
CMP.w #$0002 : BNE .no_fog
|
|
||||||
|
|
||||||
LDA.b [Scrap00],Y : AND.w #$00FF
|
|
||||||
PHX
|
|
||||||
TAX
|
|
||||||
BIT.w #$0040
|
|
||||||
BEQ .light_fog
|
|
||||||
LDA.l Overworld_ActualScreenID-$40,X : ORA.w #$0040
|
|
||||||
BRA .dark_fog
|
|
||||||
.light_fog
|
|
||||||
LDA.l Overworld_ActualScreenID,X
|
|
||||||
.dark_fog
|
|
||||||
AND.w #$00FF
|
|
||||||
TAX
|
|
||||||
LDA.l OverworldEventDataWRAM,X
|
|
||||||
.check_visited_flag
|
|
||||||
PLX
|
|
||||||
AND.w #$0080 : BNE .no_fog
|
|
||||||
LDA.w #($D350-$C739)
|
|
||||||
RTS
|
|
||||||
|
|
||||||
.parallel_fog
|
|
||||||
LDA.b [Scrap00],Y : AND.w #$003F
|
|
||||||
PHX
|
|
||||||
TAX
|
|
||||||
LDA.l Overworld_ActualScreenID,X
|
|
||||||
AND.w #$00FF
|
|
||||||
TAX
|
|
||||||
LDA.l OverworldEventDataWRAM,X
|
|
||||||
ORA.l OverworldEventDataWRAM+$40,X
|
|
||||||
BRA .check_visited_flag
|
|
||||||
|
|
||||||
.no_fog
|
|
||||||
LDA.b [Scrap00],Y : AND.w #$0038 : ASL : ASL : ASL : ASL
|
|
||||||
STA.b Scrap03
|
|
||||||
LDA.b [Scrap00],Y
|
|
||||||
BIT.w #$0040
|
|
||||||
BEQ .light
|
|
||||||
AND.w #$0007
|
|
||||||
ASL : ASL : ADC.w #$1000 : ADC.b Scrap03
|
|
||||||
RTS
|
|
||||||
.light
|
|
||||||
PHX
|
|
||||||
AND.w #$0024 : LSR : TAX
|
|
||||||
LDA.b [Scrap00],Y
|
|
||||||
AND.w #$0007
|
|
||||||
ASL : ASL : ADC.w #$1000 : ADC.b Scrap03
|
|
||||||
SEC : SBC.l LWQuadrantOffsets,X
|
|
||||||
PLX
|
|
||||||
RTS
|
|
||||||
|
|
||||||
LWQuadrantOffsets:
|
LWQuadrantOffsets:
|
||||||
dw $1000-$0210 ; top left
|
dw $1000-$0210 ; top left
|
||||||
@@ -515,143 +441,6 @@ GetOWMapTilemapOffsetToCopy:
|
|||||||
dw $0400+$0210 ; bottom right
|
dw $0400+$0210 ; bottom right
|
||||||
}
|
}
|
||||||
|
|
||||||
OverworldMap_InitGfx_InitScrap:
|
|
||||||
{
|
|
||||||
STZ.b ScrapBuffer72 ; clear tile swap flag
|
|
||||||
LDA.b #$11 : STA.b MAINDESQ ; what we wrote over
|
|
||||||
RTL
|
|
||||||
}
|
|
||||||
LoadMapDarkOrCustom_long:
|
|
||||||
{
|
|
||||||
PHB : LDA.b #WorldMap_DarkWorldTilemap>>16 : PHA : PLB
|
|
||||||
LDA.l OWFlags : AND.b #!FLAG_OW_CUSTOM_MAP
|
|
||||||
JSR LoadMapDarkOrCustom
|
|
||||||
PLB
|
|
||||||
RTL
|
|
||||||
}
|
|
||||||
LoadMapOppositeWorld:
|
|
||||||
{
|
|
||||||
LDA.l OWFlags : AND.b #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla
|
|
||||||
LDA.b ScrapBuffer72 : BEQ +
|
|
||||||
LDA.b Joy1B_All : AND.b #$30 : BNE .vanilla
|
|
||||||
STZ.b ScrapBuffer72 ; clear tile swap flag
|
|
||||||
BRA .new_tiles
|
|
||||||
+ LDA.b Joy1B_New : AND.b #$30 : BEQ .vanilla
|
|
||||||
LDA.b #$40 : STA.b ScrapBuffer72 ; set tile swap flag
|
|
||||||
.new_tiles
|
|
||||||
JSL OverworldMap_InitGfx+$10 ; load palette
|
|
||||||
DEC.w SubModuleInterface
|
|
||||||
LDA.b #$0F : STA.b INIDISPQ
|
|
||||||
JSL LoadMapDarkOrCustom_long
|
|
||||||
LDA.b #$24 : STA.w SFX3
|
|
||||||
PLA : PLA : PEA.w $BBAF ; skip everything upon return
|
|
||||||
.vanilla
|
|
||||||
LDA.b Joy1B_New : AND.b #$70 ; what we wrote over
|
|
||||||
RTL
|
|
||||||
}
|
|
||||||
FluteMenu_MoveLinkSprite:
|
|
||||||
{
|
|
||||||
JSR MoveMapSprite
|
|
||||||
BRA WorldMap_SkipHandleSprites_vanilla
|
|
||||||
}
|
|
||||||
WorldMap_SkipHandleSprites:
|
|
||||||
{
|
|
||||||
JSR MoveMapSprite : BEQ .vanilla
|
|
||||||
LDA.b ScrapBuffer72 : BEQ .vanilla ; skip draw if no tile swap
|
|
||||||
PLA : PLA : PEA.w $C39B ; exit without drawing sprites
|
|
||||||
RTL
|
|
||||||
.vanilla
|
|
||||||
LDA.b FrameCounter : AND.b #$10 ; what we wrote over
|
|
||||||
RTL
|
|
||||||
}
|
|
||||||
|
|
||||||
MoveMirrorPortalMapSprite:
|
|
||||||
{
|
|
||||||
STA.l $7EC109 ; what we overwrote
|
|
||||||
JSR MoveMapSprite
|
|
||||||
RTL
|
|
||||||
}
|
|
||||||
|
|
||||||
MoveZoomedInPositionY:
|
|
||||||
{
|
|
||||||
LDA.l OWFlags : AND.w #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla
|
|
||||||
SEP #$20
|
|
||||||
JSR MoveMapSprite_Setup
|
|
||||||
JSR MoveMapSprite_GetYCoordHighByte
|
|
||||||
PHA
|
|
||||||
REP #$20
|
|
||||||
LDA.l $7EC108 : XBA
|
|
||||||
SEP #$20
|
|
||||||
PLA : XBA
|
|
||||||
REP #$20
|
|
||||||
RTL
|
|
||||||
.vanilla
|
|
||||||
LDA.l $7EC108 ; what we overwrote
|
|
||||||
RTL
|
|
||||||
}
|
|
||||||
MoveZoomedInPositionX:
|
|
||||||
{
|
|
||||||
LDA.l OWFlags : AND.w #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla
|
|
||||||
SEP #$20
|
|
||||||
JSR MoveMapSprite_Setup
|
|
||||||
JSR MoveMapSprite_GetXCoordHighByte
|
|
||||||
PHA
|
|
||||||
REP #$20
|
|
||||||
LDA.l $7EC10A : XBA
|
|
||||||
SEP #$20
|
|
||||||
PLA : XBA
|
|
||||||
REP #$20
|
|
||||||
RTL
|
|
||||||
.vanilla
|
|
||||||
LDA.l $7EC10A ; what we overwrote
|
|
||||||
RTL
|
|
||||||
}
|
|
||||||
|
|
||||||
MoveMapSprite:
|
|
||||||
{
|
|
||||||
LDA.l OWFlags : AND.b #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .return
|
|
||||||
PHP
|
|
||||||
JSR MoveMapSprite_Setup
|
|
||||||
JSR MoveMapSprite_GetXCoordHighByte : STA.l $7EC10B
|
|
||||||
JSR MoveMapSprite_GetYCoordHighByte : STA.l $7EC109
|
|
||||||
PLP
|
|
||||||
.return
|
|
||||||
RTS
|
|
||||||
}
|
|
||||||
MoveMapSprite_Setup:
|
|
||||||
{
|
|
||||||
LDA.l $7EC10B : AND.b #$0E : LSR
|
|
||||||
STA.b Scrap00
|
|
||||||
LDA.l $7EC109 : AND.b #$0E : ASL : ASL
|
|
||||||
ADC.b Scrap00
|
|
||||||
STA.b Scrap00
|
|
||||||
LDX.b OverworldIndex
|
|
||||||
LDA.l OWTileWorldAssoc,X
|
|
||||||
LDX.b Scrap00
|
|
||||||
AND.b #$40
|
|
||||||
BEQ .light
|
|
||||||
LDA.l OWMapGridDarkPositionByAbsolutePosition,X
|
|
||||||
BRA .dark
|
|
||||||
.light
|
|
||||||
LDA.l OWMapGridLightPositionByAbsolutePosition,X
|
|
||||||
.dark
|
|
||||||
TAX
|
|
||||||
AND.b #$07 : ASL
|
|
||||||
STA.b Scrap00
|
|
||||||
RTS
|
|
||||||
}
|
|
||||||
MoveMapSprite_GetXCoordHighByte:
|
|
||||||
{
|
|
||||||
LDA.l $7EC10B : AND.b #$01 : ORA.b Scrap00
|
|
||||||
RTS
|
|
||||||
}
|
|
||||||
MoveMapSprite_GetYCoordHighByte:
|
|
||||||
{
|
|
||||||
TXA : AND.b #$38 : LSR : LSR : STA.b Scrap00
|
|
||||||
LDA.l $7EC109 : AND.b #$01 : ORA.b Scrap00
|
|
||||||
RTS
|
|
||||||
}
|
|
||||||
|
|
||||||
OWBonkDropPrepSprite:
|
OWBonkDropPrepSprite:
|
||||||
{
|
{
|
||||||
LDA.b IndoorsFlag : BEQ +
|
LDA.b IndoorsFlag : BEQ +
|
||||||
@@ -820,26 +609,27 @@ OWBonkDrops:
|
|||||||
JSL OWBonkSpritePrep
|
JSL OWBonkSpritePrep
|
||||||
|
|
||||||
.mark_collected ; S = Collected, FlagBitmask, X (row + 2)
|
.mark_collected ; S = Collected, FlagBitmask, X (row + 2)
|
||||||
PLA : BEQ + : - : JMP .return : + ; S = FlagBitmask, X (row + 2)
|
PLA : BNE + ; S = FlagBitmask, X (row + 2)
|
||||||
TYX : JSL Sprite_IsOnscreen : BCC -
|
TYX : JSL Sprite_IsOnscreen : BCC +
|
||||||
LDA.b IndoorsFlag : BEQ +
|
LDA.b IndoorsFlag : BEQ ++
|
||||||
LDA.l RoomDataWRAM[$0120].high : ORA.b 1,S : STA.l RoomDataWRAM[$0120].high
|
LDA.l RoomDataWRAM[$0120].high : ORA.b 1,S : STA.l RoomDataWRAM[$0120].high
|
||||||
LDA.w $0400 : ORA.b 1,S : STA.w $0400
|
LDA.w $0400 : ORA.b 1,S : STA.w $0400
|
||||||
BRA .increment_collection
|
BRA .increment_collection
|
||||||
+
|
++
|
||||||
LDA.b OverworldIndex
|
LDA.b OverworldIndex
|
||||||
BIT.b #$40 : BEQ +
|
BIT.b #$40 : BEQ +
|
||||||
LDA.l ProgressIndicator : CMP.b #$02
|
LDA.l ProgressIndicator : CMP.b #$02
|
||||||
LDA.b OverworldIndex : BCS + : AND.b #$BF
|
LDA.b OverworldIndex : BCS ++ : AND.b #$BF
|
||||||
|
++
|
||||||
+
|
+
|
||||||
TAX : LDA.l OverworldEventDataWRAM,X : ORA.b 1,S : STA.l OverworldEventDataWRAM,X
|
TAX : LDA.l OverworldEventDataWRAM,X : ORA.b 1,S : STA.l OverworldEventDataWRAM,X
|
||||||
|
|
||||||
.increment_collection
|
.increment_collection
|
||||||
REP #$20
|
REP #$20
|
||||||
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter
|
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter
|
||||||
|
INC.w UpdateHUDFlag
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.b #$01 : STA.l UpdateHUDFlag
|
+ BRA .return
|
||||||
BRA .return
|
|
||||||
|
|
||||||
; spawn itemget item
|
; spawn itemget item
|
||||||
.spawn_item ; A = item id ; Y = bonk sprite slot ; S = Collected, FlagBitmask, X (row + 2)
|
.spawn_item ; A = item id ; Y = bonk sprite slot ; S = Collected, FlagBitmask, X (row + 2)
|
||||||
@@ -948,29 +738,20 @@ OWBonkSpritePrep:
|
|||||||
org $aa9000
|
org $aa9000
|
||||||
OWDetectEdgeTransition:
|
OWDetectEdgeTransition:
|
||||||
{
|
{
|
||||||
JSL Link_CheckForEdgeScreenTransition ; what we wrote over
|
JSL OWDestroyItemSprites
|
||||||
BCS .return
|
|
||||||
STZ.w RandoOverworldWalkDist
|
STZ.w RandoOverworldWalkDist
|
||||||
LDA.l OWMode : ORA.l OWMode+1 : BEQ .vanilla
|
LDA.l OWMode : ORA.l OWMode+1 : BEQ .vanilla
|
||||||
PHY
|
|
||||||
JSR OWShuffle
|
JSR OWShuffle
|
||||||
PLY
|
LDA.w RandoOverworldTargetEdge : BMI .special
|
||||||
LDA.w RandoOverworldTargetEdge : BMI .specialOrDisabled
|
|
||||||
.vanilla
|
.vanilla
|
||||||
CLC ; allow transition
|
REP #$31 : LDX.b Scrap02 : LDA.b OverworldMap16Buffer ; what we wrote over
|
||||||
RTL
|
RTL
|
||||||
.specialOrDisabled
|
|
||||||
CMP.b #$FF : BNE .special
|
|
||||||
STZ.w RandoOverworldTargetEdge
|
|
||||||
PHB
|
|
||||||
JML Link_CheckForEdgeScreenTransition_prevent_transition
|
|
||||||
.special
|
.special
|
||||||
REP #$30
|
REP #$30
|
||||||
AND.w #$0003 : TAY : ASL : TAX
|
AND.w #$0003 : TAY : ASL : TAX
|
||||||
LDA.w #$007F : STA.w RandoOverworldTargetEdge
|
LDA.w #$007F : STA.w RandoOverworldTargetEdge
|
||||||
JSR OWLoadSpecialArea
|
JSR OWLoadSpecialArea
|
||||||
SEC
|
SEC
|
||||||
.return
|
|
||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
OWDetectSpecialTransition:
|
OWDetectSpecialTransition:
|
||||||
@@ -980,23 +761,17 @@ OWDetectSpecialTransition:
|
|||||||
TXA : AND.w #$0002 : LSR
|
TXA : AND.w #$0002 : LSR
|
||||||
STA.w RandoOverworldTerrain
|
STA.w RandoOverworldTerrain
|
||||||
LDA.l OWSpecialDestIndex,X : BIT.w #$0080 : BEQ .switch_to_edge
|
LDA.l OWSpecialDestIndex,X : BIT.w #$0080 : BEQ .switch_to_edge
|
||||||
AND.w #$00FF : CMP.w #$00FF : BEQ .disabled
|
|
||||||
AND.w #$0003 : TAY : ASL : TAX
|
AND.w #$0003 : TAY : ASL : TAX
|
||||||
.normal
|
.normal
|
||||||
JSR OWLoadSpecialArea
|
JSR OWLoadSpecialArea
|
||||||
.return
|
.return
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
.disabled
|
|
||||||
SEP #$30
|
|
||||||
STZ.w RandoOverworldTargetEdge
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.switch_to_edge
|
.switch_to_edge
|
||||||
STA.w RandoOverworldTargetEdge
|
STA.w RandoOverworldTargetEdge
|
||||||
LDA.l OWEdgeDataOffset,X : STA.w RandoOverworldEdgeAddr
|
LDA.l OWEdgeDataOffset,X : STA.w RandoOverworldEdgeAddr
|
||||||
PLA : SEP #$30 : PLA ; delete 3 bytes from stack
|
PLA : SEP #$30 : PLA ; delete 3 bytes from stack
|
||||||
JSL Link_CheckForEdgeScreenTransition : BCS .return
|
JSL Link_CheckForEdgeScreenTransition : BCS .return ; Link_CheckForEdgeScreenTransition
|
||||||
LDA.l Overworld_CheckForSpecialOverworldTrigger_Direction,X : STA.b Scrap00 : CMP.b #$08 : BNE .hobo
|
LDA.l Overworld_CheckForSpecialOverworldTrigger_Direction,X : STA.b Scrap00 : CMP.b #$08 : BNE .hobo
|
||||||
LSR : STA.b LinkPosY : STZ.b BG2V ; move Link and camera to edge
|
LSR : STA.b LinkPosY : STZ.b BG2V ; move Link and camera to edge
|
||||||
LDA.b #$06 : STA.b Scrap02
|
LDA.b #$06 : STA.b Scrap02
|
||||||
@@ -1015,15 +790,16 @@ OWDetectSpecialTransition:
|
|||||||
LDA.b #$FF : STA.b LinkRecoilZ : STA.b $C7
|
LDA.b #$FF : STA.b LinkRecoilZ : STA.b $C7
|
||||||
STZ.b $3D : STZ.b LinkSpeed : STZ.w $032B : STZ.w LinkDashing : STZ.b LinkState
|
STZ.b $3D : STZ.b LinkSpeed : STZ.w $032B : STZ.w LinkDashing : STZ.b LinkState
|
||||||
.not_dashing
|
.not_dashing
|
||||||
PLA : PLA : PLA ; delete 3 bytes from stack
|
PLA : REP #$31 : PLA ; delete 3 bytes from stack
|
||||||
JML OverworldHandleTransitions_PerformEdgeTransition
|
LDX.b Scrap02
|
||||||
|
LDA.b OverworldMap16Buffer
|
||||||
|
JML OverworldHandleTransitions_SpecialTrigger+6
|
||||||
}
|
}
|
||||||
OWEdgeTransition:
|
OWEdgeTransition:
|
||||||
{
|
{
|
||||||
LDA.l OWMode : ORA.l OWMode+1 : BEQ .unshuffled
|
LDA.l OWMode : ORA.l OWMode+1 : BEQ .unshuffled
|
||||||
LDY.w RandoOverworldTargetEdge : STZ.w RandoOverworldTargetEdge
|
LDY.w RandoOverworldTargetEdge : STZ.w RandoOverworldTargetEdge
|
||||||
CPY.b #$7F : BEQ .unshuffled
|
CPY.b #$7F : BEQ .unshuffled
|
||||||
JSL OWDestroyItemSprites
|
|
||||||
REP #$10
|
REP #$10
|
||||||
LDX.w RandoOverworldEdgeAddr
|
LDX.w RandoOverworldEdgeAddr
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
@@ -1341,7 +1117,6 @@ OWWorldTerrainUpdate: ; x = owid of destination screen, y = 1 for land to water,
|
|||||||
STZ.w RandoOverworldForceTrans
|
STZ.w RandoOverworldForceTrans
|
||||||
CMP.b #$02 : BNE +
|
CMP.b #$02 : BNE +
|
||||||
DEC : STA.w LinkDeepWater : STZ.w LinkSwimDirection
|
DEC : STA.w LinkDeepWater : STZ.w LinkSwimDirection
|
||||||
LDA.b FlagBY : AND.b #$7F : STA.b FlagBY
|
|
||||||
LDA.b #$04 : BRA .set_state
|
LDA.b #$04 : BRA .set_state
|
||||||
+
|
+
|
||||||
CMP.b #$03 : BNE ++
|
CMP.b #$03 : BNE ++
|
||||||
@@ -1362,7 +1137,6 @@ OWWorldTerrainUpdate: ; x = owid of destination screen, y = 1 for land to water,
|
|||||||
LDA.b #$01 : STA.w LinkDeepWater
|
LDA.b #$01 : STA.w LinkDeepWater
|
||||||
LDA.l FlippersEquipment : BEQ .no_flippers ; check if flippers obtained
|
LDA.l FlippersEquipment : BEQ .no_flippers ; check if flippers obtained
|
||||||
LDA.b LinkState : CMP.b #$17 : BEQ .no_flippers ; check if bunny
|
LDA.b LinkState : CMP.b #$17 : BEQ .no_flippers ; check if bunny
|
||||||
LDA.b FlagBY : AND.b #$7F : STA.b FlagBY
|
|
||||||
LDA.b #$04 : STA.b LinkState : STZ.w LinkSwimDirection : RTS
|
LDA.b #$04 : STA.b LinkState : STZ.w LinkSwimDirection : RTS
|
||||||
.no_flippers
|
.no_flippers
|
||||||
PHX
|
PHX
|
||||||
@@ -1714,7 +1488,7 @@ dw $0b28, $0b38, $0010, $0b30, $1515, $1018, $0001, $000e
|
|||||||
dw $0b70, $0ba0, $0030, $0b88, $1515, $1020, $0000, $000f
|
dw $0b70, $0ba0, $0030, $0b88, $1515, $1020, $0000, $000f
|
||||||
dw $0a40, $0b10, $00d0, $0aa8, $1d1d, $1006, $0000, $0010
|
dw $0a40, $0b10, $00d0, $0aa8, $1d1d, $1006, $0000, $0010
|
||||||
dw $0350, $0390, $0040, $0370, $1821, $2060, $0000, $0011
|
dw $0350, $0390, $0040, $0370, $1821, $2060, $0000, $0011
|
||||||
dw $0670, $06a8, $0038, $068c, $1b23, $2004, $0000, $0012
|
dw $0670, $06a8, $0038, $068c, $1b23, $2002, $0000, $0012
|
||||||
dw $0898, $09b0, $0118, $0924, $1b24, $2054, $0000, $0013
|
dw $0898, $09b0, $0118, $0924, $1b24, $2054, $0000, $0013
|
||||||
dw $0a40, $0ba0, $0160, $0af0, $2525, $100e, $0000, $0014
|
dw $0a40, $0ba0, $0160, $0af0, $2525, $100e, $0000, $0014
|
||||||
dw $0c70, $0c90, $0020, $0c80, $1e26, $2002, $0000, $0015
|
dw $0c70, $0c90, $0020, $0c80, $1e26, $2002, $0000, $0015
|
||||||
@@ -1746,7 +1520,7 @@ dw $0b28, $0b38, $0010, $0b30, $5555, $1018, $0001, $002e
|
|||||||
dw $0b70, $0ba0, $0030, $0b88, $5555, $1020, $0000, $002f
|
dw $0b70, $0ba0, $0030, $0b88, $5555, $1020, $0000, $002f
|
||||||
dw $0a40, $0b10, $00d0, $0aa8, $5d5d, $1006, $0000, $0030
|
dw $0a40, $0b10, $00d0, $0aa8, $5d5d, $1006, $0000, $0030
|
||||||
dw $0350, $0390, $0040, $0370, $5861, $2060, $0000, $0031
|
dw $0350, $0390, $0040, $0370, $5861, $2060, $0000, $0031
|
||||||
dw $0670, $06a8, $0038, $068c, $5b63, $2004, $0000, $0032
|
dw $0670, $06a8, $0038, $068c, $5b63, $2002, $0000, $0032
|
||||||
dw $0898, $09b0, $0118, $0924, $5b64, $2054, $0000, $0033
|
dw $0898, $09b0, $0118, $0924, $5b64, $2054, $0000, $0033
|
||||||
dw $0a40, $0ba0, $0160, $0af0, $6565, $100e, $0000, $0034
|
dw $0a40, $0ba0, $0160, $0af0, $6565, $100e, $0000, $0034
|
||||||
dw $0c70, $0c90, $0020, $0c80, $5e66, $2002, $0000, $0035
|
dw $0c70, $0c90, $0020, $0c80, $5e66, $2002, $0000, $0035
|
||||||
@@ -2053,42 +1827,16 @@ db $74, $4e, $10, $b1, $00, $1c
|
|||||||
UWBonkPrizeData:
|
UWBonkPrizeData:
|
||||||
db $ff, $00, $02, $b5, $00, $08
|
db $ff, $00, $02, $b5, $00, $08
|
||||||
|
|
||||||
org $AABC80 ;PC 153C80
|
; temporary fix - murahdahla replaces one of the bonk tree prizes
|
||||||
OWMapGridLight:
|
; so we copy the sprite table here and update the pointer
|
||||||
db $00, $01, $02, $03, $04, $05, $06, $07
|
; longterm solution should be to spawn in murahdahla separately
|
||||||
db $08, $09, $0A, $0B, $0C, $0D, $0E, $0F
|
org $89AE2A
|
||||||
db $10, $11, $12, $13, $14, $15, $16, $17
|
Overworld_Sprites_Screen1A_2:
|
||||||
db $18, $19, $1A, $1B, $1C, $1D, $1E, $1F
|
db $08, $0F, $41 ; yx:{ 0x080, 0x0F0 }
|
||||||
db $20, $21, $22, $23, $24, $25, $26, $27
|
db $0E, $0C, $41 ; yx:{ 0x0E0, 0x0C0 }
|
||||||
db $28, $29, $2A, $2B, $2C, $2D, $2E, $2F
|
db $11, $0D, $E3 ; yx:{ 0x110, 0x0D0 }
|
||||||
db $30, $31, $32, $33, $34, $35, $36, $37
|
db $18, $0A, $D8 ; yx:{ 0x180, 0x0A0 }
|
||||||
db $38, $39, $3A, $3B, $3C, $3D, $3E, $3F
|
db $18, $0F, $45 ; yx:{ 0x180, 0x0F0 }
|
||||||
OWMapGridDark:
|
db $FF ; END
|
||||||
db $40, $41, $42, $43, $44, $45, $46, $47
|
org $89CA55
|
||||||
db $48, $49, $4A, $4B, $4C, $4D, $4E, $4F
|
dw Overworld_Sprites_Screen1A_2&$FFFF
|
||||||
db $50, $51, $52, $53, $54, $55, $56, $57
|
|
||||||
db $58, $59, $5A, $5B, $5C, $5D, $5E, $5F
|
|
||||||
db $60, $61, $62, $63, $64, $65, $66, $67
|
|
||||||
db $68, $69, $6A, $6B, $6C, $6D, $6E, $6F
|
|
||||||
db $70, $71, $72, $73, $74, $75, $76, $77
|
|
||||||
db $78, $79, $7A, $7B, $7C, $7D, $7E, $7F
|
|
||||||
|
|
||||||
org $AABD00 ;PC 153D00
|
|
||||||
OWMapGridLightPositionByAbsolutePosition:
|
|
||||||
db $00, $01, $02, $03, $04, $05, $06, $07
|
|
||||||
db $08, $09, $0A, $0B, $0C, $0D, $0E, $0F
|
|
||||||
db $10, $11, $12, $13, $14, $15, $16, $17
|
|
||||||
db $18, $19, $1A, $1B, $1C, $1D, $1E, $1F
|
|
||||||
db $20, $21, $22, $23, $24, $25, $26, $27
|
|
||||||
db $28, $29, $2A, $2B, $2C, $2D, $2E, $2F
|
|
||||||
db $30, $31, $32, $33, $34, $35, $36, $37
|
|
||||||
db $38, $39, $3A, $3B, $3C, $3D, $3E, $3F
|
|
||||||
OWMapGridDarkPositionByAbsolutePosition:
|
|
||||||
db $00, $01, $02, $03, $04, $05, $06, $07
|
|
||||||
db $08, $09, $0A, $0B, $0C, $0D, $0E, $0F
|
|
||||||
db $10, $11, $12, $13, $14, $15, $16, $17
|
|
||||||
db $18, $19, $1A, $1B, $1C, $1D, $1E, $1F
|
|
||||||
db $20, $21, $22, $23, $24, $25, $26, $27
|
|
||||||
db $28, $29, $2A, $2B, $2C, $2D, $2E, $2F
|
|
||||||
db $30, $31, $32, $33, $34, $35, $36, $37
|
|
||||||
db $38, $39, $3A, $3B, $3C, $3D, $3E, $3F
|
|
||||||
|
|||||||
@@ -291,10 +291,10 @@ RTL
|
|||||||
REP #$30
|
REP #$30
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
; dungeon names
|
; dungeon names
|
||||||
LDA.w #$2DA4
|
LDA.w #$2D50
|
||||||
LDY.w #00
|
LDY.w #00
|
||||||
|
|
||||||
.next_dungeon_name
|
.next_dungeon_name
|
||||||
LDX.w .dungeon_positions,Y
|
LDX.w .dungeon_positions,Y
|
||||||
STA.w GFXStripes+$0646,X
|
STA.w GFXStripes+$0646,X
|
||||||
INC
|
INC
|
||||||
@@ -310,10 +310,10 @@ RTL
|
|||||||
STA.w GFXStripes+$0706,X
|
STA.w GFXStripes+$0706,X
|
||||||
|
|
||||||
DEX : DEX
|
DEX : DEX
|
||||||
BPL --
|
BPL --
|
||||||
|
|
||||||
LDA.l HudFlag : AND.w #$0020 : BEQ +
|
LDA.l HudFlag : AND.w #$0020 : BEQ +
|
||||||
JMP .maps_and_compasses
|
JMP .maps_and_compasses
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
+
|
+
|
||||||
LDA.l HUDDungeonItems : AND.w #$0001 : BNE +
|
LDA.l HUDDungeonItems : AND.w #$0001 : BNE +
|
||||||
|
|||||||
@@ -115,9 +115,7 @@ RTL
|
|||||||
CheckTransitionOverworld:
|
CheckTransitionOverworld:
|
||||||
STA.b $8A
|
STA.b $8A
|
||||||
STA.w $040A ; what we wrote over
|
STA.w $040A ; what we wrote over
|
||||||
JSL MaybeMarkFluteSpotVisited
|
JML MaybeMarkFluteSpotVisited
|
||||||
LDA.b $8A
|
|
||||||
RTL
|
|
||||||
|
|
||||||
CheckFlute:
|
CheckFlute:
|
||||||
LDA.l FluteBitfield
|
LDA.l FluteBitfield
|
||||||
@@ -65,8 +65,6 @@ LinkSubPixelVelocty = $7E002A ; Word length
|
|||||||
LinkAnimationStep = $7E002E ;
|
LinkAnimationStep = $7E002E ;
|
||||||
LinkDirection = $7E002F ; $00 = Up | $02 = Down | $04 = Left | $06 = Right
|
LinkDirection = $7E002F ; $00 = Up | $02 = Down | $04 = Left | $06 = Right
|
||||||
;
|
;
|
||||||
FlagBY = $7E003A ; Bitfield for B and Y buttons.
|
|
||||||
;
|
|
||||||
OAMOffsetY = $7E0044 ;
|
OAMOffsetY = $7E0044 ;
|
||||||
OAMOffsetX = $7E0045 ;
|
OAMOffsetX = $7E0045 ;
|
||||||
LinkIncapacitatedTimer = $7E0046 ; Countdown when Link takes damage, not same as I-frames
|
LinkIncapacitatedTimer = $7E0046 ; Countdown when Link takes damage, not same as I-frames
|
||||||
@@ -237,8 +235,6 @@ CurrentYItem = $7E0303 ;
|
|||||||
AButtonAct = $7E0308 ; Bitfield for A-actions. $80 = Carry/toss | $02 Prayer | $01 = Tree pull
|
AButtonAct = $7E0308 ; Bitfield for A-actions. $80 = Carry/toss | $02 Prayer | $01 = Tree pull
|
||||||
CarryAct = $7E0309 ; Bitfield for carrying. $02 = Tossing | $01 = Lifting
|
CarryAct = $7E0309 ; Bitfield for carrying. $02 = Tossing | $01 = Lifting
|
||||||
;
|
;
|
||||||
LinkIFrames = $7E031F ; Countdown for Link's invincibility frames after taking damage.
|
|
||||||
;
|
|
||||||
LinkSwimDirection = $7E0340 ; Bitfield for swim direction. (.... udlr)
|
LinkSwimDirection = $7E0340 ; Bitfield for swim direction. (.... udlr)
|
||||||
;
|
;
|
||||||
LinkDeepWater = $7E0345 ; Set when Link is in deep water.
|
LinkDeepWater = $7E0345 ; Set when Link is in deep water.
|
||||||
@@ -338,7 +334,6 @@ SpawnedItemFlag = $7E0726 ; 0x02 - one for pot, 2 for sprite drop
|
|||||||
SpawnedItemMWPlayer = $7E0728 ; Player Id for spawned item if Multiworld item 0x02
|
SpawnedItemMWPlayer = $7E0728 ; Player Id for spawned item if Multiworld item 0x02
|
||||||
;
|
;
|
||||||
EnemyDropIndicator = $7E072A ; Used by HUD to indicate enemy drops remaining
|
EnemyDropIndicator = $7E072A ; Used by HUD to indicate enemy drops remaining
|
||||||
NpcItemIndicator = $7E072C ; Flag used by HUD to indicate NPC item present
|
|
||||||
SkipBeeTrapDisguise = $7E072D ; Flag to skip bee trap disguise during draw routine
|
SkipBeeTrapDisguise = $7E072D ; Flag to skip bee trap disguise during draw routine
|
||||||
|
|
||||||
SprDropsItem = $7E0730 ; Array for whether a sprite drops an item 0x16
|
SprDropsItem = $7E0730 ; Array for whether a sprite drops an item 0x16
|
||||||
@@ -598,8 +593,6 @@ HUDMultiIndicator = $7EC790 ;
|
|||||||
HUDKeysObtained = $7EC7A2 ;
|
HUDKeysObtained = $7EC7A2 ;
|
||||||
HUDKeysSlash = $7EC7A4 ;
|
HUDKeysSlash = $7EC7A4 ;
|
||||||
HUDKeysTotal = $7EC7A6 ;
|
HUDKeysTotal = $7EC7A6 ;
|
||||||
HUDKeysExtraPlus = $7EC7E4 ;
|
|
||||||
HUDKeysExtraCount = $7EC7E6 ;
|
|
||||||
;
|
;
|
||||||
BigRAM = $7EC900 ; Big buffer of free ram (0x1F00)
|
BigRAM = $7EC900 ; Big buffer of free ram (0x1F00)
|
||||||
ItemGFXStack = $7ECB00 ; Pointers to source of decompressed item tiles deferred to NMI loading.
|
ItemGFXStack = $7ECB00 ; Pointers to source of decompressed item tiles deferred to NMI loading.
|
||||||
@@ -784,7 +777,6 @@ endmacro
|
|||||||
%assertRAM(LinkRecoilZ, $7E0029)
|
%assertRAM(LinkRecoilZ, $7E0029)
|
||||||
%assertRAM(LinkAnimationStep, $7E002E)
|
%assertRAM(LinkAnimationStep, $7E002E)
|
||||||
%assertRAM(LinkDirection, $7E002F)
|
%assertRAM(LinkDirection, $7E002F)
|
||||||
%assertRAM(FlagBY, $7E003A)
|
|
||||||
%assertRAM(OAMOffsetY, $7E0044)
|
%assertRAM(OAMOffsetY, $7E0044)
|
||||||
%assertRAM(OAMOffsetX, $7E0045)
|
%assertRAM(OAMOffsetX, $7E0045)
|
||||||
%assertRAM(LinkIncapacitatedTimer, $7E0046)
|
%assertRAM(LinkIncapacitatedTimer, $7E0046)
|
||||||
@@ -882,8 +874,6 @@ endmacro
|
|||||||
%assertRAM(UseY1, $7E0301)
|
%assertRAM(UseY1, $7E0301)
|
||||||
%assertRAM(CurrentYItem, $7E0303)
|
%assertRAM(CurrentYItem, $7E0303)
|
||||||
%assertRAM(AButtonAct, $7E0308)
|
%assertRAM(AButtonAct, $7E0308)
|
||||||
%assertRAM(CarryAct, $7E0309)
|
|
||||||
%assertRAM(LinkIFrames, $7E031F)
|
|
||||||
%assertRAM(LinkSwimDirection, $7E0340)
|
%assertRAM(LinkSwimDirection, $7E0340)
|
||||||
%assertRAM(LinkDeepWater, $7E0345)
|
%assertRAM(LinkDeepWater, $7E0345)
|
||||||
%assertRAM(TileActIce, $7E0348)
|
%assertRAM(TileActIce, $7E0348)
|
||||||
|
|||||||
+1
-4
@@ -433,12 +433,9 @@ Shopkeeper_BuyItem:
|
|||||||
CMP.b #$2E : BEQ .refill ; Red Potion Refill
|
CMP.b #$2E : BEQ .refill ; Red Potion Refill
|
||||||
CMP.b #$2F : BEQ .refill ; Green Potion Refill
|
CMP.b #$2F : BEQ .refill ; Green Potion Refill
|
||||||
CMP.b #$30 : BEQ .refill ; Blue Potion Refill
|
CMP.b #$30 : BEQ .refill ; Blue Potion Refill
|
||||||
CMP.b #$66 : BEQ .refill ; Orange Potion Refill
|
BRA +
|
||||||
CMP.b #$AF : BEQ .generic_key
|
|
||||||
BRA +
|
|
||||||
.refill
|
.refill
|
||||||
JSL Sprite_GetEmptyBottleIndex : BMI .full_bottles
|
JSL Sprite_GetEmptyBottleIndex : BMI .full_bottles
|
||||||
.generic_key
|
|
||||||
LDA.b #$1 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop
|
LDA.b #$1 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop
|
||||||
+
|
+
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
DamageClassCalc:
|
DamageClassCalc:
|
||||||
PHA
|
PHA
|
||||||
LDA.l GanonVulnerabilityItem : AND.b #$7F : BEQ +
|
LDA.l GanonVulnerabilityItem : BEQ +
|
||||||
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE +
|
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE +
|
||||||
PLA
|
PLA
|
||||||
JSL Ganon_CheckAncillaVulnerability
|
JSL Ganon_CheckAncillaVulnerability
|
||||||
@@ -240,9 +240,7 @@ CompassCountDisplay: skip 2 ; Compass count display flags (bitfield)
|
|||||||
; High Byte: x c e d a s p m
|
; High Byte: x c e d a s p m
|
||||||
; x = Sewers | c = Hyrule Castle | e = Eastern Palace | d = Desert Palace
|
; x = Sewers | c = Hyrule Castle | e = Eastern Palace | d = Desert Palace
|
||||||
; a = Castle Tower | s = Swamp Palace | p = PoD | m = Mire
|
; a = Castle Tower | s = Swamp Palace | p = PoD | m = Mire
|
||||||
DungeonVisited: skip 2 ; Whether each dungeon has been entered (bitfield)
|
skip 10 ;
|
||||||
; same order of bits as CompassCountDisplay above
|
|
||||||
skip 8 ;
|
|
||||||
Aga2Duck: skip 1 ; Used in lieu of pyramid hole for checking if the duck should come
|
Aga2Duck: skip 1 ; Used in lieu of pyramid hole for checking if the duck should come
|
||||||
; 0 = Haven't called post-Aga 2 bird | 1 = Have called post-Aga 2 bird
|
; 0 = Haven't called post-Aga 2 bird | 1 = Have called post-Aga 2 bird
|
||||||
NpcFlags: skip 2 ; l - c s t k z o (bitfield)
|
NpcFlags: skip 2 ; l - c s t k z o (bitfield)
|
||||||
@@ -308,7 +306,7 @@ HeartContainerCounter: skip 1 ; Total number of heart containers collected (in
|
|||||||
DeathCounter: skip 1 ; Number of deaths (integer)
|
DeathCounter: skip 1 ; Number of deaths (integer)
|
||||||
skip 1 ; Reserved
|
skip 1 ; Reserved
|
||||||
FluteCounter: skip 1 ; Number of times fluted (integer)
|
FluteCounter: skip 1 ; Number of times fluted (integer)
|
||||||
MapFrames: skip 4 ; Total map time in frames (32-bit integer)
|
skip 4 ;
|
||||||
RNGItem: skip 2 ; RNG Item
|
RNGItem: skip 2 ; RNG Item
|
||||||
SwordlessBossKills: skip 1 ; Number of bosses killed without a sword (integer)
|
SwordlessBossKills: skip 1 ; Number of bosses killed without a sword (integer)
|
||||||
FaerieRevivalCounter: skip 1 ; Number of faerie revivals (integer)
|
FaerieRevivalCounter: skip 1 ; Number of faerie revivals (integer)
|
||||||
|
|||||||
@@ -88,27 +88,27 @@ IncrementSmallKeys:
|
|||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
IncrementSmallKeysNoPrimary:
|
IncrementSmallKeysNoPrimary:
|
||||||
STA.l CurrentSmallKeys ; thing we wrote over, write small key count
|
STA.l CurrentSmallKeys ; thing we wrote over, write small key count
|
||||||
PHX
|
PHX
|
||||||
LDA.l StatsLocked : BNE +
|
LDA.l StatsLocked : BNE +
|
||||||
LDA.l SmallKeyCounter : INC : STA.l SmallKeyCounter
|
LDA.l SmallKeyCounter : INC : STA.l SmallKeyCounter
|
||||||
+
|
+
|
||||||
JSL UpdateKeys
|
JSL UpdateKeys
|
||||||
LDA.b IndoorsFlag : BEQ + ; skip room check if outdoors
|
LDA.b IndoorsFlag : BEQ + ; skip room check if outdoors
|
||||||
PHP : REP #$20 ; set 16-bit accumulator
|
PHP : REP #$20 ; set 16-bit accumulator
|
||||||
LDA.b RoomIndex : CMP.w #$0087 : BNE ++ ; hera basement
|
LDA.b RoomIndex : CMP.w #$0087 : BNE ++ ; hera basement
|
||||||
LDA.b $A8 : AND.w #$0003 : CMP.w #$0002 : BNE ++ ; must be quadrant 2
|
LDA.b $A8 : AND.w #$0003 : CMP.w #$0002 : BNE ++ ; must be quadrant 2
|
||||||
LDA.w SprDropsItem, X : AND.w #$00FF : BNE ++ ; must not be a standing item
|
LDA.w SprDropsItem, X : AND.w #$00FF : BNE ++ ; must not be a standing item
|
||||||
PLP : PHY
|
PLP : PHY
|
||||||
LDY.b #$24
|
LDY.b #$24
|
||||||
JSL AddInventory
|
JSL AddInventory
|
||||||
PLY : BRA +
|
PLY : BRA +
|
||||||
++
|
++
|
||||||
PLP
|
PLP
|
||||||
+
|
+
|
||||||
LDA.b #$01 : STA.l UpdateHUDFlag
|
LDA.b #$01 : STA.l UpdateHUDFlag
|
||||||
JSL HUD_RebuildLong
|
JSL HUD_RebuildLong
|
||||||
PLX
|
PLX
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
DecrementSmallKeys:
|
DecrementSmallKeys:
|
||||||
@@ -188,9 +188,9 @@ CountAllKey:
|
|||||||
|
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
IncrementAgahnim2Sword:
|
IncrementAgahnim2Sword:
|
||||||
PHA
|
PHA
|
||||||
JSL IncrementBossSword
|
JSL IncrementBossSword
|
||||||
PLA
|
PLA
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
IncrementDeathCounter:
|
IncrementDeathCounter:
|
||||||
@@ -239,22 +239,22 @@ RTL
|
|||||||
DecrementItemCounter:
|
DecrementItemCounter:
|
||||||
PHA
|
PHA
|
||||||
LDA.l StatsLocked : BNE +
|
LDA.l StatsLocked : BNE +
|
||||||
REP #$20
|
REP #$20
|
||||||
LDA.l TotalItemCounter : DEC : STA.l TotalItemCounter
|
LDA.l TotalItemCounter : DEC : STA.l TotalItemCounter
|
||||||
SEP #$20
|
SEP #$20
|
||||||
+
|
+
|
||||||
PLA
|
PLA
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
IncrementBigChestCounter:
|
IncrementBigChestCounter:
|
||||||
JSL Dungeon_SaveRoomQuadrantData ; thing we wrote over
|
JSL Dungeon_SaveRoomQuadrantData ; thing we wrote over
|
||||||
PHA
|
PHA
|
||||||
LDA.l StatsLocked : BNE +
|
LDA.l StatsLocked : BNE +
|
||||||
LDA.l BigKeysBigChests : INC : AND.b #$0F : TAX
|
LDA.l BigKeysBigChests : INC : AND.b #$0F : TAX
|
||||||
LDA.l BigKeysBigChests : AND.b #$F0 : STA.l BigKeysBigChests
|
LDA.l BigKeysBigChests : AND.b #$F0 : STA.l BigKeysBigChests
|
||||||
TXA : ORA.l BigKeysBigChests : STA.l BigKeysBigChests
|
TXA : ORA.l BigKeysBigChests : STA.l BigKeysBigChests
|
||||||
+
|
+
|
||||||
PLA
|
PLA
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
IncrementDamageTakenCounter_Eight:
|
IncrementDamageTakenCounter_Eight:
|
||||||
@@ -338,8 +338,8 @@ IncrementUWMirror:
|
|||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
IncrementSpentRupees:
|
IncrementSpentRupees:
|
||||||
DEC A : BPL .subtractRupees
|
DEC A : BPL .subtractRupees
|
||||||
LDA.w #$0000 : STA.l CurrentRupees
|
LDA.w #$0000 : STA.l CurrentRupees
|
||||||
RTL
|
RTL
|
||||||
.subtractRupees
|
.subtractRupees
|
||||||
PHA : PHP
|
PHA : PHP
|
||||||
@@ -355,9 +355,9 @@ IndoorTileTransitionCounter:
|
|||||||
JMP StatTransitionCounter
|
JMP StatTransitionCounter
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
IndoorSubtileTransitionCounter:
|
IndoorSubtileTransitionCounter:
|
||||||
;JSL HeartPieceSetRedraw ; set redraw flag for items
|
;JSL HeartPieceSetRedraw ; set redraw flag for items
|
||||||
STZ.w SomariaSwitchFlag ; stuff we wrote over
|
STZ.w SomariaSwitchFlag ; stuff we wrote over
|
||||||
STZ.w SpriteRoomTag
|
STZ.w SpriteRoomTag
|
||||||
JMP StatTransitionCounter
|
JMP StatTransitionCounter
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
StatsFinalPrep:
|
StatsFinalPrep:
|
||||||
@@ -385,12 +385,12 @@ StatsFinalPrep:
|
|||||||
LDA.l RupeesSpent : !ADD.l DisplayRupees : STA.l RupeesCollected
|
LDA.l RupeesSpent : !ADD.l DisplayRupees : STA.l RupeesCollected
|
||||||
LDA.l RupeesSpent+1 : ADC.l DisplayRupees+1 : STA.l RupeesCollected+1
|
LDA.l RupeesSpent+1 : ADC.l DisplayRupees+1 : STA.l RupeesCollected+1
|
||||||
|
|
||||||
REP #$20
|
REP #$20
|
||||||
LDA.l TotalItemCounter : !SUB.l ChestsOpened : STA.l NonChestCounter
|
LDA.l TotalItemCounter : !SUB.l ChestsOpened : STA.l NonChestCounter
|
||||||
|
|
||||||
.done
|
.done
|
||||||
PLP : PLX : PLA
|
PLP : PLX : PLA
|
||||||
LDA.b #$19 : STA.b GameMode ; thing we wrote over, load triforce room
|
LDA.b #$19 : STA.b GameMode ; thing we wrote over, load triforce room
|
||||||
STZ.b GameSubMode
|
STZ.b GameSubMode
|
||||||
STZ.b SubSubModule
|
STZ.b SubSubModule
|
||||||
RTL
|
RTL
|
||||||
|
|||||||
+16
-18
@@ -504,16 +504,7 @@ CreditsLineBlank:
|
|||||||
%blankline()
|
%blankline()
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
%smallcredits("GWAAKIWI * DUNGEON MAPS", "yellow")
|
%smallcredits("SPRITE DEVELOPMENT", "yellow")
|
||||||
|
|
||||||
%blankline()
|
|
||||||
|
|
||||||
%bigcredits("KARAFRUIT")
|
|
||||||
|
|
||||||
%blankline()
|
|
||||||
%blankline()
|
|
||||||
|
|
||||||
%smallcredits("SPRITE DEVELOPMENT", "green")
|
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
@@ -534,7 +525,7 @@ CreditsLineBlank:
|
|||||||
%blankline()
|
%blankline()
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
%smallcredits("YOUR SPRITE BY", "yellow")
|
%smallcredits("YOUR SPRITE BY", "green")
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
@@ -544,7 +535,7 @@ CreditsLineBlank:
|
|||||||
%blankline()
|
%blankline()
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
%smallcredits("MSU SUPPORT", "green")
|
%smallcredits("MSU SUPPORT", "yellow")
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
@@ -553,7 +544,7 @@ CreditsLineBlank:
|
|||||||
%blankline()
|
%blankline()
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
%smallcredits("PALETTE SHUFFLER", "yellow")
|
%smallcredits("PALETTE SHUFFLER", "green")
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
@@ -562,7 +553,7 @@ CreditsLineBlank:
|
|||||||
%blankline()
|
%blankline()
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
%smallcredits("WEBSITE LOGO", "green")
|
%smallcredits("WEBSITE LOGO", "yellow")
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
@@ -632,6 +623,12 @@ endif
|
|||||||
|
|
||||||
%bigcredits("HTTPS://ALTTPR.COM/DISCORD")
|
%bigcredits("HTTPS://ALTTPR.COM/DISCORD")
|
||||||
|
|
||||||
|
%emptyline()
|
||||||
|
%emptyline()
|
||||||
|
%emptyline()
|
||||||
|
%emptyline()
|
||||||
|
%emptyline()
|
||||||
|
%emptyline()
|
||||||
%emptyline()
|
%emptyline()
|
||||||
%emptyline()
|
%emptyline()
|
||||||
|
|
||||||
@@ -755,13 +752,14 @@ endif
|
|||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|
||||||
%bigcreditsleft("TOTAL MAP TIME")
|
|
||||||
|
|
||||||
%blankline()
|
|
||||||
|
|
||||||
%bigcreditsleft("TOTAL LAG TIME")
|
%bigcreditsleft("TOTAL LAG TIME")
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
%blankline()
|
||||||
|
|
||||||
|
|
||||||
|
%blankline()
|
||||||
|
%blankline()
|
||||||
|
|
||||||
|
|
||||||
%blankline()
|
%blankline()
|
||||||
|
|||||||
+3
-7
@@ -263,10 +263,6 @@ dw $3D9E ; ~ ;
|
|||||||
dw $3D98 ; , ;
|
dw $3D98 ; , ;
|
||||||
dw $3D99 ; - ; $FB
|
dw $3D99 ; - ; $FB
|
||||||
dw $0000 ; ;
|
dw $0000 ; ;
|
||||||
|
dw $0000 ; ;
|
||||||
; green ellipsis ;
|
dw $0000 ; ;
|
||||||
dw $293F ; ; $FD
|
dw $0000 ; ;
|
||||||
; green period
|
|
||||||
dw $29FE ; ; $FE
|
|
||||||
; yellow dot
|
|
||||||
dw $2DFA ; ; $FF
|
|
||||||
|
|||||||
+49
-49
@@ -25,8 +25,8 @@ PreparePointer:
|
|||||||
LDY.w #$0000
|
LDY.w #$0000
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
; Regular stat: XXXX X00L LLLL LLLL BBBB SSSS CCC- ---- ---- ---- AAAA AAAA AAAA AAAA AAAA AAAA
|
; Regular stat: XXXX X00L LLLL LLLL BBBB SSSS CCC- ---- ---- ---- AAAA AAAA AAAA AAAA AAAA AAAA
|
||||||
; Time stat: XXXX X01L LLLL LLLL ---- ---- ---- ---- ---- ---- AAAA AAAA AAAA AAAA AAAA AAAA
|
; Time stat: XXXX X01L LLLL LLLL ---- ---- ---- ---- ---- ---- AAAA AAAA AAAA AAAA AAAA AAAA
|
||||||
; End of data: 1111 1111 1111 1111
|
; End of data: 1111 1111 1111 1111
|
||||||
|
|
||||||
; X X offset (measured in 8x8 tiles)
|
; X X offset (measured in 8x8 tiles)
|
||||||
@@ -174,7 +174,7 @@ FindLine:
|
|||||||
!FRAMES_PER_SECOND = 60
|
!FRAMES_PER_SECOND = 60
|
||||||
!FRAMES_PER_MINUTE = 60*60
|
!FRAMES_PER_MINUTE = 60*60
|
||||||
!FRAMES_PER_HOUR = 60*60*60
|
!FRAMES_PER_HOUR = 60*60*60
|
||||||
!MAX_FRAME_COUNT = (99*60*60*60)+(59*60*60)+(59*60)+59
|
!MAX_FRAME_COUNT = 59*60+59*60+59*60+99
|
||||||
|
|
||||||
macro CountUnits(framesPerUnit, unitCounter)
|
macro CountUnits(framesPerUnit, unitCounter)
|
||||||
STZ.b <unitCounter>
|
STZ.b <unitCounter>
|
||||||
@@ -196,7 +196,7 @@ endmacro
|
|||||||
|
|
||||||
!ColonOffset = $8A
|
!ColonOffset = $8A
|
||||||
!PeriodOffset = $4D
|
!PeriodOffset = $4D
|
||||||
BlankCreditsTile = $3D88
|
BlankCreditsTile = $883D
|
||||||
|
|
||||||
RenderCreditsStatCounter:
|
RenderCreditsStatCounter:
|
||||||
PHB
|
PHB
|
||||||
@@ -498,45 +498,45 @@ RenderLineNumber:
|
|||||||
RTS
|
RTS
|
||||||
|
|
||||||
LoadCreditsTiles:
|
LoadCreditsTiles:
|
||||||
JSL CopyFontToVRAM ; What we wrote over
|
JSL CopyFontToVRAM ; What we wrote over
|
||||||
|
|
||||||
REP #$10
|
REP #$10
|
||||||
LDA.b #$80 : STA.w VMAIN
|
LDA.b #$80 : STA.w VMAIN
|
||||||
LDA.b #$01 : STA.w DMAP0
|
LDA.b #$01 : STA.w DMAP0
|
||||||
LDA.b #$18 : STA.w BBAD0
|
LDA.b #$18 : STA.w BBAD0
|
||||||
|
|
||||||
; Item tiles
|
; Item tiles
|
||||||
LDX.w #$8200 : STX.w VMADDL
|
LDX.w #$8200 : STX.w VMADDL
|
||||||
LDA.b #FileSelectNewGraphics>>16 : STA.w A1B0
|
LDA.b #FileSelectNewGraphics>>16 : STA.w A1B0
|
||||||
LDX.w #FileSelectNewGraphics : STX.w A1T0L
|
LDX.w #FileSelectNewGraphics : STX.w A1T0L
|
||||||
LDX.w #$0C00 : STX.w DAS0L
|
LDX.w #$0C00 : STX.w DAS0L
|
||||||
LDA.b #$01 : STA.w DMAENABLE
|
LDA.b #$01 : STA.w DMAENABLE
|
||||||
|
|
||||||
; Small characters A-Z
|
; Small characters A-Z
|
||||||
LDX.w #$7F00 : STX.w VMADDL
|
LDX.w #$7F00 : STX.w VMADDL
|
||||||
LDA.b #SmallCharacters>>16 : STA.w A1B0
|
LDA.b #SmallCharacters>>16 : STA.w A1B0
|
||||||
LDX.w #SmallCharacters : STX.w A1T0L
|
LDX.w #SmallCharacters : STX.w A1T0L
|
||||||
LDX.w #$0200 : STX.w DAS0L
|
LDX.w #$0200 : STX.w DAS0L
|
||||||
LDA.b #$01 : STA.w DMAENABLE
|
LDA.b #$01 : STA.w DMAENABLE
|
||||||
|
|
||||||
SEP #$10
|
SEP #$10
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
LoadOverworldCreditsTiles:
|
LoadOverworldCreditsTiles:
|
||||||
JSL CopyFontToVRAM ; What we wrote over
|
JSL CopyFontToVRAM ; What we wrote over
|
||||||
REP #$10
|
REP #$10
|
||||||
|
|
||||||
; Small characters A-Z
|
; Small characters A-Z
|
||||||
LDA.b #$80 : STA.w VMAIN
|
LDA.b #$80 : STA.w VMAIN
|
||||||
LDA.b #$01 : STA.w DMAP0
|
LDA.b #$01 : STA.w DMAP0
|
||||||
LDA.b #$18 : STA.w BBAD0
|
LDA.b #$18 : STA.w BBAD0
|
||||||
LDA.b #SmallCharacters>>16 : STA.w A1B0
|
LDA.b #SmallCharacters>>16 : STA.w A1B0
|
||||||
LDX.w #SmallCharacters : STX.w A1T0L
|
LDX.w #SmallCharacters : STX.w A1T0L
|
||||||
LDX.w #$0200 : STX.w DAS0L
|
LDX.w #$0200 : STX.w DAS0L
|
||||||
LDX.w #$7F00 : STX.w VMADDL
|
LDX.w #$7F00 : STX.w VMADDL
|
||||||
LDA.b #$01 : STA.w DMAENABLE
|
LDA.b #$01 : STA.w DMAENABLE
|
||||||
|
|
||||||
SEP #$10
|
SEP #$10
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
CheckFontTable:
|
CheckFontTable:
|
||||||
@@ -577,23 +577,23 @@ RTS
|
|||||||
; Dialog Pointer Override
|
; Dialog Pointer Override
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
EndingSequenceTableOverride:
|
EndingSequenceTableOverride:
|
||||||
PHY
|
PHY
|
||||||
PHX
|
PHX
|
||||||
TYX
|
TYX
|
||||||
LDA.l EndingSequenceText, X
|
LDA.l EndingSequenceText, X
|
||||||
PLX
|
PLX
|
||||||
STA.w $1008, X
|
STA.w $1008, X
|
||||||
PLY
|
PLY
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
EndingSequenceTableLookupOverride:
|
EndingSequenceTableLookupOverride:
|
||||||
PHX : PHB
|
PHX : PHB
|
||||||
PHK : PLB
|
PHK : PLB
|
||||||
TYX
|
TYX
|
||||||
LDA.l EndingSequenceText, X : AND.w #$00FF
|
LDA.l EndingSequenceText, X : AND.w #$00FF
|
||||||
ASL A
|
ASL
|
||||||
TAY
|
TAY
|
||||||
LDA.w FontTable,Y
|
LDA.w FontTable,Y
|
||||||
PLB : PLX
|
PLB : PLX
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -30,10 +30,8 @@
|
|||||||
!FAERIE_REVIVALS_Y = 361
|
!FAERIE_REVIVALS_Y = 361
|
||||||
!TOTAL_MENU_TIME_X = 19
|
!TOTAL_MENU_TIME_X = 19
|
||||||
!TOTAL_MENU_TIME_Y = 364
|
!TOTAL_MENU_TIME_Y = 364
|
||||||
!TOTAL_MAP_TIME_X = 19
|
|
||||||
!TOTAL_MAP_TIME_Y = 367
|
|
||||||
!TOTAL_LAG_TIME_X = 19
|
!TOTAL_LAG_TIME_X = 19
|
||||||
!TOTAL_LAG_TIME_Y = 370
|
!TOTAL_LAG_TIME_Y = 367
|
||||||
!COLLECTION_RATE_X = 22
|
!COLLECTION_RATE_X = 22
|
||||||
!COLLECTION_RATE_Y = 380
|
!COLLECTION_RATE_Y = 380
|
||||||
!TOTAL_TIME_X = 19
|
!TOTAL_TIME_X = 19
|
||||||
@@ -64,10 +62,10 @@ CreditsStats:
|
|||||||
%AddStat(SaveQuitCounter, 0, 0, 08, 2, !SAVE_AND_QUITS_X, !SAVE_AND_QUITS_Y)
|
%AddStat(SaveQuitCounter, 0, 0, 08, 2, !SAVE_AND_QUITS_X, !SAVE_AND_QUITS_Y)
|
||||||
%AddStat(DeathCounter, 0, 0, 08, 2, !DEATHS_X, !DEATHS_Y)
|
%AddStat(DeathCounter, 0, 0, 08, 2, !DEATHS_X, !DEATHS_Y)
|
||||||
%AddStat(FaerieRevivalCounter, 0, 0, 08, 3, !FAERIE_REVIVALS_X, !FAERIE_REVIVALS_Y)
|
%AddStat(FaerieRevivalCounter, 0, 0, 08, 3, !FAERIE_REVIVALS_X, !FAERIE_REVIVALS_Y)
|
||||||
%AddStat(MenuFrames, 1, 0, 32, 4, !TOTAL_MENU_TIME_X, !TOTAL_MENU_TIME_Y)
|
%AddStat(MenuFrames, 1, 8, 32, 4, !TOTAL_MENU_TIME_X, !TOTAL_MENU_TIME_Y)
|
||||||
%AddStat(MapFrames, 1, 0, 32, 4, !TOTAL_MAP_TIME_X, !TOTAL_MAP_TIME_Y)
|
|
||||||
%AddStat(LagTime, 1, 0, 32, 4, !TOTAL_LAG_TIME_X, !TOTAL_LAG_TIME_Y)
|
%AddStat(LagTime, 1, 0, 32, 4, !TOTAL_LAG_TIME_X, !TOTAL_LAG_TIME_Y)
|
||||||
print "Collection Rate config: ", pc
|
print "Collection Rate config: ", pc
|
||||||
|
warnpc $A39864
|
||||||
%AddStat(TotalItemCounter, 0, 0, 16, 3, !COLLECTION_RATE_X, !COLLECTION_RATE_Y)
|
%AddStat(TotalItemCounter, 0, 0, 16, 3, !COLLECTION_RATE_X, !COLLECTION_RATE_Y)
|
||||||
%AddStat(NMIFrames, 1, 0, 32, 4, !TOTAL_TIME_X, !TOTAL_TIME_Y)
|
%AddStat(NMIFrames, 1, 0, 32, 4, !TOTAL_TIME_X, !TOTAL_TIME_Y)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -101,7 +101,7 @@ CheckGanonHammerDamage:
|
|||||||
LDA.w SpriteTypeTable, X : CMP.b #$D8 ; original behavior except ganon
|
LDA.w SpriteTypeTable, X : CMP.b #$D8 ; original behavior except ganon
|
||||||
RTL
|
RTL
|
||||||
+
|
+
|
||||||
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$0C : BEQ .hammer_silvers
|
LDA.l GanonVulnerabilityItem : CMP.b #$0C : BEQ .hammer_silvers
|
||||||
LDA.w SpriteTypeTable, X : CMP.b #$D6 ; original behavior
|
LDA.w SpriteTypeTable, X : CMP.b #$D6 ; original behavior
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
|||||||
+15
-15
@@ -105,10 +105,6 @@ db $00
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B0802E
|
org $B0802E
|
||||||
GanonVulnerabilityItem:
|
GanonVulnerabilityItem:
|
||||||
; sn-i iiii
|
|
||||||
; s - immune to sword spins in phase 4
|
|
||||||
; n - immune to all items
|
|
||||||
; i - index of item vulnerability
|
|
||||||
db $00 ; $00 = default behavior (silver arrows)
|
db $00 ; $00 = default behavior (silver arrows)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B0902F
|
org $B0902F
|
||||||
@@ -241,8 +237,12 @@ db $00
|
|||||||
;a - Infinite Arrows
|
;a - Infinite Arrows
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B0804E ; PC 0x18004E
|
org $B0804E ; PC 0x18004E
|
||||||
UncleRefill_deprecated: ; no longer used
|
UncleRefill:
|
||||||
db $00
|
db $00
|
||||||
|
;---- -mba
|
||||||
|
;m - Refill Magic
|
||||||
|
;b - Refill Bombs
|
||||||
|
;a - Refill Arrows
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B0804F ; PC 0x18004F
|
org $B0804F ; PC 0x18004F
|
||||||
ByrnaInvulnerability:
|
ByrnaInvulnerability:
|
||||||
@@ -464,9 +464,10 @@ db $00 ; #$00 = Original Behavior (default) - #$01 = Book can flip crystal switc
|
|||||||
; 0x1800A7 - 0x1800AE (unused)
|
; 0x1800A7 - 0x1800AE (unused)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; 0x1800AF
|
; 0x1800AF
|
||||||
; m-ff ffff
|
; mtff ffff
|
||||||
;
|
;
|
||||||
; m - 0 = only shorten timer on multiworld items, 1 = shorten all items
|
; m - 0 = only shorten timer on multiworld items, 1 = shorten all items
|
||||||
|
; t - 0 = triforce pieces considered important, 1 = triforce pieces considered junk
|
||||||
; f - number of frames to show items
|
; f - number of frames to show items
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B080AF ; PC 0x1800AF
|
org $B080AF ; PC 0x1800AF
|
||||||
@@ -890,8 +891,8 @@ SilverArrowsAutoEquip:
|
|||||||
db $01 ; #$00 = Off - #$01 = Collection Time (Default) - #$02 = Entering Ganon - #$03 = Collection Time & Entering Ganon
|
db $01 ; #$00 = Off - #$01 = Collection Time (Default) - #$02 = Entering Ganon - #$03 = Collection Time & Entering Ganon
|
||||||
;================================================================================
|
;================================================================================
|
||||||
org $B08183 ; PC 0x180183
|
org $B08183 ; PC 0x180183
|
||||||
RainDeathRefillRupeeBow:
|
FreeUncleItemAmount:
|
||||||
dw $012C ; 300 rupees (Default)
|
dw $12C ; 300 rupees (Default)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B08185 ; PC 0x180185
|
org $B08185 ; PC 0x180185
|
||||||
RainDeathRefillTable:
|
RainDeathRefillTable:
|
||||||
@@ -1532,7 +1533,7 @@ db $19,$1A,$1B,$1C,$1D,$1E,$1F,$20
|
|||||||
db $21,$22,$11,$11,$10,$16,$16,$16
|
db $21,$22,$11,$11,$10,$16,$16,$16
|
||||||
db $16,$16,$11,$16,$16,$16,$15,$15
|
db $16,$16,$11,$16,$16,$16,$15,$15
|
||||||
db $15,$15,$15,$15,$15,$15,$15,$15
|
db $15,$15,$15,$15,$15,$15,$15,$15
|
||||||
db $15,$15,$2E,$02,$09,$00,$00,$00
|
db $15,$15,$16,$02,$09,$00,$00,$00
|
||||||
|
|
||||||
MusicShuffleTable:
|
MusicShuffleTable:
|
||||||
db $01,$02,$03,$04,$05,$06,$07,$08
|
db $01,$02,$03,$04,$05,$06,$07,$08
|
||||||
@@ -1584,7 +1585,6 @@ dw $0000
|
|||||||
; STAIRS3
|
; STAIRS3
|
||||||
; STAIRS4
|
; STAIRS4
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B0DA00
|
|
||||||
RoomHeaders:
|
RoomHeaders:
|
||||||
org $B0DA00 : RoomHeader_0000: ; pc 0x185A00
|
org $B0DA00 : RoomHeader_0000: ; pc 0x185A00
|
||||||
db $41, $21, $13, $22, $07, $3D, $00, $00, $00, $10, $C0, $00, $00, $04
|
db $41, $21, $13, $22, $07, $3D, $00, $00, $00, $10, $C0, $00, $00, $04
|
||||||
@@ -2664,7 +2664,7 @@ db #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00,
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B0EFE0 ; PC 0x186FE0-0x186FEF
|
org $B0EFE0 ; PC 0x186FE0-0x186FEF
|
||||||
CrystalPendantFlags_3:
|
CrystalPendantFlags_3:
|
||||||
db $00 ; Sewers
|
db $00 ; Sewers
|
||||||
db $00 ; Hyrule Castle
|
db $00 ; Hyrule Castle
|
||||||
db $08 ; Eastern Palace
|
db $08 ; Eastern Palace
|
||||||
db $09 ; Desert Palace
|
db $09 ; Desert Palace
|
||||||
@@ -2672,7 +2672,7 @@ CrystalPendantFlags_3:
|
|||||||
db $02 ; Swamp Palace
|
db $02 ; Swamp Palace
|
||||||
db $01 ; Palace of Darkness
|
db $01 ; Palace of Darkness
|
||||||
db $06 ; Misery Mire
|
db $06 ; Misery Mire
|
||||||
db $03 ; Skull Woods
|
db $03 ; Skull Woods
|
||||||
db $05 ; Ice Palace
|
db $05 ; Ice Palace
|
||||||
db $0A ; Tower of Hera
|
db $0A ; Tower of Hera
|
||||||
db $04 ; Thieves' Town
|
db $04 ; Thieves' Town
|
||||||
@@ -2686,9 +2686,9 @@ org $B0EFFF ; PC 0x186FFF
|
|||||||
BallNChainDungeon: ; Dungeon ID where ball n chain guard is located. Write
|
BallNChainDungeon: ; Dungeon ID where ball n chain guard is located. Write
|
||||||
db $02 ; $FF to count ball and chain item for collection stats.
|
db $02 ; $FF to count ball and chain item for collection stats.
|
||||||
|
|
||||||
org $B0F000
|
;--------------------------------------------------------------------------------
|
||||||
ExtraChestKeys: ; PC 0x187000-0x18700F
|
; 0x187000 - 18700F (unused)
|
||||||
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
;--------------------------------------------------------------------------------
|
||||||
|
|
||||||
org $B0F010
|
org $B0F010
|
||||||
ChestKeys: ; PC 0x187010-0x18701F
|
ChestKeys: ; PC 0x187010-0x18701F
|
||||||
|
|||||||
+1
-1
@@ -368,7 +368,7 @@ FontProperties:
|
|||||||
dw $8001, $06C0 ; C7 ; !
|
dw $8001, $06C0 ; C7 ; !
|
||||||
dw $8001, $02D0 ; C8 ; ,
|
dw $8001, $02D0 ; C8 ; ,
|
||||||
dw $8001, $02B0 ; C9 ; -
|
dw $8001, $02B0 ; C9 ; -
|
||||||
dw $8000, $0000 ; CA ; 🡄
|
dw $8000, $0000 ; CA ; 🡄"
|
||||||
dw $8000, $0000 ; CB ; 🡆
|
dw $8000, $0000 ; CB ; 🡆
|
||||||
dw $0000, $0000 ; CC ; Blank char
|
dw $0000, $0000 ; CC ; Blank char
|
||||||
dw $8001, $02C0 ; CD ; .
|
dw $8001, $02C0 ; CD ; .
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ HandleFollowersAfterMirroring = $87AA8B
|
|||||||
LinkHop_FindArbitraryLandingSpot = $87E359
|
LinkHop_FindArbitraryLandingSpot = $87E359
|
||||||
Link_HandleMovingAnimation_FullLongEntry = $87E68F
|
Link_HandleMovingAnimation_FullLongEntry = $87E68F
|
||||||
Link_CheckForEdgeScreenTransition = $87F413
|
Link_CheckForEdgeScreenTransition = $87F413
|
||||||
Link_CheckForEdgeScreenTransition_prevent_transition = $87F42C
|
|
||||||
Sprite_CheckIfPlayerPreoccupied = $87F4AA
|
Sprite_CheckIfPlayerPreoccupied = $87F4AA
|
||||||
FlashGanonTowerPalette_next_thunder = $87FA81
|
FlashGanonTowerPalette_next_thunder = $87FA81
|
||||||
FlashGanonTowerPalette_bright_white = $87FAAC
|
FlashGanonTowerPalette_bright_white = $87FAAC
|
||||||
@@ -222,8 +221,6 @@ Ancilla29_MilestoneItemReceipt_skip_crystal_sfx = $88CAE5
|
|||||||
Ancilla29_MilestoneItemReceipt_no_sparkle = $88CB2E
|
Ancilla29_MilestoneItemReceipt_no_sparkle = $88CB2E
|
||||||
Ancilla_SetOAM_XY = $88F6F3
|
Ancilla_SetOAM_XY = $88F6F3
|
||||||
Ancilla_AddAncilla = $899CCE
|
Ancilla_AddAncilla = $899CCE
|
||||||
WorldMap_CalculateOAMCoordinates_exit_successfully = $8AC51F
|
|
||||||
WorldMap_MultiplyAxB = $8AC57F
|
|
||||||
UpdateHUD = $8DDFA9
|
UpdateHUD = $8DDFA9
|
||||||
UpdateEquippedItem = $8DDFAF
|
UpdateEquippedItem = $8DDFAF
|
||||||
DrawProgressIcons = $8DE9C8
|
DrawProgressIcons = $8DE9C8
|
||||||
@@ -291,17 +288,13 @@ EntranceData_layer = $82D2F9
|
|||||||
EntranceData_song = $82D592
|
EntranceData_song = $82D592
|
||||||
SpawnPointData_room_id = $82D8D2
|
SpawnPointData_room_id = $82D8D2
|
||||||
Overworld_CheckForSpecialOverworldTrigger_Direction = $84E879
|
Overworld_CheckForSpecialOverworldTrigger_Direction = $84E879
|
||||||
RoomHeaderPointers = $84F1E2
|
|
||||||
UncleItem = $85DF45
|
|
||||||
Sprite_ShowSolicitedMessage_Direction = $85E1A3
|
Sprite_ShowSolicitedMessage_Direction = $85E1A3
|
||||||
FluteMenuNumbers_bits = $8AB7A3
|
FluteMenuNumbers_bits = $8AB7A3
|
||||||
WorldMap_RedXChars = $8ABF70
|
WorldMap_RedXChars = $8ABF70
|
||||||
WorldMap_CalculateOAMCoordinates = $8AC3B1
|
WorldMap_CalculateOAMCoordinates = $8AC3B1
|
||||||
WorldMap_HandleSpriteBlink = $8AC52E
|
WorldMap_HandleSpriteBlink = $8AC52E
|
||||||
WorldMapIcon_AdjustCoordinate = $8AC59B
|
WorldMapIcon_AdjustCoordinate = $8AC59B
|
||||||
WorldMap_LightWorldTilemap = $8AC739
|
|
||||||
WorldMap_DarkWorldTilemap = $8AD739
|
WorldMap_DarkWorldTilemap = $8AD739
|
||||||
DungeonMapRoomMarkerYBase = $8AE803
|
|
||||||
DungeonMapBossRooms = $8AE817
|
DungeonMapBossRooms = $8AE817
|
||||||
DungeonMapFloorCountData = $8AF5E9
|
DungeonMapFloorCountData = $8AF5E9
|
||||||
DungeonMapFloorToDataOffset = $8AF605
|
DungeonMapFloorToDataOffset = $8AF605
|
||||||
|
|||||||
@@ -4,14 +4,12 @@ Ganon_CheckAncillaVulnerability:
|
|||||||
PLA
|
PLA
|
||||||
PHX : PHA
|
PHX : PHA
|
||||||
LDA.l GanonVulnerabilityItem
|
LDA.l GanonVulnerabilityItem
|
||||||
BVS .no_weakness
|
BMI .no_weakness
|
||||||
AND.b #$7F
|
|
||||||
TAX : PLA
|
TAX : PLA
|
||||||
CMP.l Ganon_CheckByAncilla, X : BNE +
|
CMP.l Ganon_CheckByAncilla, X : BNE +
|
||||||
PLX : BRA .vulnerable
|
PLX : BRA .vulnerable
|
||||||
+ PLX : PHA
|
+ PLX : PHA
|
||||||
LDA.l GanonVulnerabilityItem
|
LDA.l GanonVulnerabilityItem
|
||||||
AND.b #$7F
|
|
||||||
BEQ .silver_arrows
|
BEQ .silver_arrows
|
||||||
CMP.b #$01 : BEQ .silver_arrows
|
CMP.b #$01 : BEQ .silver_arrows
|
||||||
CMP.b #$11 : BEQ .somaria
|
CMP.b #$11 : BEQ .somaria
|
||||||
@@ -36,7 +34,6 @@ Ganon_CheckAncillaVulnerability:
|
|||||||
.vulnerable
|
.vulnerable
|
||||||
PHX
|
PHX
|
||||||
LDA.l GanonVulnerabilityItem
|
LDA.l GanonVulnerabilityItem
|
||||||
AND.b #$7F
|
|
||||||
TAX
|
TAX
|
||||||
LDA.l Ganon_IFrameDuration, X
|
LDA.l Ganon_IFrameDuration, X
|
||||||
PLX
|
PLX
|
||||||
@@ -55,7 +52,7 @@ Ganon_CheckAncillaVulnerability:
|
|||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
Ganon_CheckPowderVulnerability:
|
Ganon_CheckPowderVulnerability:
|
||||||
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$05 : BNE .normal
|
LDA.l GanonVulnerabilityItem : CMP.b #$05 : BNE .normal
|
||||||
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .normal
|
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .normal
|
||||||
LDA.w $0EE0, X : BNE .normal ; ganon has i-frames
|
LDA.w $0EE0, X : BNE .normal ; ganon has i-frames
|
||||||
LDA.l Ganon_IFrameDuration+$05
|
LDA.l Ganon_IFrameDuration+$05
|
||||||
@@ -72,7 +69,7 @@ Ganon_CheckPowderVulnerability:
|
|||||||
Ganon_CheckBeeVulnerability:
|
Ganon_CheckBeeVulnerability:
|
||||||
; X is bee sprite index
|
; X is bee sprite index
|
||||||
; Y is target sprite index
|
; Y is target sprite index
|
||||||
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$10 : BNE .normal
|
LDA.l GanonVulnerabilityItem : CMP.b #$10 : BNE .normal
|
||||||
LDA.w SpriteTypeTable, Y : CMP.b #$D7 : BNE .normal
|
LDA.w SpriteTypeTable, Y : CMP.b #$D7 : BNE .normal
|
||||||
LDA.w $0EE0, Y : BNE .normal ; ganon has i-frames
|
LDA.w $0EE0, Y : BNE .normal ; ganon has i-frames
|
||||||
LDA.l Ganon_IFrameDuration+$10
|
LDA.l Ganon_IFrameDuration+$10
|
||||||
@@ -91,14 +88,14 @@ Ganon_CheckInvincible:
|
|||||||
LDA.w $04C5 : CMP.b #$02 : BEQ .not_transparent
|
LDA.w $04C5 : CMP.b #$02 : BEQ .not_transparent
|
||||||
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .transparent ; non-stunned ganon
|
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .transparent ; non-stunned ganon
|
||||||
LDA.w UseY1 : AND.b #$0A : BEQ .transparent ; normal behavior if not hammering
|
LDA.w UseY1 : AND.b #$0A : BEQ .transparent ; normal behavior if not hammering
|
||||||
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$0C : BNE .transparent
|
LDA.l GanonVulnerabilityItem : CMP.b #$0C : BNE .transparent
|
||||||
.not_transparent
|
.not_transparent
|
||||||
LDA.b #$00 : RTL
|
LDA.b #$00 : RTL
|
||||||
.transparent
|
.transparent
|
||||||
LDA.b #$01 : RTL
|
LDA.b #$01 : RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
Ganon_CheckHammerVulnerability:
|
Ganon_CheckHammerVulnerability:
|
||||||
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$0C : BNE .normal
|
LDA.l GanonVulnerabilityItem : CMP.b #$0C : BNE .normal
|
||||||
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .normal
|
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .normal
|
||||||
LDA.w $0EE0, X : BNE .normal ; ganon has i-frames
|
LDA.w $0EE0, X : BNE .normal ; ganon has i-frames
|
||||||
LDA.l Ganon_IFrameDuration+$0C
|
LDA.l Ganon_IFrameDuration+$0C
|
||||||
@@ -111,7 +108,7 @@ Ganon_CheckHammerVulnerability:
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
CheckBeeBoss:
|
CheckBeeBoss:
|
||||||
; Y is sprite index
|
; Y is sprite index
|
||||||
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$10 : BNE .normal
|
LDA.l GanonVulnerabilityItem : CMP.b #$10 : BNE .normal
|
||||||
LDA.w SpriteTypeTable, Y : CMP.b #$D7 : BNE .normal
|
LDA.w SpriteTypeTable, Y : CMP.b #$D7 : BNE .normal
|
||||||
LDA.b #$00 : RTL
|
LDA.b #$00 : RTL
|
||||||
.normal
|
.normal
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
EndRainState:
|
EndRainState:
|
||||||
LDA.l InitProgressIndicator : BIT.b #$80 : BEQ + ; check for instant post-aga
|
LDA.l InitProgressIndicator : BIT.b #$80 : BNE + ; check for instant post-aga
|
||||||
LDA.l InitLumberjackOW : STA.l OverworldEventDataWRAM+$02
|
LDA.b #$02 : STA.l ProgressIndicator
|
||||||
LDA.b #$03
|
RTL
|
||||||
BRA ++
|
|
||||||
+
|
+
|
||||||
LDA.b #$02
|
LDA.b #$03 : STA.l ProgressIndicator
|
||||||
++
|
LDA.l InitLumberjackOW : STA.l OverworldEventDataWRAM+$02
|
||||||
STA.l ProgressIndicator
|
|
||||||
|
|
||||||
JSL SetEscapeAssist
|
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user