mirror of
https://github.com/a2-4am/4cade.git
synced 2025-08-10 08:25:13 +00:00
add fx/star
This commit is contained in:
1
Makefile
1
Makefile
@@ -47,6 +47,7 @@ asm: md
|
||||
$(ACME) src/fx/fx.hgr.split.ud.intro.a
|
||||
$(ACME) src/fx/fx.hgr.iris.a
|
||||
$(ACME) src/fx/fx.hgr.ripple.a
|
||||
$(ACME) src/fx/fx.hgr.star.a
|
||||
|
||||
dsk: md asm
|
||||
$(CADIUS) CREATEVOLUME build/"$(DISK)" "${VOLUME}" 32766KB >>build/log
|
||||
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
@@ -24,3 +24,4 @@ RADIAL=Type(06),AuxType(6000),Access(C3)
|
||||
SPLIT.UD.INTRO=Type(06),AuxType(6000),Access(C3)
|
||||
IRIS=Type(06),AuxType(6000),Access(C3)
|
||||
RIPPLE=Type(06),AuxType(6000),Access(C3)
|
||||
STAR=Type(06),AuxType(6000),Access(C3)
|
||||
|
26
res/notes/star.py
Executable file
26
res/notes/star.py
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from math import sqrt, sin, cos, acos, pi
|
||||
|
||||
def f(t, k):
|
||||
t = float(t)
|
||||
r = k/cos(0.4*acos(sin(2.5*(t+pi/2))))
|
||||
return r*cos(t),r*sin(t)
|
||||
|
||||
coords = []
|
||||
for k_mul in range(500):
|
||||
any = False
|
||||
for t_mul in range(int(pi*1000+1)):
|
||||
a, b = f(float(t_mul/100), float(k_mul)/10.0)
|
||||
x = round(20+a*.6)
|
||||
y = round(24+b)
|
||||
if x < 0 or x > 39 or y < 0 or y > 47 or (x,y) in coords:
|
||||
continue
|
||||
coords.append((x,y))
|
||||
any = True
|
||||
if any:
|
||||
coords.append((255,255))
|
||||
|
||||
with open("../../src/fx/fx.hgr.star.data.a", "w") as f:
|
||||
for x, y in coords:
|
||||
f.write(" !byte %s,%s\n" % (y,x))
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
43
src/fx/fx.hgr.star.a
Normal file
43
src/fx/fx.hgr.star.a
Normal file
@@ -0,0 +1,43 @@
|
||||
!cpu 6502
|
||||
!to "build/FX/STAR",plain
|
||||
*=$6000
|
||||
|
||||
coord = $FE
|
||||
|
||||
lda #<@coords
|
||||
sta coord
|
||||
lda #>@coords
|
||||
sta coord+1
|
||||
ldy #0
|
||||
@loop
|
||||
lda (coord),y
|
||||
bpl +
|
||||
lda #$10
|
||||
jsr WaitForKeyWithTimeout
|
||||
bmi @exit
|
||||
bpl @next
|
||||
+ tax
|
||||
iny
|
||||
lda (coord),y
|
||||
tay
|
||||
txa
|
||||
jsr HGRHalfBlockCopy
|
||||
@next
|
||||
inc coord
|
||||
bne +
|
||||
inc coord+1
|
||||
+ inc coord
|
||||
bne +
|
||||
inc coord+1
|
||||
+ ldy #$00
|
||||
lda ($FE),y
|
||||
cmp #$80
|
||||
bne @loop
|
||||
@exit rts
|
||||
|
||||
@coords
|
||||
!source "src/fx/fx.hgr.star.data.a"
|
||||
!byte $80
|
||||
|
||||
!source "src/wait.a"
|
||||
!source "src/fx/fx.hgr.common.a"
|
2174
src/fx/fx.hgr.star.data.a
Normal file
2174
src/fx/fx.hgr.star.data.a
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user