Add minecart track objects, housekeeping

This commit is contained in:
scawful
2023-09-07 19:38:43 -04:00
parent 381cccad17
commit 192f718eb0
10 changed files with 116 additions and 24 deletions

View File

@@ -0,0 +1,88 @@
; Dungeon Object Handler
org $018262 ;object id 0x31
dw ExpandedObject
org $01B53C
ExpandedObject:
JSL NewObjectsCode
RTS
org $2C8000
NewObjectsCode:
{
PHB : PHK : PLB
PHX
LDA $00 : PHA
LDA $02 : PHA
; $00 Will be used for tile count and tile to skip
LDA $B2 : ASL #2 : ORA $B4
;get the offset for the object data based on the object height
ASL : TAX
LDA .ObjOffset, X
TAX
.lineLoop
LDA .ObjData, X : BNE .continue
;break
BRA .Done
.continue
PHY ; Keep current position in the buffer
STA $00 ; we save the tile count + tile to skip
-- ;Tiles Loop
INX : INX
LDA .ObjData, X : BEQ +
STA [$BF], Y
+
INY : INY
LDA $00 : DEC : STA $00 : AND #$001F : BNE +
LDA $00 : XBA : AND #$00FF : STA $00
PLA ;Pull back position
CLC : ADC $00 : TAY
INX : INX
BRA .lineLoop
+
BRA --
.Done
PLA : STA $02
PLA : STA $00 ;Not sure if needed
PLX
PLB
RTL
.ObjOffset
dw .LeftRight-.ObjData ; 00
dw .UpDown-.ObjData ; 01
dw .TopLeft-.ObjData ; 02
dw .TopRight-.ObjData ; 03
dw .Bottomleft-.ObjData ; 04
dw .BottomRight-.ObjData ; 05
.ObjData
.LeftRight
incbin track_LR.bin
.UpDown
incbin track_UD.bin
.TopLeft
incbin track_corner_TL.bin
.TopRight
incbin track_corner_TR.bin
.Bottomleft
incbin track_corner_BL.bin
.BottomRight
incbin track_corner_BR.bin
}
pushpc

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3,23 +3,30 @@
; $DB8BF-$DB916 - chr types indicating door entrances
org $1BB8BF
dw $00FE, $00C5, $00FE, $0114, $0115, $0175, $0156, $00F5
dw $00E2, $01EF, $0119, $00FE, $0172, $0177, $013F, $0172
dw $0112, $0161, $0172, $014C, $0156, $01EF, $00FE, $00FE
dw $00FE, $010B, $0173, $0143, $0149, $0175, $0103, $0100
dw $01C6 ; Waterfall tile
dw $015E
dw $0167
dw $0128, $0131, $0112, $016D, $0163
dw $0173, $00FE, $0113, $00A7
ValidDoorTypes_low:
dw $00FE, $00C5, $00FE, $0114 ; ???, House Door, ???, ???
dw $0115, $0175, $0156, $00F5
dw $00E2, $01EF, $0119, $00FE ; ???, ???, ???, Desert Door
dw $0172, $0177, $013F, $0172
dw $0112, $0161, $0172, $014C ; ???, ???, Dam Door, ???
dw $0156, $01EF, $00FE, $00FE
dw $00FE, $010B, $0173, $0143 ; ???, ???, ???, Tower of Hera
dw $0149, $0175, $0103, $0100
dw $01C6, $015E, $0167, $0128
dw $0131, $0112, $016D, $0163
dw $0173, $00FE, $0113, $0177
; $DB917 - $DB96E
dw $014A, $00C4, $014F, $0115, $0114, $0174, $0155, $00F5
dw $00EE, $01EB, $0118, $0146, $0171, $0155, $0137, $0174
dw $0173, $0121, $0164, $0155, $0157, $0128, $0114, $0123
dw $0113, $0109, $0118, $0161, $0149, $0171, $0174, $0101
dw $01C6 ; Waterfall tile
dw $0131
dw $0051
dw $014E, $0131, $0121, $017A, $0163
dw $0172, $01BD, $0152, $00A7
;---------------------------------------------------------------------------------------------------
ValidDoorTypes_high:
dw $014A, $00C4, $014F, $0115 ; ???, House Door, ???, ???
dw $0114, $0174, $0155, $00F5
dw $00EE, $01EB, $0118, $0146 ; ???, ???, ???, Desert Door
dw $0171, $0155, $0137, $0174
dw $0173, $0121, $0164, $0155 ; ???, ???, Dam Door, ???
dw $0157, $0128, $0114, $0123
dw $0113, $0109, $0118, $0161
dw $0149, $0117, $0174, $0101
dw $01C6, $0131, $0051, $014E
dw $0131, $0112, $017A, $0163
dw $0172, $01BD, $0152, $0167

View File

@@ -8,10 +8,6 @@
;09,0A,0B,0C,0D,0E = Vertical with speed incrementing
;you can edit the ASM to make diagonal spikes too
;#ENDPATCH_DESCRIPTION
lorom
org $288000 ; NEED TO MOVE
pushpc
org $0691D7 ; SpritePrep_SpikeBlock:
JSL NewSpikePrep
@@ -48,4 +44,4 @@ LDA $0D40, X : EOR.b #$FF : INC A : STA $0D40, X
LDA.b #$05 : JSL $0DBB7C ; Sound_SetSfx2PanLong
RTL
RTL

View File

@@ -43,5 +43,6 @@ WarpTag:
PLX
JML WarpTag_Return
}
pushpc
; ==============================================================================