Added Bombos platform in first Ice Palace room
This commit is contained in:
@@ -124,7 +124,7 @@ incsrc doorframefixes.asm
|
|||||||
;incsrc shopkeeper.asm
|
;incsrc shopkeeper.asm
|
||||||
incsrc cuccostorm.asm
|
incsrc cuccostorm.asm
|
||||||
incsrc roomloading.asm
|
incsrc roomloading.asm
|
||||||
incsrc graphicsoverride.asm
|
incsrc icepalacegraphics.asm
|
||||||
incsrc hashalphabet.asm ; <- TAKE OUT THE EXTRA ORGS IN HERE - THIS IS WHY WE COULDN'T ADD MORE FILES EARLIER
|
incsrc hashalphabet.asm ; <- TAKE OUT THE EXTRA ORGS IN HERE - THIS IS WHY WE COULDN'T ADD MORE FILES EARLIER
|
||||||
warnpc $A18000
|
warnpc $A18000
|
||||||
|
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
macro OverwriteVramTile(firstTileIndex, count)
|
|
||||||
LDA.w #<firstTileIndex>+512*8*8*4/16
|
|
||||||
LDX.b #<count>
|
|
||||||
JSR UploadTileToVram
|
|
||||||
endmacro
|
|
||||||
|
|
||||||
GraphicsOverrideHook:
|
|
||||||
JSL .resumeOriginalCode
|
|
||||||
|
|
||||||
LDA $0A ; Floor tileset loaded
|
|
||||||
CMP #$0A ; Floor tileset index used by Ice and Mire
|
|
||||||
BEQ .loadedIceOrMireFloor
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.loadedIceOrMireFloor
|
|
||||||
LDA $040C ; Load dungeon number
|
|
||||||
CMP #$12 ; Ice Palace
|
|
||||||
BEQ .isInIcePalace
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.isInIcePalace
|
|
||||||
; We've just loading the floor tiles in Ice Palace.
|
|
||||||
; Replace the bridge tiles with the bombos medallion
|
|
||||||
|
|
||||||
LDA.b #IcePalaceMedallionGfx>>16
|
|
||||||
STA $02
|
|
||||||
REP #$20
|
|
||||||
LDA.w #IcePalaceMedallionGfx
|
|
||||||
STA $00
|
|
||||||
|
|
||||||
%OverwriteVramTile($CA, 2)
|
|
||||||
%OverwriteVramTile($DA, 2)
|
|
||||||
|
|
||||||
SEP #$20
|
|
||||||
RTL
|
|
||||||
|
|
||||||
.resumeOriginalCode
|
|
||||||
; Overwritten instructions:
|
|
||||||
PHB
|
|
||||||
LDA.b #$00
|
|
||||||
PHA
|
|
||||||
PLB
|
|
||||||
LDA.b #$80
|
|
||||||
JML GraphicsOverrideResume
|
|
||||||
|
|
||||||
; A = VRAM word address to upload to (Actual VRAM address / 2)
|
|
||||||
; X = Tiles to upload
|
|
||||||
; $00-$02 = Pointer to graphics data
|
|
||||||
UploadTileToVram:
|
|
||||||
; TODO: This should probably be optimized with a DMA
|
|
||||||
STA $2116
|
|
||||||
TXA : ASL #4 : TAX ; X = Amount of words to upload (Tiles to upload * 16)
|
|
||||||
- LDA [$00]
|
|
||||||
STA $2118
|
|
||||||
INC $00
|
|
||||||
INC $00
|
|
||||||
DEX
|
|
||||||
BNE -
|
|
||||||
RTS
|
|
||||||
|
|
||||||
IcePalaceMedallionGfx:
|
|
||||||
incbin ice_bombos_floor.bin
|
|
||||||
18
hooks.asm
18
hooks.asm
@@ -1945,17 +1945,9 @@ org $02C2F3 ; <- Bank02.asm:10391 (JSL Dungeon_LoadRoom)
|
|||||||
;================================================================================
|
;================================================================================
|
||||||
; Hook for graphicsoverride.asm
|
; Hook for graphicsoverride.asm
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $00E1DB ; <- Bank00.asm:4866 (PHB : PHK : PLB : LDA.b #$80)
|
org $00E64D ; <- Bank00.asm:5656 (STZ $00 : STX $01 : STA $02)
|
||||||
JML GraphicsOverrideHook
|
JML BgGraphicsLoading
|
||||||
NOP
|
BgGraphicsLoadingCancel:
|
||||||
GraphicsOverrideResume:
|
RTS : NOP
|
||||||
;--------------------------------------------------------------------------------
|
BgGraphicsLoadingResume:
|
||||||
org $028BE7 ; <- Bank02.asm:2299 (JSL Dungeon_LoadRoom)
|
|
||||||
JSL LoadRoomHook
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
org $029309 ; <- Bank02.asm:3533 (JSL Dungeon_LoadRoom)
|
|
||||||
JSL LoadRoomHook
|
|
||||||
;--------------------------------------------------------------------------------
|
|
||||||
org $02C2F3 ; <- Bank02.asm:10391 (JSL Dungeon_LoadRoom)
|
|
||||||
JSL LoadRoomHook
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
Binary file not shown.
BIN
ice_palace_floor.bin
Normal file
BIN
ice_palace_floor.bin
Normal file
Binary file not shown.
47
icepalacegraphics.asm
Normal file
47
icepalacegraphics.asm
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
BgGraphicsLoading:
|
||||||
|
; Instructions overwritten
|
||||||
|
STZ $00
|
||||||
|
STX $01
|
||||||
|
STA $02
|
||||||
|
|
||||||
|
; Y = Graphics file being loaded
|
||||||
|
CPY #$0A ; 0A = Ice/Mire floor file
|
||||||
|
BNE .useDefaultGraphics
|
||||||
|
|
||||||
|
LDA $040C ; Dungeon number
|
||||||
|
CMP #$12 ; Ice Palace
|
||||||
|
BEQ .useSpecialIcePalaceFile
|
||||||
|
|
||||||
|
.useDefaultGraphics
|
||||||
|
JML BgGraphicsLoadingResume
|
||||||
|
|
||||||
|
.useSpecialIcePalaceFile
|
||||||
|
; We're loading the floor tiles in Ice Palace. Instead of the normal file,
|
||||||
|
; load another one that replaces the bridge tiles with the Bombos medallion
|
||||||
|
|
||||||
|
LDA $FFFFFF
|
||||||
|
|
||||||
|
LDA.b #IcePalaceFloorGfx>>16
|
||||||
|
STA $02
|
||||||
|
REP #$20
|
||||||
|
LDA.w #IcePalaceFloorGfx
|
||||||
|
STA $00
|
||||||
|
LDX.b #64*2 ; Tiles to load * 2
|
||||||
|
-
|
||||||
|
; Unrolled loop to upload half a tile
|
||||||
|
LDA [$00] : STA $2118 : INC $00 : INC $00
|
||||||
|
LDA [$00] : STA $2118 : INC $00 : INC $00
|
||||||
|
LDA [$00] : STA $2118 : INC $00 : INC $00
|
||||||
|
LDA [$00] : STA $2118 : INC $00 : INC $00
|
||||||
|
LDA [$00] : STA $2118 : INC $00 : INC $00
|
||||||
|
LDA [$00] : STA $2118 : INC $00 : INC $00
|
||||||
|
LDA [$00] : STA $2118 : INC $00 : INC $00
|
||||||
|
LDA [$00] : STA $2118 : INC $00 : INC $00
|
||||||
|
DEX
|
||||||
|
BNE -
|
||||||
|
|
||||||
|
SEP #$20
|
||||||
|
JML BgGraphicsLoadingCancel
|
||||||
|
|
||||||
|
IcePalaceFloorGfx:
|
||||||
|
incbin ice_palace_floor.bin
|
||||||
Reference in New Issue
Block a user