Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function nconcat(n as long,d as long) as string
- dim as string sn
- sn=str(n)
- while left(sn,1)=chr(32):sn=right(sn,len(sn)-1):wend
- if len(sn)<d then sn=string(d-len(sn),"0")+sn
- nconcat=sn
- end function
- Sub Intro(level as long)
- color 15,1
- dim as string gamename,levelname,rating,datapack
- dim as long levelnum,packexists
- dim as long filemode
- datapack="./datapack/level-"+nconcat(level,2)+".txt"
- packexists=open(datapack for input as #filemode)
- if packexists=1 then
- input #filemode,gamename
- input #filemode,levelnum,levelname
- input #filemode,rating
- else
- gamename="Sparked x86"
- levelnum=0
- levelname="Placeholder"
- rating="Debug Mode"
- end if
- close #filemode
- cls : randomize()
- locate 1,1 : print datapack+" ("+nconcat(packexists,4)+","+nconcat(filemode,4)+")"
- locate 5,34 : print gamename;
- locate 7,28 : print "LEVEL "+nconcat(levelnum,2)+": "+levelname;
- locate 9,28 : print "RATING: "+rating;
- locate 15,24 : print "PUSH THE <ENTER> KEY TO START";
- while getkey()<>13 : wend
- end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement