mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-21 22:29:12 +00:00
rotate: rotate by shearing
This commit is contained in:
parent
a9935044fe
commit
12075db10b
29
graphics/gr/rotate/Makefile
Normal file
29
graphics/gr/rotate/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
LINKER_DIR = ../../../linker_scripts/
|
||||
|
||||
EMPTY_DISK = ../../../empty_disk/empty.dsk
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
|
||||
all: rotate.dsk
|
||||
|
||||
rotate.dsk: HELLO ROTATE.BAS
|
||||
cp $(EMPTY_DISK) rotate.dsk
|
||||
$(DOS33) -y rotate.dsk SAVE A HELLO
|
||||
$(DOS33) -y rotate.dsk SAVE A ROTATE.BAS
|
||||
|
||||
###
|
||||
|
||||
HELLO: hello.bas
|
||||
$(TOKENIZE) < hello.bas > HELLO
|
||||
|
||||
ROTATE.BAS: rotate.bas
|
||||
$(TOKENIZE) < rotate.bas > ROTATE.BAS
|
||||
|
||||
####
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO ROTATE.BAS
|
||||
|
2
graphics/gr/rotate/hello.bas
Normal file
2
graphics/gr/rotate/hello.bas
Normal file
@ -0,0 +1,2 @@
|
||||
5 HOME
|
||||
40 PRINT CHR$(4)"CATALOG"
|
26
graphics/gr/rotate/rotate.bas
Normal file
26
graphics/gr/rotate/rotate.bas
Normal file
@ -0,0 +1,26 @@
|
||||
5 GR
|
||||
10 FOR Y=5 TO 43:COLOR=Y:HLIN5,35ATY:NEXT
|
||||
15 INPUT A$
|
||||
20 A=(45*3.14)/180:T=TAN(A/2):S=SIN(A)
|
||||
30 FOR Y=0 TO 47
|
||||
40 O=-(Y-24)*T
|
||||
50 FOR X=0 TO 39
|
||||
55 C=0
|
||||
60 IF ((X+O)>0) AND ((X+O)<39) THEN C=SCRN(X+O,Y)
|
||||
70 COLOR=C:PLOT X,Y
|
||||
80 NEXT X,Y
|
||||
130 FOR X=0 TO 39
|
||||
140 O=(X-20)*S
|
||||
150 FOR Y=0 TO 47
|
||||
155 C=0
|
||||
160 IF ((Y+O)>0) AND ((Y+O)<47) THEN C=SCRN(X,Y+O)
|
||||
170 COLOR=C:PLOT X,Y
|
||||
180 NEXT Y,X
|
||||
230 FOR Y=0 TO 47
|
||||
240 O=-(Y-24)*T
|
||||
250 FOR X=0 TO 39
|
||||
255 C=0
|
||||
260 IF ((X+O)>0) AND ((X+O)<39) THEN C=SCRN(X+O,Y)
|
||||
270 COLOR=C:PLOT X,Y
|
||||
280 NEXT X,Y
|
||||
|
Loading…
x
Reference in New Issue
Block a user