mirror of https://github.com/a2-4am/4cade.git
add 7-pointed star transition effects
This commit is contained in:
parent
258458d505
commit
279b46b0eb
|
@ -60,6 +60,7 @@ DHGR.STAR
|
|||
DHGR.48.LDIAGON
|
||||
DHGR.MAPLE.IN
|
||||
DHGR.DITHBUTTER
|
||||
DHGR.STAR7
|
||||
DHGR.BAR.DISSLV
|
||||
DHGR.BLOOM
|
||||
DHGR.SLOW.STARI
|
||||
|
@ -77,6 +78,7 @@ DHGR.SOFTIRISIN
|
|||
DHGR.DITHSTAR
|
||||
DHGR.RADIAL2
|
||||
DHGR.IRIS
|
||||
DHGR.STAR7.RIP
|
||||
DHGR.BUBBLES.IN
|
||||
DHGR.SLOWST.RIP
|
||||
DHGR.DITHWAVYIR
|
||||
|
@ -87,6 +89,7 @@ DHGR.48.PAGEC
|
|||
DHGR.DITHBLOOM
|
||||
DHGR.BFLY.RIP
|
||||
DHGR.IRIS.IN
|
||||
DHGR.DITHSTAR7
|
||||
DHGR.SWIRL
|
||||
DHGR.48.SPIRALC
|
||||
DHGR.DITHRADIAL
|
||||
|
@ -94,6 +97,7 @@ DHGR.MAPLE.RIP
|
|||
DHGR.R.BY.PIXEL
|
||||
DHGR.HEART.IN
|
||||
DHGR.SNOWFL.RIP
|
||||
DHGR.STAR7.IN
|
||||
DHGR.DITHRAD2
|
||||
DHGR.48.SIDES
|
||||
DHGR.CORNER4.IN
|
||||
|
|
|
@ -33,6 +33,7 @@ HEART.IN
|
|||
CRYSTAL
|
||||
STAR.RIPPLE
|
||||
BIT2.FIZZLE
|
||||
STAR7
|
||||
DITHER.HEART
|
||||
MEETINTHEMIDDLE
|
||||
BOXES48
|
||||
|
@ -62,6 +63,7 @@ DITHER.MAPLE
|
|||
DIAG.STRIPES
|
||||
APPLE
|
||||
MANDELBROT.RIP
|
||||
STAR7.IN
|
||||
SOFT.L
|
||||
DITHER.SOFTIRIS
|
||||
HEART.RIPPLE
|
||||
|
@ -93,6 +95,7 @@ FLOWER.RIPPLE
|
|||
SPLIT.UD.INTRO
|
||||
WAVY.IRIS.IN
|
||||
R.BY.2
|
||||
STAR7.RIPPLE
|
||||
DITHER.RADIAL4
|
||||
HALF.FIZZLE
|
||||
BOXES48.LDIAGON
|
||||
|
@ -130,6 +133,7 @@ CHECKERB.FIZZLE
|
|||
BOXES48.SIDES
|
||||
CIRCLE.STRIPES
|
||||
STAGGERWHITE.LR
|
||||
DITHER.STAR7
|
||||
SOFT.UD.OUT
|
||||
ONESQUARE
|
||||
W.IRIS.BLOOM
|
||||
|
|
|
@ -14,7 +14,7 @@ import util
|
|||
# Now we can create individual images for each "frame" of the animation, by
|
||||
# resizing the (squashed) source image and putting it in a 280x192 frame.
|
||||
#
|
||||
# $ for w in `seq 1 1500`; do \
|
||||
# $ for w in $(seq 1 1500); do \
|
||||
# gm convert -size 280x192 squash.png \
|
||||
# -resize "$w" \
|
||||
# -background white \
|
||||
|
@ -29,22 +29,25 @@ import util
|
|||
# Now we have 1500 (or so) PNG images of what the HGR screen should look like at
|
||||
# each stage. Despite each frame being 280x192 and in the correct aspect ratio,
|
||||
# only coordinates
|
||||
# - on every 3rd row
|
||||
# - in the left half of the screen, AND
|
||||
# - on even rows, AND
|
||||
# - on even columns
|
||||
# are included in the final data set.
|
||||
# are included. It is assumed that the image is symmetrical across
|
||||
# the left and half sides of the screen (along an axis at X=140).
|
||||
#
|
||||
# X coordinates are converted to byte+bitmask (but see notes below).
|
||||
# Y coordinates are flipped (so 0,0 ends up on the bottom left) then
|
||||
# divided by 3.
|
||||
# incremented by 1 so that 0 can terminate the loop,
|
||||
#
|
||||
# 6502 code will be responsible for plotting each of these coordinates
|
||||
# in a 2x3 block. The bitmask usually includes 2 adjacent pixels;
|
||||
# the code will also plot the same 2 adjacent pixels in the next two rows.
|
||||
# in a 2x2 block. The bitmask usually includes 2 adjacent pixels;
|
||||
# the code will also plot the same 2 adjacent pixels in the adjacent row,
|
||||
# AND mirror both of those plots in the right half of the screen.
|
||||
#
|
||||
# Unfortunately, since bytes are 7 pixels across, some of the 2-pixel-wide
|
||||
# blocks will cross a byte boundary. To simplify the 6502 code, these are
|
||||
# simply listed as separate coordinate pairs, each with a bitmask that
|
||||
# includes 1 pixel instead of 2.
|
||||
# Unfortunately, since bytes are 7 bits across, some blocks will cross a
|
||||
# byte boundary. To simplify the 6502 code, those are simply listed as
|
||||
# separate coordinate pairs, each with a bitmask that includes 1 pixel
|
||||
# instead of 2.
|
||||
|
||||
frames = 1500 # number of "thumbN.png" files
|
||||
|
||||
|
@ -53,7 +56,7 @@ for i in range(5, frames, 5):
|
|||
p = PIL.Image.open("maple/thumb%s.png" % i)
|
||||
for x in range(0, 280//2, 2):
|
||||
for y in range(0, 192, 2):
|
||||
if p.getpixel((x,191-y))[0] == 0:
|
||||
if p.getpixel((x,191-y))[0] != (255,255,255,255):
|
||||
coords.append((x,y))
|
||||
|
||||
unique_coords = util.unique(coords)
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import PIL.Image # https://pillow.readthedocs.io/
|
||||
import util
|
||||
|
||||
# star7.png is the source image. The source image MUST have a white background,
|
||||
# but other colors and pixel depth are irrelevant. This one is black & white.
|
||||
# Due to the Apple II pixel aspect ratio, we do a 1-time aspect-ratio-losing resize
|
||||
# to squash the image to 87% height.
|
||||
#
|
||||
# $ gm convert star7.png -resize "100%x87%!" squash.png
|
||||
# (Depending on your shell, you may need to escape the exclamation point. Grr.)
|
||||
#
|
||||
# Now we can create individual images for each "frame" of the animation, by
|
||||
# resizing the (squashed) source image and putting it in a 280x192 frame.
|
||||
#
|
||||
# $ for w in $(seq 1 1500); do \
|
||||
# gm convert -size 280x192 squash.png \
|
||||
# -resize "$w" \
|
||||
# -background white \
|
||||
# -compose Copy \
|
||||
# -gravity center \
|
||||
# -extent 280x192 thumb"$w".png; \
|
||||
# done
|
||||
#
|
||||
# Depending on the source image, you may need more or fewer than 1500 frames. This
|
||||
# number is duplicated below in the |frames| variable. Sorry.
|
||||
#
|
||||
# Now we have 1500 (or so) PNG images of what the HGR screen should look like at
|
||||
# each stage. Despite each frame being 280x192 and in the correct aspect ratio,
|
||||
# only coordinates
|
||||
# - in the left half of the screen, AND
|
||||
# - on even rows, AND
|
||||
# - on even columns
|
||||
# are included. It is assumed that the image is symmetrical across
|
||||
# the left and half sides of the screen (along an axis at X=140).
|
||||
#
|
||||
# X coordinates are converted to byte+bitmask (but see notes below).
|
||||
# Y coordinates are flipped (so 0,0 ends up on the bottom left) then
|
||||
# incremented by 1 so that 0 can terminate the loop,
|
||||
#
|
||||
# 6502 code will be responsible for plotting each of these coordinates
|
||||
# in a 2x2 block. The bitmask usually includes 2 adjacent pixels;
|
||||
# the code will also plot the same 2 adjacent pixels in the adjacent row,
|
||||
# AND mirror both of those plots in the right half of the screen.
|
||||
#
|
||||
# Unfortunately, since bytes are 7 bits across, some blocks will cross a
|
||||
# byte boundary. To simplify the 6502 code, those are simply listed as
|
||||
# separate coordinate pairs, each with a bitmask that includes 1 pixel
|
||||
# instead of 2.
|
||||
|
||||
frames = 1500 # number of "thumbN.png" files
|
||||
|
||||
coords = []
|
||||
for i in range(1, frames):
|
||||
p = PIL.Image.open("star7/thumb%s.png" % i)
|
||||
for x in range(0, 280//2, 2):
|
||||
for y in range(0, 192, 2):
|
||||
if p.getpixel((x,191-y)) == (0,0,0,255):
|
||||
coords.append((x,y))
|
||||
|
||||
unique_coords = util.unique(coords)
|
||||
unique_vals = util.vals_2bit(unique_coords)
|
||||
with open("../../../src/fx/fx.hgr.star7.data.a", "w") as f:
|
||||
for aval, bval in unique_vals:
|
||||
f.write(" !byte %s,%s\n" % (aval, bval))
|
Binary file not shown.
After Width: | Height: | Size: 139 KiB |
|
@ -0,0 +1,16 @@
|
|||
;license:MIT
|
||||
;(c) 2019-2022 by 4am/qkumba
|
||||
;
|
||||
!cpu 6502
|
||||
!to "build/FX.INDEXED/DHGR.DITHSTAR7",plain
|
||||
*=$6000
|
||||
|
||||
!source "src/fx/fx.dhgr.precomputed.2bit.a"
|
||||
|
||||
+FX_INITONCE_2BIT CoordinatesFile, Start
|
||||
Start
|
||||
+FX_PRECOMPUTED_2BIT_DHGR_DITHER Coordinates2Bit, EndCoordinates2Bit
|
||||
|
||||
CoordinatesFile
|
||||
!byte 13
|
||||
!text "FX/STAR7.DATA"
|
|
@ -0,0 +1,16 @@
|
|||
;license:MIT
|
||||
;(c) 2019-2022 by 4am/qkumba
|
||||
;
|
||||
!cpu 6502
|
||||
!to "build/FX.INDEXED/DHGR.STAR7",plain
|
||||
*=$6000
|
||||
|
||||
!source "src/fx/fx.dhgr.precomputed.2bit.a"
|
||||
|
||||
+FX_INITONCE_2BIT CoordinatesFile, Start
|
||||
Start
|
||||
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
|
||||
|
||||
CoordinatesFile
|
||||
!byte 13
|
||||
!text "FX/STAR7.DATA"
|
|
@ -0,0 +1,17 @@
|
|||
;license:MIT
|
||||
;(c) 2019-2022 by 4am/qkumba
|
||||
;
|
||||
!cpu 6502
|
||||
!to "build/FX.INDEXED/DHGR.STAR7.IN",plain
|
||||
*=$6000
|
||||
|
||||
!source "src/fx/fx.dhgr.precomputed.2bit.a"
|
||||
|
||||
+FX_INITONCE_2BIT CoordinatesFile, Start
|
||||
+FX_REVERSE_2BIT
|
||||
Start
|
||||
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
|
||||
|
||||
CoordinatesFile
|
||||
!byte 13
|
||||
!text "FX/STAR7.DATA"
|
|
@ -0,0 +1,17 @@
|
|||
;license:MIT
|
||||
;(c) 2019-2022 by 4am/qkumba
|
||||
;
|
||||
!cpu 6502
|
||||
!to "build/FX.INDEXED/DHGR.STAR7.RIP",plain
|
||||
*=$6000
|
||||
|
||||
!source "src/fx/fx.dhgr.precomputed.2bit.a"
|
||||
|
||||
+FX_INITONCE_2BIT CoordinatesFile, Start
|
||||
+FX_RIPPLE_2BIT
|
||||
Start
|
||||
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
|
||||
|
||||
CoordinatesFile
|
||||
!byte 13
|
||||
!text "FX/STAR7.DATA"
|
|
@ -0,0 +1,16 @@
|
|||
;license:MIT
|
||||
;(c) 2019-2022 by 4am/qkumba
|
||||
;
|
||||
!cpu 6502
|
||||
!to "build/FX.INDEXED/DITHER.STAR7",plain
|
||||
*=$6000
|
||||
|
||||
!source "src/fx/fx.hgr.precomputed.2bit.a"
|
||||
|
||||
+FX_INITONCE_2BIT CoordinatesFile, Start
|
||||
Start
|
||||
+FX_PRECOMPUTED_2BIT_DITHER Coordinates2Bit, EndCoordinates2Bit
|
||||
|
||||
CoordinatesFile
|
||||
!byte 13
|
||||
!text "FX/STAR7.DATA"
|
|
@ -0,0 +1,16 @@
|
|||
;license:MIT
|
||||
;(c) 2019-2022 by 4am/qkumba
|
||||
;
|
||||
!cpu 6502
|
||||
!to "build/FX.INDEXED/STAR7",plain
|
||||
*=$6000
|
||||
|
||||
!source "src/fx/fx.hgr.precomputed.2bit.a"
|
||||
|
||||
+FX_INITONCE_2BIT CoordinatesFile, Start
|
||||
Start
|
||||
+FX_PRECOMPUTED_2BIT Coordinates2Bit
|
||||
|
||||
CoordinatesFile
|
||||
!byte 13
|
||||
!text "FX/STAR7.DATA"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
;license:MIT
|
||||
;(c) 2019-2022 by 4am/qkumba
|
||||
;
|
||||
!cpu 6502
|
||||
!to "build/FX.INDEXED/STAR7.IN",plain
|
||||
*=$6000
|
||||
|
||||
!source "src/fx/fx.hgr.precomputed.2bit.a"
|
||||
|
||||
+FX_INITONCE_2BIT CoordinatesFile, Start
|
||||
+FX_REVERSE_2BIT
|
||||
Start
|
||||
+FX_PRECOMPUTED_2BIT Coordinates2Bit
|
||||
|
||||
CoordinatesFile
|
||||
!byte 13
|
||||
!text "FX/STAR7.DATA"
|
|
@ -0,0 +1,17 @@
|
|||
;license:MIT
|
||||
;(c) 2019-2022 by 4am/qkumba
|
||||
;
|
||||
!cpu 6502
|
||||
!to "build/FX.INDEXED/STAR7.RIPPLE",plain
|
||||
*=$6000
|
||||
|
||||
!source "src/fx/fx.hgr.precomputed.2bit.a"
|
||||
|
||||
+FX_INITONCE_2BIT CoordinatesFile, Start
|
||||
+FX_RIPPLE_2BIT
|
||||
Start
|
||||
+FX_PRECOMPUTED_2BIT Coordinates2Bit
|
||||
|
||||
CoordinatesFile
|
||||
!byte 13
|
||||
!text "FX/STAR7.DATA"
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12014025
|
||||
!be24 12020105
|
||||
!le16 5108
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11963197
|
||||
!le16 5441
|
||||
!be24 11969026
|
||||
!le16 5469
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11901486
|
||||
!be24 11907315
|
||||
!le16 3786
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11914843
|
||||
!be24 11920672
|
||||
!le16 4209
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11931474
|
||||
!be24 11937303
|
||||
!le16 5329
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11950548
|
||||
!be24 11956377
|
||||
!le16 5960
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12019133
|
||||
!be24 12025213
|
||||
!le16 410
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12019887
|
||||
!be24 12025967
|
||||
!le16 448
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12020335
|
||||
!be24 12026415
|
||||
!le16 303
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11971213
|
||||
!le16 1561
|
||||
!be24 11977135
|
||||
!le16 1719
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12019619
|
||||
!be24 12025699
|
||||
!le16 67
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12013966
|
||||
!be24 12020046
|
||||
!le16 59
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12012432
|
||||
!be24 12018512
|
||||
!le16 1437
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11997820
|
||||
!be24 12003900
|
||||
!le16 537
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11968638
|
||||
!le16 2575
|
||||
!be24 11974495
|
||||
!le16 2640
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11973132
|
||||
!be24 11979212
|
||||
!le16 6689
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12019543
|
||||
!be24 12025623
|
||||
!le16 76
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12013869
|
||||
!be24 12019949
|
||||
!le16 97
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12019686
|
||||
!be24 12025766
|
||||
!le16 201
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11998357
|
||||
!be24 12004437
|
||||
!le16 4516
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12002873
|
||||
!be24 12008953
|
||||
!le16 1669
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12004542
|
||||
!be24 12010622
|
||||
!le16 1053
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12005595
|
||||
!be24 12011675
|
||||
!le16 3259
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12008854
|
||||
!be24 12014934
|
||||
!le16 2985
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12011839
|
||||
!be24 12017919
|
||||
!le16 479
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12012318
|
||||
!be24 12018398
|
||||
!le16 114
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 12020638
|
||||
!be24 12026718
|
||||
!le16 2370
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11984893
|
||||
!be24 11990973
|
||||
!le16 4457
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11989350
|
||||
!be24 11995430
|
||||
!le16 2236
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11956508
|
||||
!be24 11962337
|
||||
!le16 6689
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11892789
|
||||
!be24 11898618
|
||||
!le16 8697
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11905272
|
||||
!be24 11911101
|
||||
!le16 9571
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11919052
|
||||
!be24 11924881
|
||||
!le16 12422
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11936803
|
||||
!be24 11942632
|
||||
!le16 13745
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11972774
|
||||
!be24 11978854
|
||||
!le16 358
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11979821
|
||||
!be24 11985901
|
||||
!le16 5072
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
; This file is automatically generated
|
||||
;
|
||||
!byte 0
|
||||
!be24 11991586
|
||||
!be24 11997666
|
||||
!le16 6234
|
||||
|
|
Loading…
Reference in New Issue