Cleanup dungeon tags, prepare for CustomTag system

This commit is contained in:
scawful
2024-10-01 18:17:16 -04:00
parent d28a6f38af
commit ed0a8203f8
4 changed files with 74 additions and 86 deletions

View File

@@ -14,19 +14,17 @@ org $028BE7
; Module06_UnderworldLoad
org $028364
{
#_028364: LDA.b #$00 ; Fixed color RGB: #808000
#_028366: STA.b $9C
LDA.b #$00 ; Fixed color RGB: #808000
STA.b $9C
#_028368: LDA.b #$00
#_02836A: STA.b $9D
LDA.b #$00 : STA.b $9D
#_02836C: LDA.b #$00
#_02836E: STA.b $9E
#_028370: LDA.b #$00
#_028372: STA.l $7EC005
#_028376: STA.l $7EC006
LDA.b #$00 : STA.b $9E
LDA.b #$00
STA.l $7EC005
STA.l $7EC006
#_02837A: JSL $079A2C ; Link_TuckIntoBed
JSL $079A2C ; Link_TuckIntoBed
}
incsrc "Dungeons/enemy_damage.asm"
@@ -40,7 +38,6 @@ print "End of object_handler.asm ", pc
; Tag: Holes8
incsrc "Dungeons/together_warp_tag.asm"
incsrc "Dungeons/spike_subtype.asm"
; Tag: Holes7
incsrc "Dungeons/house_tag.asm"
@@ -49,6 +46,8 @@ incsrc "Dungeons/house_tag.asm"
incsrc "Dungeons/floor_puzzle.asm"
print "End of floor_puzzle.asm ", pc
incsrc "Dungeons/spike_subtype.asm"
incsrc "Dungeons/attract_scenes.asm"
print "End of attract_scenes.asm ", pc

View File

@@ -1,8 +1,8 @@
; =============================================================================
; ==========================================================
; Key Block Object like Link's Awakening
; Overwrites the Prison Door
;
; Author: XaserLE
; Author: XaserLE
; Thanks: - PuzzleDude for finding a drawing bug and get rid of it
; - MathOnNapkins' Zelda Doc's
; - wiiqwertyuiop for his Zelda Disassembly
@@ -11,50 +11,48 @@
; left and right will not work (will try to fix this in the future).
;
; The key block must always be placed on EVEN x and y.
; 00, 02, 04, 06, 08, 0A, 0C, 0E
; =============================================================================
; 00, 02, 04, 06, 08, 0A, 0C, 0E
; ==========================================================
; Big chest key for compass
; Big chest key for compass
org $01EC1A
db $64
org $01EB8C
org $01EB8C
Object_KeyBlock:
{
LDA $7EF36F ; load the small key counter
AND #$00FF ; check if we have at least one small key (AND will not be zero)
BEQ $4C ; if not (AND is zero), do nothing
; otherwise we will decrement the small key counter
BEQ $4C ; if not (AND is zero), do nothing
; otherwise we will decrement the small key counter
; and branch to the code that opens the prison door
LDA $7EF36F ; reload small key counter
DEC A ; remove one key
STA $7EF36F ; save the new value at small key counter position
BRA $05 ; branch to the code that opens the prison door
; Fix draw bug from floor tile left by block after unlock.
org $01EBC8
LDA.w $9B5A,y
org $01EBD1
LDA.w $9B54,y
org $01EBDA
LDA.w $9B5C,y
; Draw Values
; 50 - /
; 52 - normal
; 54 - x mirror
; 56 - normal
; 58 - x mirror
; 5A - y mirror
; 5C - xy mirror
; 5E - y mirror
}
; =============================================================================
; Fix draw bug from floor tile left by block after unlock.
org $01EBC8
LDA.w $9B5A, Y
org $01EBD1
LDA.w $9B54, Y
org $01EBDA
LDA.w $9B5C, Y
; Draw Values
; 50 - /
; 52 - normal
; 54 - x mirror
; 56 - normal
; 58 - x mirror
; 5A - y mirror
; 5C - xy mirror
; 5E - y mirror
org $00AFE6

View File

@@ -28,23 +28,25 @@ db $00, $00, $00, $00, $00, $00, $00, $FF
db $20, $18, $20, $28, $30, $38, $40, $FF
NewSpikePrep:
PHB : PHK : PLB
LDA $0E30, X : TAY
LDA.w speedValuesH, Y : STA $0D50, X
LDA.w speedValuesV, Y : STA $0D40, X
PLB
RTL
{
PHB : PHK : PLB
LDA $0E30, X : TAY
LDA.w speedValuesH, Y : STA $0D50, X
LDA.w speedValuesV, Y : STA $0D40, X
PLB
RTL
}
NewSpikeCollision:
LDA.b #$04 : STA $0DF0, X
{
LDA.b #$04 : STA $0DF0, X
LDA $0D50, X : EOR.b #$FF : INC A : STA $0D50, X
LDA $0D40, X : EOR.b #$FF : INC A : STA $0D40, X
LDA $0D50, X : EOR.b #$FF : INC A : STA $0D50, X
LDA $0D40, X : EOR.b #$FF : INC A : STA $0D40, X
LDA.b #$05 : JSL $0DBB7C ; Sound_SetSfx2PanLong
RTL
LDA.b #$05 : JSL $0DBB7C ; Sound_SetSfx2PanLong
RTL
}
print "End of spike_subtype.asm ", pc
pushpc
pushpc

View File

@@ -1,49 +1,38 @@
; ==============================================================================
; ==========================================================
; Special Warp room tag
; Written by Jared_Brian_
; 11-19-2022
;
; Edit by scawful since I'm already using Holes(7)
; ==============================================================================
; Replaces the "Holes(8)" tag in HM or ZS. Makes it so that what room the player
; will warp to when falling in a hole or using a warp pad will change depending
; on the player's position in the room. This uses the 4 "stairs" properties in
; the room header.
; ==============================================================================
;relpaces the original tag.
; dw $CC1C ; = $CC1C* ; routine 0x3A "Holes(8)"
; Makes it so that what room the player will warp to when
; falling in a hole or using a warp pad will change
; depending on the player's position in the room. This uses
; the 4 "stairs" properties in the room header.
org $01CC1C
JML WarpTag
JML WarpTag
org $01CC5A
WarpTag_Return:
; ==============================================================================
WarpTag_Return:
pullpc ; Bank 0x2C
WarpTag:
{
PHX
PHX
; Get a value 0-3 that represents where we are in the room
; -----------
; | 0 | 1 |
; | | |
; -----------
; | 2 | 3 |
; | | |
; -----------
LDA $A9 : CLC : ADC $AA : TAX
LDA $7EC001, X : STA $7EC000
; Get a value 0-3 that represents where we are in the room
; -----------
; | 0 | 1 |
; | | |
; -----------
; | 2 | 3 |
; | | |
; -----------
LDA $A9 : CLC : ADC $AA : TAX
LDA $7EC001, X : STA $7EC000
PLX
JML WarpTag_Return
PLX
JML WarpTag_Return
}
print "End of together_warp_tag.asm ", pc
pushpc
; ==============================================================================