global isEXE, userColourDepth, cd_volume, gloss_texts, glossList
set isEXE to 1
set the centerStage to 1
if ((the stageTop >= 0) and (the stageLeft >= 0)) = 1 then
set cd_volume to whichCDVolume()
if cd_volume <> EMPTY then
if the machineType < 256 then
if the colorQD = 1 then
set userColourDepth to the colorDepth
else
fatalError("Sources of Faith can only be run on a Macintosh that can be set" && "to 8-bit colour.")
end if
else
if the colorDepth < 8 then
fatalError("Please update your Video Driver to allow 8-bit colour before" && "running Sources of Faith.")
end if
end if
else
fatalError("The Sources of Faith CD-ROM does not appear to be present on your system.")
end if
else
fatalError("Sources of Faith can only be run on a computer with a 640x480 monitor.")
end if
sourceSearchPaths()
sourceMediaPaths()
linkExternalObjects()
if the quickTimePresent = 0 then
fatalError("QuickTime is not installed on your computer.")
end if
set glossList to getFileContent(gloss_texts & "SofIndex.txt")
when keyDown then soundSwitch(the keycode)
end
on linkExternalObjects
global cd_volume
if the machineType < 256 then
else
openXLib(cd_volume & "fileio.dll")
openXLib(cd_volume & "mciqtenu.dll")
openXLib(cd_volume & "playenu.dll")
openXLib(cd_volume & "qthndlr.dll")
openXLib(cd_volume & "qtim.dll")
openXLib(cd_volume & "qtimcmgr.dll")
openXLib(cd_volume & "qtole.dll")
openXLib(cd_volume & "qtvhdw.dll")
openXLib(cd_volume & "viewenu.dll")
end if
end
on whichCDVolume
return the pathName
end
on sourceSearchPaths
global cd_volume
if the machineType < 256 then
append(the searchPath, cd_volume)
append(the searchPath, cd_volume & "IslaMovs:")
append(the searchPath, cd_volume & "IslaSnds:")
append(the searchPath, cd_volume & "Glossary:")
else
append(the searchPath, cd_volume)
append(the searchPath, cd_volume & "IslaMovs\")
append(the searchPath, cd_volume & "IslaSnds\")
append(the searchPath, cd_volume & "Glossary\")
end if
end
on sourceMediaPaths
global cd_volume, mmd_movies, gloss_texts, main_sounds, isla_sounds, isla_movies
if the machineType < 256 then
set mmd_movies to cd_volume
set gloss_texts to cd_volume & "Glossary:"
set main_sounds to cd_volume & "MainSnds:"
set isla_sounds to cd_volume & "IslaSnds:"
set isla_movies to cd_volume & "IslaMovs:"
else
set mmd_movies to cd_volume
set gloss_texts to cd_volume & "Glossary\"
set main_sounds to cd_volume & "MainSnds\"
set isla_sounds to cd_volume & "IslaSnds\"
set isla_movies to cd_volume & "IslaMovs\"
end if
end
on helper
if the mouseCast = 509 then
put "If this button is blue, click for textual information. If a word appears in red" && "in the text field, it is a Glossary term. Click it and you will receive a brief" && "explanation of its meaning. If this button is grey, no further information is" && "available." into field "help"
else
if the mouseCast = 501 then
put "Click this button to Quit from Sources of Faith." into field "help"
else
if the mouseCast = 1 then
put "Click this button to print the textual information displayed when you click the blue" && "Information button. It is not possible to print images, but refer to your" && "computer's user manual to discover how to make a 'screen dump'." into field "help"
else
if the mouseCast = 449 then
set theReligion to (the mouseH - the left of sprite 6) / 78
if theReligion = 1 then
put "The buttons along the bottom of the screen are used to select a particular religion." && "This one is Animism. It looks at Australian Aborigines." into field "help"
else
if theReligion = 2 then
put "The buttons along the bottom of the screen are used to select a particular religion." && "This one is Buddhism." into field "help"
else
if theReligion = 3 then
put "The buttons along the bottom of the screen are used to select a particular religion." && "This one is Christianity." into field "help"
else
if theReligion = 4 then
put "The buttons along the bottom of the screen are used to select a particular religion." && "This one is Hinduism." into field "help"
else
if theReligion = 5 then
put "The buttons along the bottom of the screen are used to select a particular religion." && "This one is Islam." into field "help"
else
if theReligion = 6 then
put "The buttons along the bottom of the screen are used to select a particular religion." && "This one is Judaism." into field "help"
else
if theReligion = 7 then
put "The buttons along the bottom of the screen are used to select a particular religion." && "This one is Taoism." into field "help"
else
if theReligion = 0 then
put "This buttons is called the 'Compass'. Click it to hide all the buttons on the screen" && "so that you can see certain information more clearly. Click it again to" && "show all the buttons once more." into field "help"
end if
end if
end if
end if
end if
end if
end if
end if
else
if the mouseCast = 25 then
set subjectCount to the height of sprite 19 / 8
set theSubject to ((the mouseV - the top of sprite 19) / subjectCount) + 1
if theSubject = 1 then
put "The buttons in the vertical are used to select information about the current" && "religion on a particular topic. Each religion is covered by the same topics." && "This one describes Gods, Deities and Mythical beings." into field "help"
else
if theSubject = 2 then
put "The buttons in the vertical are used to select information about the current" && "religion on a particular topic. Each religion is covered by the same topics." && "This one describes Life Cycles and Rites of Passage." into field "help"
else
if theSubject = 3 then
put "The buttons in the vertical are used to select information about the current" && "religion on a particular topic. Each religion is covered by the same topics." && "This one describes Moral Codes and Ethics." into field "help"
else
if theSubject = 4 then
put "The buttons in the vertical are used to select information about the current" && "religion on a particular topic. Each religion is covered by the same topics." && "This one describes Cultural Achievements (Art, Architecture, Literature and" && "Science)." into field "help"
else
if theSubject = 5 then
put "The buttons in the vertical are used to select information about the current" && "religion on a particular topic. Each religion is covered by the same topics." && "This one describes Festivals and Celebrations." into field "help"
else
if theSubject = 6 then
put "The buttons in the vertical are used to select information about the current" && "religion on a particular topic. Each religion is covered by the same topics." && "This one describes Geographic Spread, Origins and History." into field "help"
else
if theSubject = 7 then
put "The buttons in the vertical are used to select information about the current" && "religion on a particular topic. Each religion is covered by the same topics." && "This one describes major Variations, Branches and Sects." into field "help"
else
if theSubject = 8 then
put "The buttons in the vertical are used to select information about the current" && "religion on a particular topic. Each religion is covered by the same topics." && "This one is a short introductory narration and slide show." into field "help"
end if
end if
end if
end if
end if
end if
end if
end if
else
if the machineType < 256 then
put "Hold down the <Option>-key down and press the <Space>-bar to switch sound" && "on or off" into field "help"
else
put "Hold down the <Alt>-key down and press the <Space>-bar to switch sound" && "on or off" into field "help"