Fix Farore sprite table bug, rearrange banks again
This commit is contained in:
@@ -10,13 +10,14 @@ incsrc sprite_functions_hooks.asm
|
||||
;==============================================================================
|
||||
|
||||
org $298000
|
||||
incsrc sprite_jump_table.asm
|
||||
incsrc sprite_new_table.asm
|
||||
|
||||
;==============================================================================
|
||||
|
||||
org $308000
|
||||
incsrc sprite_new_functions.asm
|
||||
|
||||
|
||||
;==============================================================================
|
||||
; Sprite Properties
|
||||
;==============================================================================
|
||||
@@ -29,7 +30,7 @@ incsrc sprite_new_functions.asm
|
||||
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
||||
!ImperviousAll = 00 ; 00 = Can be attack, 01 = attack will clink on it
|
||||
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
||||
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||
!Shadow = 1 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||
!Palette = 0 ; Unused in this template (can be 0 to 7)
|
||||
!Hitbox = 0 ; 00 to 31, can be viewed in sprite draw tool
|
||||
!Persist = 00 ; 01 = your sprite continue to live offscreen
|
||||
@@ -211,29 +212,24 @@ RTS
|
||||
;==============================================================================
|
||||
|
||||
.start_index
|
||||
db $00, $02, $04
|
||||
db $00, $02
|
||||
.nbr_of_tiles
|
||||
db 1, 1, 1
|
||||
db 1, 1
|
||||
.x_offsets
|
||||
dw 0, 0
|
||||
dw 0, 0
|
||||
dw 0, 0
|
||||
.y_offsets
|
||||
dw 4, -8
|
||||
dw 4, -7
|
||||
dw 4, -8
|
||||
.chr
|
||||
db $AA, $A8
|
||||
db $AA, $A8
|
||||
db $AA, $A8
|
||||
.properties
|
||||
db $3B, $3B
|
||||
db $7B, $3B
|
||||
db $3B, $3B
|
||||
.sizes
|
||||
db $02, $02
|
||||
db $02, $02
|
||||
db $02, $02
|
||||
}
|
||||
|
||||
;==============================================================================
|
||||
|
||||
79
Sprites/sprite_new_table.asm
Normal file
79
Sprites/sprite_new_table.asm
Normal file
@@ -0,0 +1,79 @@
|
||||
pushpc
|
||||
org $06FFF8 ; New Jumptable for sprites
|
||||
NewMainSprFunction:
|
||||
JSL SpriteActiveExp_MainLong
|
||||
RTS
|
||||
|
||||
org $068EB9
|
||||
NewSprPrepFunction:
|
||||
JSL Sprite_PrepExp_Long
|
||||
RTS
|
||||
pullpc
|
||||
|
||||
|
||||
|
||||
SpriteActiveExp_MainLong:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
|
||||
JSL NewSprTable
|
||||
|
||||
PLB
|
||||
|
||||
RTL
|
||||
}
|
||||
|
||||
NewSprTable:
|
||||
LDA $0E20, X ; Load Sprite ID
|
||||
REP #$30
|
||||
AND.w #$00FF
|
||||
STA $06
|
||||
ASL A ; *2
|
||||
CLC : ADC $06 ; *3
|
||||
TAY
|
||||
|
||||
LDA NewSprRoutinesLong, Y ; Load sprite Address
|
||||
STA $06
|
||||
SEP #$20 ; Previously SEP #$30 -_- (that's fine for sprites below ~0x40 over that it will crash)
|
||||
LDA NewSprRoutinesLong+2, Y
|
||||
STA $08
|
||||
SEP #$30
|
||||
JMP [$0006]
|
||||
|
||||
;do a JML and sprite will RTL back to previous code
|
||||
|
||||
Sprite_PrepExp_Long:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
|
||||
JSL NewSprPrepTable
|
||||
|
||||
PLB
|
||||
|
||||
RTL
|
||||
}
|
||||
|
||||
NewSprPrepTable:
|
||||
LDA $0E20, X ; Load Sprite ID
|
||||
REP #$30
|
||||
AND.w #$00FF
|
||||
STA $06
|
||||
ASL A ; *2
|
||||
CLC : ADC $06 ; *3
|
||||
TAY
|
||||
|
||||
LDA NewSprPrepRoutinesLong, Y ; Load sprite Address
|
||||
STA $06
|
||||
SEP #$20 ; Previously SEP #$30 -_- (that's fine for sprites below ~0x40 over that it will crash)
|
||||
LDA NewSprPrepRoutinesLong+2, Y
|
||||
STA $08
|
||||
SEP #$30
|
||||
JMP [$0006]
|
||||
|
||||
NewSprRoutinesLong:
|
||||
fillbyte $00
|
||||
fill $2FD
|
||||
|
||||
NewSprPrepRoutinesLong:
|
||||
fillbyte $00
|
||||
fill $2FD
|
||||
Reference in New Issue
Block a user