mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-03 18:29:53 +00:00
gr: twister: working on some twister code
This commit is contained in:
parent
53783d0cf0
commit
a49ae04118
32
graphics/gr/twister/Makefile
Normal file
32
graphics/gr/twister/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
PNG2GR = ../../../utils/gr-utils/png2gr
|
||||
PNG2RLE = ../../../utils/gr-utils/png2rle
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
LINKERSCRIPTS = ../../../linker_scripts
|
||||
EMPTY_DISK = ../../../empty_disk
|
||||
|
||||
all: twister.dsk
|
||||
|
||||
twister.dsk: $(DOS33) HELLO TWISTER.BAS
|
||||
cp $(EMPTY_DISK)/empty.dsk twister.dsk
|
||||
$(DOS33) -y twister.dsk SAVE A HELLO
|
||||
$(DOS33) -y twister.dsk SAVE A TWISTER.BAS
|
||||
|
||||
###
|
||||
|
||||
HELLO: hello.bas
|
||||
$(TOKENIZE) < hello.bas > HELLO
|
||||
|
||||
###
|
||||
|
||||
TWISTER.BAS: twister.bas
|
||||
$(TOKENIZE) < twister.bas > TWISTER.BAS
|
||||
|
||||
|
||||
###
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o HELLO TWISTER.BAS *.lst
|
||||
|
2
graphics/gr/twister/hello.bas
Normal file
2
graphics/gr/twister/hello.bas
Normal file
@ -0,0 +1,2 @@
|
||||
5 HOME
|
||||
10 PRINT CHR$(4);"CATALOG"
|
22
graphics/gr/twister/twister.bas
Normal file
22
graphics/gr/twister/twister.bas
Normal file
@ -0,0 +1,22 @@
|
||||
10 REM TWISTER-DEMO
|
||||
15 REM https://8bitshack.org/post/twister/
|
||||
20 HGR
|
||||
30 FOR A2 = 1 TO 360 STEP 3
|
||||
40 AM = 120+COS(A2*0.0174533)*100
|
||||
50 AN = -3.141593+SIN(A2*0.0174533)*3.141593
|
||||
60 FOR Y = 1 TO 159 STEP 2
|
||||
65 FV = Y/AM+AN
|
||||
70 X1 = 35*SIN(FV)
|
||||
80 X2 = 35*SIN(FV+1.570796)
|
||||
90 REM X3 = 140+35*SIN(FV+3.141593)
|
||||
95 X3 = -X1
|
||||
100 REM X4 = 140+35*SIN(FV+4.712389)
|
||||
105 X4 = -X2
|
||||
108 HCOLOR = 0: HPLOT 105,Y TO 175,Y
|
||||
110 IF X1 < X2 THEN HCOLOR = 1: HPLOT 140+X1,Y TO 140+X2,Y: GOTO 130
|
||||
120 IF X3 < X4 THEN HCOLOR = 1: HPLOT 140+X3,Y TO 140+X4,Y
|
||||
130 IF X2 < X3 THEN HCOLOR = 2: HPLOT 140+X2,Y TO 140+X3,Y: GOTO 150
|
||||
140 IF X4 < X1 THEN HCOLOR = 2: HPLOT 140+X4,Y TO 140+X1,Y
|
||||
150 NEXT Y
|
||||
160 NEXT A2
|
||||
170 GOTO 30
|
Loading…
Reference in New Issue
Block a user