home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World's Top 500 Windows Games
/
Top500WindowsGames.iso
/
jlmwin1
/
jlmwin1.sxt
< prev
next >
Wrap
Text File
|
1996-04-10
|
6KB
|
249 lines
// This is the script file for JLM Windows Games
start:
execute "\jlmwin1\runanim.exe"
set condition 60
loadsound=FALSE
////////////////////////////
// install icons
////////////////////////////
install_icons:
$target = "jlmwin1"
$title = "JLM Software"
$progtitle = "JLM Windows Games"
$destdir = $cd,"\\jlmwin1"
program manager "[CreateGroup(",$title,")]"
program manager "[ShowGroup(1)]"
program manager "[AddItem(",$destdir,"\\",$target,".exe,",$progtitle,",",$destdir,"\\",$target,".exe,0)]"
////////////////////////////
// Drive selection screen
////////////////////////////
get_drives:
$cd1=getedit "editcd"
$hd1=getedit "edithd"
good=FALSE
if strlen $hd1==1
if strlen $cd1==1
good=TRUE
if good==TRUE
$cd=$cd1,":"
$hd=$hd1,":"
set condition 50
// load sounds
load $cd,"\\jlmwin1\\cheer.wav" sound cheer
load $cd,"\\jlmwin1\\sonar1.wav" sound snore
load $cd,"\\jlmwin1\\dyna10.wav" sound press
load $cd,"\\jlmwin1\\gmk.wav" sound final
loadsound=TRUE
play sound cheer
display screen "first"
else
display screen "baddrives"
get_hdrive:
$hd1=getedit "edithd"
good=FALSE
if strlen $hd1==1
good=TRUE
if good==TRUE
$hd=$hd1,":"
display screen "Title"
else
display screen "badhdrives"
////////////////////////////
// Category selection functions
////////////////////////////
cat_sel :
// numcats is number of categories
// load in cats from a file
catlist = new byte[15][50]
load $cd,"\\jlmwin1\\jlmcats.inf" byte cats
// break cats into an array of strings
n=0
test = TRUE
ind=0
while test
ind=parse cats[ind] to $wordread
$catlist[n] = $wordread
if ind==ERROR then test=FALSE
n=n+1
numcats = n
//display element "catlistbox"
//add each item to the list
for n=0 to numcats-1
index = listbox "catlistbox" add $catlist[n]
// set catchoice to first position
$catchoice=$catlist[0]
browse_games: a,b,pos
newcat=TRUE
$catchoice=$catlist[pos]
remove all
display screen "browser"
////////////////////////////
// Game selection functions
////////////////////////////
game_sel :
if newcat==TRUE
$blurbb=" "
pos=0
// load in games from a file
gamelist = new byte[1000][35]
// use string manipulation to load game title list
$filename=$cd,"\\jlmwin1\\",$catchoice strcnt 4,".inf"
load $filename byte games
// break games into an array of strings
n=0
test = TRUE
ind=0
while test
ind=parse games[ind] to $wordread
$gamelist[n]=$wordread
if ind==ERROR then test=FALSE
n=n+1
numgames = (n-1)/4
//add each title to the game list
n=0
while n < (numgames*4-1)
index = listbox "gamelist" add $gamelist[n]
n=n+4
newcat=FALSE
//set catchoice to first position
$gamechoice=$gamelist[pos]
$gamedir=$cd,"\\wingame1\\",$catchoice strcnt 4,"\\",$gamelist[1]
detect_gsel : dummy,stng,pos
blurba=new byte[1000]
$gamechoice=$gamelist[pos*4]
testbrac= strstr $gamelist[pos*4+2];"("
if testbrac>ERROR
undisplay element "runbutton"
else
display element "runbutton"
// maybe put in updating pictures based on current Category
$scrshot=$cd,"\\jlmwin1\\",$catchoice strcnt 4,".bmp"
load $scrshot bitmap scrbmp
display bitmap scrbmp at 385,45
// put short description in box
if file_exist $cd,"\\wingame1\\",$catchoice strcnt 4,"\\",$gamelist[pos*4+1],"\\file_id.diz"
load $cd,"\\wingame1\\",$catchoice strcnt 4,"\\",$gamelist[pos*4+1],"\\file_id.diz" byte blurba
editbox "blurb" = $blurba
else
editbox "blurb" = "No short program description. Try clicking on the View More Information button."
// put title in title box
textbox "titletext" = $gamelist[pos*4]
// make variable for game directory
$gamedir=$cd,"\\wingame1\\",$catchoice strcnt 4,"\\",$gamelist[pos*4+1]
view_info:
$readme=$gamedir,"\\",$gamelist[pos*4+3]
testnone = strstr $readme;"none"
testwri = strstr $readme;".wri"
none=FALSE
wri=FALSE
if testnone>ERROR then none=TRUE
if testwri>ERROR then wri=TRUE
if none==TRUE
play sound press
dialog "Ah, well" ok "Sorry, there is no more information to view. There may be online instructions."
else
// check filesize
sizefile=file_length $readme
if wri==TRUE
execute "write ",$readme
else
if sizefile<60000
execute "notepad ",$readme
else
execute "write ",$readme
print_info:
dialog "Please Note" ok "Use the print facility in Notepad or Write (Wordpad) to print out the documentation."
back_main:
undisplay all
display screen "Title"
///////////////////
// Running game buttons
///////////////////
run_game:
$runcom=$gamedir,"\\",$gamelist[pos*4+2]
testbrac= strstr $runcom;"("
message testbrac
if testbrac==ERROR
execute $runcom
else
play sound press
dialog "Whoops!" ok "This game needs to be installed to your hard drive."
run_game_hd:
testbrac=strstr $gamelist[pos*4+2];"("
if testbrac==0
// remove ( symbol from string
$gamename=$gamelist[pos*4+2] stroff 1
else
$gamename=$gamelist[pos*4+2]
$runcom=$hd,"\\jlmcd\\",$gamelist[pos*4+1],"\\",$gamename
execute $runcom
install_game:
testbrac=strstr $gamelist[pos*4+2];"("
if testbrac==0
// remove ( symbol from string
$gamename=$gamelist[pos*4+2] stroff 1
else
$gamename=$gamelist[pos*4+2]
$gamedirname=$gamelist[pos*4+1]
// make directory
new directory $hd,"\\jlmcd"
play sound snore
$exname=$cd,"\\jlmwin1\\file.exe c ",$gamedir," ",$hd,"\\jlmcd\\",$gamedirname," ",$cd1
execute $exname
dialog "To Run Game With File Manager or Explorer" ok "Browse to the ","\\jlmcd\\",$gamedirname," and double click on ",$gamename," to run."
// ask for icons
insticon=dialog "Install Icons" yesno "Do you want to install an icon for this game in the JLM Software Group?"
if insticon==TRUE
$target = $gamelist[pos*4+2]
$title = "JLM Software"
$destdir = $hd,"\\jlmcd\\",$gamelist[pos*4+1]
program manager "[CreateGroup(",$title,")]"
program manager "[ShowGroup(1)]"
program manager "[AddItem(",$destdir,"\\",$target,",",$gamelist[pos*4],",",$destdir,"\\",$target,",0)]"
deinstall_game:
$gamedirname=$gamelist[pos*4+1]
execute $cd,"\\jlmwin1\\file.exe d ",$hd,"\\jlmcd\\",$gamedirname," ",$cd1
finalsound:
if loadsound==TRUE
play sound final
//////////////////////////////