migrate DHGR.RADIAL4 effect to external file

This commit is contained in:
Peter Ferrie 2020-11-18 09:35:10 -08:00
parent 26338f9a4e
commit e96e8eb9cb
3 changed files with 160 additions and 3850 deletions

View File

@ -390,6 +390,163 @@ zerochk !word 1194 - 493
posttransform
}
!macro FX_RADIAL4_DHGR .coords {
ldx #$11
- lda ptrtbl, x
sta $c0, x
dex
bpl -
ldx #3
- lda .coords, x
sta $80, x
dex
bpl -
dex
lda #$1a
sta $fe
lda #7
sta $ff
- lda .coords + 8 - 254, x
sta $86, x
lda .coords + 12 - 254, x
sta $88, x
lda .coords + 292 - 254, x
sta $8a, x
lda .coords + 352 - 254, x
sta $8c, x
lda .coords + 744 - 254, x
sta $8e, x
lda .coords + 1348 - 254, x
sta $90, x
lda .coords + 2208 - 254, x
sta $92, x
inx
bne -
--- ldx #$12
-- lda $bf, x
bmi +
ldy $be, x
jsr aslmod
sty $be, x
sta $bf, x
sty $fc
clc
adc #>.coords
sta $fd
ldy #0
!byte $a9
- sec
lda ($fc), y
pha
lda $7e, x
sta ($fc), y
pla
sta $7e, x
inx
iny
bcc -
dex
dex
+ dex
dex
bne --
ldy #$ff
ldx #$0e
- lda $fe
eor zerochk, x
bne +
lda $ff
eor zerochk + 1, x
beq ++
+ dex
dex
bpl -
!byte $2c
++ sty $c3, x
+++ dec $fe
bne ---
dec $ff
bpl ---
bmi posttransform
aslmod
pha
tya
asl
tay
pla
rol
pha
tya
asl
tay
pla
rol
cmp #$1E
bcc +
bne ++
cpy #8
bcs ++
+ pha
tya
adc #6
tay
pla
adc #0
rts
++ cmp #$3C
bcc +
bne ++
cpy #$10
bcs ++
+ eor #$ff
pha
tya
eor #$ff
adc #9
tay
pla
adc #$3C
rts
++ cmp #$5A
bcc +
bne ++
cpy #$18
bcs ++
+ sec
pha
tya
sbc #$0E
tay
pla
sbc #$3C
rts
++ eor #$ff
pha
tya
eor #$ff
adc #$1C
tay
pla
adc #$78
rts
ptrtbl !word 0, 2, 8, 12, 292, 352, 744, 1348, 2208
zerochk !word 1819 - 361
!word 1819 - 1494
!word 1819 - 55
!word 1819 - 28
!word 1819 - 45
!word 1819 - 21
!word 1819 - 12
!word 1819 - 10
posttransform
}
!macro FX_RADIAL5_DHGR .coords {
lda #<(.coords + 1004)
sta $c4

View File

@ -8,6 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.a"
+FX_INITONCE_DHGR CoordinatesFile, PostInit
+FX_RADIAL4_DHGR Coordinates
+COPY_SELF_TO_AUXMEM
PostInit
+FX_PRECOMPUTED_DHGR HGRHalfBlockCopy, Coordinates, $1
@ -16,5 +17,5 @@ PostInit
Coordinates=CoordinatesDHGR
CoordinatesFile
!byte 17
!text "FX/DHGR.RAD4.DATA"
!byte 16
!text "FX/DHGR.RAD.DATA"

File diff suppressed because it is too large Load Diff