-+-+-+-+-+-+-+-+ START OF PART 5 -+-+-+-+-+-+-+-+ X smg$put_chars (mover,wallseg,loop-lefty+1,loop2-leftx+1) X else X smg$put_chars (mover,wallseg,loop-lefty+1,loop2-leftx+1,,smg$m_bol Vd); X end; X smg$end_pasteboard_update (pasty); X X repeat X smg$read_keystroke(keyboard,lastkey,,); X if lastkey = smg$k_trm_ctrlp then `7Bpreview screen`7D X begin X smg$begin_pasteboard_update (pasty); X smg$repaste_virtual_display(display,pasty,3,2); X smg$create_virtual_display(righty-lefty+1,rightx-leftx+1,prev,); X smg$paste_virtual_display(prev,pasty,2+newy,1+newx,); X for loop := leftx to rightx do X for loop2 := lefty to righty do X if temp `5Bloop,loop2`5D then X smg$put_chars (prev,wallseg,loop2-lefty+1,loop-leftx+1); X smg$end_pasteboard_update (pasty); X smg$read_keystroke(keyboard,lastkey,,); X smg$begin_pasteboard_update (pasty); X smg$delete_virtual_display(prev); X smg$repaste_virtual_display(mover,pasty,2+newy,1+newx); X smg$end_pasteboard_update (pasty); X end; X if (lastkey = smg$k_trm_ctrll) or (lastkey = smg$k_trm_ctrlw) then smg$r Vepaint_screen (pasty); X if lastkey = smg$k_trm_up then newy := newy-1; X if lastkey = smg$k_trm_down then newy := newy+1; X if lastkey = smg$k_trm_left then newx := newx-1; X if lastkey = smg$k_trm_right then newx := newx+1; X if newx < 1 then newx := 1; X if newx > swidth-(rightx-leftx) then newx := swidth-(rightx-leftx); X if newy < 1 then newy := 1; X if newy > sheight-(righty-lefty) then newy := sheight-(righty-lefty); X smg$move_virtual_display(mover,pasty,2+newy,1+newx); X until (lastkey = smg$k_trm_enter) or (lastkey = smg$k_trm_uppercase_f) or V (lastkey = smg$k_trm_lowercase_f); X smg$delete_virtual_display(mover); X smg$erase_display(stat); X smg$put_chars (stat,'Press control M for help...',1,1); X`7Bpaste contents`7D X if not ((lastkey = smg$k_trm_uppercase_f) or (lastkey = smg$k_trm_lowercas Ve_f)) then X begin X smg$begin_pasteboard_update (pasty); X for loop := leftx to rightx do X for loop2 := lefty to righty do X begin X if temp `5Bloop,loop2`5D then X begin X screen `5Bloop-leftx+newx,loop2-lefty+newy`5D := True; X smg$put_chars (display,wallseg,loop2-lefty+newy,loop-leftx+newx); X end X else X begin X screen `5Bloop-leftx+newx,loop2-lefty+newy`5D := False; X smg$put_chars (display,' ',loop2-lefty+newy,loop-leftx+newx); X end; X end; X screen `5Bround(swidth/2),round(sheight/2)`5D := False; X smg$end_pasteboard_update (pasty); X end; Xend; X Xprocedure move; `7Bthis is a mess, I know, but hell: It works`7D X Xvar X newx : integer; X newy : integer; X select : array `5B1..swidth`5D of liner; X Xbegin X smg$put_chars(stat,'Select box with arrow keys, press ENTER when done...', V1,1); X for loop := 1 to swidth do X for loop2 := 1 to sheight do X begin X select `5Bloop,loop2`5D := False; X temp `5Bloop,loop2`5D := screen `5Bloop,loop2`5D; X end; X leftx := x; X lefty := y; X rightx := x; X righty := y; X select `5Bleftx,lefty`5D := True; X X if screen `5Bleftx,lefty`5D then X smg$put_chars(display,wallseg,lefty,leftx,,smg$m_reverse) X else X smg$put_chars(display,' ',lefty,leftx,,smg$m_reverse); X`7Bselect box`7D X repeat X smg$set_cursor_abs (display,lefty,leftx); X smg$read_keystroke(keyboard,lastkey,,); X if (lastkey = smg$k_trm_ctrll) or (lastkey = smg$k_trm_ctrlw) then smg$r Vepaint_screen (pasty); X if lastkey = smg$k_trm_up then righty := righty-1; X if lastkey = smg$k_trm_down then righty := righty+1; X if lastkey = smg$k_trm_left then rightx := rightx-1; X if lastkey = smg$k_trm_right then rightx := rightx+1; X if righty < lefty then X begin X lastkey := 0; X righty := lefty; X end; X if rightx < leftx then X begin X lastkey := 0; X rightx := leftx; X end; X if righty > sheight then righty := sheight; X if rightx > swidth then rightx := swidth; X X if lastkey = smg$k_trm_up then `7Brighty decreased`7D X begin X smg$begin_pasteboard_update (pasty); X for loop := leftx to rightx do X begin X if temp `5Bloop,righty+1`5D then X smg$put_chars (display,wallseg,righty+1,loop) X else X smg$put_chars (display,' ',righty+1,loop); X select `5Bloop,righty+1`5D := False; X end; X smg$end_pasteboard_update (pasty); X end; X`20 X if lastkey = smg$k_trm_down then `7Brighty increased`7D X begin X smg$begin_pasteboard_update (pasty); X for loop := leftx to rightx do X begin X if temp `5Bloop,righty`5D then X smg$put_chars (display,wallseg,righty,loop,,smg$m_reverse) X else X smg$put_chars (display,' ',righty,loop,,smg$m_reverse); X select `5Bloop,righty`5D := True; X end; X smg$end_pasteboard_update (pasty); X end; X`20 X if lastkey = smg$k_trm_left then `7Brighty decreased`7D X begin X smg$begin_pasteboard_update (pasty); X for loop := lefty to righty do X begin X if temp `5Brightx+1,loop`5D then X smg$put_chars (display,wallseg,loop,rightx+1) X else X smg$put_chars (display,' ',loop,rightx+1); X select `5Brightx+1,loop`5D := False; X end; X smg$end_pasteboard_update (pasty); X end; X`20 X if lastkey = smg$k_trm_right then `7Brighty increased`7D X begin X smg$begin_pasteboard_update (pasty); X for loop := lefty to righty do X begin X if temp `5Brightx,loop`5D then X smg$put_chars (display,wallseg,loop,rightx,,smg$m_reverse) X else X smg$put_chars (display,' ',loop,rightx,,smg$m_reverse); X select `5Brightx,loop`5D := True; X end; X smg$end_pasteboard_update (pasty); X end; X X until lastkey = smg$k_trm_enter; X X`7Berase highlight box, and everything in it`7D X smg$end_pasteboard_update (pasty); X smg$erase_display(stat); X smg$begin_pasteboard_update (pasty); X for loop2 := lefty to righty do X for loop := leftx to rightx do X begin X smg$put_chars (display,' ',loop2,loop); X screen `5Bloop,loop2`5D := False; X end; X smg$end_pasteboard_update (pasty); X X`7Buse copy to put it somewhere now....`7D X copy; Xend; X Xprocedure print; X Xbegin X direction := 0; X smg$put_chars (stat,'Press control M for help...',1,1); X repeat X if lastdir = direction then X begin X if direction = smg$k_trm_up then Y := Y-1; X if direction = smg$k_trm_down then Y := Y+1; X if direction = smg$k_trm_left then X := X-1; X if direction = smg$k_trm_right then X := X+1; X if X > swidth then X := 1; X end X else X begin X if direction = smg$k_trm_up then smg$put_chars (display,'`5E',round(sh Veight/2),round(swidth/2)); X if direction = smg$k_trm_down then smg$put_chars (display,'v',round(sh Veight/2),round(swidth/2)); X if direction = smg$k_trm_left then smg$put_chars (display,'<',round(sh Veight/2),round(swidth/2)); X if direction = smg$k_trm_right then smg$put_chars (display,'>',round(s Vheight/2),round(swidth/2)); X end; X if Y > sheight then Y := 1; X if X < 1 then X := swidth; X if Y < 1 then Y := sheight; X lastdir := direction; X smg$set_cursor_abs (display,Y,X); X t_time_o := t_time; X smg$read_keystroke(keyboard,lastkey,,); X time (t_time); X if not (substr (t_time,1,5) = substr (t_time_o,1,5)) and AUTO then X begin X AUTOSAVE := True; X writefile; X end; X if (lastkey >= smg$k_trm_up) and (lastkey <= smg$k_trm_right) then direc Vtion := lastkey; X if (lastkey = smg$k_trm_space) and X not ((y = round(sheight/2)) and (x = round(swidth/2))) then X begin X screen `5BX,Y`5D := True; X smg$put_chars (display,wallseg,Y,X); X end; X if ((lastkey = smg$k_trm_delete) or (lastkey = smg$k_trm_ctrlh)) and X not ((y = round(sheight/2)) and (x = round(swidth/2))) then X begin X screen `5BX,Y`5D := False; X smg$erase_chars (display,1,Y,X); X end; X if lastkey = smg$k_trm_ctrli then X begin X smg$erase_display (stat); X if muno < 10 then X smg$put_chars(stat,'Number of Shrooms ('+substr(intstr(muno),4,1)+') V ',1,1) X else X smg$put_chars(stat,'Number of Shrooms ('+substr(intstr(muno),3,2)+') V ',1,1); X readln (null); X muno := strint (null); X if muno < 1 then muno := 1; X if muno > 20 then muno := 20; X smg$erase_display (stat); X smg$put_chars (stat,'Press control M for help...',1,1); X end; X if lastkey = smg$k_trm_ctrlm then X begin X smg$create_virtual_display(11,60,helpdis,smg$m_border); X smg$paste_virtual_display(helpdis,pasty,round(sheight/2)-3,round(swidt Vh/2)-28,); `20 X smg$put_line(helpdis,' Period : to select left upper of box, use Vd to copy'); X smg$put_line(helpdis,' control N : to name or title the level'); X smg$put_line(helpdis,' control I : to select number of mushrooms fo Vr level'); X smg$put_line(helpdis,' control D : to move a duplicate of buffer, u Vse with .'); X smg$put_line(helpdis,' control M : to get this screen (more)'); X smg$put_line(helpdis,' control Z : to save edited level to file'); X smg$put_line(helpdis,' Q or q : to quit (loose al changes)'); X smg$put_line(helpdis,' Arrow Keys : to change arrow direction'); X smg$put_line(helpdis,' Space : to draw walls in direction of ar Vrow'); X smg$put_line(helpdis,' Delete : to erase walls in direction of a Vrrow'); X smg$put_line(helpdis,' press any key to go back to editor...',, Vsmg$m_blink); X smg$read_keystroke(keyboard,lastkey,,); X smg$delete_virtual_display(helpdis); X end; X if lastkey = smg$k_trm_ctrln then titlescreen; X if (lastkey = smg$k_trm_ctrll) or (lastkey = smg$k_trm_ctrlw) then smg$r Vepaint_screen (pasty); X if (lastkey = smg$k_trm_period) or (lastkey = smg$k_trm_dot) then move; X if lastkey = smg$k_trm_ctrld then copy; X if (lastkey = smg$k_trm_uppercase_q) or (lastkey = smg$k_trm_lowercase_q V) then verify; X until (lastkey = smg$k_trm_ctrlz) or nowrite; X AUTOSAVE := False; X if not NOWRITE then writefile; X NOWRITE := False; X if AUTO then lib$delete_file (filename+'bkup;*'); Xend; X Xbegin X if (odd(cli$present('BRIGHT'))) then X MOVEB := False X else X MOVEB := True; X if (odd(cli$present('NOBACKUP'))) then X AUTO := False X else X AUTO := True; X if (odd(cli$present('WALL'))) then X clistat := cli$get_value('WALL',wallseg) X else X wallseg := '`7C'; X if (odd(cli$present('DIRECTORY'))) then X clistat := cli$get_value('DIRECTORY',%descr prefix) X else X prefix := prefixd; X title `5B1`5D := ' '; X title `5B2`5D := ' '; X Quit := False; X filen := 1; X smg$create_virtual_keyboard(keyboard,,,); X smg$create_pasteboard(pasty,,,);`20 X smg$create_virtual_display(1,80,stat); X smg$paste_virtual_display(stat,pasty,1,1); X repeat X smg$create_virtual_display(sheight,swidth,display,smg$m_border); X muno := 5; X for loop := 1 to sheight do X for loop2 := 1 to swidth do X screen `5Bloop2,loop`5D := False; X X := 1; X Y := 1; X getlevel; X if not QUIT then X begin X smg$paste_virtual_display(display,pasty,3,2,); `20 X smg$put_chars (display,'`5E',round(sheight/2),round(swidth/2)); X readfile; X print; X smg$delete_virtual_display(display); X end; X until QUIT; Xend. $ CALL UNPACK LEVELR.PAS;1 927384451 $ create 'f' XIf you FTP any of the programs mentioned below, please include this help fil Ve! X XThere are two help files included here, one for shroom (a game) and one Xfor levelr (a utility to create levels). Have fun with both! X XNOTE: both programs have been setup as verbs, to run these you must first ty Vpe:`20 X SET COMMAND SHROOM and SET COMMAND LEVELR X after that just type LEVELR and SHROOM to run the programs. X X For those unfamiliar with verbs, the .cld programms are essential for X the operation of the programs! These are the files that set command X looks for and reads. You will HAVE to change the "image" name to the X the ENTIRE path name. Mine is disk$userdisk1:`5Bmas0.masrich.games`5 VDshroom X It is a pain, but verbs are VERY handy and easy to use. Almost all X the programs on VAX (delete, directory, show, set, etc) are verbs. X X Also, change the PREFIXD constants in both LEVELR and SHROOM. This X is the directory path only. For example, mine is: X disk$userdisk1:`5Bmas0.masrich.games`5D X X*******************************shroom help file***************************** V** X XThe game of shroom is a strategy/skill game. It's a fairly simply concept: XYou (the worm) must eat all the shrooms on the board in order to complete Xthe level and go on to the next stage. There are 20 levels in all. X XEach shroom eaten adds 10 more segments to the worms length. If you hit Xa wall, yourself or the house, you die. Three lives are initially given wit Vh Xa bonus life every 5 levels completed. X XThe worm is controlled with the cursor keys but this can be changed with the X/mapkey qualifier or within the program with OPTIONS. X XThe worm looks like this : ooooooooooooo XThe walls look like this : `7C`7C`7C`7C`7C`7C`7C`7C`7C`7C`7C`7C`7C Xthe house is : `5E Xand the shroom is : @ X XAdditional information Avaliable, for customization: X X/MAPKEY= X This qualifier can be used to remap the cursor keys to any other set of`2 V0 X keys on the keyboard. Usage is shroom/mapkey=uldr, where u is up, l is X left, d is down, and r is right. X X NOTE: Because Vax CLI will automatically convert all letters to uppercas Ve X you should enclode the "udlr" in quotes. So format is really: X shroom/mapkey="udlr". As an alternative, use the OPTIONS menu X within shroom. It is much more userfriendly, and is the only way +-+-+-+-+-+-+-+- END OF PART 5 +-+-+-+-+-+-+-+-