home *** CD-ROM | disk | FTP | other *** search
- gosub init_vars
-
- draw_screen
-
- status
-
- mainloop:
- while q$<>"Q"
- x=mouse(0):y=mouse(1)
- if snap<0 then
- x=int(x/8.5)*8.5-6:y=int(y/8.5)*8.5-5
- end if
- if x>10 and y>10 and x<310 and y<150
- mouse -1
- get(x,y)-(x+s(p,0)*16,y+s(p,1)*16),stor
- color 1,1,1
- bar x-11,y-11,s(p,0)*16,s(p,1)*16
- color p+1,p+1,p+1
- if p>16 then
- color 0,0,0
- end if
- bar x-10,y-10,s(p,0)*14,s(p,1)*14
- put(x,y),stor,pset
- else
- mouse 0
- end if
- if mouse(2)<>0 and x>10 and x<309 and y>10 and y<150 then
- color 1,1,1
- bar x-11,y-11,s(p,0)*16,s(p,1)*16
- color p+1,p+1,p+1
- if p>16 then
- color 0,0,0
- end if
- bar x-10,y-10,s(p,0)*14,s(p,1)*14
- color 1,1,1
- scrn(n(s_n),0,s_n)=p
- scrn(n(s_n),1,s_n)=x
- scrn(n(s_n),2,s_n)=y
- n(s_n)=n(s_n)+1
- if p>99 and p<200 then
- get_alien_info
- end if
- while mouse(2)<>0
- wend
- end if
- q$=inkey$
- if q$="" then
- q$=" "
- end if
- if val(q$)<>0 then
- p=val(q$)
- status
- else
- if q$="+" then
- p=p+1
- status
- end if
- if q$="-" then
- p=p-1
- status
- end if
- q$=chr$(asc(q$) and 223)
- if q$="N" then
- window output 1
- cls
- input"Screen #n:";s_n
- status
- draw_l
- end if
- if q$="W" then
- n(s_n)=0:cls
- status
- end if
- if q$="O" then
- window output 1
- cls
- input"OBJECT #n:";a
- p=a+199
- status
- end if
- if q$="A" then
- window output 1
- cls
- input"ALIEN/MOTILE #n:";a
- p=a+99
- status
- end if
- if q$="G" then
- snap=-snap
- window output 1
- status
- end if
- if Q$="S" then
- save_screen
- end if
- if q$="L" then
- load_screen
- end if
- end if
- wend
-
- stop
-
- sub status
- shared p,snap,n(),s_n,item$()
- window output 1
- cls
- if p>100 then
- if p>200 then
- ?"Object:";
- else
- ?"Motile:";
- end if
- else
- ?"Scenery:";
- end if
- ?item$(p);" #n:";n(s_n)
- ?"Snap:";
- if snap<0 then
- ?"ON";
- else
- ?"OFF";
- end if
- ?" Screen:";s_n;
- window output 2
- end sub
-
- sub get_alien_info
- shared scrn(),stor(),x,y,n(),s_n,s(),p,snap
- get(0,0)-(319,199),stor
- mouse -1
- while mouse(2)<>0
- wend
- while mouse(2)=0
- mx=mouse(0)
- if snap<0 then
- mx=int(mx/8.5)*8.5-6
- end if
- put(0,0),stor,pset
- linef x-12,y-10+s(p,1)*8,mx-12,y-10+s(p,1)*8
- linef mx-12,y-15+s(p,1)*8,mx-12,y-5+s(p,1)*8
- wend
- scrn(n(s_n),0,s_n)=mx
- get(0,0)-(319,199),stor
- while mouse(2)<>0
- wend
- while mouse(2)=0
- mx=mouse(0)
- if snap<0 then
- mx=int(mx/8.5)*8.5-6
- end if
- put(0,0),stor,pset
- linef x-10+s(p,0)*16,y-10+s(p,1)*8,mx-14+s(p,0)*16,y-10+s(p,1)*8
- linef mx-14+s(p,0)*16,y-5+s(p,1)*8,mx-14+s(p,0)*16,y-15+s(p,1)*8
- wend
- scrn(n(s_n),2,s_n)=mx
- get(0,0)-(319,199),stor
- while mouse(2)<>0
- wend
- while mouse(2)=0
- my=mouse(1)
- if snap<0 then
- my=int(my/8.5)*8.5-5
- end if
- put(0,0),stor,pset
- linef x-12+s(p,0)*8,y-10,x-12+s(p,0)*8,my-10
- linef x-9+s(p,0)*8,my-10,x-15+s(p,1)*8,my-10
- wend
- scrn(n(s_n),1,s_n)=my
- get(0,0)-(319,199),stor
- while mouse(2)<>0
- wend
- while mouse(2)=0
- my=mouse(1)
- if snap<0 then
- my=int(my/8.5)*8.5-5
- end if
- put(0,0),stor,pset
- linef x-12+s(p,0)*8,y-10+s(p,1)*16,x-12+s(p,0)*8,my-10+s(p,1)*16
- linef x-9+s(p,0)*8,my-10+s(p,1)*16,x-15+s(p,0)*8,my-10+s(p,1)*16
- wend
- scrn(n(s_n)+1,0,s_n)=my
- window output 1
- cls:input"DIRECTION:";a
- status
- scrn(n(s_n)+1,1,s_n)=a:scrn(n(s_n)+1,2,s_n)=0
- n(s_n)=n(s_n)+2
- MOUSE 0
- end sub
-
- sub save_screen
- shared n(),s_n,scrn(),stor()
- window output 1
- cls
- ?"SAVE TO DISC"
- input"FILENAME:";n$:cls
- n$=n$+".SCR"
- s=varptr(stor(0)):p=0
- ns=0
- while ns<>25 and ns<>1
- input"NUMBER OF SCREENS (1 or 25)";ns
- wend
-
- for s_n=1 to ns
- if n(s_n)<>0 then
- for f=0 to n(s_n)-1:for a=0 to 2
- pokew s+p,scrn(f,a,s_n)
- p=p+2
- gotoxy 0,0
- next a,f
- end if
- pokel s+p,0:pokew s+p+4,0
- p=p+6
- next s_n
-
- bsave n$,s,p+2
- s_n=1
-
- status
- end sub
-
- sub load_screen
- shared n(),s_n,scrn(),stor()
- window output 1
- cls
- ?"LOAD FROM DISC"
- input"FILENAME:";n$:cls
- n$=n$+".SCR"
- ns=0
- while ns<>25 and ns<>1
- input"NUMBER OF SCREENS (1 or 25)";ns
- wend
-
- s=varptr(stor(0))
- bload n$,s
- p=0
- for s_n=1 to ns
- n(s_n)=0
- while peekw(s+p)<>0
- n(s_n)=n(s_n)+1
- p=p+6
- wend
- p=p+6
- next s_n
- p=0
- for s_n=1 to ns
- for f=0 to n(s_n)-1:for a=0 to 2
- scrn(f,a,s_n)=peekw(s+p)
- p=p+2
- next a,f
- p=p+6
- next s_n
- s_n=1
- status
- draw_l
- end sub
-
- sub draw_l
- shared n(),s_n,scrn(),s()
- cls
- for f=0 to n(s_n)-1
- x=scrn(f,1,s_n):y=scrn(f,2,s_n)
- p=scrn(f,0,s_n)
- color 1,1,1
- bar x-11,y-11,16*s(p,0),16*s(p,1)
- color p+1,p+1,p+1
- bar x-10,y-10,14*s(p,0),14*s(p,1)
- next f
- end sub
-
- sub draw_screen
- window open 1,"GMET SCREEN DESIGNER",0,155,320,40,1
-
- window open 2,"",10,10,300,140,0
-
- end sub
-
- init_vars:
- dim scrn(500,2,25),stor(10000),s(250,1),n(25)
- p=1:snap=1:s_n=1
- dim item$(250)
- for f=1 to 14:read item$(f),s(f,0),s(f,1):next f
- FOR f=100 to 103
- read item$(f),s(f,0),s(f,1)
- next f
- for f=200 to 205
- read item$(f),s(f,0),s(f,1)
- next f
-
- return
-
- rem SCENERY DATA
-
- data OLD BRICKS,1,1,BLUEBALL,1,1,GRASS,1,1,PLAYER WORM START,2,0.6
- data TREES,1,2,PILLAR,1,1
- data HORIZ.PIPE,1,0.5,VERT.PIPE,0.5,1,CONECT PIPE,1.5,1.5
- data HORIZ.BONES,1,0.5,VERT.BONES,0.5,1,CONECT BONES,1.5,1.5
- data SHORT STALAGTITE,1,1,LONG STALAGTITE,1,2
-
- rem ALIEN/MOTILE DATA
-
- data EVIL EYE,2,2,PLATFORM,2,2,POWER DRILL,2,2
- data MANIC MUSHROOM,2,2
-
- rem OBJECT DATA
-
- data WORM EGG,1,1,EXTRA LIFE,1,1,EXTRA FUEL,1,1
- data BONUS DIAMOND,1,1,INVULNERABILITY,1,1
- data FREEZE ALIENS,1,1