home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
201-225
/
apd214
/
editobj.amos
/
editobj.amosSourceCode
Wrap
AMOS Source Code
|
1978-02-21
|
4KB
|
151 lines
' 2D OBJECT EDITOR FOR THE OBJECT SHOWER.
' CODED BY SHOCK WAVE (NICK) OF HANISSIS 5
'
'THIS PROGRAM WILL ALLOW YOU TO DESIGN OBJECTS IN 2 DIMENSIONS
'FOR USE WITH THE VECTOR OBJECT SHOWER OR OTHER PROGRAMS OF YOUR OWN
'YOU CAN ALTER THE OBJECTS INTO 3D ONES BY CHANGING THE Z CO-ORDS
'IF YOU KNOW WHAT YOUR DOING!
'
'
'ITS FAIRLY STRAIGHT FORWARD TO USE, JUST RUN IT, MAKE YOUR OBJECT
'AND THEN CONVERT TO DATA BY PRESSING M, GOING THOUGH ALL THE POINTS,
'WRITING THEM IN X,Y,Z ORDER AND THEN YOU CAN INSERT THEM INTO THE SHOWER
'LISTING AS DATA!
'
'
'THESE PROGRAMS ARE SHARE WARE! IF YOU LIKE THESE PROGRAMS
'PLEASE SEND A SMALL POSTAL ORDER TO:
'
' NICK
' 44 HEOL-Y-GWRGAN
' MARGAM
' PORT TALBOT
' WEST GLAM
' SA132DG
'
'AND THEN ILL SEND YOU THE NEXT PROGRAM / DEMO THAT I WRITE.
'
'
Dim EROR$(3)
EROR$(1)="CANT GO TO DATA SCREEN,NO OBJECT"
EROR$(2)="CANT DELETE LAST LINE OR NO LINE!"
EROR$(3)="CANT PLOT, OUT OF POINTS!"
'
'
'
' object editor
' for 2 dimensional objects
'
'
MXPOINTS=50
Dim XX(MXPOINTS)
Dim YY(MXPOINTS)
Dim ZZ(MXPOINTS)
X=0
Y=0
BASE=-1
LINES=0
'
'
Screen Open 0,320,250,4,Lowres
Curs Off
Flash Off
Cls 0
'
Gosub INST
Do
If LINES>1 Then Gosub OBJDRAW
K$=Inkey$
K$=Upper$(K$)
Plot X+140,Y+120,2
Wait Vbl
If K$=" " and(LINES=>MXPOINTS) Then Locate 1,25 : Print EROR$(3) : Boom : Wait 50 : Locate 1,25 : Print " "
If K$=" " and(LINES<MXPOINTS) Then LINES=LINES+1 : BASE=BASE+1 : XX(LINES)=X : YY(LINES)=Y : Play 40,1
If K$="D" and BASE<=1 Then Locate 1,25 : Print EROR$(2) : Boom : Wait 50 : Locate 1,25 : Print " "
If K$="D" Then If BASE>1 Then Cls 0 : LINES=LINES-1 : BASE=BASE-1 : Gosub COMPDRAW
If K$="R" Then Cls 0 : Gosub COMPDRAW
If K$="C" Then LINES=0 : BASE=-1 : Cls 0 : Gosub INST : X=0 : Y=0
If K$="M" and LINES<=1 Then Locate 1,25 : Print EROR$(1) : Boom : Wait 50 : Locate 1,25 : Print " "
If K$="M" and LINES>1 Then Gosub MAP
If K$="0" Then End
Plot X+140,Y+120,0
If K$="P" Then X=X+10
If K$="O" Then X=X-10
If K$="Q" Then Y=Y-10
If K$="A" Then Y=Y+10
If X>140 Then Bell : X=140
If X<-140 Then Bell : X=-140
If Y<-90 Then Bell : Y=-90
If Y>90 Then Bell : Y=90
Loop
'
OBJDRAW:
Gosub INST
' For A=(BASE) To(LINES)
Ink 1
Draw XX(BASE)+140,YY(BASE)+120 To XX(LINES)+140,YY(LINES)+120
' Next
Wait Vbl
Return
COMPDRAW:
Gosub INST
For A=1 To LINES-1
Ink 1
Draw XX(A)+140,YY(A)+120 To XX(A+1)+140,YY(A+1)+120
Next A
Return
'
INST:
Paper 0
Pen 1
Locate 0,0
Centre "{O-LEFT}{P-RIGHT}{Q-UP}{A-DOWN}"
Print
Centre "{SPACE-PLOT}{D-DEL}{C-CLEAR}{R-REDRAW}"
Print
Centre "{M-CONVERT TO DATA}{0-QUIT}"
Return
'
MAP:
Cls 0
Locate 0,0
Print
Centre "THE COORDINATES FOR THIS OBJECT ARE:"
Print
Centre "USE O AND P TO MOVE THROUGH POINTS!"
Print
Centre "PRESS X TO RETURN TO EDITOR"
'BS=1
P=1
MX=LINES
Repeat
Locate 1,4
Print
Print
Print
Print "POINT NUMBER:";P;" OF:";MX;" "
Print
Print "X CO-ORDINATE:";XX(P)/10;" "
Print
Print "Y CO-ORDINATE:";YY(P)/10;" "
Print
Print "Z CO-ORDINATE:";ZZ(P)/10;" "
Print
Print
Centre "WRITE ALL THE POINTS DOWN AND ENTER"
Print
Centre "THEM AS DATA STATEMENTS IN THE SHOWER"
Print
Centre "REMEMBER TO WRITE THE X,Y,Z FOR ALL THE POINTS!"
Print
Print
Print "REMEMBER TO SET THE NPS VARIABLE TO:";MX;" "
K$=Input$(1)
K$=Upper$(K$)
If K$="O" and P>1 Then P=P-1
If K$="P" and P<MX Then P=P+1
Until K$="X"
Cls 0
Gosub COMPDRAW
Return
'