Home » Archimedes archive » Archimedes World » AW-1994-11-Disc1.adf » Disk1Nov94 » !AWNov94/Goodies/Centepede/!Centipede/!RunImage

!AWNov94/Goodies/Centepede/!Centipede/!RunImage

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1994-11-Disc1.adf » Disk1Nov94
Filename: !AWNov94/Goodies/Centepede/!Centipede/!RunImage
Read OK:
File size: 4979 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20REM With 'highscore' and 'replay game' mods.
   30
   40REM *******************************************************
   50REM *   LEN 1990 Philip Hawthorne/Alpine Software           *
   60REM *   For use only with Creator-designed games          *
   70REM *******************************************************
   80
   90ON ERROR MODE12:OSCLI("SHUT"):IF ERR<>17 PRINT"Creator run-time error: ";:REPORT:PRINT" (Error code: ";ERR;"/";ERL;")":END ELSE OSCLI"SNEW":MODE12:PRINT"Bye...":END
  100
  110MODE 15:OFF
  120
  130PROCfind_mode:REM Peek at 'GameData' file to see what mode they are using
  140PROCcheck_config:REM Read "Config" file, if there is one
  150
  160data_size = 128*1024 :REM Allow 128 Kbytes for the game data
  170DIM object_space data_size
  180
  190SYS "OS_File",5,"<RunGame$Dir>.Title" TO title,,,,scrnsize
  200IF title<>0 AND screen_delay<>-2 THEN
  210
  220MODE mode:OFF
  230SYS "OS_ReadModeVariable",mode,3 TO ,,NColour
  240
  250IF NColour < 63 THEN
  260in%=OPENIN("<RunGame$Dir>.!Palette"):CLOSE#in%
  270IF in%<>0 THEN OSCLI("PRINT <RunGame$Dir>.!Palette")
  280ENDIF
  290
  300  IF scrnload$="FAST" AND (scrnsize+16)<=data_size THEN
  310    !object_space=data_size:REM Use object_space as temporary sprite area
  320    object_space!4=0
  330    object_space!8=16
  340    object_space!12=16
  350    SYS "OS_SpriteOp",10+256,object_space,"<RunGame$Dir>.Title"
  360    SYS "OS_SpriteOp",52+256,object_space,"title",0,0,8,0,0
  370  ELSE
  380    OSCLI ("SCREENLOAD <RunGame$Dir>.Title")
  390  ENDIF
  400ENDIF
  410
  420
  430
  440
  450
  460
  470PROCinit             :REM Basic setting up, loading sprites etc.
  480
  490DIM filename 255
  500REM Set up the starfield data block
  510DIM starsX num_stars*4,starsY num_stars,starsV num_stars
  520
  530FOR I%=0 TO num_stars-1
  540  N%=4*I%
  550  starsX!N% = RND(319)
  560NEXT
  570FOR I%=0 TO num_stars-1
  580  starsY?I% = RND(254)
  590  starsV?I% = RND(4)
  600NEXT
  610
  620REM Find size of Alphabet file
  630
  640SYS "OS_File",5,"<RunGame$Dir>.Alphabet" TO ftype,,,,alphalen
  650IF ftype=0 ERROR 252,"No Alphabet file"
  660
  670REM Reserve space for character set sprites
  680
  690alphalen+=16:DIM alphabet alphalen,alpha_info 32,character_ptrs 95*4
  700
  710REM Initialise the alphabet sprite area and load the sprites
  720
  730!alphabet=alphalen:alphabet!4=0:alphabet!8=16:alphabet!12=16
  740SYS "OS_SpriteOp",256+10,alphabet,"<RunGame$Dir>.Alphabet"
  750
  760REM Read the width and height of the characters
  770
  780SYS "OS_SpriteOp",256+40,alphabet,"32" TO ,,,width,height,,charmode
  790SYS "OS_ReadModeVariable",charmode,4 TO ,,XEig
  800SYS "OS_ReadModeVariable",charmode,5 TO ,,YEig
  810width = width << XEig
  820height = height << YEig
  830
  840REM Find the addresses of each character's sprite
  850I%=0
  860FOR C%=32 TO 126
  870  C$=STR$C%
  880  SYS "OS_SpriteOp",24+256,alphabet,C$ TO ,,address
  890  I%!character_ptrs=address
  900  I%+=4
  910NEXT
  920
  930REM ---------- Set up information block for alphabet ----------------
  940REM Word#0 = alphabet sprite area
  950REM Word#1 = character lookup table (ASC"char" - ASC" " -> index)
  960REM Word#2 = character width
  970REM Word#3 = character height
  980
  990!alpha_info=alphabet
 1000alpha_info!4=character_ptrs
 1010alpha_info!8=width
 1020alpha_info!12=height
 1030
 1040REM ----------- Set up information block for stars -----------------
 1050REM Word#0 = stars X coord table
 1060REM Word#1 = stars Y coord table
 1070REM Word#2 = stars Velocity table
 1080REM Word#3 = number of stars to plot (default)
 1090
 1100DIM stars_info 32
 1110!stars_info = starsX
 1120stars_info!4=starsY
 1130stars_info!8=starsV
 1140stars_info!12=120    :REM Default number of stars
 1150
 1160REM ------------- Get tune names from 'Tunes' file ------------------
 1170DIM tune_names 24*max_tunes,name_ptrs max_tunes*4,tunes_info 32
 1180
 1190PROCread_tunes("<RunGame$Dir>.Tunes",tune$(),num_tunes)
 1200ptr=0:dir$="<Sounds$Dir>."
 1210
 1220FOR I%=0 TO num_tunes-1
 1230  $(tune_names+ptr)=dir$+tune$(I%)+CHR$(0)
 1240  !(name_ptrs+4*I%)=tune_names+ptr
 1250  ptr+=LEN(tune$(I%))+1+LEN(dir$)
 1260NEXT
 1270
 1280REM ------------- Set up information block for tunes -----------------
 1290REM Word#0 = number of tunes
 1300REM Word#1 = ptr to tune names table
 1310REM Word#2 = ptr to table of tune name ptrs!
 1320
 1330!tunes_info=num_tunes:tunes_info!4=tune_names:tunes_info!8=name_ptrs
 1340
 1350REM ------ Set up register variables and initialise the system -------
 1360A%=work%         :REM Some workspace
 1370B%=sprite_area   :REM Sprite area
 1380C%=object_space  :REM Storage for all other data
 1390D%=stars_info    :REM Stars data
 1400E%=alpha_info    :REM Alphabet data
 1410F%=tunes_info    :REM Tunes info
 1420CALL _initialise :REM Get Creator ready to start
 1430
 1440H%=work%         :REM Don't change H% from now on!
 1450highscore=score(1)
 1460
 1470IF title<>0 THEN
 1480  IF screen_delay = -1 THEN A=GET ELSE A=INKEY(screen_delay*100)
 1490ENDIF
 1500
 1510IF stop_tune$ = "AFTER LOADING" THEN OSCLI"SNEW"
 1520
 1530
 1540REPEAT
 1550$filename = "<RunGame$Dir>.GameData" :REM Filename of data to load
 1560A%=filename                          :REM R0-> filename
 1570CALL _getdata                        :REM Load the data
 1580
 1590
 1600var_table=H%!40:var_table!8 = highscore
 1610
 1620A%=sprite_area      :REM Pointer to sprite area
 1630H%=work%            :REM Pointer to work space
 1640TIME=0              :REM Get ready to time the game
 1650frames=USR _display :REM Run the game, return number of frames displayed
 1660
 1670time=TIME/100       :REM The total game time
 1680starting = FALSE
 1690
 1700highscore = var_table!8:REM Read 'highscore' from Creator's variable table
 1710score     = var_table!4:REM and copy Creator's 'score' variable as well
 1720
 1730REM If Left-hand Alt key is pressed give the frame rate
 1740
 1750IF INKEY(-6) PRINT frames/time;" frames/second"
 1760
 1770REM - Find what mode the game was running in and select suitable sprites -
 1780mode=MODE
 1790SYS "OS_ReadModeVariable",mode,4 TO ,,XEig
 1800SYS "OS_ReadModeVariable",mode,5 TO ,,YEig
 1810go_sprite$="gameover"+STR$(mode)
 1820pa_sprite$="playagain"+STR$(mode)
 1830hs_sprite$="highscore"+STR$(mode)
 1840OFF
 1850
 1860REM ------------- Display the "Game Over" sprite ------------------
 1870REM 'delay' is the time in seconds to display the sprite
 1880REM xcoord1,ycoord1 are the coords where it is to be displayed
 1890
 1900PROCend_of_game(delay,go_sprite$,xcoord1,ycoord1)
 1910
 1920PROChighscore(score)
 1930
 1940REM Now display the "Play Again" sprite and wait until Y or N is pressed
 1950REM xcoord2,ycoord2 are the coords where the sprite is to be displayed
 1960REM key$: keys to check eg "YyNn" in English or "JjNn" in German or Dutch
 1970
 1980IF FNanother(pa_sprite$,xcoord2,ycoord2,key$) THEN
 1990  REM Reload the game sprites
 2000  SYS "OS_SpriteOp",256+10,sprite_area,"<RunGame$Dir>.Sprites"
 2010  another=TRUE
 2020ELSE
 2030  another=FALSE
 2040ENDIF
 2050UNTIL NOT another
 2060
 2070IF save$="YES" THEN PROCsave_highscores("<RunGame$Dir>.HighScores")
 2080
 2090IF stop_tune$ = "AT END" THEN OSCLI"SNEW"
 2100MODE12:PRINT"Bye..."
 2110END
 2120
 2130
 2140DEF PROCinit
 2150SYS "OS_Byte",161,191 TO ,,OldMouse
 2160num_stars = 255
 2170max_tunes = 16:DIM tune$(max_tunes)
 2180
 2190REM Find size of sprite file
 2200SYS "OS_File",5,"<RunGame$Dir>.Sprites" TO ftype,,,,splen
 2210IF ftype=0 ERROR 255,"No Sprites file"
 2220
 2230REM Reserve space for sprites, allowing for 16-byte header
 2240splen+= 16:DIM sprite_area splen
 2250
 2260REM Initialise the sprite area and load the sprites
 2270!sprite_area=splen:sprite_area!4=0:sprite_area!8=16:sprite_area!12=16
 2280SYS "OS_SpriteOp",256+10,sprite_area,"<RunGame$Dir>.Sprites"
 2290
 2300REM Find size of Sprite2 file
 2310SYS "OS_File",5,"<RunGame$Dir>.Sprites2" TO ftype,,,,splen2
 2320IF ftype=0 ERROR 254,"No 'Sprites2' file"
 2330
 2340REM Reserve space for sprites, allowing for 16-byte header
 2350splen2+= 16:DIM sprite_area2 splen2
 2360
 2370REM Initialise the sprite2 area and load the sprites
 2380!sprite_area2=splen2:sprite_area2!4=0:sprite_area2!8=16:sprite_area2!12=16
 2390SYS "OS_SpriteOp",256+10,sprite_area2,"<RunGame$Dir>.Sprites2"
 2400
 2410REM Read and install the sounds
 2420PROCload_sounds("<RunGame$Dir>.Sounds")
 2430
 2440maxlen=16:maxdigits=10
 2450DIM name$(maxhi),score(maxhi)
 2460name$()="Creator":score()=1000
 2470
 2480in%=OPENIN "<RunGame$Dir>.HighScores"
 2490IF in%<>0 THEN
 2500I%=1
 2510WHILE NOT EOF#in% AND I%<=maxhi
 2520  line$=GET$#in%
 2530  REM Ignore any comment or blank lines
 2540  IF LEFT$(line$,1)<>";" AND line$<>"" THEN
 2550    IF I%>maxhi THEN ERROR 253,"Too many names in 'HighScore' file"
 2560    Q%=INSTR(line$,":")
 2570    name$(I%)=LEFT$(line$,Q%-1)
 2580    name$(I%)=LEFT$(name$(I%)+STRING$(maxlen," "),maxlen-1)
 2590    Q%+=1
 2600    WHILE MID$(line$,Q%,1)=" ":Q%+=1:ENDWHILE
 2610    value$=MID$(line$,Q%)
 2620    score(I%) = VAL(value$)
 2630    I%+=1
 2640  ENDIF
 2650ENDWHILE
 2660CLOSE#in%
 2670ENDIF
 2680PROCsort_highscores(maxhi)
 2690
 2700REM Find size of ARM code and reserve space for it
 2710SYS "OS_File",5,"<RunGame$Dir>.FCode" TO ftype,,,,codesize
 2720DIM code codesize
 2730
 2740REM Set up the assembler labels
 2750FOR pass = 0 TO 2 STEP 2
 2760PROCassemble(code,pass)
 2770NEXT
 2780
 2790REM Now load in the actual code
 2800OSCLI("LOAD <RunGame$Dir>.FCode "+STR$~code)
 2810
 2820*K.1 EDIT|M
 2830*K.2 RUN|M
 2840
 2850
 2860
 2870DIM work% 2000:REM Reserve some workspace
 2880ENDPROC
 2890
 2900
 2910DEF PROCfind_mode
 2920LOCAL dummy$,I%
 2930in% = OPENIN "<RunGame$Dir>.GameData"
 2940IF in%=0 ERROR 252,"GameData file is missing"
 2950FOR I%=1 TO 7:dummy$=GET$#in%:NEXT
 2960mode=VAL(GET$#in%)
 2970CLOSE#in%
 2980ENDPROC
 2990
 3000DEF PROCcheck_config
 3010in%=OPENIN "<RunGame$Dir>.Config"
 3020REM If there is no "Config" file then use these defaults
 3030delay = 3
 3040screen_delay = 5
 3050xcoord1 = 540
 3060ycoord1 = 500
 3070xcoord2 = 520
 3080ycoord2 = 500
 3090show$="ALWAYS"
 3100save$ = "YES"
 3110key$= "YyNn"
 3120maxhi = 5
 3130scrnload$="FAST"
 3140play_tune$ = ""
 3150stop_tune$ = "AFTER LOADING"
 3160REM Some mode dependent stuff
 3170CASE mode OF
 3180WHEN 12:
 3190hsx     = 360
 3200hsy     = 400
 3210slab_colour = 2
 3220hilite = 1
 3230lolite = 6
 3240inset = 2
 3250line = 7
 3260WHEN 13:
 3270hsx     = 130
 3280hsy     = 400
 3290slab_colour = 42
 3300hilite = 63
 3310lolite = 21
 3320inset = 0
 3330line = 0
 3340ENDCASE
 3350
 3360IF in%<>0 THEN
 3370WHILE NOT EOF#in%
 3380  line$=GET$#in%
 3390  REM Ignore any comment or blank lines
 3400  IF LEFT$(line$,1)<>";" AND line$<>"" THEN
 3410    Q%=INSTR(line$,":")
 3420    label$=LEFT$(line$,Q%-1)
 3430    Q%+=1
 3440    WHILE MID$(line$,Q%,1)=" ":Q%+=1:ENDWHILE
 3450      value$=MID$(line$,Q%)
 3460      value = VAL(value$)
 3470      CASE label$ OF
 3480        WHEN "Delay"
 3490          delay = value
 3500        WHEN "Game over X"
 3510          xcoord1 = value
 3520        WHEN "Game over Y"
 3530          ycoord1 = value
 3540        WHEN "Play again X"
 3550          xcoord2 = value
 3560        WHEN "Play again Y"
 3570          ycoord2 = value
 3580        WHEN "Table X"
 3590          hsx = value
 3600        WHEN "Table Y"
 3610          hsy = value
 3620        WHEN "Keys"
 3630          key$ = value$
 3640        WHEN "Table colour"
 3650          slab_colour= value
 3660        WHEN "Inset colour"
 3670          inset = value
 3680        WHEN "Show table"
 3690          show$ = value$
 3700        WHEN "Save table"
 3710          save$=value$
 3720        WHEN "Table size"
 3730          maxhi = value
 3740          IF maxhi > 16 THEN maxhi =16
 3750        WHEN "Load screen"
 3760          scrnload$ = value$
 3770        WHEN "Screen delay"
 3780          screen_delay = value
 3790        WHEN "Loading tune"
 3800          play_tune$ = value$
 3810        WHEN "Stop music"
 3820          stop_tune$ = value$
 3830      ENDCASE
 3840  ENDIF
 3850ENDWHILE
 3860CLOSE#in%
 3870ENDIF
 3880ENDPROC
 3890
 3900
 3910DEF PROCload_sounds(dir$)
 3920LOCAL item,voice
 3930DIM infobuffer 512,pathname 256
 3940item = 0:voice=16
 3950$pathname=dir$+"."
 3960
 3970REM Remove any existing voices first
 3980FOR I%=16 TO 31
 3990  SYS "ExS_Remove",I%
 4000NEXT
 4010
 4020REM Count how many files are in the given directory
 4030
 4040SYS "OS_FSControl",28,dir$,,0 TO ,,,files
 4050
 4060IF files>0 THEN
 4070
 4080WHILE item <> -1
 4090  J%=LEN dir$+1
 4100
 4110  REM Read name of next 'item'
 4120
 4130  SYS "OS_GBPB",9,dir$,infobuffer,1,item,512,0 TO ,,,,item
 4140
 4150  I%=0
 4160
 4170  WHILE infobuffer?I% >0
 4180    pathname?J% = infobuffer?I%
 4190    I%+=1:J%+=1
 4200  ENDWHILE
 4210
 4220  pathname?J% = 13
 4230  SYS "ExS_Install",voice,pathname :REM Load and Install the sound
 4240  voice+=1
 4250ENDWHILE
 4260
 4270ENDIF
 4280ENDPROC
 4290
 4300
 4310DEF PROCassemble(org,pass)
 4320P%=org:O%=org
 4330[OPT pass
 4340.jump_table
 4350
 4360\The entries in this jump table must be in the same order as the
 4370\corresponding 'action' in the Creator "Keywords" file
 4380
 4390._activate_object    b dummy
 4400._deactivate_object  b dummy
 4410._show_object        b dummy
 4420._hide_object        b dummy
 4430._swop_objects       b dummy
 4440._set_coords         b dummy
 4450._shift_object       b dummy
 4460._copy_coords        b dummy
 4470._reverse_vertical   b dummy
 4480._reverse_horizontal b dummy
 4490._set_Xvelocity      b dummy
 4500._set_Yvelocity      b dummy
 4510._attach_to_path     b dummy
 4520._load_screen        b dummy
 4530._scroll_h           b dummy
 4540._scroll_v           b dummy
 4550._put_var            b dummy
 4560._add_var            b dummy
 4570._subtract_var       b dummy
 4580._make_sound         b dummy
 4590._wait               b dummy
 4600._sound_off          b dummy
 4610._sound_on           b dummy
 4620._copy_var           b dummy
 4630._multiply_var       b dummy
 4640._divide_var         b dummy
 4650._print_var          b dummy
 4660._display_var        b dummy
 4670._text_colour        b dummy
 4680._text_bgdcol        b dummy
 4690._initialise         b dummy
 4700._getdata            b dummy
 4710._display            b dummy
 4720._event_handler      b dummy
 4730._stars_off          b dummy
 4740._stars_left         b dummy
 4750._stars_right        b dummy
 4760._set_sequence_cnt   b dummy
 4770._convert_to_number  b dummy
 4780._print_number       b dummy
 4790._overlap            b dummy
 4800._get_entry_size     b dummy
 4810._get_header_size    b dummy
 4820._get_object_ptr     b dummy
 4830._get_bounding_box   b dummy
 4840._get_coords         b dummy
 4850._get_velocities     b dummy
 4860._set_velocities     b dummy
 4870._check_if_active    b dummy
 4880._check_ignore       b dummy
 4890._check_if_visible   b dummy
 4900._get_object_flags   b dummy
 4910]
 4920
 4930FOR I%=1 TO 200
 4940[OPT pass
 4950b dummy
 4960]
 4970NEXT
 4980[OPT pass
 4990.dummy
 5000mov pc,r14
 5010]
 5020ENDPROC
 5030
 5040DEF PROCread_tunes(name$,tune$(),RETURN I%)
 5050LOCAL chn%,ptr,chr$
 5060I%=0
 5070chn%=OPENIN(name$)
 5080IF chn%<>0 THEN
 5090  WHILE NOT EOF#chn%
 5100    tune$(I%)=""
 5110    IF EOF#chn% CLOSE#chn%:ENDPROC
 5120    chr%=BGET#chn%
 5130    WHILE chr%>31
 5140      chr$=CHR$(chr%)
 5150      tune$(I%)+=chr$
 5160      IF EOF#chn% I%+=1:CLOSE#chn%:ENDPROC
 5170      chr%=BGET#chn%
 5180    ENDWHILE
 5190    I%+=1
 5200    IF I%=max_tunes ERROR 1,"Too many tunes in 'Tunes' file"
 5210  ENDWHILE
 5220  CLOSE#chn%
 5230ENDIF
 5240ENDPROC
 5250
 5260DEF PROCend_of_game(delay,sprite$,X,Y)
 5270LOCAL time,width,height,right,top
 5280IF delay=-2 THEN ENDPROC:REM Don't show it
 5290SYS "OS_SpriteOp",256+40,sprite_area2,sprite$ TO ,,,width,height
 5300width  = width << XEig
 5310height = height << YEig
 5320right = X + width
 5330top   = Y + height
 5340SYS "OS_SpriteOp",256+16,sprite_area2,"temp",0,X,Y,right,top
 5350SYS "OS_SpriteOp",256+34,sprite_area2,sprite$,X,Y,8
 5360time=TIME
 5370IF delay=-1 THEN time=GET ELSE REPEAT UNTIL TIME>time+delay*100
 5380SYS "OS_SpriteOp",256+34,sprite_area2,"temp",X,Y,8
 5390ENDPROC
 5400
 5410DEF FNanother(sprite$,X,Y,key$)
 5420LOCAL Answer,width,height,right,top
 5430
 5440SYS "OS_SpriteOp",256+40,sprite_area2,sprite$ TO ,,,width,height
 5450width  = width << XEig
 5460height = height << YEig
 5470right = X + width
 5480top   = Y + height
 5490SYS "OS_SpriteOp",256+16,sprite_area2,"temp",0,X,Y,right,top
 5500SYS "OS_SpriteOp",256+34,sprite_area2,sprite$,X,Y,8
 5510
 5520OSCLI("FX 15,0")
 5530REPEAT
 5540  Answer=INSTR(key$,GET$)
 5550UNTIL Answer>0
 5560SYS "OS_SpriteOp",256+34,sprite_area2,"temp",X,Y,8
 5570IF Answer<3 THEN =TRUE ELSE =FALSE
 5580
 5590DEF PROChighscore(score)
 5600LOCAL I%,J%,T$,newhigh,name$,hsw,hsh
 5610IF show$="NEVER" THEN ENDPROC
 5620
 5630J%=maxhi:newhigh=FALSE
 5640WHILE score>score(J%) AND J%>0
 5650  newhigh=TRUE
 5660  J%-=1
 5670ENDWHILE
 5680IF NOT newhigh AND show$="NEWSCORE" THEN ENDPROC
 5690
 5700SYS "OS_SpriteOp",256+40,sprite_area2,hs_sprite$ TO ,,,hswidth,hsheight
 5710hswidth  = hswidth << XEig
 5720hsheight = hsheight << YEig
 5730hsw=maxlen*width+maxdigits*width+3*width+48+24
 5740hsh=maxhi*2*height+24+hsheight
 5750
 5760PROCslab(hsx,hsy,hsw,hsh,16,hilite,slab_colour,lolite,line)
 5770SYS "OS_SpriteOp",256+34,sprite_area2,hs_sprite$,hsx+(hsw-hswidth)/2,hsy+hsh-hsheight-16,8
 5780
 5790FOR I%=0 TO maxhi-1
 5800  PROCslab(hsx+24,hsy+24+I%*2*height,width*3,height+16,4,lolite,inset,hilite,line)
 5810  T$=STR$(maxhi-I%)
 5820  PROCfancy_print(T$,hsx+24+(3-LENT$)*width/2,hsy+24+I%*2*height+8,1,1,1,1)
 5830  PROCslab(hsx+24+width*3+12,hsy+24+I%*2*height,maxlen*width,height+16,4,lolite,inset,hilite,line)
 5840  PROCfancy_print(name$(maxhi-I%),hsx+24+width*3+20,hsy+24+I%*2*height+8,1,1,1,1)
 5850  PROCslab(hsx+24+width*3+20+maxlen*width,hsy+24+I%*2*height,maxdigits*width,height+16,4,lolite,inset,hilite,line)
 5860  PROCfancy_print(STR$(score(maxhi-I%)),hsx+24+width*3+28+maxlen*width,hsy+24+I%*2*height+8,1,1,1,1)
 5870NEXT
 5880IF newhigh THEN
 5890  J%+=1
 5900  FOR I%=maxhi TO J%+1 STEP -1
 5910    name$(I%)=name$(I%-1)
 5920    score(I%)=score(I%-1)
 5930    PROCfancy_print(name$(I%),hsx+24+width*3+20,hsy+24+(maxhi-I%)*2*height+8,1,1,1,1)
 5940    PROCfancy_print(STR$(score(I%)),hsx+24+width*3+28+maxlen*width,hsy+24+(maxhi-I%)*2*height+8,1,1,1,1)
 5950  NEXT
 5960  PROCfancy_print(STRING$(maxlen-1," "),hsx+24+width*3+20,hsy+24+(maxhi-J%)*2*height+8,1,1,1,1)
 5970  PROCfancy_print(STR$(score),hsx+24+width*3+28+maxlen*width,hsy+24+(maxhi-J%)*2*height+8,1,1,1,1)
 5980  name$=FNinput_name(hsx+24+width*3+20,hsy+24+(maxhi-J%)*2*height+8)
 5990  name$(J%)=LEFT$(name$+STRING$(maxlen," "),maxlen-1)
 6000  score(J%)=score
 6010  PROCfancy_print(name$(J%),hsx+24+width*3+20,hsy+24+(maxhi-J%)*2*height+8,1,1,1,1)
 6020ENDIF
 6030ENDPROC
 6040
 6050DEF FNinput_name(X,Y)
 6060LOCAL chr,I%,name$,dummy
 6070*FX21,0
 6080*FX4,1
 6090PROCfancy_print("_",X,Y,1,1,1,1)
 6100chr=GET
 6110WHILE chr<>13 AND I%<(maxlen-1)
 6120  IF chr<127 THEN
 6130  name$+=CHR$(chr):I%+=1
 6140  PROCfancy_print(CHR$(chr),X,Y,1,1,1,1)
 6150  IF I%<(maxlen-1) PROCfancy_print("_",X+width,Y,1,1,1,1)
 6160  X+=width
 6170  ELSE
 6180  IF chr=127 AND I%>0 THEN
 6190    PROCfancy_print(" ",X,Y,1,1,1,1)
 6200    I%-=1
 6210    X-=width
 6220    PROCfancy_print("_",X,Y,1,1,1,1)
 6230    name$=LEFT$(name$,I%)
 6240  ENDIF
 6250  ENDIF
 6260  chr=GET
 6270ENDWHILE
 6280*FX4,0
 6290=name$
 6300
 6310DEF PROCfancy_print(text$,X,Y,Xmult,Ymult,Xdiv,Ydiv)
 6320LOCAL I%,ch$,initX
 6330initX=X
 6340DIM scale 16
 6350scale!0=Xmult:scale!4=Ymult:scale!8=Xdiv:scale!12=Ydiv
 6360FOR I%=1 TO LEN text$
 6370  ch$=STR$(ASC(MID$(text$,I%,1)))
 6380  REM Use | as a newline marker
 6390  IF ch$="126" THEN ch$="32":REM Replace ~ with space
 6400  IF ch$="124" THEN
 6410    REM The 'newline' character |
 6420    Y-=height*Ymult DIV Ydiv
 6430    X=initX
 6440  ELSE
 6450    SYS "OS_SpriteOp",256+52,alphabet,ch$,X,Y,8,scale,0
 6460    X+=width*Xmult DIV Xdiv
 6470  ENDIF
 6480NEXT
 6490ENDPROC
 6500
 6510DEF PROCslab(x,y,l,h,w,c1,c2,c3,c4)
 6520GCOLc1
 6530RECTANGLE FILL x,y,l,h
 6540GCOL c3
 6550MOVE x+l-w,y+h-w:MOVE x+l,y+h
 6560PLOT85,x+l,y+h-w
 6570RECTANGLE FILL x+w,y,l-w,h-w
 6580MOVE x,y:MOVE x+w,y:PLOT 85,x+w,y+w
 6590GCOL c4
 6600LINE x,y+h,x+w,y+h-w
 6610LINE x+l,y,x+l-w,y+w
 6620GCOL c2
 6630RECTANGLE FILL x+w,y+w,l-2*w,h-2*w
 6640ENDPROC
 6650
 6660DEF PROCsort_highscores(num)
 6670LOCAL I%,swop
 6680REPEAT
 6690  swop=FALSE
 6700  FOR I%=1 TO num-1
 6710    IF score(I%) < score(I%+1) THEN
 6720      swop=TRUE
 6730      SWAP score(I%),score(I%+1)
 6740      SWAP name$(I%),name$(I%+1)
 6750    ENDIF
 6760  NEXT
 6770  num-=1
 6780UNTIL NOT swop
 6790ENDPROC
 6800
 6810DEF PROCsave_highscores(file$)
 6820LOCAL out%,I%,header$,date$,year$
 6830
 6840DIM OSbuffer 32
 6850
 6860LOCAL ERROR:ON ERROR LOCAL IF ERR=&108C9 OR ERR=&108CA PROCfancy_print("  Couldn't save HighScore Table.  |  Please move write-protect tab   |to 'write' position and hit RETURN",80,300,1,1,1,1):dummy=GET ELSE PRINTREPORT$;" (Error code: ";~ERR;")":dummy=GET:ENDPROC
 6870
 6880SYS "XOS_ReadVarVal","Sys$Date",OSbuffer,30
 6890OSbuffer?10=13
 6900date$=$OSbuffer
 6910SYS "XOS_ReadVarVal","Sys$Year",OSbuffer,30
 6920OSbuffer?4=13
 6930year$=$OSbuffer
 6940
 6950out%=OPENOUT file$
 6960header$="; Creator high score table ("+date$+" "+year$+")"
 6970BPUT#out%,header$
 6980FOR I%=1 TO maxhi
 6990  BPUT#out%,name$(I%)+": "+STR$(score(I%))
 7000NEXT
 7010CLOSE#out%
 7020OSCLI("SetType "+file$+" Text")
 7030ENDPROC
 7040

� >!RunImage
.� With 'highscore' and 'replay game' mods.

(=� *******************************************************
2=� *   � 1990 Philip Hawthorne/Alpine Software           *
<=� *   For use only with Creator-designed games          *
F=� *******************************************************
P
Zv� � �12:�("SHUT"):� �<>17 �"Creator run-time error: ";:�:�" (Error code: ";�;"/";�;")":� � �"SNEW":�12:�"Bye...":�
d
n
� 15:�
x
�H�find_mode:� Peek at 'GameData' file to see what mode they are using
�7�check_config:� Read "Config" file, if there is one
�
�>data_size = 128*1024 :� Allow 128 Kbytes for the game data
�� object_space data_size
�
�<ș "OS_File",5,"<RunGame$Dir>.Title" � title,,,,scrnsize
�#� title<>0 � screen_delay<>-2 �
�
�� mode:�
�/ș "OS_ReadModeVariable",mode,3 � ,,NColour
�
�� NColour < 63 �
)in%=�("<RunGame$Dir>.!Palette"):�#in%
0� in%<>0 � �("PRINT <RunGame$Dir>.!Palette")
�
"
,5  � scrnload$="FAST" � (scrnsize+16)<=data_size �
6K    !object_space=data_size:� Use object_space as temporary sprite area
@    object_space!4=0
J    object_space!8=16
T    object_space!12=16
^B    ș "OS_SpriteOp",10+256,object_space,"<RunGame$Dir>.Title"
h>    ș "OS_SpriteOp",52+256,object_space,"title",0,0,8,0,0
r  �
|,    � ("SCREENLOAD <RunGame$Dir>.Title")
�  �
��
�
�
�
�
�
�
�?�init             :� Basic setting up, loading sprites etc.
�
�� filename 255
�%� Set up the starfield data block
�:� starsX num_stars*4,starsY num_stars,starsV num_stars

� I%=0 � num_stars-1

  N%=4*I%
&  starsX!N% = �(319)
0�
:� I%=0 � num_stars-1
D  starsY?I% = �(254)
N  starsV?I% = �(4)
X�
b
l � Find size of Alphabet file
v
�?ș "OS_File",5,"<RunGame$Dir>.Alphabet" � ftype,,,,alphalen
�&� ftype=0 � 252,"No Alphabet file"
�
�-� Reserve space for character set sprites
�
�Falphalen+=16:� alphabet alphalen,alpha_info 32,character_ptrs 95*4
�
�>� Initialise the alphabet sprite area and load the sprites
�
�@!alphabet=alphalen:alphabet!4=0:alphabet!8=16:alphabet!12=16
�=ș "OS_SpriteOp",256+10,alphabet,"<RunGame$Dir>.Alphabet"
�
�1� Read the width and height of the characters

Eș "OS_SpriteOp",256+40,alphabet,"32" � ,,,width,height,,charmode
0ș "OS_ReadModeVariable",charmode,4 � ,,XEig
 0ș "OS_ReadModeVariable",charmode,5 � ,,YEig
*width = width << XEig
4height = height << YEig
>
H3� Find the addresses of each character's sprite
RI%=0
\� C%=32 � 126
f  C$=�C%
p5  ș "OS_SpriteOp",24+256,alphabet,C$ � ,,address
z  I%!character_ptrs=address
�  I%+=4
��
�
�G� ---------- Set up information block for alphabet ----------------
�#� Word#0 = alphabet sprite area
�C� Word#1 = character lookup table (ASC"char" - ASC" " -> index)
�� Word#2 = character width
�� Word#3 = character height
�
�!alpha_info=alphabet
�alpha_info!4=character_ptrs
�alpha_info!8=width
�alpha_info!12=height

F� ----------- Set up information block for stars -----------------
"� Word#0 = stars X coord table
$"� Word#1 = stars Y coord table
.#� Word#2 = stars Velocity table
80� Word#3 = number of stars to plot (default)
B
L� stars_info 32
V!stars_info = starsX
`stars_info!4=starsY
jstars_info!8=starsV
t3stars_info!12=120    :� Default number of stars
~
�G� ------------- Get tune names from 'Tunes' file ------------------
�A� tune_names 24*max_tunes,name_ptrs max_tunes*4,tunes_info 32
�
�8�read_tunes("<RunGame$Dir>.Tunes",tune$(),num_tunes)
�ptr=0:dir$="<Sounds$Dir>."
�
�� I%=0 � num_tunes-1
�+  $(tune_names+ptr)=dir$+tune$(I%)+�(0)
�&  !(name_ptrs+4*I%)=tune_names+ptr
�!  ptr+=�(tune$(I%))+1+�(dir$)
��
�
H� ------------- Set up information block for tunes -----------------

� Word#0 = number of tunes
&� Word#1 = ptr to tune names table
.� Word#2 = ptr to table of tune name ptrs!
(
2H!tunes_info=num_tunes:tunes_info!4=tune_names:tunes_info!8=name_ptrs
<
FH� ------ Set up register variables and initialise the system -------
P&A%=work%         :� Some workspace
Z#B%=sprite_area   :� Sprite area
d2C%=object_space  :� Storage for all other data
n"D%=stars_info    :� Stars data
x%E%=alpha_info    :� Alphabet data
�"F%=tunes_info    :� Tunes info
�/� _initialise :� Get Creator ready to start
�
�4H%=work%         :� Don't change H% from now on!
�highscore=score(1)
�
�� title<>0 �
�7  � screen_delay = -1 � A=� � A=�(screen_delay*100)
��
�
�,� stop_tune$ = "AFTER LOADING" � �"SNEW"
�
�
�
D$filename = "<RunGame$Dir>.GameData" :� Filename of data to load
9A%=filename                          :� R0-> filename
"6� _getdata                        :� Load the data
,
6
@+var_table=H%!40:var_table!8 = highscore
J
T1A%=sprite_area      :� Pointer to sprite area
^0H%=work%            :� Pointer to work space
h2�=0              :� Get ready to time the game
rHframes=� _display :� Run the game, return number of frames displayed
|
�+time=�/100       :� The total game time
�starting = �
�
�Lhighscore = var_table!8:� Read 'highscore' from Creator's variable table
�Iscore     = var_table!4:� and copy Creator's 'score' variable as well
�
�9� If Left-hand Alt key is pressed give the frame rate
�
�*� �(-6) � frames/time;" frames/second"
�
�L� - Find what mode the game was running in and select suitable sprites -
�
mode=�
�,ș "OS_ReadModeVariable",mode,4 � ,,XEig
,ș "OS_ReadModeVariable",mode,5 � ,,YEig
!go_sprite$="gameover"+�(mode)
"pa_sprite$="playagain"+�(mode)
&"hs_sprite$="highscore"+�(mode)
0�
:
DE� ------------- Display the "Game Over" sprite ------------------
N:� 'delay' is the time in seconds to display the sprite
X@� xcoord1,ycoord1 are the coords where it is to be displayed
b
l2�end_of_game(delay,go_sprite$,xcoord1,ycoord1)
v
��highscore(score)
�
�J� Now display the "Play Again" sprite and wait until Y or N is pressed
�H� xcoord2,ycoord2 are the coords where the sprite is to be displayed
�K� key$: keys to check eg "YyNn" in English or "JjNn" in German or Dutch
�
�1� �another(pa_sprite$,xcoord2,ycoord2,key$) �
�  � Reload the game sprites
�A  ș "OS_SpriteOp",256+10,sprite_area,"<RunGame$Dir>.Sprites"
�  another=�
��
�  another=�
��
� � another

@� save$="YES" � �save_highscores("<RunGame$Dir>.HighScores")
 
*%� stop_tune$ = "AT END" � �"SNEW"
4�12:�"Bye..."
>�
H
R
\� �init
f%ș "OS_Byte",161,191 � ,,OldMouse
pnum_stars = 255
z%max_tunes = 16:� tune$(max_tunes)
�
�� Find size of sprite file
�;ș "OS_File",5,"<RunGame$Dir>.Sprites" � ftype,,,,splen
�%� ftype=0 � 255,"No Sprites file"
�
�<� Reserve space for sprites, allowing for 16-byte header
�"splen+= 16:� sprite_area splen
�
�5� Initialise the sprite area and load the sprites
�I!sprite_area=splen:sprite_area!4=0:sprite_area!8=16:sprite_area!12=16
�?ș "OS_SpriteOp",256+10,sprite_area,"<RunGame$Dir>.Sprites"
�
�� Find size of Sprite2 file
	=ș "OS_File",5,"<RunGame$Dir>.Sprites2" � ftype,,,,splen2
	(� ftype=0 � 254,"No 'Sprites2' file"
	
	$<� Reserve space for sprites, allowing for 16-byte header
	.%splen2+= 16:� sprite_area2 splen2
	8
	B6� Initialise the sprite2 area and load the sprites
	LN!sprite_area2=splen2:sprite_area2!4=0:sprite_area2!8=16:sprite_area2!12=16
	VAș "OS_SpriteOp",256+10,sprite_area2,"<RunGame$Dir>.Sprites2"
	`
	j!� Read and install the sounds
	t(�load_sounds("<RunGame$Dir>.Sounds")
	~
	�maxlen=16:maxdigits=10
	�� name$(maxhi),score(maxhi)
	�"name$()="Creator":score()=1000
	�
	�$in%=� "<RunGame$Dir>.HighScores"
	�� in%<>0 �
	�I%=1
	�ȕ � �#in% � I%<=maxhi
	�  line$=�#in%
	�)  � Ignore any comment or blank lines
	�$  � �line$,1)<>";" � line$<>"" �
	�?    � I%>maxhi � � 253,"Too many names in 'HighScore' file"
    Q%=�line$,":")

    name$(I%)=�line$,Q%-1)
3    name$(I%)=�name$(I%)+�maxlen," "),maxlen-1)

    Q%+=1
(#    ȕ �line$,Q%,1)=" ":Q%+=1:�
2    value$=�line$,Q%)
<    score(I%) = �(value$)
F
    I%+=1
P  �
Z�
d	�#in%
n�
x�sort_highscores(maxhi)
�
�4� Find size of ARM code and reserve space for it
�<ș "OS_File",5,"<RunGame$Dir>.FCode" � ftype,,,,codesize
�� code codesize
�
�!� Set up the assembler labels
�� pass = 0 � 2 � 2
��assemble(code,pass)
��
�
�!� Now load in the actual code
�)�("LOAD <RunGame$Dir>.FCode "+�~code)
�
*K.1 EDIT|M
*K.2 RUN|M

"
,
6)� work% 2000:� Reserve some workspace
@�
J
T
^� �find_mode
h� dummy$,I%
r$in% = � "<RunGame$Dir>.GameData"
|,� in%=0 � 252,"GameData file is missing"
�� I%=1 � 7:dummy$=�#in%:�
�mode=�(�#in%)
�	�#in%
��
�
�� �check_config
� in%=� "<RunGame$Dir>.Config"
�:� If there is no "Config" file then use these defaults
�
delay = 3
�screen_delay = 5
�xcoord1 = 540
�ycoord1 = 500
�xcoord2 = 520
ycoord2 = 500
show$="ALWAYS"
save$ = "YES"
&key$= "YyNn"
0
maxhi = 5
:scrnload$="FAST"
Dplay_tune$ = ""
N stop_tune$ = "AFTER LOADING"
X� Some mode dependent stuff
b
Ȏ mode �
l	� 12:
vhsx     = 360
�hsy     = 400
�slab_colour = 2
�hilite = 1
�lolite = 6
�
inset = 2
�line = 7
�	� 13:
�hsx     = 130
�hsy     = 400
�slab_colour = 42
�hilite = 63
�lolite = 21
�
inset = 0

line = 0

�



 � in%<>0 �

*ȕ � �#in%

4  line$=�#in%

>)  � Ignore any comment or blank lines

H$  � �line$,1)<>";" � line$<>"" �

R    Q%=�line$,":")

\    label$=�line$,Q%-1)

f
    Q%+=1

p#    ȕ �line$,Q%,1)=" ":Q%+=1:�

z      value$=�line$,Q%)

�      value = �(value$)

�      Ȏ label$ �

�        � "Delay"

�          delay = value

�        � "Game over X"

�          xcoord1 = value

�        � "Game over Y"

�          ycoord1 = value

�        � "Play again X"

�          xcoord2 = value

�        � "Play again Y"

�          ycoord2 = value

�        � "Table X"
          hsx = value
        � "Table Y"
          hsy = value
$        � "Keys"
.          key$ = value$
8        � "Table colour"
B           slab_colour= value
L        � "Inset colour"
V          inset = value
`        � "Show table"
j          show$ = value$
t        � "Save table"
~          save$=value$
�        � "Table size"
�          maxhi = value
�&          � maxhi > 16 � maxhi =16
�        � "Load screen"
�           scrnload$ = value$
�        � "Screen delay"
�"          screen_delay = value
�        � "Loading tune"
�!          play_tune$ = value$
�        � "Stop music"
�!          stop_tune$ = value$
�      �
  �

�
	�#in%
�
(�
2
<
F� �load_sounds(dir$)
P� item,voice
Z!� infobuffer 512,pathname 256
ditem = 0:voice=16
n$pathname=dir$+"."
x
�&� Remove any existing voices first
�� I%=16 � 31
�  ș "ExS_Remove",I%
��
�
�5� Count how many files are in the given directory
�
�+ș "OS_FSControl",28,dir$,,0 � ,,,files
�
�� files>0 �
�
�ȕ item <> -1
�  J%=� dir$+1

   � Read name of next 'item'

"<  ș "OS_GBPB",9,dir$,infobuffer,1,item,512,0 � ,,,,item
,
6
  I%=0
@
J  ȕ infobuffer?I% >0
T#    pathname?J% = infobuffer?I%
^    I%+=1:J%+=1
h  �
r
|  pathname?J% = 13
�C  ș "ExS_Install",voice,pathname :� Load and Install the sound
�  voice+=1
��
�
��
��
�
�
�� �assemble(org,pass)
�P%=org:O%=org
�
[OPT pass
�.jump_table
�
D\The entries in this jump table must be in the same order as the
:\corresponding 'action' in the Creator "Keywords" file

& ._activate_object    b dummy
0 ._deactivate_object  b dummy
: ._show_object        b dummy
D ._hide_object        b dummy
N ._swop_objects       b dummy
X ._set_coords         b dummy
b ._shift_object       b dummy
l ._copy_coords        b dummy
v ._reverse_vertical   b dummy
� ._reverse_horizontal b dummy
� ._set_Xvelocity      b dummy
� ._set_Yvelocity      b dummy
� ._attach_to_path     b dummy
� ._load_screen        b dummy
� ._scroll_h           b dummy
� ._scroll_v           b dummy
� ._put_var            b dummy
� ._add_var            b dummy
� ._subtract_var       b dummy
� ._make_sound         b dummy
� ._wait               b dummy
� ._sound_off          b dummy
 ._sound_on           b dummy
 ._copy_var           b dummy
 ._multiply_var       b dummy
  ._divide_var         b dummy
* ._print_var          b dummy
4 ._display_var        b dummy
> ._text_colour        b dummy
H ._text_bgdcol        b dummy
R ._initialise         b dummy
\ ._getdata            b dummy
f ._display            b dummy
p ._event_handler      b dummy
z ._stars_off          b dummy
� ._stars_left         b dummy
� ._stars_right        b dummy
� ._set_sequence_cnt   b dummy
� ._convert_to_number  b dummy
� ._print_number       b dummy
� ._overlap            b dummy
� ._get_entry_size     b dummy
� ._get_header_size    b dummy
� ._get_object_ptr     b dummy
� ._get_bounding_box   b dummy
� ._get_coords         b dummy
� ._get_velocities     b dummy
� ._set_velocities     b dummy
 ._check_if_active    b dummy
 ._check_ignore       b dummy
 ._check_if_visible   b dummy
$ ._get_object_flags   b dummy
.]
8
B� I%=1 � 200
L
[OPT pass
Vb dummy
`]
j�
t
[OPT pass
~
.dummy
�mov pc,r14
�]
��
�
�%� �read_tunes(name$,tune$(),� I%)
�� chn%,ptr,chr$
�I%=0
�chn%=�(name$)
�� chn%<>0 �
�  ȕ � �#chn%
�    tune$(I%)=""
�    � �#chn% �#chn%:�
    chr%=�#chn%

    ȕ chr%>31
      chr$=�(chr%)
      tune$(I%)+=chr$
(!      � �#chn% I%+=1:�#chn%:�
2      chr%=�#chn%
<	    �
F
    I%+=1
P;    � I%=max_tunes � 1,"Too many tunes in 'Tunes' file"
Z  �
d  �#chn%
n�
x�
�
�%� �end_of_game(delay,sprite$,X,Y)
�!� time,width,height,right,top
�"� delay=-2 � �:� Don't show it
�Bș "OS_SpriteOp",256+40,sprite_area2,sprite$ � ,,,width,height
�width  = width << XEig
�height = height << YEig
�right = X + width
�top   = Y + height
�?ș "OS_SpriteOp",256+16,sprite_area2,"temp",0,X,Y,right,top
�6ș "OS_SpriteOp",256+34,sprite_area2,sprite$,X,Y,8
�
time=�
�.� delay=-1 � time=� � � � �>time+delay*100
5ș "OS_SpriteOp",256+34,sprite_area2,"temp",X,Y,8
�

" � �another(sprite$,X,Y,key$)
,#� Answer,width,height,right,top
6
@Bș "OS_SpriteOp",256+40,sprite_area2,sprite$ � ,,,width,height
Jwidth  = width << XEig
Theight = height << YEig
^right = X + width
htop   = Y + height
r?ș "OS_SpriteOp",256+16,sprite_area2,"temp",0,X,Y,right,top
|6ș "OS_SpriteOp",256+34,sprite_area2,sprite$,X,Y,8
�
��("FX 15,0")
��
�  Answer=�key$,�)
�� Answer>0
�5ș "OS_SpriteOp",256+34,sprite_area2,"temp",X,Y,8
�� Answer<3 � =� � =�
�
�� �highscore(score)
�$� I%,J%,T$,newhigh,name$,hsw,hsh
�� show$="NEVER" � �
�
�J%=maxhi:newhigh=�
ȕ score>score(J%) � J%>0
  newhigh=�
  J%-=1
&�
0&� � newhigh � show$="NEWSCORE" � �
:
DIș "OS_SpriteOp",256+40,sprite_area2,hs_sprite$ � ,,,hswidth,hsheight
Nhswidth  = hswidth << XEig
Xhsheight = hsheight << YEig
b2hsw=maxlen*width+maxdigits*width+3*width+48+24
l"hsh=maxhi*2*height+24+hsheight
v
�<�slab(hsx,hsy,hsw,hsh,16,hilite,slab_colour,lolite,line)
�]ș "OS_SpriteOp",256+34,sprite_area2,hs_sprite$,hsx+(hsw-hswidth)/2,hsy+hsh-hsheight-16,8
�
�� I%=0 � maxhi-1
�S  �slab(hsx+24,hsy+24+I%*2*height,width*3,height+16,4,lolite,inset,hilite,line)
�  T$=�(maxhi-I%)
�J  �fancy_print(T$,hsx+24+(3-�T$)*width/2,hsy+24+I%*2*height+8,1,1,1,1)
�c  �slab(hsx+24+width*3+12,hsy+24+I%*2*height,maxlen*width,height+16,4,lolite,inset,hilite,line)
�R  �fancy_print(name$(maxhi-I%),hsx+24+width*3+20,hsy+24+I%*2*height+8,1,1,1,1)
�s  �slab(hsx+24+width*3+20+maxlen*width,hsy+24+I%*2*height,maxdigits*width,height+16,4,lolite,inset,hilite,line)
�b  �fancy_print(�(score(maxhi-I%)),hsx+24+width*3+28+maxlen*width,hsy+24+I%*2*height+8,1,1,1,1)
��
�� newhigh �
  J%+=1
  � I%=maxhi � J%+1 � -1
    name$(I%)=name$(I%-1)
     score(I%)=score(I%-1)
*V    �fancy_print(name$(I%),hsx+24+width*3+20,hsy+24+(maxhi-I%)*2*height+8,1,1,1,1)
4f    �fancy_print(�(score(I%)),hsx+24+width*3+28+maxlen*width,hsy+24+(maxhi-I%)*2*height+8,1,1,1,1)
>  �
HY  �fancy_print(�maxlen-1," "),hsx+24+width*3+20,hsy+24+(maxhi-J%)*2*height+8,1,1,1,1)
R`  �fancy_print(�(score),hsx+24+width*3+28+maxlen*width,hsy+24+(maxhi-J%)*2*height+8,1,1,1,1)
\G  name$=�input_name(hsx+24+width*3+20,hsy+24+(maxhi-J%)*2*height+8)
f-  name$(J%)=�name$+�maxlen," "),maxlen-1)
p  score(J%)=score
zT  �fancy_print(name$(J%),hsx+24+width*3+20,hsy+24+(maxhi-J%)*2*height+8,1,1,1,1)
��
��
�
�� �input_name(X,Y)
�� chr,I%,name$,dummy
�*FX21,0
�
*FX4,1
�!�fancy_print("_",X,Y,1,1,1,1)
�	chr=�
�ȕ chr<>13 � I%<(maxlen-1)
�  � chr<127 �
�  name$+=�(chr):I%+=1
�&  �fancy_print(�(chr),X,Y,1,1,1,1)
9  � I%<(maxlen-1) �fancy_print("_",X+width,Y,1,1,1,1)
  X+=width
  �
$  � chr=127 � I%>0 �
.%    �fancy_print(" ",X,Y,1,1,1,1)
8
    I%-=1
B    X-=width
L%    �fancy_print("_",X,Y,1,1,1,1)
V    name$=�name$,I%)
`  �
j  �
t  chr=�
~�
�
*FX4,0
�
=name$
�
�3� �fancy_print(text$,X,Y,Xmult,Ymult,Xdiv,Ydiv)
�� I%,ch$,initX
�initX=X
�� scale 16
�:scale!0=Xmult:scale!4=Ymult:scale!8=Xdiv:scale!12=Ydiv
�� I%=1 � � text$
�  ch$=�(�(�text$,I%,1)))
�!  � Use | as a newline marker
�3  � ch$="126" � ch$="32":� Replace ~ with space
  � ch$="124" �

#    � The 'newline' character |
    Y-=height*Ymult � Ydiv
    X=initX
(  �
2:    ș "OS_SpriteOp",256+52,alphabet,ch$,X,Y,8,scale,0
<    X+=width*Xmult � Xdiv
F  �
P�
Z�
d
n"� �slab(x,y,l,h,w,c1,c2,c3,c4)
x�c1
�ȓ Ȑ x,y,l,h
�� c3
�� x+l-w,y+h-w:� x+l,y+h
��85,x+l,y+h-w
�ȓ Ȑ x+w,y,l-w,h-w
�� x,y:� x+w,y:� 85,x+w,y+w
�� c4
�� x,y+h,x+w,y+h-w
�� x+l,y,x+l-w,y+w
�� c2
�ȓ Ȑ x+w,y+w,l-2*w,h-2*w
��
�
� �sort_highscores(num)

� I%,swop
�
"  swop=�
,  � I%=1 � num-1
6#    � score(I%) < score(I%+1) �
@      swop=�
J"      Ȕ score(I%),score(I%+1)
T"      Ȕ name$(I%),name$(I%+1)
^	    �
h  �
r  num-=1
|� � swop
��
�
�� �save_highscores(file$)
�!� out%,I%,header$,date$,year$
�
�� OSbuffer 32
�
��� �:� � � � �=&108C9 � �=&108CA �fancy_print("  Couldn't save HighScore Table.  |  Please move write-protect tab   |to 'write' position and hit RETURN",80,300,1,1,1,1):dummy=� � �$;" (Error code: ";~�;")":dummy=�:�
�
�.ș "XOS_ReadVarVal","Sys$Date",OSbuffer,30
�OSbuffer?10=13
�date$=$OSbuffer
�.ș "XOS_ReadVarVal","Sys$Year",OSbuffer,30
OSbuffer?4=13
year$=$OSbuffer

&out%=� file$
0>header$="; Creator high score table ("+date$+" "+year$+")"
:�#out%,header$
D� I%=1 � maxhi
N(  �#out%,name$(I%)+": "+�(score(I%))
X�
b
�#out%
l�("SetType "+file$+" Text")
v�
�
�
00000000  0d 00 0a 10 f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  0d 00 14 2e f4 20 57 69  74 68 20 27 68 69 67 68  |..... With 'high|
00000020  73 63 6f 72 65 27 20 61  6e 64 20 27 72 65 70 6c  |score' and 'repl|
00000030  61 79 20 67 61 6d 65 27  20 6d 6f 64 73 2e 0d 00  |ay game' mods...|
00000040  1e 04 0d 00 28 3d f4 20  2a 2a 2a 2a 2a 2a 2a 2a  |....(=. ********|
00000050  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000070  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 0d  |***************.|
00000080  00 32 3d f4 20 2a 20 20  20 a9 20 31 39 39 30 20  |.2=. *   . 1990 |
00000090  50 68 69 6c 69 70 20 48  61 77 74 68 6f 72 6e 65  |Philip Hawthorne|
000000a0  2f 41 6c 70 69 6e 65 20  53 6f 66 74 77 61 72 65  |/Alpine Software|
000000b0  20 20 20 20 20 20 20 20  20 20 20 2a 0d 00 3c 3d  |           *..<=|
000000c0  f4 20 2a 20 20 20 46 6f  72 20 75 73 65 20 6f 6e  |. *   For use on|
000000d0  6c 79 20 77 69 74 68 20  43 72 65 61 74 6f 72 2d  |ly with Creator-|
000000e0  64 65 73 69 67 6e 65 64  20 67 61 6d 65 73 20 20  |designed games  |
000000f0  20 20 20 20 20 20 20 20  2a 0d 00 46 3d f4 20 2a  |        *..F=. *|
00000100  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000130  2a 2a 2a 2a 2a 2a 0d 00  50 04 0d 00 5a 76 ee 20  |******..P...Zv. |
00000140  85 20 eb 31 32 3a ff 28  22 53 48 55 54 22 29 3a  |. .12:.("SHUT"):|
00000150  e7 20 9f 3c 3e 31 37 20  f1 22 43 72 65 61 74 6f  |. .<>17 ."Creato|
00000160  72 20 72 75 6e 2d 74 69  6d 65 20 65 72 72 6f 72  |r run-time error|
00000170  3a 20 22 3b 3a f6 3a f1  22 20 28 45 72 72 6f 72  |: ";:.:." (Error|
00000180  20 63 6f 64 65 3a 20 22  3b 9f 3b 22 2f 22 3b 9e  | code: ";.;"/";.|
00000190  3b 22 29 22 3a e0 20 8b  20 ff 22 53 4e 45 57 22  |;")":. . ."SNEW"|
000001a0  3a eb 31 32 3a f1 22 42  79 65 2e 2e 2e 22 3a e0  |:.12:."Bye...":.|
000001b0  0d 00 64 04 0d 00 6e 0a  eb 20 31 35 3a 87 0d 00  |..d...n.. 15:...|
000001c0  78 04 0d 00 82 48 f2 66  69 6e 64 5f 6d 6f 64 65  |x....H.find_mode|
000001d0  3a f4 20 50 65 65 6b 20  61 74 20 27 47 61 6d 65  |:. Peek at 'Game|
000001e0  44 61 74 61 27 20 66 69  6c 65 20 74 6f 20 73 65  |Data' file to se|
000001f0  65 20 77 68 61 74 20 6d  6f 64 65 20 74 68 65 79  |e what mode they|
00000200  20 61 72 65 20 75 73 69  6e 67 0d 00 8c 37 f2 63  | are using...7.c|
00000210  68 65 63 6b 5f 63 6f 6e  66 69 67 3a f4 20 52 65  |heck_config:. Re|
00000220  61 64 20 22 43 6f 6e 66  69 67 22 20 66 69 6c 65  |ad "Config" file|
00000230  2c 20 69 66 20 74 68 65  72 65 20 69 73 20 6f 6e  |, if there is on|
00000240  65 0d 00 96 04 0d 00 a0  3e 64 61 74 61 5f 73 69  |e.......>data_si|
00000250  7a 65 20 3d 20 31 32 38  2a 31 30 32 34 20 3a f4  |ze = 128*1024 :.|
00000260  20 41 6c 6c 6f 77 20 31  32 38 20 4b 62 79 74 65  | Allow 128 Kbyte|
00000270  73 20 66 6f 72 20 74 68  65 20 67 61 6d 65 20 64  |s for the game d|
00000280  61 74 61 0d 00 aa 1c de  20 6f 62 6a 65 63 74 5f  |ata..... object_|
00000290  73 70 61 63 65 20 64 61  74 61 5f 73 69 7a 65 0d  |space data_size.|
000002a0  00 b4 04 0d 00 be 3c c8  99 20 22 4f 53 5f 46 69  |......<.. "OS_Fi|
000002b0  6c 65 22 2c 35 2c 22 3c  52 75 6e 47 61 6d 65 24  |le",5,"<RunGame$|
000002c0  44 69 72 3e 2e 54 69 74  6c 65 22 20 b8 20 74 69  |Dir>.Title" . ti|
000002d0  74 6c 65 2c 2c 2c 2c 73  63 72 6e 73 69 7a 65 0d  |tle,,,,scrnsize.|
000002e0  00 c8 23 e7 20 74 69 74  6c 65 3c 3e 30 20 80 20  |..#. title<>0 . |
000002f0  73 63 72 65 65 6e 5f 64  65 6c 61 79 3c 3e 2d 32  |screen_delay<>-2|
00000300  20 8c 0d 00 d2 04 0d 00  dc 0c eb 20 6d 6f 64 65  | .......... mode|
00000310  3a 87 0d 00 e6 2f c8 99  20 22 4f 53 5f 52 65 61  |:..../.. "OS_Rea|
00000320  64 4d 6f 64 65 56 61 72  69 61 62 6c 65 22 2c 6d  |dModeVariable",m|
00000330  6f 64 65 2c 33 20 b8 20  2c 2c 4e 43 6f 6c 6f 75  |ode,3 . ,,NColou|
00000340  72 0d 00 f0 04 0d 00 fa  14 e7 20 4e 43 6f 6c 6f  |r......... NColo|
00000350  75 72 20 3c 20 36 33 20  8c 0d 01 04 29 69 6e 25  |ur < 63 ....)in%|
00000360  3d 8e 28 22 3c 52 75 6e  47 61 6d 65 24 44 69 72  |=.("<RunGame$Dir|
00000370  3e 2e 21 50 61 6c 65 74  74 65 22 29 3a d9 23 69  |>.!Palette"):.#i|
00000380  6e 25 0d 01 0e 30 e7 20  69 6e 25 3c 3e 30 20 8c  |n%...0. in%<>0 .|
00000390  20 ff 28 22 50 52 49 4e  54 20 3c 52 75 6e 47 61  | .("PRINT <RunGa|
000003a0  6d 65 24 44 69 72 3e 2e  21 50 61 6c 65 74 74 65  |me$Dir>.!Palette|
000003b0  22 29 0d 01 18 05 cd 0d  01 22 04 0d 01 2c 35 20  |")......."...,5 |
000003c0  20 e7 20 73 63 72 6e 6c  6f 61 64 24 3d 22 46 41  | . scrnload$="FA|
000003d0  53 54 22 20 80 20 28 73  63 72 6e 73 69 7a 65 2b  |ST" . (scrnsize+|
000003e0  31 36 29 3c 3d 64 61 74  61 5f 73 69 7a 65 20 8c  |16)<=data_size .|
000003f0  0d 01 36 4b 20 20 20 20  21 6f 62 6a 65 63 74 5f  |..6K    !object_|
00000400  73 70 61 63 65 3d 64 61  74 61 5f 73 69 7a 65 3a  |space=data_size:|
00000410  f4 20 55 73 65 20 6f 62  6a 65 63 74 5f 73 70 61  |. Use object_spa|
00000420  63 65 20 61 73 20 74 65  6d 70 6f 72 61 72 79 20  |ce as temporary |
00000430  73 70 72 69 74 65 20 61  72 65 61 0d 01 40 18 20  |sprite area..@. |
00000440  20 20 20 6f 62 6a 65 63  74 5f 73 70 61 63 65 21  |   object_space!|
00000450  34 3d 30 0d 01 4a 19 20  20 20 20 6f 62 6a 65 63  |4=0..J.    objec|
00000460  74 5f 73 70 61 63 65 21  38 3d 31 36 0d 01 54 1a  |t_space!8=16..T.|
00000470  20 20 20 20 6f 62 6a 65  63 74 5f 73 70 61 63 65  |    object_space|
00000480  21 31 32 3d 31 36 0d 01  5e 42 20 20 20 20 c8 99  |!12=16..^B    ..|
00000490  20 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 31  | "OS_SpriteOp",1|
000004a0  30 2b 32 35 36 2c 6f 62  6a 65 63 74 5f 73 70 61  |0+256,object_spa|
000004b0  63 65 2c 22 3c 52 75 6e  47 61 6d 65 24 44 69 72  |ce,"<RunGame$Dir|
000004c0  3e 2e 54 69 74 6c 65 22  0d 01 68 3e 20 20 20 20  |>.Title"..h>    |
000004d0  c8 99 20 22 4f 53 5f 53  70 72 69 74 65 4f 70 22  |.. "OS_SpriteOp"|
000004e0  2c 35 32 2b 32 35 36 2c  6f 62 6a 65 63 74 5f 73  |,52+256,object_s|
000004f0  70 61 63 65 2c 22 74 69  74 6c 65 22 2c 30 2c 30  |pace,"title",0,0|
00000500  2c 38 2c 30 2c 30 0d 01  72 07 20 20 cc 0d 01 7c  |,8,0,0..r.  ...||
00000510  2c 20 20 20 20 ff 20 28  22 53 43 52 45 45 4e 4c  |,    . ("SCREENL|
00000520  4f 41 44 20 3c 52 75 6e  47 61 6d 65 24 44 69 72  |OAD <RunGame$Dir|
00000530  3e 2e 54 69 74 6c 65 22  29 0d 01 86 07 20 20 cd  |>.Title")....  .|
00000540  0d 01 90 05 cd 0d 01 9a  04 0d 01 a4 04 0d 01 ae  |................|
00000550  04 0d 01 b8 04 0d 01 c2  04 0d 01 cc 04 0d 01 d6  |................|
00000560  3f f2 69 6e 69 74 20 20  20 20 20 20 20 20 20 20  |?.init          |
00000570  20 20 20 3a f4 20 42 61  73 69 63 20 73 65 74 74  |   :. Basic sett|
00000580  69 6e 67 20 75 70 2c 20  6c 6f 61 64 69 6e 67 20  |ing up, loading |
00000590  73 70 72 69 74 65 73 20  65 74 63 2e 0d 01 e0 04  |sprites etc.....|
000005a0  0d 01 ea 12 de 20 66 69  6c 65 6e 61 6d 65 20 32  |..... filename 2|
000005b0  35 35 0d 01 f4 25 f4 20  53 65 74 20 75 70 20 74  |55...%. Set up t|
000005c0  68 65 20 73 74 61 72 66  69 65 6c 64 20 64 61 74  |he starfield dat|
000005d0  61 20 62 6c 6f 63 6b 0d  01 fe 3a de 20 73 74 61  |a block...:. sta|
000005e0  72 73 58 20 6e 75 6d 5f  73 74 61 72 73 2a 34 2c  |rsX num_stars*4,|
000005f0  73 74 61 72 73 59 20 6e  75 6d 5f 73 74 61 72 73  |starsY num_stars|
00000600  2c 73 74 61 72 73 56 20  6e 75 6d 5f 73 74 61 72  |,starsV num_star|
00000610  73 0d 02 08 04 0d 02 12  18 e3 20 49 25 3d 30 20  |s......... I%=0 |
00000620  b8 20 6e 75 6d 5f 73 74  61 72 73 2d 31 0d 02 1c  |. num_stars-1...|
00000630  0d 20 20 4e 25 3d 34 2a  49 25 0d 02 26 18 20 20  |.  N%=4*I%..&.  |
00000640  73 74 61 72 73 58 21 4e  25 20 3d 20 b3 28 33 31  |starsX!N% = .(31|
00000650  39 29 0d 02 30 05 ed 0d  02 3a 18 e3 20 49 25 3d  |9)..0....:.. I%=|
00000660  30 20 b8 20 6e 75 6d 5f  73 74 61 72 73 2d 31 0d  |0 . num_stars-1.|
00000670  02 44 18 20 20 73 74 61  72 73 59 3f 49 25 20 3d  |.D.  starsY?I% =|
00000680  20 b3 28 32 35 34 29 0d  02 4e 16 20 20 73 74 61  | .(254)..N.  sta|
00000690  72 73 56 3f 49 25 20 3d  20 b3 28 34 29 0d 02 58  |rsV?I% = .(4)..X|
000006a0  05 ed 0d 02 62 04 0d 02  6c 20 f4 20 46 69 6e 64  |....b...l . Find|
000006b0  20 73 69 7a 65 20 6f 66  20 41 6c 70 68 61 62 65  | size of Alphabe|
000006c0  74 20 66 69 6c 65 0d 02  76 04 0d 02 80 3f c8 99  |t file..v....?..|
000006d0  20 22 4f 53 5f 46 69 6c  65 22 2c 35 2c 22 3c 52  | "OS_File",5,"<R|
000006e0  75 6e 47 61 6d 65 24 44  69 72 3e 2e 41 6c 70 68  |unGame$Dir>.Alph|
000006f0  61 62 65 74 22 20 b8 20  66 74 79 70 65 2c 2c 2c  |abet" . ftype,,,|
00000700  2c 61 6c 70 68 61 6c 65  6e 0d 02 8a 26 e7 20 66  |,alphalen...&. f|
00000710  74 79 70 65 3d 30 20 85  20 32 35 32 2c 22 4e 6f  |type=0 . 252,"No|
00000720  20 41 6c 70 68 61 62 65  74 20 66 69 6c 65 22 0d  | Alphabet file".|
00000730  02 94 04 0d 02 9e 2d f4  20 52 65 73 65 72 76 65  |......-. Reserve|
00000740  20 73 70 61 63 65 20 66  6f 72 20 63 68 61 72 61  | space for chara|
00000750  63 74 65 72 20 73 65 74  20 73 70 72 69 74 65 73  |cter set sprites|
00000760  0d 02 a8 04 0d 02 b2 46  61 6c 70 68 61 6c 65 6e  |.......Falphalen|
00000770  2b 3d 31 36 3a de 20 61  6c 70 68 61 62 65 74 20  |+=16:. alphabet |
00000780  61 6c 70 68 61 6c 65 6e  2c 61 6c 70 68 61 5f 69  |alphalen,alpha_i|
00000790  6e 66 6f 20 33 32 2c 63  68 61 72 61 63 74 65 72  |nfo 32,character|
000007a0  5f 70 74 72 73 20 39 35  2a 34 0d 02 bc 04 0d 02  |_ptrs 95*4......|
000007b0  c6 3e f4 20 49 6e 69 74  69 61 6c 69 73 65 20 74  |.>. Initialise t|
000007c0  68 65 20 61 6c 70 68 61  62 65 74 20 73 70 72 69  |he alphabet spri|
000007d0  74 65 20 61 72 65 61 20  61 6e 64 20 6c 6f 61 64  |te area and load|
000007e0  20 74 68 65 20 73 70 72  69 74 65 73 0d 02 d0 04  | the sprites....|
000007f0  0d 02 da 40 21 61 6c 70  68 61 62 65 74 3d 61 6c  |...@!alphabet=al|
00000800  70 68 61 6c 65 6e 3a 61  6c 70 68 61 62 65 74 21  |phalen:alphabet!|
00000810  34 3d 30 3a 61 6c 70 68  61 62 65 74 21 38 3d 31  |4=0:alphabet!8=1|
00000820  36 3a 61 6c 70 68 61 62  65 74 21 31 32 3d 31 36  |6:alphabet!12=16|
00000830  0d 02 e4 3d c8 99 20 22  4f 53 5f 53 70 72 69 74  |...=.. "OS_Sprit|
00000840  65 4f 70 22 2c 32 35 36  2b 31 30 2c 61 6c 70 68  |eOp",256+10,alph|
00000850  61 62 65 74 2c 22 3c 52  75 6e 47 61 6d 65 24 44  |abet,"<RunGame$D|
00000860  69 72 3e 2e 41 6c 70 68  61 62 65 74 22 0d 02 ee  |ir>.Alphabet"...|
00000870  04 0d 02 f8 31 f4 20 52  65 61 64 20 74 68 65 20  |....1. Read the |
00000880  77 69 64 74 68 20 61 6e  64 20 68 65 69 67 68 74  |width and height|
00000890  20 6f 66 20 74 68 65 20  63 68 61 72 61 63 74 65  | of the characte|
000008a0  72 73 0d 03 02 04 0d 03  0c 45 c8 99 20 22 4f 53  |rs.......E.. "OS|
000008b0  5f 53 70 72 69 74 65 4f  70 22 2c 32 35 36 2b 34  |_SpriteOp",256+4|
000008c0  30 2c 61 6c 70 68 61 62  65 74 2c 22 33 32 22 20  |0,alphabet,"32" |
000008d0  b8 20 2c 2c 2c 77 69 64  74 68 2c 68 65 69 67 68  |. ,,,width,heigh|
000008e0  74 2c 2c 63 68 61 72 6d  6f 64 65 0d 03 16 30 c8  |t,,charmode...0.|
000008f0  99 20 22 4f 53 5f 52 65  61 64 4d 6f 64 65 56 61  |. "OS_ReadModeVa|
00000900  72 69 61 62 6c 65 22 2c  63 68 61 72 6d 6f 64 65  |riable",charmode|
00000910  2c 34 20 b8 20 2c 2c 58  45 69 67 0d 03 20 30 c8  |,4 . ,,XEig.. 0.|
00000920  99 20 22 4f 53 5f 52 65  61 64 4d 6f 64 65 56 61  |. "OS_ReadModeVa|
00000930  72 69 61 62 6c 65 22 2c  63 68 61 72 6d 6f 64 65  |riable",charmode|
00000940  2c 35 20 b8 20 2c 2c 59  45 69 67 0d 03 2a 19 77  |,5 . ,,YEig..*.w|
00000950  69 64 74 68 20 3d 20 77  69 64 74 68 20 3c 3c 20  |idth = width << |
00000960  58 45 69 67 0d 03 34 1b  68 65 69 67 68 74 20 3d  |XEig..4.height =|
00000970  20 68 65 69 67 68 74 20  3c 3c 20 59 45 69 67 0d  | height << YEig.|
00000980  03 3e 04 0d 03 48 33 f4  20 46 69 6e 64 20 74 68  |.>...H3. Find th|
00000990  65 20 61 64 64 72 65 73  73 65 73 20 6f 66 20 65  |e addresses of e|
000009a0  61 63 68 20 63 68 61 72  61 63 74 65 72 27 73 20  |ach character's |
000009b0  73 70 72 69 74 65 0d 03  52 08 49 25 3d 30 0d 03  |sprite..R.I%=0..|
000009c0  5c 11 e3 20 43 25 3d 33  32 20 b8 20 31 32 36 0d  |\.. C%=32 . 126.|
000009d0  03 66 0c 20 20 43 24 3d  c3 43 25 0d 03 70 35 20  |.f.  C$=.C%..p5 |
000009e0  20 c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  | .. "OS_SpriteOp|
000009f0  22 2c 32 34 2b 32 35 36  2c 61 6c 70 68 61 62 65  |",24+256,alphabe|
00000a00  74 2c 43 24 20 b8 20 2c  2c 61 64 64 72 65 73 73  |t,C$ . ,,address|
00000a10  0d 03 7a 1f 20 20 49 25  21 63 68 61 72 61 63 74  |..z.  I%!charact|
00000a20  65 72 5f 70 74 72 73 3d  61 64 64 72 65 73 73 0d  |er_ptrs=address.|
00000a30  03 84 0b 20 20 49 25 2b  3d 34 0d 03 8e 05 ed 0d  |...  I%+=4......|
00000a40  03 98 04 0d 03 a2 47 f4  20 2d 2d 2d 2d 2d 2d 2d  |......G. -------|
00000a50  2d 2d 2d 20 53 65 74 20  75 70 20 69 6e 66 6f 72  |--- Set up infor|
00000a60  6d 61 74 69 6f 6e 20 62  6c 6f 63 6b 20 66 6f 72  |mation block for|
00000a70  20 61 6c 70 68 61 62 65  74 20 2d 2d 2d 2d 2d 2d  | alphabet ------|
00000a80  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 03 ac 23 f4 20  |----------...#. |
00000a90  57 6f 72 64 23 30 20 3d  20 61 6c 70 68 61 62 65  |Word#0 = alphabe|
00000aa0  74 20 73 70 72 69 74 65  20 61 72 65 61 0d 03 b6  |t sprite area...|
00000ab0  43 f4 20 57 6f 72 64 23  31 20 3d 20 63 68 61 72  |C. Word#1 = char|
00000ac0  61 63 74 65 72 20 6c 6f  6f 6b 75 70 20 74 61 62  |acter lookup tab|
00000ad0  6c 65 20 28 41 53 43 22  63 68 61 72 22 20 2d 20  |le (ASC"char" - |
00000ae0  41 53 43 22 20 22 20 2d  3e 20 69 6e 64 65 78 29  |ASC" " -> index)|
00000af0  0d 03 c0 1e f4 20 57 6f  72 64 23 32 20 3d 20 63  |..... Word#2 = c|
00000b00  68 61 72 61 63 74 65 72  20 77 69 64 74 68 0d 03  |haracter width..|
00000b10  ca 1f f4 20 57 6f 72 64  23 33 20 3d 20 63 68 61  |... Word#3 = cha|
00000b20  72 61 63 74 65 72 20 68  65 69 67 68 74 0d 03 d4  |racter height...|
00000b30  04 0d 03 de 18 21 61 6c  70 68 61 5f 69 6e 66 6f  |.....!alpha_info|
00000b40  3d 61 6c 70 68 61 62 65  74 0d 03 e8 1f 61 6c 70  |=alphabet....alp|
00000b50  68 61 5f 69 6e 66 6f 21  34 3d 63 68 61 72 61 63  |ha_info!4=charac|
00000b60  74 65 72 5f 70 74 72 73  0d 03 f2 16 61 6c 70 68  |ter_ptrs....alph|
00000b70  61 5f 69 6e 66 6f 21 38  3d 77 69 64 74 68 0d 03  |a_info!8=width..|
00000b80  fc 18 61 6c 70 68 61 5f  69 6e 66 6f 21 31 32 3d  |..alpha_info!12=|
00000b90  68 65 69 67 68 74 0d 04  06 04 0d 04 10 46 f4 20  |height.......F. |
00000ba0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 20 53 65 74 20  |----------- Set |
00000bb0  75 70 20 69 6e 66 6f 72  6d 61 74 69 6f 6e 20 62  |up information b|
00000bc0  6c 6f 63 6b 20 66 6f 72  20 73 74 61 72 73 20 2d  |lock for stars -|
00000bd0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000be0  0d 04 1a 22 f4 20 57 6f  72 64 23 30 20 3d 20 73  |...". Word#0 = s|
00000bf0  74 61 72 73 20 58 20 63  6f 6f 72 64 20 74 61 62  |tars X coord tab|
00000c00  6c 65 0d 04 24 22 f4 20  57 6f 72 64 23 31 20 3d  |le..$". Word#1 =|
00000c10  20 73 74 61 72 73 20 59  20 63 6f 6f 72 64 20 74  | stars Y coord t|
00000c20  61 62 6c 65 0d 04 2e 23  f4 20 57 6f 72 64 23 32  |able...#. Word#2|
00000c30  20 3d 20 73 74 61 72 73  20 56 65 6c 6f 63 69 74  | = stars Velocit|
00000c40  79 20 74 61 62 6c 65 0d  04 38 30 f4 20 57 6f 72  |y table..80. Wor|
00000c50  64 23 33 20 3d 20 6e 75  6d 62 65 72 20 6f 66 20  |d#3 = number of |
00000c60  73 74 61 72 73 20 74 6f  20 70 6c 6f 74 20 28 64  |stars to plot (d|
00000c70  65 66 61 75 6c 74 29 0d  04 42 04 0d 04 4c 13 de  |efault)..B...L..|
00000c80  20 73 74 61 72 73 5f 69  6e 66 6f 20 33 32 0d 04  | stars_info 32..|
00000c90  56 18 21 73 74 61 72 73  5f 69 6e 66 6f 20 3d 20  |V.!stars_info = |
00000ca0  73 74 61 72 73 58 0d 04  60 17 73 74 61 72 73 5f  |starsX..`.stars_|
00000cb0  69 6e 66 6f 21 34 3d 73  74 61 72 73 59 0d 04 6a  |info!4=starsY..j|
00000cc0  17 73 74 61 72 73 5f 69  6e 66 6f 21 38 3d 73 74  |.stars_info!8=st|
00000cd0  61 72 73 56 0d 04 74 33  73 74 61 72 73 5f 69 6e  |arsV..t3stars_in|
00000ce0  66 6f 21 31 32 3d 31 32  30 20 20 20 20 3a f4 20  |fo!12=120    :. |
00000cf0  44 65 66 61 75 6c 74 20  6e 75 6d 62 65 72 20 6f  |Default number o|
00000d00  66 20 73 74 61 72 73 0d  04 7e 04 0d 04 88 47 f4  |f stars..~....G.|
00000d10  20 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 20 47  | ------------- G|
00000d20  65 74 20 74 75 6e 65 20  6e 61 6d 65 73 20 66 72  |et tune names fr|
00000d30  6f 6d 20 27 54 75 6e 65  73 27 20 66 69 6c 65 20  |om 'Tunes' file |
00000d40  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000d50  2d 2d 0d 04 92 41 de 20  74 75 6e 65 5f 6e 61 6d  |--...A. tune_nam|
00000d60  65 73 20 32 34 2a 6d 61  78 5f 74 75 6e 65 73 2c  |es 24*max_tunes,|
00000d70  6e 61 6d 65 5f 70 74 72  73 20 6d 61 78 5f 74 75  |name_ptrs max_tu|
00000d80  6e 65 73 2a 34 2c 74 75  6e 65 73 5f 69 6e 66 6f  |nes*4,tunes_info|
00000d90  20 33 32 0d 04 9c 04 0d  04 a6 38 f2 72 65 61 64  | 32.......8.read|
00000da0  5f 74 75 6e 65 73 28 22  3c 52 75 6e 47 61 6d 65  |_tunes("<RunGame|
00000db0  24 44 69 72 3e 2e 54 75  6e 65 73 22 2c 74 75 6e  |$Dir>.Tunes",tun|
00000dc0  65 24 28 29 2c 6e 75 6d  5f 74 75 6e 65 73 29 0d  |e$(),num_tunes).|
00000dd0  04 b0 1e 70 74 72 3d 30  3a 64 69 72 24 3d 22 3c  |...ptr=0:dir$="<|
00000de0  53 6f 75 6e 64 73 24 44  69 72 3e 2e 22 0d 04 ba  |Sounds$Dir>."...|
00000df0  04 0d 04 c4 18 e3 20 49  25 3d 30 20 b8 20 6e 75  |...... I%=0 . nu|
00000e00  6d 5f 74 75 6e 65 73 2d  31 0d 04 ce 2b 20 20 24  |m_tunes-1...+  $|
00000e10  28 74 75 6e 65 5f 6e 61  6d 65 73 2b 70 74 72 29  |(tune_names+ptr)|
00000e20  3d 64 69 72 24 2b 74 75  6e 65 24 28 49 25 29 2b  |=dir$+tune$(I%)+|
00000e30  bd 28 30 29 0d 04 d8 26  20 20 21 28 6e 61 6d 65  |.(0)...&  !(name|
00000e40  5f 70 74 72 73 2b 34 2a  49 25 29 3d 74 75 6e 65  |_ptrs+4*I%)=tune|
00000e50  5f 6e 61 6d 65 73 2b 70  74 72 0d 04 e2 21 20 20  |_names+ptr...!  |
00000e60  70 74 72 2b 3d a9 28 74  75 6e 65 24 28 49 25 29  |ptr+=.(tune$(I%)|
00000e70  29 2b 31 2b a9 28 64 69  72 24 29 0d 04 ec 05 ed  |)+1+.(dir$).....|
00000e80  0d 04 f6 04 0d 05 00 48  f4 20 2d 2d 2d 2d 2d 2d  |.......H. ------|
00000e90  2d 2d 2d 2d 2d 2d 2d 20  53 65 74 20 75 70 20 69  |------- Set up i|
00000ea0  6e 66 6f 72 6d 61 74 69  6f 6e 20 62 6c 6f 63 6b  |nformation block|
00000eb0  20 66 6f 72 20 74 75 6e  65 73 20 2d 2d 2d 2d 2d  | for tunes -----|
00000ec0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 05 0a 1e  |------------....|
00000ed0  f4 20 57 6f 72 64 23 30  20 3d 20 6e 75 6d 62 65  |. Word#0 = numbe|
00000ee0  72 20 6f 66 20 74 75 6e  65 73 0d 05 14 26 f4 20  |r of tunes...&. |
00000ef0  57 6f 72 64 23 31 20 3d  20 70 74 72 20 74 6f 20  |Word#1 = ptr to |
00000f00  74 75 6e 65 20 6e 61 6d  65 73 20 74 61 62 6c 65  |tune names table|
00000f10  0d 05 1e 2e f4 20 57 6f  72 64 23 32 20 3d 20 70  |..... Word#2 = p|
00000f20  74 72 20 74 6f 20 74 61  62 6c 65 20 6f 66 20 74  |tr to table of t|
00000f30  75 6e 65 20 6e 61 6d 65  20 70 74 72 73 21 0d 05  |une name ptrs!..|
00000f40  28 04 0d 05 32 48 21 74  75 6e 65 73 5f 69 6e 66  |(...2H!tunes_inf|
00000f50  6f 3d 6e 75 6d 5f 74 75  6e 65 73 3a 74 75 6e 65  |o=num_tunes:tune|
00000f60  73 5f 69 6e 66 6f 21 34  3d 74 75 6e 65 5f 6e 61  |s_info!4=tune_na|
00000f70  6d 65 73 3a 74 75 6e 65  73 5f 69 6e 66 6f 21 38  |mes:tunes_info!8|
00000f80  3d 6e 61 6d 65 5f 70 74  72 73 0d 05 3c 04 0d 05  |=name_ptrs..<...|
00000f90  46 48 f4 20 2d 2d 2d 2d  2d 2d 20 53 65 74 20 75  |FH. ------ Set u|
00000fa0  70 20 72 65 67 69 73 74  65 72 20 76 61 72 69 61  |p register varia|
00000fb0  62 6c 65 73 20 61 6e 64  20 69 6e 69 74 69 61 6c  |bles and initial|
00000fc0  69 73 65 20 74 68 65 20  73 79 73 74 65 6d 20 2d  |ise the system -|
00000fd0  2d 2d 2d 2d 2d 2d 0d 05  50 26 41 25 3d 77 6f 72  |------..P&A%=wor|
00000fe0  6b 25 20 20 20 20 20 20  20 20 20 3a f4 20 53 6f  |k%         :. So|
00000ff0  6d 65 20 77 6f 72 6b 73  70 61 63 65 0d 05 5a 23  |me workspace..Z#|
00001000  42 25 3d 73 70 72 69 74  65 5f 61 72 65 61 20 20  |B%=sprite_area  |
00001010  20 3a f4 20 53 70 72 69  74 65 20 61 72 65 61 0d  | :. Sprite area.|
00001020  05 64 32 43 25 3d 6f 62  6a 65 63 74 5f 73 70 61  |.d2C%=object_spa|
00001030  63 65 20 20 3a f4 20 53  74 6f 72 61 67 65 20 66  |ce  :. Storage f|
00001040  6f 72 20 61 6c 6c 20 6f  74 68 65 72 20 64 61 74  |or all other dat|
00001050  61 0d 05 6e 22 44 25 3d  73 74 61 72 73 5f 69 6e  |a..n"D%=stars_in|
00001060  66 6f 20 20 20 20 3a f4  20 53 74 61 72 73 20 64  |fo    :. Stars d|
00001070  61 74 61 0d 05 78 25 45  25 3d 61 6c 70 68 61 5f  |ata..x%E%=alpha_|
00001080  69 6e 66 6f 20 20 20 20  3a f4 20 41 6c 70 68 61  |info    :. Alpha|
00001090  62 65 74 20 64 61 74 61  0d 05 82 22 46 25 3d 74  |bet data..."F%=t|
000010a0  75 6e 65 73 5f 69 6e 66  6f 20 20 20 20 3a f4 20  |unes_info    :. |
000010b0  54 75 6e 65 73 20 69 6e  66 6f 0d 05 8c 2f d6 20  |Tunes info.../. |
000010c0  5f 69 6e 69 74 69 61 6c  69 73 65 20 3a f4 20 47  |_initialise :. G|
000010d0  65 74 20 43 72 65 61 74  6f 72 20 72 65 61 64 79  |et Creator ready|
000010e0  20 74 6f 20 73 74 61 72  74 0d 05 96 04 0d 05 a0  | to start.......|
000010f0  34 48 25 3d 77 6f 72 6b  25 20 20 20 20 20 20 20  |4H%=work%       |
00001100  20 20 3a f4 20 44 6f 6e  27 74 20 63 68 61 6e 67  |  :. Don't chang|
00001110  65 20 48 25 20 66 72 6f  6d 20 6e 6f 77 20 6f 6e  |e H% from now on|
00001120  21 0d 05 aa 16 68 69 67  68 73 63 6f 72 65 3d 73  |!....highscore=s|
00001130  63 6f 72 65 28 31 29 0d  05 b4 04 0d 05 be 10 e7  |core(1).........|
00001140  20 74 69 74 6c 65 3c 3e  30 20 8c 0d 05 c8 37 20  | title<>0 ....7 |
00001150  20 e7 20 73 63 72 65 65  6e 5f 64 65 6c 61 79 20  | . screen_delay |
00001160  3d 20 2d 31 20 8c 20 41  3d a5 20 8b 20 41 3d a6  |= -1 . A=. . A=.|
00001170  28 73 63 72 65 65 6e 5f  64 65 6c 61 79 2a 31 30  |(screen_delay*10|
00001180  30 29 0d 05 d2 05 cd 0d  05 dc 04 0d 05 e6 2c e7  |0)............,.|
00001190  20 73 74 6f 70 5f 74 75  6e 65 24 20 3d 20 22 41  | stop_tune$ = "A|
000011a0  46 54 45 52 20 4c 4f 41  44 49 4e 47 22 20 8c 20  |FTER LOADING" . |
000011b0  ff 22 53 4e 45 57 22 0d  05 f0 04 0d 05 fa 04 0d  |."SNEW".........|
000011c0  06 04 05 f5 0d 06 0e 44  24 66 69 6c 65 6e 61 6d  |.......D$filenam|
000011d0  65 20 3d 20 22 3c 52 75  6e 47 61 6d 65 24 44 69  |e = "<RunGame$Di|
000011e0  72 3e 2e 47 61 6d 65 44  61 74 61 22 20 3a f4 20  |r>.GameData" :. |
000011f0  46 69 6c 65 6e 61 6d 65  20 6f 66 20 64 61 74 61  |Filename of data|
00001200  20 74 6f 20 6c 6f 61 64  0d 06 18 39 41 25 3d 66  | to load...9A%=f|
00001210  69 6c 65 6e 61 6d 65 20  20 20 20 20 20 20 20 20  |ilename         |
00001220  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001230  20 3a f4 20 52 30 2d 3e  20 66 69 6c 65 6e 61 6d  | :. R0-> filenam|
00001240  65 0d 06 22 36 d6 20 5f  67 65 74 64 61 74 61 20  |e.."6. _getdata |
00001250  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001260  20 20 20 20 20 20 20 3a  f4 20 4c 6f 61 64 20 74  |       :. Load t|
00001270  68 65 20 64 61 74 61 0d  06 2c 04 0d 06 36 04 0d  |he data..,...6..|
00001280  06 40 2b 76 61 72 5f 74  61 62 6c 65 3d 48 25 21  |.@+var_table=H%!|
00001290  34 30 3a 76 61 72 5f 74  61 62 6c 65 21 38 20 3d  |40:var_table!8 =|
000012a0  20 68 69 67 68 73 63 6f  72 65 0d 06 4a 04 0d 06  | highscore..J...|
000012b0  54 31 41 25 3d 73 70 72  69 74 65 5f 61 72 65 61  |T1A%=sprite_area|
000012c0  20 20 20 20 20 20 3a f4  20 50 6f 69 6e 74 65 72  |      :. Pointer|
000012d0  20 74 6f 20 73 70 72 69  74 65 20 61 72 65 61 0d  | to sprite area.|
000012e0  06 5e 30 48 25 3d 77 6f  72 6b 25 20 20 20 20 20  |.^0H%=work%     |
000012f0  20 20 20 20 20 20 20 3a  f4 20 50 6f 69 6e 74 65  |       :. Pointe|
00001300  72 20 74 6f 20 77 6f 72  6b 20 73 70 61 63 65 0d  |r to work space.|
00001310  06 68 32 d1 3d 30 20 20  20 20 20 20 20 20 20 20  |.h2.=0          |
00001320  20 20 20 20 3a f4 20 47  65 74 20 72 65 61 64 79  |    :. Get ready|
00001330  20 74 6f 20 74 69 6d 65  20 74 68 65 20 67 61 6d  | to time the gam|
00001340  65 0d 06 72 48 66 72 61  6d 65 73 3d ba 20 5f 64  |e..rHframes=. _d|
00001350  69 73 70 6c 61 79 20 3a  f4 20 52 75 6e 20 74 68  |isplay :. Run th|
00001360  65 20 67 61 6d 65 2c 20  72 65 74 75 72 6e 20 6e  |e game, return n|
00001370  75 6d 62 65 72 20 6f 66  20 66 72 61 6d 65 73 20  |umber of frames |
00001380  64 69 73 70 6c 61 79 65  64 0d 06 7c 04 0d 06 86  |displayed..|....|
00001390  2b 74 69 6d 65 3d 91 2f  31 30 30 20 20 20 20 20  |+time=./100     |
000013a0  20 20 3a f4 20 54 68 65  20 74 6f 74 61 6c 20 67  |  :. The total g|
000013b0  61 6d 65 20 74 69 6d 65  0d 06 90 10 73 74 61 72  |ame time....star|
000013c0  74 69 6e 67 20 3d 20 a3  0d 06 9a 04 0d 06 a4 4c  |ting = ........L|
000013d0  68 69 67 68 73 63 6f 72  65 20 3d 20 76 61 72 5f  |highscore = var_|
000013e0  74 61 62 6c 65 21 38 3a  f4 20 52 65 61 64 20 27  |table!8:. Read '|
000013f0  68 69 67 68 73 63 6f 72  65 27 20 66 72 6f 6d 20  |highscore' from |
00001400  43 72 65 61 74 6f 72 27  73 20 76 61 72 69 61 62  |Creator's variab|
00001410  6c 65 20 74 61 62 6c 65  0d 06 ae 49 73 63 6f 72  |le table...Iscor|
00001420  65 20 20 20 20 20 3d 20  76 61 72 5f 74 61 62 6c  |e     = var_tabl|
00001430  65 21 34 3a f4 20 61 6e  64 20 63 6f 70 79 20 43  |e!4:. and copy C|
00001440  72 65 61 74 6f 72 27 73  20 27 73 63 6f 72 65 27  |reator's 'score'|
00001450  20 76 61 72 69 61 62 6c  65 20 61 73 20 77 65 6c  | variable as wel|
00001460  6c 0d 06 b8 04 0d 06 c2  39 f4 20 49 66 20 4c 65  |l.......9. If Le|
00001470  66 74 2d 68 61 6e 64 20  41 6c 74 20 6b 65 79 20  |ft-hand Alt key |
00001480  69 73 20 70 72 65 73 73  65 64 20 67 69 76 65 20  |is pressed give |
00001490  74 68 65 20 66 72 61 6d  65 20 72 61 74 65 0d 06  |the frame rate..|
000014a0  cc 04 0d 06 d6 2a e7 20  a6 28 2d 36 29 20 f1 20  |.....*. .(-6) . |
000014b0  66 72 61 6d 65 73 2f 74  69 6d 65 3b 22 20 66 72  |frames/time;" fr|
000014c0  61 6d 65 73 2f 73 65 63  6f 6e 64 22 0d 06 e0 04  |ames/second"....|
000014d0  0d 06 ea 4c f4 20 2d 20  46 69 6e 64 20 77 68 61  |...L. - Find wha|
000014e0  74 20 6d 6f 64 65 20 74  68 65 20 67 61 6d 65 20  |t mode the game |
000014f0  77 61 73 20 72 75 6e 6e  69 6e 67 20 69 6e 20 61  |was running in a|
00001500  6e 64 20 73 65 6c 65 63  74 20 73 75 69 74 61 62  |nd select suitab|
00001510  6c 65 20 73 70 72 69 74  65 73 20 2d 0d 06 f4 0a  |le sprites -....|
00001520  6d 6f 64 65 3d eb 0d 06  fe 2c c8 99 20 22 4f 53  |mode=....,.. "OS|
00001530  5f 52 65 61 64 4d 6f 64  65 56 61 72 69 61 62 6c  |_ReadModeVariabl|
00001540  65 22 2c 6d 6f 64 65 2c  34 20 b8 20 2c 2c 58 45  |e",mode,4 . ,,XE|
00001550  69 67 0d 07 08 2c c8 99  20 22 4f 53 5f 52 65 61  |ig...,.. "OS_Rea|
00001560  64 4d 6f 64 65 56 61 72  69 61 62 6c 65 22 2c 6d  |dModeVariable",m|
00001570  6f 64 65 2c 35 20 b8 20  2c 2c 59 45 69 67 0d 07  |ode,5 . ,,YEig..|
00001580  12 21 67 6f 5f 73 70 72  69 74 65 24 3d 22 67 61  |.!go_sprite$="ga|
00001590  6d 65 6f 76 65 72 22 2b  c3 28 6d 6f 64 65 29 0d  |meover"+.(mode).|
000015a0  07 1c 22 70 61 5f 73 70  72 69 74 65 24 3d 22 70  |.."pa_sprite$="p|
000015b0  6c 61 79 61 67 61 69 6e  22 2b c3 28 6d 6f 64 65  |layagain"+.(mode|
000015c0  29 0d 07 26 22 68 73 5f  73 70 72 69 74 65 24 3d  |)..&"hs_sprite$=|
000015d0  22 68 69 67 68 73 63 6f  72 65 22 2b c3 28 6d 6f  |"highscore"+.(mo|
000015e0  64 65 29 0d 07 30 05 87  0d 07 3a 04 0d 07 44 45  |de)..0....:...DE|
000015f0  f4 20 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 20  |. ------------- |
00001600  44 69 73 70 6c 61 79 20  74 68 65 20 22 47 61 6d  |Display the "Gam|
00001610  65 20 4f 76 65 72 22 20  73 70 72 69 74 65 20 2d  |e Over" sprite -|
00001620  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001630  2d 0d 07 4e 3a f4 20 27  64 65 6c 61 79 27 20 69  |-..N:. 'delay' i|
00001640  73 20 74 68 65 20 74 69  6d 65 20 69 6e 20 73 65  |s the time in se|
00001650  63 6f 6e 64 73 20 74 6f  20 64 69 73 70 6c 61 79  |conds to display|
00001660  20 74 68 65 20 73 70 72  69 74 65 0d 07 58 40 f4  | the sprite..X@.|
00001670  20 78 63 6f 6f 72 64 31  2c 79 63 6f 6f 72 64 31  | xcoord1,ycoord1|
00001680  20 61 72 65 20 74 68 65  20 63 6f 6f 72 64 73 20  | are the coords |
00001690  77 68 65 72 65 20 69 74  20 69 73 20 74 6f 20 62  |where it is to b|
000016a0  65 20 64 69 73 70 6c 61  79 65 64 0d 07 62 04 0d  |e displayed..b..|
000016b0  07 6c 32 f2 65 6e 64 5f  6f 66 5f 67 61 6d 65 28  |.l2.end_of_game(|
000016c0  64 65 6c 61 79 2c 67 6f  5f 73 70 72 69 74 65 24  |delay,go_sprite$|
000016d0  2c 78 63 6f 6f 72 64 31  2c 79 63 6f 6f 72 64 31  |,xcoord1,ycoord1|
000016e0  29 0d 07 76 04 0d 07 80  15 f2 68 69 67 68 73 63  |)..v......highsc|
000016f0  6f 72 65 28 73 63 6f 72  65 29 0d 07 8a 04 0d 07  |ore(score)......|
00001700  94 4a f4 20 4e 6f 77 20  64 69 73 70 6c 61 79 20  |.J. Now display |
00001710  74 68 65 20 22 50 6c 61  79 20 41 67 61 69 6e 22  |the "Play Again"|
00001720  20 73 70 72 69 74 65 20  61 6e 64 20 77 61 69 74  | sprite and wait|
00001730  20 75 6e 74 69 6c 20 59  20 6f 72 20 4e 20 69 73  | until Y or N is|
00001740  20 70 72 65 73 73 65 64  0d 07 9e 48 f4 20 78 63  | pressed...H. xc|
00001750  6f 6f 72 64 32 2c 79 63  6f 6f 72 64 32 20 61 72  |oord2,ycoord2 ar|
00001760  65 20 74 68 65 20 63 6f  6f 72 64 73 20 77 68 65  |e the coords whe|
00001770  72 65 20 74 68 65 20 73  70 72 69 74 65 20 69 73  |re the sprite is|
00001780  20 74 6f 20 62 65 20 64  69 73 70 6c 61 79 65 64  | to be displayed|
00001790  0d 07 a8 4b f4 20 6b 65  79 24 3a 20 6b 65 79 73  |...K. key$: keys|
000017a0  20 74 6f 20 63 68 65 63  6b 20 65 67 20 22 59 79  | to check eg "Yy|
000017b0  4e 6e 22 20 69 6e 20 45  6e 67 6c 69 73 68 20 6f  |Nn" in English o|
000017c0  72 20 22 4a 6a 4e 6e 22  20 69 6e 20 47 65 72 6d  |r "JjNn" in Germ|
000017d0  61 6e 20 6f 72 20 44 75  74 63 68 0d 07 b2 04 0d  |an or Dutch.....|
000017e0  07 bc 31 e7 20 a4 61 6e  6f 74 68 65 72 28 70 61  |..1. .another(pa|
000017f0  5f 73 70 72 69 74 65 24  2c 78 63 6f 6f 72 64 32  |_sprite$,xcoord2|
00001800  2c 79 63 6f 6f 72 64 32  2c 6b 65 79 24 29 20 8c  |,ycoord2,key$) .|
00001810  0d 07 c6 1f 20 20 f4 20  52 65 6c 6f 61 64 20 74  |....  . Reload t|
00001820  68 65 20 67 61 6d 65 20  73 70 72 69 74 65 73 0d  |he game sprites.|
00001830  07 d0 41 20 20 c8 99 20  22 4f 53 5f 53 70 72 69  |..A  .. "OS_Spri|
00001840  74 65 4f 70 22 2c 32 35  36 2b 31 30 2c 73 70 72  |teOp",256+10,spr|
00001850  69 74 65 5f 61 72 65 61  2c 22 3c 52 75 6e 47 61  |ite_area,"<RunGa|
00001860  6d 65 24 44 69 72 3e 2e  53 70 72 69 74 65 73 22  |me$Dir>.Sprites"|
00001870  0d 07 da 0f 20 20 61 6e  6f 74 68 65 72 3d b9 0d  |....  another=..|
00001880  07 e4 05 cc 0d 07 ee 0f  20 20 61 6e 6f 74 68 65  |........  anothe|
00001890  72 3d a3 0d 07 f8 05 cd  0d 08 02 0f fd 20 ac 20  |r=........... . |
000018a0  61 6e 6f 74 68 65 72 0d  08 0c 04 0d 08 16 40 e7  |another.......@.|
000018b0  20 73 61 76 65 24 3d 22  59 45 53 22 20 8c 20 f2  | save$="YES" . .|
000018c0  73 61 76 65 5f 68 69 67  68 73 63 6f 72 65 73 28  |save_highscores(|
000018d0  22 3c 52 75 6e 47 61 6d  65 24 44 69 72 3e 2e 48  |"<RunGame$Dir>.H|
000018e0  69 67 68 53 63 6f 72 65  73 22 29 0d 08 20 04 0d  |ighScores").. ..|
000018f0  08 2a 25 e7 20 73 74 6f  70 5f 74 75 6e 65 24 20  |.*%. stop_tune$ |
00001900  3d 20 22 41 54 20 45 4e  44 22 20 8c 20 ff 22 53  |= "AT END" . ."S|
00001910  4e 45 57 22 0d 08 34 11  eb 31 32 3a f1 22 42 79  |NEW"..4..12:."By|
00001920  65 2e 2e 2e 22 0d 08 3e  05 e0 0d 08 48 04 0d 08  |e..."..>....H...|
00001930  52 04 0d 08 5c 0b dd 20  f2 69 6e 69 74 0d 08 66  |R...\.. .init..f|
00001940  25 c8 99 20 22 4f 53 5f  42 79 74 65 22 2c 31 36  |%.. "OS_Byte",16|
00001950  31 2c 31 39 31 20 b8 20  2c 2c 4f 6c 64 4d 6f 75  |1,191 . ,,OldMou|
00001960  73 65 0d 08 70 13 6e 75  6d 5f 73 74 61 72 73 20  |se..p.num_stars |
00001970  3d 20 32 35 35 0d 08 7a  25 6d 61 78 5f 74 75 6e  |= 255..z%max_tun|
00001980  65 73 20 3d 20 31 36 3a  de 20 74 75 6e 65 24 28  |es = 16:. tune$(|
00001990  6d 61 78 5f 74 75 6e 65  73 29 0d 08 84 04 0d 08  |max_tunes)......|
000019a0  8e 1e f4 20 46 69 6e 64  20 73 69 7a 65 20 6f 66  |... Find size of|
000019b0  20 73 70 72 69 74 65 20  66 69 6c 65 0d 08 98 3b  | sprite file...;|
000019c0  c8 99 20 22 4f 53 5f 46  69 6c 65 22 2c 35 2c 22  |.. "OS_File",5,"|
000019d0  3c 52 75 6e 47 61 6d 65  24 44 69 72 3e 2e 53 70  |<RunGame$Dir>.Sp|
000019e0  72 69 74 65 73 22 20 b8  20 66 74 79 70 65 2c 2c  |rites" . ftype,,|
000019f0  2c 2c 73 70 6c 65 6e 0d  08 a2 25 e7 20 66 74 79  |,,splen...%. fty|
00001a00  70 65 3d 30 20 85 20 32  35 35 2c 22 4e 6f 20 53  |pe=0 . 255,"No S|
00001a10  70 72 69 74 65 73 20 66  69 6c 65 22 0d 08 ac 04  |prites file"....|
00001a20  0d 08 b6 3c f4 20 52 65  73 65 72 76 65 20 73 70  |...<. Reserve sp|
00001a30  61 63 65 20 66 6f 72 20  73 70 72 69 74 65 73 2c  |ace for sprites,|
00001a40  20 61 6c 6c 6f 77 69 6e  67 20 66 6f 72 20 31 36  | allowing for 16|
00001a50  2d 62 79 74 65 20 68 65  61 64 65 72 0d 08 c0 22  |-byte header..."|
00001a60  73 70 6c 65 6e 2b 3d 20  31 36 3a de 20 73 70 72  |splen+= 16:. spr|
00001a70  69 74 65 5f 61 72 65 61  20 73 70 6c 65 6e 0d 08  |ite_area splen..|
00001a80  ca 04 0d 08 d4 35 f4 20  49 6e 69 74 69 61 6c 69  |.....5. Initiali|
00001a90  73 65 20 74 68 65 20 73  70 72 69 74 65 20 61 72  |se the sprite ar|
00001aa0  65 61 20 61 6e 64 20 6c  6f 61 64 20 74 68 65 20  |ea and load the |
00001ab0  73 70 72 69 74 65 73 0d  08 de 49 21 73 70 72 69  |sprites...I!spri|
00001ac0  74 65 5f 61 72 65 61 3d  73 70 6c 65 6e 3a 73 70  |te_area=splen:sp|
00001ad0  72 69 74 65 5f 61 72 65  61 21 34 3d 30 3a 73 70  |rite_area!4=0:sp|
00001ae0  72 69 74 65 5f 61 72 65  61 21 38 3d 31 36 3a 73  |rite_area!8=16:s|
00001af0  70 72 69 74 65 5f 61 72  65 61 21 31 32 3d 31 36  |prite_area!12=16|
00001b00  0d 08 e8 3f c8 99 20 22  4f 53 5f 53 70 72 69 74  |...?.. "OS_Sprit|
00001b10  65 4f 70 22 2c 32 35 36  2b 31 30 2c 73 70 72 69  |eOp",256+10,spri|
00001b20  74 65 5f 61 72 65 61 2c  22 3c 52 75 6e 47 61 6d  |te_area,"<RunGam|
00001b30  65 24 44 69 72 3e 2e 53  70 72 69 74 65 73 22 0d  |e$Dir>.Sprites".|
00001b40  08 f2 04 0d 08 fc 1f f4  20 46 69 6e 64 20 73 69  |........ Find si|
00001b50  7a 65 20 6f 66 20 53 70  72 69 74 65 32 20 66 69  |ze of Sprite2 fi|
00001b60  6c 65 0d 09 06 3d c8 99  20 22 4f 53 5f 46 69 6c  |le...=.. "OS_Fil|
00001b70  65 22 2c 35 2c 22 3c 52  75 6e 47 61 6d 65 24 44  |e",5,"<RunGame$D|
00001b80  69 72 3e 2e 53 70 72 69  74 65 73 32 22 20 b8 20  |ir>.Sprites2" . |
00001b90  66 74 79 70 65 2c 2c 2c  2c 73 70 6c 65 6e 32 0d  |ftype,,,,splen2.|
00001ba0  09 10 28 e7 20 66 74 79  70 65 3d 30 20 85 20 32  |..(. ftype=0 . 2|
00001bb0  35 34 2c 22 4e 6f 20 27  53 70 72 69 74 65 73 32  |54,"No 'Sprites2|
00001bc0  27 20 66 69 6c 65 22 0d  09 1a 04 0d 09 24 3c f4  |' file"......$<.|
00001bd0  20 52 65 73 65 72 76 65  20 73 70 61 63 65 20 66  | Reserve space f|
00001be0  6f 72 20 73 70 72 69 74  65 73 2c 20 61 6c 6c 6f  |or sprites, allo|
00001bf0  77 69 6e 67 20 66 6f 72  20 31 36 2d 62 79 74 65  |wing for 16-byte|
00001c00  20 68 65 61 64 65 72 0d  09 2e 25 73 70 6c 65 6e  | header...%splen|
00001c10  32 2b 3d 20 31 36 3a de  20 73 70 72 69 74 65 5f  |2+= 16:. sprite_|
00001c20  61 72 65 61 32 20 73 70  6c 65 6e 32 0d 09 38 04  |area2 splen2..8.|
00001c30  0d 09 42 36 f4 20 49 6e  69 74 69 61 6c 69 73 65  |..B6. Initialise|
00001c40  20 74 68 65 20 73 70 72  69 74 65 32 20 61 72 65  | the sprite2 are|
00001c50  61 20 61 6e 64 20 6c 6f  61 64 20 74 68 65 20 73  |a and load the s|
00001c60  70 72 69 74 65 73 0d 09  4c 4e 21 73 70 72 69 74  |prites..LN!sprit|
00001c70  65 5f 61 72 65 61 32 3d  73 70 6c 65 6e 32 3a 73  |e_area2=splen2:s|
00001c80  70 72 69 74 65 5f 61 72  65 61 32 21 34 3d 30 3a  |prite_area2!4=0:|
00001c90  73 70 72 69 74 65 5f 61  72 65 61 32 21 38 3d 31  |sprite_area2!8=1|
00001ca0  36 3a 73 70 72 69 74 65  5f 61 72 65 61 32 21 31  |6:sprite_area2!1|
00001cb0  32 3d 31 36 0d 09 56 41  c8 99 20 22 4f 53 5f 53  |2=16..VA.. "OS_S|
00001cc0  70 72 69 74 65 4f 70 22  2c 32 35 36 2b 31 30 2c  |priteOp",256+10,|
00001cd0  73 70 72 69 74 65 5f 61  72 65 61 32 2c 22 3c 52  |sprite_area2,"<R|
00001ce0  75 6e 47 61 6d 65 24 44  69 72 3e 2e 53 70 72 69  |unGame$Dir>.Spri|
00001cf0  74 65 73 32 22 0d 09 60  04 0d 09 6a 21 f4 20 52  |tes2"..`...j!. R|
00001d00  65 61 64 20 61 6e 64 20  69 6e 73 74 61 6c 6c 20  |ead and install |
00001d10  74 68 65 20 73 6f 75 6e  64 73 0d 09 74 28 f2 6c  |the sounds..t(.l|
00001d20  6f 61 64 5f 73 6f 75 6e  64 73 28 22 3c 52 75 6e  |oad_sounds("<Run|
00001d30  47 61 6d 65 24 44 69 72  3e 2e 53 6f 75 6e 64 73  |Game$Dir>.Sounds|
00001d40  22 29 0d 09 7e 04 0d 09  88 1a 6d 61 78 6c 65 6e  |")..~.....maxlen|
00001d50  3d 31 36 3a 6d 61 78 64  69 67 69 74 73 3d 31 30  |=16:maxdigits=10|
00001d60  0d 09 92 1f de 20 6e 61  6d 65 24 28 6d 61 78 68  |..... name$(maxh|
00001d70  69 29 2c 73 63 6f 72 65  28 6d 61 78 68 69 29 0d  |i),score(maxhi).|
00001d80  09 9c 22 6e 61 6d 65 24  28 29 3d 22 43 72 65 61  |.."name$()="Crea|
00001d90  74 6f 72 22 3a 73 63 6f  72 65 28 29 3d 31 30 30  |tor":score()=100|
00001da0  30 0d 09 a6 04 0d 09 b0  24 69 6e 25 3d 8e 20 22  |0.......$in%=. "|
00001db0  3c 52 75 6e 47 61 6d 65  24 44 69 72 3e 2e 48 69  |<RunGame$Dir>.Hi|
00001dc0  67 68 53 63 6f 72 65 73  22 0d 09 ba 0e e7 20 69  |ghScores"..... i|
00001dd0  6e 25 3c 3e 30 20 8c 0d  09 c4 08 49 25 3d 31 0d  |n%<>0 .....I%=1.|
00001de0  09 ce 1a c8 95 20 ac 20  c5 23 69 6e 25 20 80 20  |..... . .#in% . |
00001df0  49 25 3c 3d 6d 61 78 68  69 0d 09 d8 11 20 20 6c  |I%<=maxhi....  l|
00001e00  69 6e 65 24 3d be 23 69  6e 25 0d 09 e2 29 20 20  |ine$=.#in%...)  |
00001e10  f4 20 49 67 6e 6f 72 65  20 61 6e 79 20 63 6f 6d  |. Ignore any com|
00001e20  6d 65 6e 74 20 6f 72 20  62 6c 61 6e 6b 20 6c 69  |ment or blank li|
00001e30  6e 65 73 0d 09 ec 24 20  20 e7 20 c0 6c 69 6e 65  |nes...$  . .line|
00001e40  24 2c 31 29 3c 3e 22 3b  22 20 80 20 6c 69 6e 65  |$,1)<>";" . line|
00001e50  24 3c 3e 22 22 20 8c 0d  09 f6 3f 20 20 20 20 e7  |$<>"" ....?    .|
00001e60  20 49 25 3e 6d 61 78 68  69 20 8c 20 85 20 32 35  | I%>maxhi . . 25|
00001e70  33 2c 22 54 6f 6f 20 6d  61 6e 79 20 6e 61 6d 65  |3,"Too many name|
00001e80  73 20 69 6e 20 27 48 69  67 68 53 63 6f 72 65 27  |s in 'HighScore'|
00001e90  20 66 69 6c 65 22 0d 0a  00 16 20 20 20 20 51 25  | file"....    Q%|
00001ea0  3d a7 6c 69 6e 65 24 2c  22 3a 22 29 0d 0a 0a 1e  |=.line$,":")....|
00001eb0  20 20 20 20 6e 61 6d 65  24 28 49 25 29 3d c0 6c  |    name$(I%)=.l|
00001ec0  69 6e 65 24 2c 51 25 2d  31 29 0d 0a 14 33 20 20  |ine$,Q%-1)...3  |
00001ed0  20 20 6e 61 6d 65 24 28  49 25 29 3d c0 6e 61 6d  |  name$(I%)=.nam|
00001ee0  65 24 28 49 25 29 2b c4  6d 61 78 6c 65 6e 2c 22  |e$(I%)+.maxlen,"|
00001ef0  20 22 29 2c 6d 61 78 6c  65 6e 2d 31 29 0d 0a 1e  | "),maxlen-1)...|
00001f00  0d 20 20 20 20 51 25 2b  3d 31 0d 0a 28 23 20 20  |.    Q%+=1..(#  |
00001f10  20 20 c8 95 20 c1 6c 69  6e 65 24 2c 51 25 2c 31  |  .. .line$,Q%,1|
00001f20  29 3d 22 20 22 3a 51 25  2b 3d 31 3a ce 0d 0a 32  |)=" ":Q%+=1:...2|
00001f30  19 20 20 20 20 76 61 6c  75 65 24 3d c1 6c 69 6e  |.    value$=.lin|
00001f40  65 24 2c 51 25 29 0d 0a  3c 1d 20 20 20 20 73 63  |e$,Q%)..<.    sc|
00001f50  6f 72 65 28 49 25 29 20  3d 20 bb 28 76 61 6c 75  |ore(I%) = .(valu|
00001f60  65 24 29 0d 0a 46 0d 20  20 20 20 49 25 2b 3d 31  |e$)..F.    I%+=1|
00001f70  0d 0a 50 07 20 20 cd 0d  0a 5a 05 ce 0d 0a 64 09  |..P.  ...Z....d.|
00001f80  d9 23 69 6e 25 0d 0a 6e  05 cd 0d 0a 78 1b f2 73  |.#in%..n....x..s|
00001f90  6f 72 74 5f 68 69 67 68  73 63 6f 72 65 73 28 6d  |ort_highscores(m|
00001fa0  61 78 68 69 29 0d 0a 82  04 0d 0a 8c 34 f4 20 46  |axhi).......4. F|
00001fb0  69 6e 64 20 73 69 7a 65  20 6f 66 20 41 52 4d 20  |ind size of ARM |
00001fc0  63 6f 64 65 20 61 6e 64  20 72 65 73 65 72 76 65  |code and reserve|
00001fd0  20 73 70 61 63 65 20 66  6f 72 20 69 74 0d 0a 96  | space for it...|
00001fe0  3c c8 99 20 22 4f 53 5f  46 69 6c 65 22 2c 35 2c  |<.. "OS_File",5,|
00001ff0  22 3c 52 75 6e 47 61 6d  65 24 44 69 72 3e 2e 46  |"<RunGame$Dir>.F|
00002000  43 6f 64 65 22 20 b8 20  66 74 79 70 65 2c 2c 2c  |Code" . ftype,,,|
00002010  2c 63 6f 64 65 73 69 7a  65 0d 0a a0 13 de 20 63  |,codesize..... c|
00002020  6f 64 65 20 63 6f 64 65  73 69 7a 65 0d 0a aa 04  |ode codesize....|
00002030  0d 0a b4 21 f4 20 53 65  74 20 75 70 20 74 68 65  |...!. Set up the|
00002040  20 61 73 73 65 6d 62 6c  65 72 20 6c 61 62 65 6c  | assembler label|
00002050  73 0d 0a be 16 e3 20 70  61 73 73 20 3d 20 30 20  |s..... pass = 0 |
00002060  b8 20 32 20 88 20 32 0d  0a c8 18 f2 61 73 73 65  |. 2 . 2.....asse|
00002070  6d 62 6c 65 28 63 6f 64  65 2c 70 61 73 73 29 0d  |mble(code,pass).|
00002080  0a d2 05 ed 0d 0a dc 04  0d 0a e6 21 f4 20 4e 6f  |...........!. No|
00002090  77 20 6c 6f 61 64 20 69  6e 20 74 68 65 20 61 63  |w load in the ac|
000020a0  74 75 61 6c 20 63 6f 64  65 0d 0a f0 29 ff 28 22  |tual code...).("|
000020b0  4c 4f 41 44 20 3c 52 75  6e 47 61 6d 65 24 44 69  |LOAD <RunGame$Di|
000020c0  72 3e 2e 46 43 6f 64 65  20 22 2b c3 7e 63 6f 64  |r>.FCode "+.~cod|
000020d0  65 29 0d 0a fa 04 0d 0b  04 0f 2a 4b 2e 31 20 45  |e)........*K.1 E|
000020e0  44 49 54 7c 4d 0d 0b 0e  0e 2a 4b 2e 32 20 52 55  |DIT|M....*K.2 RU|
000020f0  4e 7c 4d 0d 0b 18 04 0d  0b 22 04 0d 0b 2c 04 0d  |N|M......"...,..|
00002100  0b 36 29 de 20 77 6f 72  6b 25 20 32 30 30 30 3a  |.6). work% 2000:|
00002110  f4 20 52 65 73 65 72 76  65 20 73 6f 6d 65 20 77  |. Reserve some w|
00002120  6f 72 6b 73 70 61 63 65  0d 0b 40 05 e1 0d 0b 4a  |orkspace..@....J|
00002130  04 0d 0b 54 04 0d 0b 5e  10 dd 20 f2 66 69 6e 64  |...T...^.. .find|
00002140  5f 6d 6f 64 65 0d 0b 68  0f ea 20 64 75 6d 6d 79  |_mode..h.. dummy|
00002150  24 2c 49 25 0d 0b 72 24  69 6e 25 20 3d 20 8e 20  |$,I%..r$in% = . |
00002160  22 3c 52 75 6e 47 61 6d  65 24 44 69 72 3e 2e 47  |"<RunGame$Dir>.G|
00002170  61 6d 65 44 61 74 61 22  0d 0b 7c 2c e7 20 69 6e  |ameData"..|,. in|
00002180  25 3d 30 20 85 20 32 35  32 2c 22 47 61 6d 65 44  |%=0 . 252,"GameD|
00002190  61 74 61 20 66 69 6c 65  20 69 73 20 6d 69 73 73  |ata file is miss|
000021a0  69 6e 67 22 0d 0b 86 1d  e3 20 49 25 3d 31 20 b8  |ing"..... I%=1 .|
000021b0  20 37 3a 64 75 6d 6d 79  24 3d be 23 69 6e 25 3a  | 7:dummy$=.#in%:|
000021c0  ed 0d 0b 90 11 6d 6f 64  65 3d bb 28 be 23 69 6e  |.....mode=.(.#in|
000021d0  25 29 0d 0b 9a 09 d9 23  69 6e 25 0d 0b a4 05 e1  |%).....#in%.....|
000021e0  0d 0b ae 04 0d 0b b8 13  dd 20 f2 63 68 65 63 6b  |......... .check|
000021f0  5f 63 6f 6e 66 69 67 0d  0b c2 20 69 6e 25 3d 8e  |_config... in%=.|
00002200  20 22 3c 52 75 6e 47 61  6d 65 24 44 69 72 3e 2e  | "<RunGame$Dir>.|
00002210  43 6f 6e 66 69 67 22 0d  0b cc 3a f4 20 49 66 20  |Config"...:. If |
00002220  74 68 65 72 65 20 69 73  20 6e 6f 20 22 43 6f 6e  |there is no "Con|
00002230  66 69 67 22 20 66 69 6c  65 20 74 68 65 6e 20 75  |fig" file then u|
00002240  73 65 20 74 68 65 73 65  20 64 65 66 61 75 6c 74  |se these default|
00002250  73 0d 0b d6 0d 64 65 6c  61 79 20 3d 20 33 0d 0b  |s....delay = 3..|
00002260  e0 14 73 63 72 65 65 6e  5f 64 65 6c 61 79 20 3d  |..screen_delay =|
00002270  20 35 0d 0b ea 11 78 63  6f 6f 72 64 31 20 3d 20  | 5....xcoord1 = |
00002280  35 34 30 0d 0b f4 11 79  63 6f 6f 72 64 31 20 3d  |540....ycoord1 =|
00002290  20 35 30 30 0d 0b fe 11  78 63 6f 6f 72 64 32 20  | 500....xcoord2 |
000022a0  3d 20 35 32 30 0d 0c 08  11 79 63 6f 6f 72 64 32  |= 520....ycoord2|
000022b0  20 3d 20 35 30 30 0d 0c  12 12 73 68 6f 77 24 3d  | = 500....show$=|
000022c0  22 41 4c 57 41 59 53 22  0d 0c 1c 11 73 61 76 65  |"ALWAYS"....save|
000022d0  24 20 3d 20 22 59 45 53  22 0d 0c 26 10 6b 65 79  |$ = "YES"..&.key|
000022e0  24 3d 20 22 59 79 4e 6e  22 0d 0c 30 0d 6d 61 78  |$= "YyNn"..0.max|
000022f0  68 69 20 3d 20 35 0d 0c  3a 14 73 63 72 6e 6c 6f  |hi = 5..:.scrnlo|
00002300  61 64 24 3d 22 46 41 53  54 22 0d 0c 44 13 70 6c  |ad$="FAST"..D.pl|
00002310  61 79 5f 74 75 6e 65 24  20 3d 20 22 22 0d 0c 4e  |ay_tune$ = ""..N|
00002320  20 73 74 6f 70 5f 74 75  6e 65 24 20 3d 20 22 41  | stop_tune$ = "A|
00002330  46 54 45 52 20 4c 4f 41  44 49 4e 47 22 0d 0c 58  |FTER LOADING"..X|
00002340  1f f4 20 53 6f 6d 65 20  6d 6f 64 65 20 64 65 70  |.. Some mode dep|
00002350  65 6e 64 65 6e 74 20 73  74 75 66 66 0d 0c 62 0d  |endent stuff..b.|
00002360  c8 8e 20 6d 6f 64 65 20  ca 0d 0c 6c 09 c9 20 31  |.. mode ...l.. 1|
00002370  32 3a 0d 0c 76 11 68 73  78 20 20 20 20 20 3d 20  |2:..v.hsx     = |
00002380  33 36 30 0d 0c 80 11 68  73 79 20 20 20 20 20 3d  |360....hsy     =|
00002390  20 34 30 30 0d 0c 8a 13  73 6c 61 62 5f 63 6f 6c  | 400....slab_col|
000023a0  6f 75 72 20 3d 20 32 0d  0c 94 0e 68 69 6c 69 74  |our = 2....hilit|
000023b0  65 20 3d 20 31 0d 0c 9e  0e 6c 6f 6c 69 74 65 20  |e = 1....lolite |
000023c0  3d 20 36 0d 0c a8 0d 69  6e 73 65 74 20 3d 20 32  |= 6....inset = 2|
000023d0  0d 0c b2 0c 6c 69 6e 65  20 3d 20 37 0d 0c bc 09  |....line = 7....|
000023e0  c9 20 31 33 3a 0d 0c c6  11 68 73 78 20 20 20 20  |. 13:....hsx    |
000023f0  20 3d 20 31 33 30 0d 0c  d0 11 68 73 79 20 20 20  | = 130....hsy   |
00002400  20 20 3d 20 34 30 30 0d  0c da 14 73 6c 61 62 5f  |  = 400....slab_|
00002410  63 6f 6c 6f 75 72 20 3d  20 34 32 0d 0c e4 0f 68  |colour = 42....h|
00002420  69 6c 69 74 65 20 3d 20  36 33 0d 0c ee 0f 6c 6f  |ilite = 63....lo|
00002430  6c 69 74 65 20 3d 20 32  31 0d 0c f8 0d 69 6e 73  |lite = 21....ins|
00002440  65 74 20 3d 20 30 0d 0d  02 0c 6c 69 6e 65 20 3d  |et = 0....line =|
00002450  20 30 0d 0d 0c 05 cb 0d  0d 16 04 0d 0d 20 0e e7  | 0........... ..|
00002460  20 69 6e 25 3c 3e 30 20  8c 0d 0d 2a 0e c8 95 20  | in%<>0 ...*... |
00002470  ac 20 c5 23 69 6e 25 0d  0d 34 11 20 20 6c 69 6e  |. .#in%..4.  lin|
00002480  65 24 3d be 23 69 6e 25  0d 0d 3e 29 20 20 f4 20  |e$=.#in%..>)  . |
00002490  49 67 6e 6f 72 65 20 61  6e 79 20 63 6f 6d 6d 65  |Ignore any comme|
000024a0  6e 74 20 6f 72 20 62 6c  61 6e 6b 20 6c 69 6e 65  |nt or blank line|
000024b0  73 0d 0d 48 24 20 20 e7  20 c0 6c 69 6e 65 24 2c  |s..H$  . .line$,|
000024c0  31 29 3c 3e 22 3b 22 20  80 20 6c 69 6e 65 24 3c  |1)<>";" . line$<|
000024d0  3e 22 22 20 8c 0d 0d 52  16 20 20 20 20 51 25 3d  |>"" ...R.    Q%=|
000024e0  a7 6c 69 6e 65 24 2c 22  3a 22 29 0d 0d 5c 1b 20  |.line$,":")..\. |
000024f0  20 20 20 6c 61 62 65 6c  24 3d c0 6c 69 6e 65 24  |   label$=.line$|
00002500  2c 51 25 2d 31 29 0d 0d  66 0d 20 20 20 20 51 25  |,Q%-1)..f.    Q%|
00002510  2b 3d 31 0d 0d 70 23 20  20 20 20 c8 95 20 c1 6c  |+=1..p#    .. .l|
00002520  69 6e 65 24 2c 51 25 2c  31 29 3d 22 20 22 3a 51  |ine$,Q%,1)=" ":Q|
00002530  25 2b 3d 31 3a ce 0d 0d  7a 1b 20 20 20 20 20 20  |%+=1:...z.      |
00002540  76 61 6c 75 65 24 3d c1  6c 69 6e 65 24 2c 51 25  |value$=.line$,Q%|
00002550  29 0d 0d 84 1b 20 20 20  20 20 20 76 61 6c 75 65  |)....      value|
00002560  20 3d 20 bb 28 76 61 6c  75 65 24 29 0d 0d 8e 15  | = .(value$)....|
00002570  20 20 20 20 20 20 c8 8e  20 6c 61 62 65 6c 24 20  |      .. label$ |
00002580  ca 0d 0d 98 15 20 20 20  20 20 20 20 20 c9 20 22  |.....        . "|
00002590  44 65 6c 61 79 22 0d 0d  a2 1b 20 20 20 20 20 20  |Delay"....      |
000025a0  20 20 20 20 64 65 6c 61  79 20 3d 20 76 61 6c 75  |    delay = valu|
000025b0  65 0d 0d ac 1b 20 20 20  20 20 20 20 20 c9 20 22  |e....        . "|
000025c0  47 61 6d 65 20 6f 76 65  72 20 58 22 0d 0d b6 1d  |Game over X"....|
000025d0  20 20 20 20 20 20 20 20  20 20 78 63 6f 6f 72 64  |          xcoord|
000025e0  31 20 3d 20 76 61 6c 75  65 0d 0d c0 1b 20 20 20  |1 = value....   |
000025f0  20 20 20 20 20 c9 20 22  47 61 6d 65 20 6f 76 65  |     . "Game ove|
00002600  72 20 59 22 0d 0d ca 1d  20 20 20 20 20 20 20 20  |r Y"....        |
00002610  20 20 79 63 6f 6f 72 64  31 20 3d 20 76 61 6c 75  |  ycoord1 = valu|
00002620  65 0d 0d d4 1c 20 20 20  20 20 20 20 20 c9 20 22  |e....        . "|
00002630  50 6c 61 79 20 61 67 61  69 6e 20 58 22 0d 0d de  |Play again X"...|
00002640  1d 20 20 20 20 20 20 20  20 20 20 78 63 6f 6f 72  |.          xcoor|
00002650  64 32 20 3d 20 76 61 6c  75 65 0d 0d e8 1c 20 20  |d2 = value....  |
00002660  20 20 20 20 20 20 c9 20  22 50 6c 61 79 20 61 67  |      . "Play ag|
00002670  61 69 6e 20 59 22 0d 0d  f2 1d 20 20 20 20 20 20  |ain Y"....      |
00002680  20 20 20 20 79 63 6f 6f  72 64 32 20 3d 20 76 61  |    ycoord2 = va|
00002690  6c 75 65 0d 0d fc 17 20  20 20 20 20 20 20 20 c9  |lue....        .|
000026a0  20 22 54 61 62 6c 65 20  58 22 0d 0e 06 19 20 20  | "Table X"....  |
000026b0  20 20 20 20 20 20 20 20  68 73 78 20 3d 20 76 61  |        hsx = va|
000026c0  6c 75 65 0d 0e 10 17 20  20 20 20 20 20 20 20 c9  |lue....        .|
000026d0  20 22 54 61 62 6c 65 20  59 22 0d 0e 1a 19 20 20  | "Table Y"....  |
000026e0  20 20 20 20 20 20 20 20  68 73 79 20 3d 20 76 61  |        hsy = va|
000026f0  6c 75 65 0d 0e 24 14 20  20 20 20 20 20 20 20 c9  |lue..$.        .|
00002700  20 22 4b 65 79 73 22 0d  0e 2e 1b 20 20 20 20 20  | "Keys"....     |
00002710  20 20 20 20 20 6b 65 79  24 20 3d 20 76 61 6c 75  |     key$ = valu|
00002720  65 24 0d 0e 38 1c 20 20  20 20 20 20 20 20 c9 20  |e$..8.        . |
00002730  22 54 61 62 6c 65 20 63  6f 6c 6f 75 72 22 0d 0e  |"Table colour"..|
00002740  42 20 20 20 20 20 20 20  20 20 20 20 73 6c 61 62  |B           slab|
00002750  5f 63 6f 6c 6f 75 72 3d  20 76 61 6c 75 65 0d 0e  |_colour= value..|
00002760  4c 1c 20 20 20 20 20 20  20 20 c9 20 22 49 6e 73  |L.        . "Ins|
00002770  65 74 20 63 6f 6c 6f 75  72 22 0d 0e 56 1b 20 20  |et colour"..V.  |
00002780  20 20 20 20 20 20 20 20  69 6e 73 65 74 20 3d 20  |        inset = |
00002790  76 61 6c 75 65 0d 0e 60  1a 20 20 20 20 20 20 20  |value..`.       |
000027a0  20 c9 20 22 53 68 6f 77  20 74 61 62 6c 65 22 0d  | . "Show table".|
000027b0  0e 6a 1c 20 20 20 20 20  20 20 20 20 20 73 68 6f  |.j.          sho|
000027c0  77 24 20 3d 20 76 61 6c  75 65 24 0d 0e 74 1a 20  |w$ = value$..t. |
000027d0  20 20 20 20 20 20 20 c9  20 22 53 61 76 65 20 74  |       . "Save t|
000027e0  61 62 6c 65 22 0d 0e 7e  1a 20 20 20 20 20 20 20  |able"..~.       |
000027f0  20 20 20 73 61 76 65 24  3d 76 61 6c 75 65 24 0d  |   save$=value$.|
00002800  0e 88 1a 20 20 20 20 20  20 20 20 c9 20 22 54 61  |...        . "Ta|
00002810  62 6c 65 20 73 69 7a 65  22 0d 0e 92 1b 20 20 20  |ble size"....   |
00002820  20 20 20 20 20 20 20 6d  61 78 68 69 20 3d 20 76  |       maxhi = v|
00002830  61 6c 75 65 0d 0e 9c 26  20 20 20 20 20 20 20 20  |alue...&        |
00002840  20 20 e7 20 6d 61 78 68  69 20 3e 20 31 36 20 8c  |  . maxhi > 16 .|
00002850  20 6d 61 78 68 69 20 3d  31 36 0d 0e a6 1b 20 20  | maxhi =16....  |
00002860  20 20 20 20 20 20 c9 20  22 4c 6f 61 64 20 73 63  |      . "Load sc|
00002870  72 65 65 6e 22 0d 0e b0  20 20 20 20 20 20 20 20  |reen"...        |
00002880  20 20 20 73 63 72 6e 6c  6f 61 64 24 20 3d 20 76  |   scrnload$ = v|
00002890  61 6c 75 65 24 0d 0e ba  1c 20 20 20 20 20 20 20  |alue$....       |
000028a0  20 c9 20 22 53 63 72 65  65 6e 20 64 65 6c 61 79  | . "Screen delay|
000028b0  22 0d 0e c4 22 20 20 20  20 20 20 20 20 20 20 73  |"..."          s|
000028c0  63 72 65 65 6e 5f 64 65  6c 61 79 20 3d 20 76 61  |creen_delay = va|
000028d0  6c 75 65 0d 0e ce 1c 20  20 20 20 20 20 20 20 c9  |lue....        .|
000028e0  20 22 4c 6f 61 64 69 6e  67 20 74 75 6e 65 22 0d  | "Loading tune".|
000028f0  0e d8 21 20 20 20 20 20  20 20 20 20 20 70 6c 61  |..!          pla|
00002900  79 5f 74 75 6e 65 24 20  3d 20 76 61 6c 75 65 24  |y_tune$ = value$|
00002910  0d 0e e2 1a 20 20 20 20  20 20 20 20 c9 20 22 53  |....        . "S|
00002920  74 6f 70 20 6d 75 73 69  63 22 0d 0e ec 21 20 20  |top music"...!  |
00002930  20 20 20 20 20 20 20 20  73 74 6f 70 5f 74 75 6e  |        stop_tun|
00002940  65 24 20 3d 20 76 61 6c  75 65 24 0d 0e f6 0b 20  |e$ = value$.... |
00002950  20 20 20 20 20 cb 0d 0f  00 07 20 20 cd 0d 0f 0a  |     .....  ....|
00002960  05 ce 0d 0f 14 09 d9 23  69 6e 25 0d 0f 1e 05 cd  |.......#in%.....|
00002970  0d 0f 28 05 e1 0d 0f 32  04 0d 0f 3c 04 0d 0f 46  |..(....2...<...F|
00002980  18 dd 20 f2 6c 6f 61 64  5f 73 6f 75 6e 64 73 28  |.. .load_sounds(|
00002990  64 69 72 24 29 0d 0f 50  10 ea 20 69 74 65 6d 2c  |dir$)..P.. item,|
000029a0  76 6f 69 63 65 0d 0f 5a  21 de 20 69 6e 66 6f 62  |voice..Z!. infob|
000029b0  75 66 66 65 72 20 35 31  32 2c 70 61 74 68 6e 61  |uffer 512,pathna|
000029c0  6d 65 20 32 35 36 0d 0f  64 15 69 74 65 6d 20 3d  |me 256..d.item =|
000029d0  20 30 3a 76 6f 69 63 65  3d 31 36 0d 0f 6e 16 24  | 0:voice=16..n.$|
000029e0  70 61 74 68 6e 61 6d 65  3d 64 69 72 24 2b 22 2e  |pathname=dir$+".|
000029f0  22 0d 0f 78 04 0d 0f 82  26 f4 20 52 65 6d 6f 76  |"..x....&. Remov|
00002a00  65 20 61 6e 79 20 65 78  69 73 74 69 6e 67 20 76  |e any existing v|
00002a10  6f 69 63 65 73 20 66 69  72 73 74 0d 0f 8c 10 e3  |oices first.....|
00002a20  20 49 25 3d 31 36 20 b8  20 33 31 0d 0f 96 18 20  | I%=16 . 31.... |
00002a30  20 c8 99 20 22 45 78 53  5f 52 65 6d 6f 76 65 22  | .. "ExS_Remove"|
00002a40  2c 49 25 0d 0f a0 05 ed  0d 0f aa 04 0d 0f b4 35  |,I%............5|
00002a50  f4 20 43 6f 75 6e 74 20  68 6f 77 20 6d 61 6e 79  |. Count how many|
00002a60  20 66 69 6c 65 73 20 61  72 65 20 69 6e 20 74 68  | files are in th|
00002a70  65 20 67 69 76 65 6e 20  64 69 72 65 63 74 6f 72  |e given director|
00002a80  79 0d 0f be 04 0d 0f c8  2b c8 99 20 22 4f 53 5f  |y.......+.. "OS_|
00002a90  46 53 43 6f 6e 74 72 6f  6c 22 2c 32 38 2c 64 69  |FSControl",28,di|
00002aa0  72 24 2c 2c 30 20 b8 20  2c 2c 2c 66 69 6c 65 73  |r$,,0 . ,,,files|
00002ab0  0d 0f d2 04 0d 0f dc 0f  e7 20 66 69 6c 65 73 3e  |......... files>|
00002ac0  30 20 8c 0d 0f e6 04 0d  0f f0 11 c8 95 20 69 74  |0 ........... it|
00002ad0  65 6d 20 3c 3e 20 2d 31  0d 0f fa 11 20 20 4a 25  |em <> -1....  J%|
00002ae0  3d a9 20 64 69 72 24 2b  31 0d 10 04 04 0d 10 0e  |=. dir$+1.......|
00002af0  20 20 20 f4 20 52 65 61  64 20 6e 61 6d 65 20 6f  |   . Read name o|
00002b00  66 20 6e 65 78 74 20 27  69 74 65 6d 27 0d 10 18  |f next 'item'...|
00002b10  04 0d 10 22 3c 20 20 c8  99 20 22 4f 53 5f 47 42  |..."<  .. "OS_GB|
00002b20  50 42 22 2c 39 2c 64 69  72 24 2c 69 6e 66 6f 62  |PB",9,dir$,infob|
00002b30  75 66 66 65 72 2c 31 2c  69 74 65 6d 2c 35 31 32  |uffer,1,item,512|
00002b40  2c 30 20 b8 20 2c 2c 2c  2c 69 74 65 6d 0d 10 2c  |,0 . ,,,,item..,|
00002b50  04 0d 10 36 0a 20 20 49  25 3d 30 0d 10 40 04 0d  |...6.  I%=0..@..|
00002b60  10 4a 19 20 20 c8 95 20  69 6e 66 6f 62 75 66 66  |.J.  .. infobuff|
00002b70  65 72 3f 49 25 20 3e 30  0d 10 54 23 20 20 20 20  |er?I% >0..T#    |
00002b80  70 61 74 68 6e 61 6d 65  3f 4a 25 20 3d 20 69 6e  |pathname?J% = in|
00002b90  66 6f 62 75 66 66 65 72  3f 49 25 0d 10 5e 13 20  |fobuffer?I%..^. |
00002ba0  20 20 20 49 25 2b 3d 31  3a 4a 25 2b 3d 31 0d 10  |   I%+=1:J%+=1..|
00002bb0  68 07 20 20 ce 0d 10 72  04 0d 10 7c 16 20 20 70  |h.  ...r...|.  p|
00002bc0  61 74 68 6e 61 6d 65 3f  4a 25 20 3d 20 31 33 0d  |athname?J% = 13.|
00002bd0  10 86 43 20 20 c8 99 20  22 45 78 53 5f 49 6e 73  |..C  .. "ExS_Ins|
00002be0  74 61 6c 6c 22 2c 76 6f  69 63 65 2c 70 61 74 68  |tall",voice,path|
00002bf0  6e 61 6d 65 20 3a f4 20  4c 6f 61 64 20 61 6e 64  |name :. Load and|
00002c00  20 49 6e 73 74 61 6c 6c  20 74 68 65 20 73 6f 75  | Install the sou|
00002c10  6e 64 0d 10 90 0e 20 20  76 6f 69 63 65 2b 3d 31  |nd....  voice+=1|
00002c20  0d 10 9a 05 ce 0d 10 a4  04 0d 10 ae 05 cd 0d 10  |................|
00002c30  b8 05 e1 0d 10 c2 04 0d  10 cc 04 0d 10 d6 19 dd  |................|
00002c40  20 f2 61 73 73 65 6d 62  6c 65 28 6f 72 67 2c 70  | .assemble(org,p|
00002c50  61 73 73 29 0d 10 e0 11  50 25 3d 6f 72 67 3a 4f  |ass)....P%=org:O|
00002c60  25 3d 6f 72 67 0d 10 ea  0d 5b 4f 50 54 20 70 61  |%=org....[OPT pa|
00002c70  73 73 0d 10 f4 0f 2e 6a  75 6d 70 5f 74 61 62 6c  |ss.....jump_tabl|
00002c80  65 0d 10 fe 04 0d 11 08  44 5c 54 68 65 20 65 6e  |e.......D\The en|
00002c90  74 72 69 65 73 20 69 6e  20 74 68 69 73 20 6a 75  |tries in this ju|
00002ca0  6d 70 20 74 61 62 6c 65  20 6d 75 73 74 20 62 65  |mp table must be|
00002cb0  20 69 6e 20 74 68 65 20  73 61 6d 65 20 6f 72 64  | in the same ord|
00002cc0  65 72 20 61 73 20 74 68  65 0d 11 12 3a 5c 63 6f  |er as the...:\co|
00002cd0  72 72 65 73 70 6f 6e 64  69 6e 67 20 27 61 63 74  |rresponding 'act|
00002ce0  69 6f 6e 27 20 69 6e 20  74 68 65 20 43 72 65 61  |ion' in the Crea|
00002cf0  74 6f 72 20 22 4b 65 79  77 6f 72 64 73 22 20 66  |tor "Keywords" f|
00002d00  69 6c 65 0d 11 1c 04 0d  11 26 20 2e 5f 61 63 74  |ile......& ._act|
00002d10  69 76 61 74 65 5f 6f 62  6a 65 63 74 20 20 20 20  |ivate_object    |
00002d20  62 20 64 75 6d 6d 79 0d  11 30 20 2e 5f 64 65 61  |b dummy..0 ._dea|
00002d30  63 74 69 76 61 74 65 5f  6f 62 6a 65 63 74 20 20  |ctivate_object  |
00002d40  62 20 64 75 6d 6d 79 0d  11 3a 20 2e 5f 73 68 6f  |b dummy..: ._sho|
00002d50  77 5f 6f 62 6a 65 63 74  20 20 20 20 20 20 20 20  |w_object        |
00002d60  62 20 64 75 6d 6d 79 0d  11 44 20 2e 5f 68 69 64  |b dummy..D ._hid|
00002d70  65 5f 6f 62 6a 65 63 74  20 20 20 20 20 20 20 20  |e_object        |
00002d80  62 20 64 75 6d 6d 79 0d  11 4e 20 2e 5f 73 77 6f  |b dummy..N ._swo|
00002d90  70 5f 6f 62 6a 65 63 74  73 20 20 20 20 20 20 20  |p_objects       |
00002da0  62 20 64 75 6d 6d 79 0d  11 58 20 2e 5f 73 65 74  |b dummy..X ._set|
00002db0  5f 63 6f 6f 72 64 73 20  20 20 20 20 20 20 20 20  |_coords         |
00002dc0  62 20 64 75 6d 6d 79 0d  11 62 20 2e 5f 73 68 69  |b dummy..b ._shi|
00002dd0  66 74 5f 6f 62 6a 65 63  74 20 20 20 20 20 20 20  |ft_object       |
00002de0  62 20 64 75 6d 6d 79 0d  11 6c 20 2e 5f 63 6f 70  |b dummy..l ._cop|
00002df0  79 5f 63 6f 6f 72 64 73  20 20 20 20 20 20 20 20  |y_coords        |
00002e00  62 20 64 75 6d 6d 79 0d  11 76 20 2e 5f 72 65 76  |b dummy..v ._rev|
00002e10  65 72 73 65 5f 76 65 72  74 69 63 61 6c 20 20 20  |erse_vertical   |
00002e20  62 20 64 75 6d 6d 79 0d  11 80 20 2e 5f 72 65 76  |b dummy... ._rev|
00002e30  65 72 73 65 5f 68 6f 72  69 7a 6f 6e 74 61 6c 20  |erse_horizontal |
00002e40  62 20 64 75 6d 6d 79 0d  11 8a 20 2e 5f 73 65 74  |b dummy... ._set|
00002e50  5f 58 76 65 6c 6f 63 69  74 79 20 20 20 20 20 20  |_Xvelocity      |
00002e60  62 20 64 75 6d 6d 79 0d  11 94 20 2e 5f 73 65 74  |b dummy... ._set|
00002e70  5f 59 76 65 6c 6f 63 69  74 79 20 20 20 20 20 20  |_Yvelocity      |
00002e80  62 20 64 75 6d 6d 79 0d  11 9e 20 2e 5f 61 74 74  |b dummy... ._att|
00002e90  61 63 68 5f 74 6f 5f 70  61 74 68 20 20 20 20 20  |ach_to_path     |
00002ea0  62 20 64 75 6d 6d 79 0d  11 a8 20 2e 5f 6c 6f 61  |b dummy... ._loa|
00002eb0  64 5f 73 63 72 65 65 6e  20 20 20 20 20 20 20 20  |d_screen        |
00002ec0  62 20 64 75 6d 6d 79 0d  11 b2 20 2e 5f 73 63 72  |b dummy... ._scr|
00002ed0  6f 6c 6c 5f 68 20 20 20  20 20 20 20 20 20 20 20  |oll_h           |
00002ee0  62 20 64 75 6d 6d 79 0d  11 bc 20 2e 5f 73 63 72  |b dummy... ._scr|
00002ef0  6f 6c 6c 5f 76 20 20 20  20 20 20 20 20 20 20 20  |oll_v           |
00002f00  62 20 64 75 6d 6d 79 0d  11 c6 20 2e 5f 70 75 74  |b dummy... ._put|
00002f10  5f 76 61 72 20 20 20 20  20 20 20 20 20 20 20 20  |_var            |
00002f20  62 20 64 75 6d 6d 79 0d  11 d0 20 2e 5f 61 64 64  |b dummy... ._add|
00002f30  5f 76 61 72 20 20 20 20  20 20 20 20 20 20 20 20  |_var            |
00002f40  62 20 64 75 6d 6d 79 0d  11 da 20 2e 5f 73 75 62  |b dummy... ._sub|
00002f50  74 72 61 63 74 5f 76 61  72 20 20 20 20 20 20 20  |tract_var       |
00002f60  62 20 64 75 6d 6d 79 0d  11 e4 20 2e 5f 6d 61 6b  |b dummy... ._mak|
00002f70  65 5f 73 6f 75 6e 64 20  20 20 20 20 20 20 20 20  |e_sound         |
00002f80  62 20 64 75 6d 6d 79 0d  11 ee 20 2e 5f 77 61 69  |b dummy... ._wai|
00002f90  74 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |t               |
00002fa0  62 20 64 75 6d 6d 79 0d  11 f8 20 2e 5f 73 6f 75  |b dummy... ._sou|
00002fb0  6e 64 5f 6f 66 66 20 20  20 20 20 20 20 20 20 20  |nd_off          |
00002fc0  62 20 64 75 6d 6d 79 0d  12 02 20 2e 5f 73 6f 75  |b dummy... ._sou|
00002fd0  6e 64 5f 6f 6e 20 20 20  20 20 20 20 20 20 20 20  |nd_on           |
00002fe0  62 20 64 75 6d 6d 79 0d  12 0c 20 2e 5f 63 6f 70  |b dummy... ._cop|
00002ff0  79 5f 76 61 72 20 20 20  20 20 20 20 20 20 20 20  |y_var           |
00003000  62 20 64 75 6d 6d 79 0d  12 16 20 2e 5f 6d 75 6c  |b dummy... ._mul|
00003010  74 69 70 6c 79 5f 76 61  72 20 20 20 20 20 20 20  |tiply_var       |
00003020  62 20 64 75 6d 6d 79 0d  12 20 20 2e 5f 64 69 76  |b dummy..  ._div|
00003030  69 64 65 5f 76 61 72 20  20 20 20 20 20 20 20 20  |ide_var         |
00003040  62 20 64 75 6d 6d 79 0d  12 2a 20 2e 5f 70 72 69  |b dummy..* ._pri|
00003050  6e 74 5f 76 61 72 20 20  20 20 20 20 20 20 20 20  |nt_var          |
00003060  62 20 64 75 6d 6d 79 0d  12 34 20 2e 5f 64 69 73  |b dummy..4 ._dis|
00003070  70 6c 61 79 5f 76 61 72  20 20 20 20 20 20 20 20  |play_var        |
00003080  62 20 64 75 6d 6d 79 0d  12 3e 20 2e 5f 74 65 78  |b dummy..> ._tex|
00003090  74 5f 63 6f 6c 6f 75 72  20 20 20 20 20 20 20 20  |t_colour        |
000030a0  62 20 64 75 6d 6d 79 0d  12 48 20 2e 5f 74 65 78  |b dummy..H ._tex|
000030b0  74 5f 62 67 64 63 6f 6c  20 20 20 20 20 20 20 20  |t_bgdcol        |
000030c0  62 20 64 75 6d 6d 79 0d  12 52 20 2e 5f 69 6e 69  |b dummy..R ._ini|
000030d0  74 69 61 6c 69 73 65 20  20 20 20 20 20 20 20 20  |tialise         |
000030e0  62 20 64 75 6d 6d 79 0d  12 5c 20 2e 5f 67 65 74  |b dummy..\ ._get|
000030f0  64 61 74 61 20 20 20 20  20 20 20 20 20 20 20 20  |data            |
00003100  62 20 64 75 6d 6d 79 0d  12 66 20 2e 5f 64 69 73  |b dummy..f ._dis|
00003110  70 6c 61 79 20 20 20 20  20 20 20 20 20 20 20 20  |play            |
00003120  62 20 64 75 6d 6d 79 0d  12 70 20 2e 5f 65 76 65  |b dummy..p ._eve|
00003130  6e 74 5f 68 61 6e 64 6c  65 72 20 20 20 20 20 20  |nt_handler      |
00003140  62 20 64 75 6d 6d 79 0d  12 7a 20 2e 5f 73 74 61  |b dummy..z ._sta|
00003150  72 73 5f 6f 66 66 20 20  20 20 20 20 20 20 20 20  |rs_off          |
00003160  62 20 64 75 6d 6d 79 0d  12 84 20 2e 5f 73 74 61  |b dummy... ._sta|
00003170  72 73 5f 6c 65 66 74 20  20 20 20 20 20 20 20 20  |rs_left         |
00003180  62 20 64 75 6d 6d 79 0d  12 8e 20 2e 5f 73 74 61  |b dummy... ._sta|
00003190  72 73 5f 72 69 67 68 74  20 20 20 20 20 20 20 20  |rs_right        |
000031a0  62 20 64 75 6d 6d 79 0d  12 98 20 2e 5f 73 65 74  |b dummy... ._set|
000031b0  5f 73 65 71 75 65 6e 63  65 5f 63 6e 74 20 20 20  |_sequence_cnt   |
000031c0  62 20 64 75 6d 6d 79 0d  12 a2 20 2e 5f 63 6f 6e  |b dummy... ._con|
000031d0  76 65 72 74 5f 74 6f 5f  6e 75 6d 62 65 72 20 20  |vert_to_number  |
000031e0  62 20 64 75 6d 6d 79 0d  12 ac 20 2e 5f 70 72 69  |b dummy... ._pri|
000031f0  6e 74 5f 6e 75 6d 62 65  72 20 20 20 20 20 20 20  |nt_number       |
00003200  62 20 64 75 6d 6d 79 0d  12 b6 20 2e 5f 6f 76 65  |b dummy... ._ove|
00003210  72 6c 61 70 20 20 20 20  20 20 20 20 20 20 20 20  |rlap            |
00003220  62 20 64 75 6d 6d 79 0d  12 c0 20 2e 5f 67 65 74  |b dummy... ._get|
00003230  5f 65 6e 74 72 79 5f 73  69 7a 65 20 20 20 20 20  |_entry_size     |
00003240  62 20 64 75 6d 6d 79 0d  12 ca 20 2e 5f 67 65 74  |b dummy... ._get|
00003250  5f 68 65 61 64 65 72 5f  73 69 7a 65 20 20 20 20  |_header_size    |
00003260  62 20 64 75 6d 6d 79 0d  12 d4 20 2e 5f 67 65 74  |b dummy... ._get|
00003270  5f 6f 62 6a 65 63 74 5f  70 74 72 20 20 20 20 20  |_object_ptr     |
00003280  62 20 64 75 6d 6d 79 0d  12 de 20 2e 5f 67 65 74  |b dummy... ._get|
00003290  5f 62 6f 75 6e 64 69 6e  67 5f 62 6f 78 20 20 20  |_bounding_box   |
000032a0  62 20 64 75 6d 6d 79 0d  12 e8 20 2e 5f 67 65 74  |b dummy... ._get|
000032b0  5f 63 6f 6f 72 64 73 20  20 20 20 20 20 20 20 20  |_coords         |
000032c0  62 20 64 75 6d 6d 79 0d  12 f2 20 2e 5f 67 65 74  |b dummy... ._get|
000032d0  5f 76 65 6c 6f 63 69 74  69 65 73 20 20 20 20 20  |_velocities     |
000032e0  62 20 64 75 6d 6d 79 0d  12 fc 20 2e 5f 73 65 74  |b dummy... ._set|
000032f0  5f 76 65 6c 6f 63 69 74  69 65 73 20 20 20 20 20  |_velocities     |
00003300  62 20 64 75 6d 6d 79 0d  13 06 20 2e 5f 63 68 65  |b dummy... ._che|
00003310  63 6b 5f 69 66 5f 61 63  74 69 76 65 20 20 20 20  |ck_if_active    |
00003320  62 20 64 75 6d 6d 79 0d  13 10 20 2e 5f 63 68 65  |b dummy... ._che|
00003330  63 6b 5f 69 67 6e 6f 72  65 20 20 20 20 20 20 20  |ck_ignore       |
00003340  62 20 64 75 6d 6d 79 0d  13 1a 20 2e 5f 63 68 65  |b dummy... ._che|
00003350  63 6b 5f 69 66 5f 76 69  73 69 62 6c 65 20 20 20  |ck_if_visible   |
00003360  62 20 64 75 6d 6d 79 0d  13 24 20 2e 5f 67 65 74  |b dummy..$ ._get|
00003370  5f 6f 62 6a 65 63 74 5f  66 6c 61 67 73 20 20 20  |_object_flags   |
00003380  62 20 64 75 6d 6d 79 0d  13 2e 05 5d 0d 13 38 04  |b dummy....]..8.|
00003390  0d 13 42 10 e3 20 49 25  3d 31 20 b8 20 32 30 30  |..B.. I%=1 . 200|
000033a0  0d 13 4c 0d 5b 4f 50 54  20 70 61 73 73 0d 13 56  |..L.[OPT pass..V|
000033b0  0b 62 20 64 75 6d 6d 79  0d 13 60 05 5d 0d 13 6a  |.b dummy..`.]..j|
000033c0  05 ed 0d 13 74 0d 5b 4f  50 54 20 70 61 73 73 0d  |....t.[OPT pass.|
000033d0  13 7e 0a 2e 64 75 6d 6d  79 0d 13 88 0e 6d 6f 76  |.~..dummy....mov|
000033e0  20 70 63 2c 72 31 34 0d  13 92 05 5d 0d 13 9c 05  | pc,r14....]....|
000033f0  e1 0d 13 a6 04 0d 13 b0  25 dd 20 f2 72 65 61 64  |........%. .read|
00003400  5f 74 75 6e 65 73 28 6e  61 6d 65 24 2c 74 75 6e  |_tunes(name$,tun|
00003410  65 24 28 29 2c f8 20 49  25 29 0d 13 ba 13 ea 20  |e$(),. I%)..... |
00003420  63 68 6e 25 2c 70 74 72  2c 63 68 72 24 0d 13 c4  |chn%,ptr,chr$...|
00003430  08 49 25 3d 30 0d 13 ce  11 63 68 6e 25 3d 8e 28  |.I%=0....chn%=.(|
00003440  6e 61 6d 65 24 29 0d 13  d8 0f e7 20 63 68 6e 25  |name$)..... chn%|
00003450  3c 3e 30 20 8c 0d 13 e2  11 20 20 c8 95 20 ac 20  |<>0 .....  .. . |
00003460  c5 23 63 68 6e 25 0d 13  ec 14 20 20 20 20 74 75  |.#chn%....    tu|
00003470  6e 65 24 28 49 25 29 3d  22 22 0d 13 f6 19 20 20  |ne$(I%)=""....  |
00003480  20 20 e7 20 c5 23 63 68  6e 25 20 d9 23 63 68 6e  |  . .#chn% .#chn|
00003490  25 3a e1 0d 14 00 13 20  20 20 20 63 68 72 25 3d  |%:.....    chr%=|
000034a0  9a 23 63 68 6e 25 0d 14  0a 12 20 20 20 20 c8 95  |.#chn%....    ..|
000034b0  20 63 68 72 25 3e 33 31  0d 14 14 16 20 20 20 20  | chr%>31....    |
000034c0  20 20 63 68 72 24 3d bd  28 63 68 72 25 29 0d 14  |  chr$=.(chr%)..|
000034d0  1e 19 20 20 20 20 20 20  74 75 6e 65 24 28 49 25  |..      tune$(I%|
000034e0  29 2b 3d 63 68 72 24 0d  14 28 21 20 20 20 20 20  |)+=chr$..(!     |
000034f0  20 e7 20 c5 23 63 68 6e  25 20 49 25 2b 3d 31 3a  | . .#chn% I%+=1:|
00003500  d9 23 63 68 6e 25 3a e1  0d 14 32 15 20 20 20 20  |.#chn%:...2.    |
00003510  20 20 63 68 72 25 3d 9a  23 63 68 6e 25 0d 14 3c  |  chr%=.#chn%..<|
00003520  09 20 20 20 20 ce 0d 14  46 0d 20 20 20 20 49 25  |.    ...F.    I%|
00003530  2b 3d 31 0d 14 50 3b 20  20 20 20 e7 20 49 25 3d  |+=1..P;    . I%=|
00003540  6d 61 78 5f 74 75 6e 65  73 20 85 20 31 2c 22 54  |max_tunes . 1,"T|
00003550  6f 6f 20 6d 61 6e 79 20  74 75 6e 65 73 20 69 6e  |oo many tunes in|
00003560  20 27 54 75 6e 65 73 27  20 66 69 6c 65 22 0d 14  | 'Tunes' file"..|
00003570  5a 07 20 20 ce 0d 14 64  0c 20 20 d9 23 63 68 6e  |Z.  ...d.  .#chn|
00003580  25 0d 14 6e 05 cd 0d 14  78 05 e1 0d 14 82 04 0d  |%..n....x.......|
00003590  14 8c 25 dd 20 f2 65 6e  64 5f 6f 66 5f 67 61 6d  |..%. .end_of_gam|
000035a0  65 28 64 65 6c 61 79 2c  73 70 72 69 74 65 24 2c  |e(delay,sprite$,|
000035b0  58 2c 59 29 0d 14 96 21  ea 20 74 69 6d 65 2c 77  |X,Y)...!. time,w|
000035c0  69 64 74 68 2c 68 65 69  67 68 74 2c 72 69 67 68  |idth,height,righ|
000035d0  74 2c 74 6f 70 0d 14 a0  22 e7 20 64 65 6c 61 79  |t,top...". delay|
000035e0  3d 2d 32 20 8c 20 e1 3a  f4 20 44 6f 6e 27 74 20  |=-2 . .:. Don't |
000035f0  73 68 6f 77 20 69 74 0d  14 aa 42 c8 99 20 22 4f  |show it...B.. "O|
00003600  53 5f 53 70 72 69 74 65  4f 70 22 2c 32 35 36 2b  |S_SpriteOp",256+|
00003610  34 30 2c 73 70 72 69 74  65 5f 61 72 65 61 32 2c  |40,sprite_area2,|
00003620  73 70 72 69 74 65 24 20  b8 20 2c 2c 2c 77 69 64  |sprite$ . ,,,wid|
00003630  74 68 2c 68 65 69 67 68  74 0d 14 b4 1a 77 69 64  |th,height....wid|
00003640  74 68 20 20 3d 20 77 69  64 74 68 20 3c 3c 20 58  |th  = width << X|
00003650  45 69 67 0d 14 be 1b 68  65 69 67 68 74 20 3d 20  |Eig....height = |
00003660  68 65 69 67 68 74 20 3c  3c 20 59 45 69 67 0d 14  |height << YEig..|
00003670  c8 15 72 69 67 68 74 20  3d 20 58 20 2b 20 77 69  |..right = X + wi|
00003680  64 74 68 0d 14 d2 16 74  6f 70 20 20 20 3d 20 59  |dth....top   = Y|
00003690  20 2b 20 68 65 69 67 68  74 0d 14 dc 3f c8 99 20  | + height...?.. |
000036a0  22 4f 53 5f 53 70 72 69  74 65 4f 70 22 2c 32 35  |"OS_SpriteOp",25|
000036b0  36 2b 31 36 2c 73 70 72  69 74 65 5f 61 72 65 61  |6+16,sprite_area|
000036c0  32 2c 22 74 65 6d 70 22  2c 30 2c 58 2c 59 2c 72  |2,"temp",0,X,Y,r|
000036d0  69 67 68 74 2c 74 6f 70  0d 14 e6 36 c8 99 20 22  |ight,top...6.. "|
000036e0  4f 53 5f 53 70 72 69 74  65 4f 70 22 2c 32 35 36  |OS_SpriteOp",256|
000036f0  2b 33 34 2c 73 70 72 69  74 65 5f 61 72 65 61 32  |+34,sprite_area2|
00003700  2c 73 70 72 69 74 65 24  2c 58 2c 59 2c 38 0d 14  |,sprite$,X,Y,8..|
00003710  f0 0a 74 69 6d 65 3d 91  0d 14 fa 2e e7 20 64 65  |..time=...... de|
00003720  6c 61 79 3d 2d 31 20 8c  20 74 69 6d 65 3d a5 20  |lay=-1 . time=. |
00003730  8b 20 f5 20 fd 20 91 3e  74 69 6d 65 2b 64 65 6c  |. . . .>time+del|
00003740  61 79 2a 31 30 30 0d 15  04 35 c8 99 20 22 4f 53  |ay*100...5.. "OS|
00003750  5f 53 70 72 69 74 65 4f  70 22 2c 32 35 36 2b 33  |_SpriteOp",256+3|
00003760  34 2c 73 70 72 69 74 65  5f 61 72 65 61 32 2c 22  |4,sprite_area2,"|
00003770  74 65 6d 70 22 2c 58 2c  59 2c 38 0d 15 0e 05 e1  |temp",X,Y,8.....|
00003780  0d 15 18 04 0d 15 22 20  dd 20 a4 61 6e 6f 74 68  |......" . .anoth|
00003790  65 72 28 73 70 72 69 74  65 24 2c 58 2c 59 2c 6b  |er(sprite$,X,Y,k|
000037a0  65 79 24 29 0d 15 2c 23  ea 20 41 6e 73 77 65 72  |ey$)..,#. Answer|
000037b0  2c 77 69 64 74 68 2c 68  65 69 67 68 74 2c 72 69  |,width,height,ri|
000037c0  67 68 74 2c 74 6f 70 0d  15 36 04 0d 15 40 42 c8  |ght,top..6...@B.|
000037d0  99 20 22 4f 53 5f 53 70  72 69 74 65 4f 70 22 2c  |. "OS_SpriteOp",|
000037e0  32 35 36 2b 34 30 2c 73  70 72 69 74 65 5f 61 72  |256+40,sprite_ar|
000037f0  65 61 32 2c 73 70 72 69  74 65 24 20 b8 20 2c 2c  |ea2,sprite$ . ,,|
00003800  2c 77 69 64 74 68 2c 68  65 69 67 68 74 0d 15 4a  |,width,height..J|
00003810  1a 77 69 64 74 68 20 20  3d 20 77 69 64 74 68 20  |.width  = width |
00003820  3c 3c 20 58 45 69 67 0d  15 54 1b 68 65 69 67 68  |<< XEig..T.heigh|
00003830  74 20 3d 20 68 65 69 67  68 74 20 3c 3c 20 59 45  |t = height << YE|
00003840  69 67 0d 15 5e 15 72 69  67 68 74 20 3d 20 58 20  |ig..^.right = X |
00003850  2b 20 77 69 64 74 68 0d  15 68 16 74 6f 70 20 20  |+ width..h.top  |
00003860  20 3d 20 59 20 2b 20 68  65 69 67 68 74 0d 15 72  | = Y + height..r|
00003870  3f c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  |?.. "OS_SpriteOp|
00003880  22 2c 32 35 36 2b 31 36  2c 73 70 72 69 74 65 5f  |",256+16,sprite_|
00003890  61 72 65 61 32 2c 22 74  65 6d 70 22 2c 30 2c 58  |area2,"temp",0,X|
000038a0  2c 59 2c 72 69 67 68 74  2c 74 6f 70 0d 15 7c 36  |,Y,right,top..|6|
000038b0  c8 99 20 22 4f 53 5f 53  70 72 69 74 65 4f 70 22  |.. "OS_SpriteOp"|
000038c0  2c 32 35 36 2b 33 34 2c  73 70 72 69 74 65 5f 61  |,256+34,sprite_a|
000038d0  72 65 61 32 2c 73 70 72  69 74 65 24 2c 58 2c 59  |rea2,sprite$,X,Y|
000038e0  2c 38 0d 15 86 04 0d 15  90 10 ff 28 22 46 58 20  |,8.........("FX |
000038f0  31 35 2c 30 22 29 0d 15  9a 05 f5 0d 15 a4 15 20  |15,0")......... |
00003900  20 41 6e 73 77 65 72 3d  a7 6b 65 79 24 2c be 29  | Answer=.key$,.)|
00003910  0d 15 ae 0e fd 20 41 6e  73 77 65 72 3e 30 0d 15  |..... Answer>0..|
00003920  b8 35 c8 99 20 22 4f 53  5f 53 70 72 69 74 65 4f  |.5.. "OS_SpriteO|
00003930  70 22 2c 32 35 36 2b 33  34 2c 73 70 72 69 74 65  |p",256+34,sprite|
00003940  5f 61 72 65 61 32 2c 22  74 65 6d 70 22 2c 58 2c  |_area2,"temp",X,|
00003950  59 2c 38 0d 15 c2 18 e7  20 41 6e 73 77 65 72 3c  |Y,8..... Answer<|
00003960  33 20 8c 20 3d b9 20 8b  20 3d a3 0d 15 cc 04 0d  |3 . =. . =......|
00003970  15 d6 17 dd 20 f2 68 69  67 68 73 63 6f 72 65 28  |.... .highscore(|
00003980  73 63 6f 72 65 29 0d 15  e0 24 ea 20 49 25 2c 4a  |score)...$. I%,J|
00003990  25 2c 54 24 2c 6e 65 77  68 69 67 68 2c 6e 61 6d  |%,T$,newhigh,nam|
000039a0  65 24 2c 68 73 77 2c 68  73 68 0d 15 ea 17 e7 20  |e$,hsw,hsh..... |
000039b0  73 68 6f 77 24 3d 22 4e  45 56 45 52 22 20 8c 20  |show$="NEVER" . |
000039c0  e1 0d 15 f4 04 0d 15 fe  16 4a 25 3d 6d 61 78 68  |.........J%=maxh|
000039d0  69 3a 6e 65 77 68 69 67  68 3d a3 0d 16 08 1d c8  |i:newhigh=......|
000039e0  95 20 73 63 6f 72 65 3e  73 63 6f 72 65 28 4a 25  |. score>score(J%|
000039f0  29 20 80 20 4a 25 3e 30  0d 16 12 0f 20 20 6e 65  |) . J%>0....  ne|
00003a00  77 68 69 67 68 3d b9 0d  16 1c 0b 20 20 4a 25 2d  |whigh=.....  J%-|
00003a10  3d 31 0d 16 26 05 ce 0d  16 30 26 e7 20 ac 20 6e  |=1..&....0&. . n|
00003a20  65 77 68 69 67 68 20 80  20 73 68 6f 77 24 3d 22  |ewhigh . show$="|
00003a30  4e 45 57 53 43 4f 52 45  22 20 8c 20 e1 0d 16 3a  |NEWSCORE" . ...:|
00003a40  04 0d 16 44 49 c8 99 20  22 4f 53 5f 53 70 72 69  |...DI.. "OS_Spri|
00003a50  74 65 4f 70 22 2c 32 35  36 2b 34 30 2c 73 70 72  |teOp",256+40,spr|
00003a60  69 74 65 5f 61 72 65 61  32 2c 68 73 5f 73 70 72  |ite_area2,hs_spr|
00003a70  69 74 65 24 20 b8 20 2c  2c 2c 68 73 77 69 64 74  |ite$ . ,,,hswidt|
00003a80  68 2c 68 73 68 65 69 67  68 74 0d 16 4e 1e 68 73  |h,hsheight..N.hs|
00003a90  77 69 64 74 68 20 20 3d  20 68 73 77 69 64 74 68  |width  = hswidth|
00003aa0  20 3c 3c 20 58 45 69 67  0d 16 58 1f 68 73 68 65  | << XEig..X.hshe|
00003ab0  69 67 68 74 20 3d 20 68  73 68 65 69 67 68 74 20  |ight = hsheight |
00003ac0  3c 3c 20 59 45 69 67 0d  16 62 32 68 73 77 3d 6d  |<< YEig..b2hsw=m|
00003ad0  61 78 6c 65 6e 2a 77 69  64 74 68 2b 6d 61 78 64  |axlen*width+maxd|
00003ae0  69 67 69 74 73 2a 77 69  64 74 68 2b 33 2a 77 69  |igits*width+3*wi|
00003af0  64 74 68 2b 34 38 2b 32  34 0d 16 6c 22 68 73 68  |dth+48+24..l"hsh|
00003b00  3d 6d 61 78 68 69 2a 32  2a 68 65 69 67 68 74 2b  |=maxhi*2*height+|
00003b10  32 34 2b 68 73 68 65 69  67 68 74 0d 16 76 04 0d  |24+hsheight..v..|
00003b20  16 80 3c f2 73 6c 61 62  28 68 73 78 2c 68 73 79  |..<.slab(hsx,hsy|
00003b30  2c 68 73 77 2c 68 73 68  2c 31 36 2c 68 69 6c 69  |,hsw,hsh,16,hili|
00003b40  74 65 2c 73 6c 61 62 5f  63 6f 6c 6f 75 72 2c 6c  |te,slab_colour,l|
00003b50  6f 6c 69 74 65 2c 6c 69  6e 65 29 0d 16 8a 5d c8  |olite,line)...].|
00003b60  99 20 22 4f 53 5f 53 70  72 69 74 65 4f 70 22 2c  |. "OS_SpriteOp",|
00003b70  32 35 36 2b 33 34 2c 73  70 72 69 74 65 5f 61 72  |256+34,sprite_ar|
00003b80  65 61 32 2c 68 73 5f 73  70 72 69 74 65 24 2c 68  |ea2,hs_sprite$,h|
00003b90  73 78 2b 28 68 73 77 2d  68 73 77 69 64 74 68 29  |sx+(hsw-hswidth)|
00003ba0  2f 32 2c 68 73 79 2b 68  73 68 2d 68 73 68 65 69  |/2,hsy+hsh-hshei|
00003bb0  67 68 74 2d 31 36 2c 38  0d 16 94 04 0d 16 9e 14  |ght-16,8........|
00003bc0  e3 20 49 25 3d 30 20 b8  20 6d 61 78 68 69 2d 31  |. I%=0 . maxhi-1|
00003bd0  0d 16 a8 53 20 20 f2 73  6c 61 62 28 68 73 78 2b  |...S  .slab(hsx+|
00003be0  32 34 2c 68 73 79 2b 32  34 2b 49 25 2a 32 2a 68  |24,hsy+24+I%*2*h|
00003bf0  65 69 67 68 74 2c 77 69  64 74 68 2a 33 2c 68 65  |eight,width*3,he|
00003c00  69 67 68 74 2b 31 36 2c  34 2c 6c 6f 6c 69 74 65  |ight+16,4,lolite|
00003c10  2c 69 6e 73 65 74 2c 68  69 6c 69 74 65 2c 6c 69  |,inset,hilite,li|
00003c20  6e 65 29 0d 16 b2 14 20  20 54 24 3d c3 28 6d 61  |ne)....  T$=.(ma|
00003c30  78 68 69 2d 49 25 29 0d  16 bc 4a 20 20 f2 66 61  |xhi-I%)...J  .fa|
00003c40  6e 63 79 5f 70 72 69 6e  74 28 54 24 2c 68 73 78  |ncy_print(T$,hsx|
00003c50  2b 32 34 2b 28 33 2d a9  54 24 29 2a 77 69 64 74  |+24+(3-.T$)*widt|
00003c60  68 2f 32 2c 68 73 79 2b  32 34 2b 49 25 2a 32 2a  |h/2,hsy+24+I%*2*|
00003c70  68 65 69 67 68 74 2b 38  2c 31 2c 31 2c 31 2c 31  |height+8,1,1,1,1|
00003c80  29 0d 16 c6 63 20 20 f2  73 6c 61 62 28 68 73 78  |)...c  .slab(hsx|
00003c90  2b 32 34 2b 77 69 64 74  68 2a 33 2b 31 32 2c 68  |+24+width*3+12,h|
00003ca0  73 79 2b 32 34 2b 49 25  2a 32 2a 68 65 69 67 68  |sy+24+I%*2*heigh|
00003cb0  74 2c 6d 61 78 6c 65 6e  2a 77 69 64 74 68 2c 68  |t,maxlen*width,h|
00003cc0  65 69 67 68 74 2b 31 36  2c 34 2c 6c 6f 6c 69 74  |eight+16,4,lolit|
00003cd0  65 2c 69 6e 73 65 74 2c  68 69 6c 69 74 65 2c 6c  |e,inset,hilite,l|
00003ce0  69 6e 65 29 0d 16 d0 52  20 20 f2 66 61 6e 63 79  |ine)...R  .fancy|
00003cf0  5f 70 72 69 6e 74 28 6e  61 6d 65 24 28 6d 61 78  |_print(name$(max|
00003d00  68 69 2d 49 25 29 2c 68  73 78 2b 32 34 2b 77 69  |hi-I%),hsx+24+wi|
00003d10  64 74 68 2a 33 2b 32 30  2c 68 73 79 2b 32 34 2b  |dth*3+20,hsy+24+|
00003d20  49 25 2a 32 2a 68 65 69  67 68 74 2b 38 2c 31 2c  |I%*2*height+8,1,|
00003d30  31 2c 31 2c 31 29 0d 16  da 73 20 20 f2 73 6c 61  |1,1,1)...s  .sla|
00003d40  62 28 68 73 78 2b 32 34  2b 77 69 64 74 68 2a 33  |b(hsx+24+width*3|
00003d50  2b 32 30 2b 6d 61 78 6c  65 6e 2a 77 69 64 74 68  |+20+maxlen*width|
00003d60  2c 68 73 79 2b 32 34 2b  49 25 2a 32 2a 68 65 69  |,hsy+24+I%*2*hei|
00003d70  67 68 74 2c 6d 61 78 64  69 67 69 74 73 2a 77 69  |ght,maxdigits*wi|
00003d80  64 74 68 2c 68 65 69 67  68 74 2b 31 36 2c 34 2c  |dth,height+16,4,|
00003d90  6c 6f 6c 69 74 65 2c 69  6e 73 65 74 2c 68 69 6c  |lolite,inset,hil|
00003da0  69 74 65 2c 6c 69 6e 65  29 0d 16 e4 62 20 20 f2  |ite,line)...b  .|
00003db0  66 61 6e 63 79 5f 70 72  69 6e 74 28 c3 28 73 63  |fancy_print(.(sc|
00003dc0  6f 72 65 28 6d 61 78 68  69 2d 49 25 29 29 2c 68  |ore(maxhi-I%)),h|
00003dd0  73 78 2b 32 34 2b 77 69  64 74 68 2a 33 2b 32 38  |sx+24+width*3+28|
00003de0  2b 6d 61 78 6c 65 6e 2a  77 69 64 74 68 2c 68 73  |+maxlen*width,hs|
00003df0  79 2b 32 34 2b 49 25 2a  32 2a 68 65 69 67 68 74  |y+24+I%*2*height|
00003e00  2b 38 2c 31 2c 31 2c 31  2c 31 29 0d 16 ee 05 ed  |+8,1,1,1,1).....|
00003e10  0d 16 f8 0f e7 20 6e 65  77 68 69 67 68 20 8c 0d  |..... newhigh ..|
00003e20  17 02 0b 20 20 4a 25 2b  3d 31 0d 17 0c 1c 20 20  |...  J%+=1....  |
00003e30  e3 20 49 25 3d 6d 61 78  68 69 20 b8 20 4a 25 2b  |. I%=maxhi . J%+|
00003e40  31 20 88 20 2d 31 0d 17  16 1d 20 20 20 20 6e 61  |1 . -1....    na|
00003e50  6d 65 24 28 49 25 29 3d  6e 61 6d 65 24 28 49 25  |me$(I%)=name$(I%|
00003e60  2d 31 29 0d 17 20 1d 20  20 20 20 73 63 6f 72 65  |-1).. .    score|
00003e70  28 49 25 29 3d 73 63 6f  72 65 28 49 25 2d 31 29  |(I%)=score(I%-1)|
00003e80  0d 17 2a 56 20 20 20 20  f2 66 61 6e 63 79 5f 70  |..*V    .fancy_p|
00003e90  72 69 6e 74 28 6e 61 6d  65 24 28 49 25 29 2c 68  |rint(name$(I%),h|
00003ea0  73 78 2b 32 34 2b 77 69  64 74 68 2a 33 2b 32 30  |sx+24+width*3+20|
00003eb0  2c 68 73 79 2b 32 34 2b  28 6d 61 78 68 69 2d 49  |,hsy+24+(maxhi-I|
00003ec0  25 29 2a 32 2a 68 65 69  67 68 74 2b 38 2c 31 2c  |%)*2*height+8,1,|
00003ed0  31 2c 31 2c 31 29 0d 17  34 66 20 20 20 20 f2 66  |1,1,1)..4f    .f|
00003ee0  61 6e 63 79 5f 70 72 69  6e 74 28 c3 28 73 63 6f  |ancy_print(.(sco|
00003ef0  72 65 28 49 25 29 29 2c  68 73 78 2b 32 34 2b 77  |re(I%)),hsx+24+w|
00003f00  69 64 74 68 2a 33 2b 32  38 2b 6d 61 78 6c 65 6e  |idth*3+28+maxlen|
00003f10  2a 77 69 64 74 68 2c 68  73 79 2b 32 34 2b 28 6d  |*width,hsy+24+(m|
00003f20  61 78 68 69 2d 49 25 29  2a 32 2a 68 65 69 67 68  |axhi-I%)*2*heigh|
00003f30  74 2b 38 2c 31 2c 31 2c  31 2c 31 29 0d 17 3e 07  |t+8,1,1,1,1)..>.|
00003f40  20 20 ed 0d 17 48 59 20  20 f2 66 61 6e 63 79 5f  |  ...HY  .fancy_|
00003f50  70 72 69 6e 74 28 c4 6d  61 78 6c 65 6e 2d 31 2c  |print(.maxlen-1,|
00003f60  22 20 22 29 2c 68 73 78  2b 32 34 2b 77 69 64 74  |" "),hsx+24+widt|
00003f70  68 2a 33 2b 32 30 2c 68  73 79 2b 32 34 2b 28 6d  |h*3+20,hsy+24+(m|
00003f80  61 78 68 69 2d 4a 25 29  2a 32 2a 68 65 69 67 68  |axhi-J%)*2*heigh|
00003f90  74 2b 38 2c 31 2c 31 2c  31 2c 31 29 0d 17 52 60  |t+8,1,1,1,1)..R`|
00003fa0  20 20 f2 66 61 6e 63 79  5f 70 72 69 6e 74 28 c3  |  .fancy_print(.|
00003fb0  28 73 63 6f 72 65 29 2c  68 73 78 2b 32 34 2b 77  |(score),hsx+24+w|
00003fc0  69 64 74 68 2a 33 2b 32  38 2b 6d 61 78 6c 65 6e  |idth*3+28+maxlen|
00003fd0  2a 77 69 64 74 68 2c 68  73 79 2b 32 34 2b 28 6d  |*width,hsy+24+(m|
00003fe0  61 78 68 69 2d 4a 25 29  2a 32 2a 68 65 69 67 68  |axhi-J%)*2*heigh|
00003ff0  74 2b 38 2c 31 2c 31 2c  31 2c 31 29 0d 17 5c 47  |t+8,1,1,1,1)..\G|
00004000  20 20 6e 61 6d 65 24 3d  a4 69 6e 70 75 74 5f 6e  |  name$=.input_n|
00004010  61 6d 65 28 68 73 78 2b  32 34 2b 77 69 64 74 68  |ame(hsx+24+width|
00004020  2a 33 2b 32 30 2c 68 73  79 2b 32 34 2b 28 6d 61  |*3+20,hsy+24+(ma|
00004030  78 68 69 2d 4a 25 29 2a  32 2a 68 65 69 67 68 74  |xhi-J%)*2*height|
00004040  2b 38 29 0d 17 66 2d 20  20 6e 61 6d 65 24 28 4a  |+8)..f-  name$(J|
00004050  25 29 3d c0 6e 61 6d 65  24 2b c4 6d 61 78 6c 65  |%)=.name$+.maxle|
00004060  6e 2c 22 20 22 29 2c 6d  61 78 6c 65 6e 2d 31 29  |n," "),maxlen-1)|
00004070  0d 17 70 15 20 20 73 63  6f 72 65 28 4a 25 29 3d  |..p.  score(J%)=|
00004080  73 63 6f 72 65 0d 17 7a  54 20 20 f2 66 61 6e 63  |score..zT  .fanc|
00004090  79 5f 70 72 69 6e 74 28  6e 61 6d 65 24 28 4a 25  |y_print(name$(J%|
000040a0  29 2c 68 73 78 2b 32 34  2b 77 69 64 74 68 2a 33  |),hsx+24+width*3|
000040b0  2b 32 30 2c 68 73 79 2b  32 34 2b 28 6d 61 78 68  |+20,hsy+24+(maxh|
000040c0  69 2d 4a 25 29 2a 32 2a  68 65 69 67 68 74 2b 38  |i-J%)*2*height+8|
000040d0  2c 31 2c 31 2c 31 2c 31  29 0d 17 84 05 cd 0d 17  |,1,1,1,1).......|
000040e0  8e 05 e1 0d 17 98 04 0d  17 a2 16 dd 20 a4 69 6e  |............ .in|
000040f0  70 75 74 5f 6e 61 6d 65  28 58 2c 59 29 0d 17 ac  |put_name(X,Y)...|
00004100  18 ea 20 63 68 72 2c 49  25 2c 6e 61 6d 65 24 2c  |.. chr,I%,name$,|
00004110  64 75 6d 6d 79 0d 17 b6  0b 2a 46 58 32 31 2c 30  |dummy....*FX21,0|
00004120  0d 17 c0 0a 2a 46 58 34  2c 31 0d 17 ca 21 f2 66  |....*FX4,1...!.f|
00004130  61 6e 63 79 5f 70 72 69  6e 74 28 22 5f 22 2c 58  |ancy_print("_",X|
00004140  2c 59 2c 31 2c 31 2c 31  2c 31 29 0d 17 d4 09 63  |,Y,1,1,1,1)....c|
00004150  68 72 3d a5 0d 17 de 1e  c8 95 20 63 68 72 3c 3e  |hr=....... chr<>|
00004160  31 33 20 80 20 49 25 3c  28 6d 61 78 6c 65 6e 2d  |13 . I%<(maxlen-|
00004170  31 29 0d 17 e8 11 20 20  e7 20 63 68 72 3c 31 32  |1)....  . chr<12|
00004180  37 20 8c 0d 17 f2 19 20  20 6e 61 6d 65 24 2b 3d  |7 .....  name$+=|
00004190  bd 28 63 68 72 29 3a 49  25 2b 3d 31 0d 17 fc 26  |.(chr):I%+=1...&|
000041a0  20 20 f2 66 61 6e 63 79  5f 70 72 69 6e 74 28 bd  |  .fancy_print(.|
000041b0  28 63 68 72 29 2c 58 2c  59 2c 31 2c 31 2c 31 2c  |(chr),X,Y,1,1,1,|
000041c0  31 29 0d 18 06 39 20 20  e7 20 49 25 3c 28 6d 61  |1)...9  . I%<(ma|
000041d0  78 6c 65 6e 2d 31 29 20  f2 66 61 6e 63 79 5f 70  |xlen-1) .fancy_p|
000041e0  72 69 6e 74 28 22 5f 22  2c 58 2b 77 69 64 74 68  |rint("_",X+width|
000041f0  2c 59 2c 31 2c 31 2c 31  2c 31 29 0d 18 10 0e 20  |,Y,1,1,1,1).... |
00004200  20 58 2b 3d 77 69 64 74  68 0d 18 1a 07 20 20 cc  | X+=width....  .|
00004210  0d 18 24 18 20 20 e7 20  63 68 72 3d 31 32 37 20  |..$.  . chr=127 |
00004220  80 20 49 25 3e 30 20 8c  0d 18 2e 25 20 20 20 20  |. I%>0 ....%    |
00004230  f2 66 61 6e 63 79 5f 70  72 69 6e 74 28 22 20 22  |.fancy_print(" "|
00004240  2c 58 2c 59 2c 31 2c 31  2c 31 2c 31 29 0d 18 38  |,X,Y,1,1,1,1)..8|
00004250  0d 20 20 20 20 49 25 2d  3d 31 0d 18 42 10 20 20  |.    I%-=1..B.  |
00004260  20 20 58 2d 3d 77 69 64  74 68 0d 18 4c 25 20 20  |  X-=width..L%  |
00004270  20 20 f2 66 61 6e 63 79  5f 70 72 69 6e 74 28 22  |  .fancy_print("|
00004280  5f 22 2c 58 2c 59 2c 31  2c 31 2c 31 2c 31 29 0d  |_",X,Y,1,1,1,1).|
00004290  18 56 18 20 20 20 20 6e  61 6d 65 24 3d c0 6e 61  |.V.    name$=.na|
000042a0  6d 65 24 2c 49 25 29 0d  18 60 07 20 20 cd 0d 18  |me$,I%)..`.  ...|
000042b0  6a 07 20 20 cd 0d 18 74  0b 20 20 63 68 72 3d a5  |j.  ...t.  chr=.|
000042c0  0d 18 7e 05 ce 0d 18 88  0a 2a 46 58 34 2c 30 0d  |..~......*FX4,0.|
000042d0  18 92 0a 3d 6e 61 6d 65  24 0d 18 9c 04 0d 18 a6  |...=name$.......|
000042e0  33 dd 20 f2 66 61 6e 63  79 5f 70 72 69 6e 74 28  |3. .fancy_print(|
000042f0  74 65 78 74 24 2c 58 2c  59 2c 58 6d 75 6c 74 2c  |text$,X,Y,Xmult,|
00004300  59 6d 75 6c 74 2c 58 64  69 76 2c 59 64 69 76 29  |Ymult,Xdiv,Ydiv)|
00004310  0d 18 b0 12 ea 20 49 25  2c 63 68 24 2c 69 6e 69  |..... I%,ch$,ini|
00004320  74 58 0d 18 ba 0b 69 6e  69 74 58 3d 58 0d 18 c4  |tX....initX=X...|
00004330  0e de 20 73 63 61 6c 65  20 31 36 0d 18 ce 3a 73  |.. scale 16...:s|
00004340  63 61 6c 65 21 30 3d 58  6d 75 6c 74 3a 73 63 61  |cale!0=Xmult:sca|
00004350  6c 65 21 34 3d 59 6d 75  6c 74 3a 73 63 61 6c 65  |le!4=Ymult:scale|
00004360  21 38 3d 58 64 69 76 3a  73 63 61 6c 65 21 31 32  |!8=Xdiv:scale!12|
00004370  3d 59 64 69 76 0d 18 d8  14 e3 20 49 25 3d 31 20  |=Ydiv..... I%=1 |
00004380  b8 20 a9 20 74 65 78 74  24 0d 18 e2 1c 20 20 63  |. . text$....  c|
00004390  68 24 3d c3 28 97 28 c1  74 65 78 74 24 2c 49 25  |h$=.(.(.text$,I%|
000043a0  2c 31 29 29 29 0d 18 ec  21 20 20 f4 20 55 73 65  |,1)))...!  . Use|
000043b0  20 7c 20 61 73 20 61 20  6e 65 77 6c 69 6e 65 20  | | as a newline |
000043c0  6d 61 72 6b 65 72 0d 18  f6 33 20 20 e7 20 63 68  |marker...3  . ch|
000043d0  24 3d 22 31 32 36 22 20  8c 20 63 68 24 3d 22 33  |$="126" . ch$="3|
000043e0  32 22 3a f4 20 52 65 70  6c 61 63 65 20 7e 20 77  |2":. Replace ~ w|
000043f0  69 74 68 20 73 70 61 63  65 0d 19 00 13 20 20 e7  |ith space....  .|
00004400  20 63 68 24 3d 22 31 32  34 22 20 8c 0d 19 0a 23  | ch$="124" ....#|
00004410  20 20 20 20 f4 20 54 68  65 20 27 6e 65 77 6c 69  |    . The 'newli|
00004420  6e 65 27 20 63 68 61 72  61 63 74 65 72 20 7c 0d  |ne' character |.|
00004430  19 14 1e 20 20 20 20 59  2d 3d 68 65 69 67 68 74  |...    Y-=height|
00004440  2a 59 6d 75 6c 74 20 81  20 59 64 69 76 0d 19 1e  |*Ymult . Ydiv...|
00004450  0f 20 20 20 20 58 3d 69  6e 69 74 58 0d 19 28 07  |.    X=initX..(.|
00004460  20 20 cc 0d 19 32 3a 20  20 20 20 c8 99 20 22 4f  |  ...2:    .. "O|
00004470  53 5f 53 70 72 69 74 65  4f 70 22 2c 32 35 36 2b  |S_SpriteOp",256+|
00004480  35 32 2c 61 6c 70 68 61  62 65 74 2c 63 68 24 2c  |52,alphabet,ch$,|
00004490  58 2c 59 2c 38 2c 73 63  61 6c 65 2c 30 0d 19 3c  |X,Y,8,scale,0..<|
000044a0  1d 20 20 20 20 58 2b 3d  77 69 64 74 68 2a 58 6d  |.    X+=width*Xm|
000044b0  75 6c 74 20 81 20 58 64  69 76 0d 19 46 07 20 20  |ult . Xdiv..F.  |
000044c0  cd 0d 19 50 05 ed 0d 19  5a 05 e1 0d 19 64 04 0d  |...P....Z....d..|
000044d0  19 6e 22 dd 20 f2 73 6c  61 62 28 78 2c 79 2c 6c  |.n". .slab(x,y,l|
000044e0  2c 68 2c 77 2c 63 31 2c  63 32 2c 63 33 2c 63 34  |,h,w,c1,c2,c3,c4|
000044f0  29 0d 19 78 07 e6 63 31  0d 19 82 11 c8 93 20 c8  |)..x..c1...... .|
00004500  90 20 78 2c 79 2c 6c 2c  68 0d 19 8c 08 e6 20 63  |. x,y,l,h..... c|
00004510  33 0d 19 96 1b ec 20 78  2b 6c 2d 77 2c 79 2b 68  |3..... x+l-w,y+h|
00004520  2d 77 3a ec 20 78 2b 6c  2c 79 2b 68 0d 19 a0 11  |-w:. x+l,y+h....|
00004530  f0 38 35 2c 78 2b 6c 2c  79 2b 68 2d 77 0d 19 aa  |.85,x+l,y+h-w...|
00004540  17 c8 93 20 c8 90 20 78  2b 77 2c 79 2c 6c 2d 77  |... .. x+w,y,l-w|
00004550  2c 68 2d 77 0d 19 b4 1e  ec 20 78 2c 79 3a ec 20  |,h-w..... x,y:. |
00004560  78 2b 77 2c 79 3a f0 20  38 35 2c 78 2b 77 2c 79  |x+w,y:. 85,x+w,y|
00004570  2b 77 0d 19 be 08 e6 20  63 34 0d 19 c8 15 86 20  |+w..... c4..... |
00004580  78 2c 79 2b 68 2c 78 2b  77 2c 79 2b 68 2d 77 0d  |x,y+h,x+w,y+h-w.|
00004590  19 d2 15 86 20 78 2b 6c  2c 79 2c 78 2b 6c 2d 77  |.... x+l,y,x+l-w|
000045a0  2c 79 2b 77 0d 19 dc 08  e6 20 63 32 0d 19 e6 1d  |,y+w..... c2....|
000045b0  c8 93 20 c8 90 20 78 2b  77 2c 79 2b 77 2c 6c 2d  |.. .. x+w,y+w,l-|
000045c0  32 2a 77 2c 68 2d 32 2a  77 0d 19 f0 05 e1 0d 19  |2*w,h-2*w.......|
000045d0  fa 04 0d 1a 04 1b dd 20  f2 73 6f 72 74 5f 68 69  |....... .sort_hi|
000045e0  67 68 73 63 6f 72 65 73  28 6e 75 6d 29 0d 1a 0e  |ghscores(num)...|
000045f0  0d ea 20 49 25 2c 73 77  6f 70 0d 1a 18 05 f5 0d  |.. I%,swop......|
00004600  1a 22 0c 20 20 73 77 6f  70 3d a3 0d 1a 2c 14 20  |.".  swop=...,. |
00004610  20 e3 20 49 25 3d 31 20  b8 20 6e 75 6d 2d 31 0d  | . I%=1 . num-1.|
00004620  1a 36 23 20 20 20 20 e7  20 73 63 6f 72 65 28 49  |.6#    . score(I|
00004630  25 29 20 3c 20 73 63 6f  72 65 28 49 25 2b 31 29  |%) < score(I%+1)|
00004640  20 8c 0d 1a 40 10 20 20  20 20 20 20 73 77 6f 70  | ...@.      swop|
00004650  3d b9 0d 1a 4a 22 20 20  20 20 20 20 c8 94 20 73  |=...J"      .. s|
00004660  63 6f 72 65 28 49 25 29  2c 73 63 6f 72 65 28 49  |core(I%),score(I|
00004670  25 2b 31 29 0d 1a 54 22  20 20 20 20 20 20 c8 94  |%+1)..T"      ..|
00004680  20 6e 61 6d 65 24 28 49  25 29 2c 6e 61 6d 65 24  | name$(I%),name$|
00004690  28 49 25 2b 31 29 0d 1a  5e 09 20 20 20 20 cd 0d  |(I%+1)..^.    ..|
000046a0  1a 68 07 20 20 ed 0d 1a  72 0c 20 20 6e 75 6d 2d  |.h.  ...r.  num-|
000046b0  3d 31 0d 1a 7c 0c fd 20  ac 20 73 77 6f 70 0d 1a  |=1..|.. . swop..|
000046c0  86 05 e1 0d 1a 90 04 0d  1a 9a 1d dd 20 f2 73 61  |............ .sa|
000046d0  76 65 5f 68 69 67 68 73  63 6f 72 65 73 28 66 69  |ve_highscores(fi|
000046e0  6c 65 24 29 0d 1a a4 21  ea 20 6f 75 74 25 2c 49  |le$)...!. out%,I|
000046f0  25 2c 68 65 61 64 65 72  24 2c 64 61 74 65 24 2c  |%,header$,date$,|
00004700  79 65 61 72 24 0d 1a ae  04 0d 1a b8 11 de 20 4f  |year$......... O|
00004710  53 62 75 66 66 65 72 20  33 32 0d 1a c2 04 0d 1a  |Sbuffer 32......|
00004720  cc db ea 20 85 3a ee 20  85 20 ea 20 e7 20 9f 3d  |... .:. . . . .=|
00004730  26 31 30 38 43 39 20 84  20 9f 3d 26 31 30 38 43  |&108C9 . .=&108C|
00004740  41 20 f2 66 61 6e 63 79  5f 70 72 69 6e 74 28 22  |A .fancy_print("|
00004750  20 20 43 6f 75 6c 64 6e  27 74 20 73 61 76 65 20  |  Couldn't save |
00004760  48 69 67 68 53 63 6f 72  65 20 54 61 62 6c 65 2e  |HighScore Table.|
00004770  20 20 7c 20 20 50 6c 65  61 73 65 20 6d 6f 76 65  |  |  Please move|
00004780  20 77 72 69 74 65 2d 70  72 6f 74 65 63 74 20 74  | write-protect t|
00004790  61 62 20 20 20 7c 74 6f  20 27 77 72 69 74 65 27  |ab   |to 'write'|
000047a0  20 70 6f 73 69 74 69 6f  6e 20 61 6e 64 20 68 69  | position and hi|
000047b0  74 20 52 45 54 55 52 4e  22 2c 38 30 2c 33 30 30  |t RETURN",80,300|
000047c0  2c 31 2c 31 2c 31 2c 31  29 3a 64 75 6d 6d 79 3d  |,1,1,1,1):dummy=|
000047d0  a5 20 8b 20 f1 f6 24 3b  22 20 28 45 72 72 6f 72  |. . ..$;" (Error|
000047e0  20 63 6f 64 65 3a 20 22  3b 7e 9f 3b 22 29 22 3a  | code: ";~.;")":|
000047f0  64 75 6d 6d 79 3d a5 3a  e1 0d 1a d6 04 0d 1a e0  |dummy=.:........|
00004800  2e c8 99 20 22 58 4f 53  5f 52 65 61 64 56 61 72  |... "XOS_ReadVar|
00004810  56 61 6c 22 2c 22 53 79  73 24 44 61 74 65 22 2c  |Val","Sys$Date",|
00004820  4f 53 62 75 66 66 65 72  2c 33 30 0d 1a ea 12 4f  |OSbuffer,30....O|
00004830  53 62 75 66 66 65 72 3f  31 30 3d 31 33 0d 1a f4  |Sbuffer?10=13...|
00004840  13 64 61 74 65 24 3d 24  4f 53 62 75 66 66 65 72  |.date$=$OSbuffer|
00004850  0d 1a fe 2e c8 99 20 22  58 4f 53 5f 52 65 61 64  |...... "XOS_Read|
00004860  56 61 72 56 61 6c 22 2c  22 53 79 73 24 59 65 61  |VarVal","Sys$Yea|
00004870  72 22 2c 4f 53 62 75 66  66 65 72 2c 33 30 0d 1b  |r",OSbuffer,30..|
00004880  08 11 4f 53 62 75 66 66  65 72 3f 34 3d 31 33 0d  |..OSbuffer?4=13.|
00004890  1b 12 13 79 65 61 72 24  3d 24 4f 53 62 75 66 66  |...year$=$OSbuff|
000048a0  65 72 0d 1b 1c 04 0d 1b  26 10 6f 75 74 25 3d ae  |er......&.out%=.|
000048b0  20 66 69 6c 65 24 0d 1b  30 3e 68 65 61 64 65 72  | file$..0>header|
000048c0  24 3d 22 3b 20 43 72 65  61 74 6f 72 20 68 69 67  |$="; Creator hig|
000048d0  68 20 73 63 6f 72 65 20  74 61 62 6c 65 20 28 22  |h score table ("|
000048e0  2b 64 61 74 65 24 2b 22  20 22 2b 79 65 61 72 24  |+date$+" "+year$|
000048f0  2b 22 29 22 0d 1b 3a 12  d5 23 6f 75 74 25 2c 68  |+")"..:..#out%,h|
00004900  65 61 64 65 72 24 0d 1b  44 12 e3 20 49 25 3d 31  |eader$..D.. I%=1|
00004910  20 b8 20 6d 61 78 68 69  0d 1b 4e 28 20 20 d5 23  | . maxhi..N(  .#|
00004920  6f 75 74 25 2c 6e 61 6d  65 24 28 49 25 29 2b 22  |out%,name$(I%)+"|
00004930  3a 20 22 2b c3 28 73 63  6f 72 65 28 49 25 29 29  |: "+.(score(I%))|
00004940  0d 1b 58 05 ed 0d 1b 62  0a d9 23 6f 75 74 25 0d  |..X....b..#out%.|
00004950  1b 6c 1f ff 28 22 53 65  74 54 79 70 65 20 22 2b  |.l..("SetType "+|
00004960  66 69 6c 65 24 2b 22 20  54 65 78 74 22 29 0d 1b  |file$+" Text")..|
00004970  76 05 e1 0d 1b 80 04 0d  ff                       |v........|
00004979