alert("Fischer's Erotic Encyclopedia requires that the number of colors be set to 256 colors. Refer to your Windows documentation to change the number of colors.")
quit()
end if
else
if the colorDepth <> 8 then
set the colorDepth to 8
end if
end if
end
on setUpFilePathDelimiter
global filePathDelimiter
if the machineType = 256 then
set filePathDelimiter to "\"
else
set filePathDelimiter to ":"
end if
end
on CustomCursor alt
global colorcrsr, gFakeWin
if (the machineType = 256) or gFakeWin then
if not alt then
cursor([the number of cast "Cursor icon", the number of cast "Cursor icon Mask"])
else
cursor([the number of cast "Cursor noMask"])
end if
else
if not objectp(colorcrsr) then
openXLib(the pathName & "ColourCursor-XObj")
set colorcrsr to ColorCursor(mnew)
end if
colorcrsr(mGetSetCursor, 9003)
end if
end
on UnCustomCursor
global colorcrsr, gFakeWin
if (the machineType = 256) or gFakeWin then
cursor(0)
else
if objectp(colorcrsr) then
colorcrsr(mReleaseCursor)
colorcrsr(mdispose)
end if
cursor(0)
end if
end
on doHotLink
global section, subsect, page, linkReturn
set linkReturn to list(section, subsect, page)
set parseMe to word 2 of line page of field subsect
set section to char 1 of parseMe
set subsect to value(char 3 of parseMe)
set page to value(char 5 to 7 of parseMe)
sound stop 1
fadeMusicOutSlow()
sound stop 2
repeat with s = 13 to 18
set the visible of sprite s to 0
end repeat
go(the frame + 1)
go(1, section & "section")
end
on doHotLinkReturn
global section, subsect, page, linkReturn
set section to getAt(linkReturn, 1)
set subsect to getAt(linkReturn, 2)
set page to getAt(linkReturn, 3)
sound stop 1
fadeMusicOutSlow()
sound stop 2
repeat with s = 13 to 18
set the visible of sprite s to 0
end repeat
set the visible of sprite 27 to 0
puppetSprite(27, 0)
set linkReturn to []
go(the frame + 1)
go(1, section & "section")
end
on HandleRollover destCast, theScript
set scrCast to the castNum of sprite the clickOn
set the castNum of sprite the clickOn to the number of cast destCast
set isFlashed to 1
updateStage()
repeat while the mouseDown
if isFlashed and not rollOver(the clickOn) then
set isFlashed to 0
set the castNum of sprite the clickOn to scrCast
end if
if not isFlashed and rollOver(the clickOn) then
set isFlashed to 1
set the castNum of sprite the clickOn to the number of cast destCast
end if
updateStage()
end repeat
set the castNum of sprite the clickOn to scrCast
updateStage()
if isFlashed then
do(theScript)
end if
end
on PrevSectKlikt
global subsect, page
if subsect > 0 then
set subsect to subsect - 1
end if
set page to 0
sound stop 1
fadeMusicOutSlow()
sound stop 2
goPage()
end
on PrevPageKlikt
global page
if page > 0 then
set page to page - 1
end if
sound stop 1
goPage()
end
on NextPageKlikt
global page, subsect
if page < the number of lines in field subsect then
set page to page + 1
end if
sound stop 1
goPage()
end
on NextSectKlikt
global subsect, page, linkReturn, gNumSubSections
if subsect < gNumSubSections then
set subsect to subsect + 1
end if
set linkReturn to []
set page to 0
sound stop 1
fadeMusicOutSlow()
sound stop 2
goPage()
end
on MoonKlikt
global subsect, page, linkReturn
set linkReturn to []
set subsect to 0
set page to 0
sound stop 1
fadeMusicOutSlow()
sound stop 2
goPage()
end
on TempleKlikt
global section, subsect, page.linkReturn
set linkReturn to []
set section to "Temple"
set subsect to "0"
set page to "0"
sound stop 1
fadeMusicOutSlow()
sound stop 2
repeat with s = 13 to 18
set the visible of sprite s to 0
end repeat
go(the frame + 1)
go("Buttons", "Temple")
end
on i_buttonKlikt
global section, subsect, page, linkReturn
set linkReturn to []
sound stop 1
fadeMusicOutSlow()
sound stop 2
repeat with s = 13 to 18
set the visible of sprite s to 0
end repeat
go(the frame + 1)
go("Menu", "Temple")
end
on q_buttonKlikt
global section, subsect, page, linkReturn
set linkReturn to []
set section to "Temple"
set subsect to "0"
set page to "0"
sound stop 1
fadeMusicOutSlow()
sound stop 2
repeat with s = 13 to 18
set the visible of sprite s to 0
end repeat
go(the frame + 1)
go("Credits", "Temple")
end
on subButton1Klikt
global subsect, page
set subsect to 1
set page to 0
goPage()
end
on subButton2Klikt
global subsect, page
set subsect to 2
set page to 0
goPage()
end
on subButton3Klikt
global subsect, page
set subsect to 3
set page to 0
goPage()
end
on subButton4Klikt
global subsect, page
set subsect to 4
set page to 0
goPage()
end
on subButton5Klikt
global subsect, page
set subsect to 5
set page to 0
goPage()
end
on subButton6Klikt
global subsect, page
set subsect to 6
set page to 0
goPage()
end
on subButton7Klikt
global subsect, page
set subsect to 7
set page to 0
goPage()
end
on subButton8Klikt
global subsect, page
set subsect to 8
set page to 0
goPage()
end
on subButton9Klikt
global subsect, page
set subsect to 9
set page to 0
goPage()
end
on setUpBannersAndTitlePuppets
global gNumSubSections
set endVal to gNumSubSections + 2
repeat with X = 1 to endVal
puppetSprite(X, 1)
end repeat
end
on setUpBannersAndTitleContent
global subsect, gNumSubSections
set bannerTitleBaseNum to 60 + (subsect * 2)
set the castNum of sprite 1 to bannerTitleBaseNum - 1
puppetSprite(2, 0)
puppetSprite(2, 1)
set the castNum of sprite 2 to bannerTitleBaseNum
set endVal to gNumSubSections + 2
repeat with X = 3 to endVal
set the castNum of sprite X to 90 + (X - 2)
set the visible of sprite X to 0
end repeat
end
on goPage
global subsect, page, voiceOnFlag
if subsect > 0 then
if the puppet of sprite 1 = 0 then
setUpBannersAndTitlePuppets()
end if
if page > 0 then
doPageStuff()
else
doTitlePageStuff()
end if
else
doSectMenuPageStuff()
end if
if (page > 0) and (voiceOnFlag = 1) then
doSound()
end if
end
on QTFix thePicName
global gQTFix, gLastQT, gFakeWin
if (the machineType < 256) and not gFakeWin then
exit
end if
if gLastQT = thePicName then
exit
end if
if thePicName contains ".mov" then
set gLastQT to thePicName
set puppetList to []
repeat with I = 1 to 48
setAt(puppetList, I, the puppet of sprite I)
end repeat
set VisibleList to []
repeat with I = 1 to 48
setAt(VisibleList, I, the visible of sprite I)
end repeat
set SpriteList to []
repeat with I = 1 to 48
setAt(SpriteList, I, the castNum of sprite I)
end repeat
setAt(puppetList, 13, 0)
set myFrame to the frame
set myMovie to the movieName
set gQTFix to 1
set the castNum of sprite 13 to 23
set the puppet of sprite 31 to 1
set the locH of sprite 31 to 320
updateStage()
go(myFrame, myMovie)
set gQTFix to 0
repeat with I = 1 to 48
if getAt(puppetList, I) then
set the puppet of sprite I to 1
set the castNum of sprite I to getAt(SpriteList, I)
end if
set the visible of sprite I to getAt(VisibleList, I)
end repeat
set the puppet of sprite 13 to 1
set the stretch of sprite 13 to 0
set the puppet of sprite 31 to 1
set the locH of sprite 31 to 1000
CustomCursor()
end if
end
on doPageStuff
global subsect, page, special, transitionFlag, thePal, section, gOldSubSection
set oldPal to thePal
set theText to (subsect * 100) + page
set thePicName to word 4 to the number of words in line page of field subsect of line page of field subsect
set thePic to the number of cast thePicName
if thePic = -1 then
alert("NO picture found for page " & page)
set thePic to 1002
end if
QTFix(thePicName)
set thePal to the palette of cast thePic
if thePal = 0 then
set thePal to thePic - 1
end if
puppetPalette(0)
puppetPalette(oldPal)
if special = 0 then
if line 1 of field the castNum of sprite 15 <> line 1 of field theText then
set the castNum of sprite 15 to the number of cast "TextBox"
end if
if the name of cast the castNum of sprite 13 <> thePicName then
set the visible of sprite 13 to 0
set the castNum of sprite 16 to the number of cast "BlankBox"
end if
else
if special = 1 then
if line 1 of field the castNum of sprite 17 <> line 1 of field theText then
set the castNum of sprite 17 to the number of cast "AltTextBox"
end if
if the name of cast the castNum of sprite 14 <> thePicName then
set the visible of sprite 14 to 0
set the castNum of sprite 18 to the number of cast "BlankBox"
end if
else
alert("Bad special flag = " & special)
end if
end if
updateStage()
if gOldSubSection = 0 then
setUpBannersAndTitleContent()
set the visible of sprite 12 to 0
end if
go("1")
puppetPalette(thePal)
set special to word 3 of line page of field subsect
if special = 0 then
set the castNum of sprite 15 to theText
set the textHeight of field theText to 16
set the castNum of sprite 13 to thePic
put line page of field (subsect + 10) into field "CreditsBox"
set the foreColor of cast "CreditsBox" to 24
set the textSize of cast "CreditsBox" to 9
set the textStyle of cast "CreditsBox" to "Italic"
set the castNum of sprite 16 to the number of cast "CreditsBox"
set the visible of sprite 13 to 1
set the visible of sprite 15 to 1
set the visible of sprite 16 to 1
set the visible of sprite 14 to 0
set the visible of sprite 17 to 0
set the visible of sprite 18 to 0
else
set the castNum of sprite 17 to theText
set the textHeight of field theText to 16
set the castNum of sprite 14 to thePic
put line page of field (subsect + 10) into field "AltCreditsBox"
set the foreColor of cast "AltCreditsBox" to 24
set the textSize of cast "AltCreditsBox" to 9
set the textStyle of cast "AltCreditsBox" to "Italic"
set the castNum of sprite 18 to the number of cast "AltCreditsBox"
set the visible of sprite 13 to 0
set the visible of sprite 15 to 0
set the visible of sprite 16 to 0
set the visible of sprite 14 to 1
set the visible of sprite 17 to 1
set the visible of sprite 18 to 1
end if
doTitleState()
doButtonState()
updateStage()
if subsect <> gOldSubSection then
fadeMusicOutSlow()
sound stop 2
set the volume of sound 2 to 255
sound playFile 2, the pathName & section & ":MUSIC:" & the name of cast (2000 + subsect)
set gOldSubSection to subsect
end if
end
on doTitlePageStuff
global subsect, thePal, section, gOldSubSection
fadeMusicOutSlow()
set oldPal to thePal
set thePic to (subsect * 2) + 1000
QTFix(the name of cast thePic)
set thePal to thePic - 1
puppetPalette(0)
puppetPalette(oldPal)
set the castNum of sprite 15 to the number of cast "TextBox"
set the castNum of sprite 13 to the number of cast "PictBlank"
set the castNum of sprite 14 to the number of cast "AltPictBlank"
set the visible of sprite 13 to 0
set the visible of sprite 14 to 0
set the castNum of sprite 16 to the number of cast "BlankBox"
updateStage()
setUpBannersAndTitleContent()
go("1")
puppetPalette(thePal)
set the volume of sound 2 to 255
set the castNum of sprite 13 to thePic
set the visible of sprite 13 to 1
set the visible of sprite 15 to 1
set the visible of sprite 14 to 0
set the visible of sprite 16 to 0
set the visible of sprite 17 to 0
set the visible of sprite 18 to 0
doTitleState()
doButtonState()
if subsect <> gOldSubSection then
sound stop 2
sound playFile 2, the pathName & section & ":MUSIC:" & the name of cast (2000 + subsect)
set gOldSubSection to subsect
end if
end
on doSectMenuPageStuff
global subsect, transitionFlag, thePal, gOldSubSection, gNumSubSections
set oldPal to thePal
set thePic to 1000
QTFix(the name of cast thePic)
set thePal to 59
if transitionFlag = 1 then
puppetTransition(50, 2, 8, 1)
end if
puppetPalette(0)
puppetPalette(oldPal)
set the castNum of sprite 15 to the number of cast "TextBox"
set the castNum of sprite 13 to the number of cast "PictBlank"
set the castNum of sprite 16 to the number of cast "BlankBox"
set endVal to gNumSubSections + 2
repeat with X = 1 to endVal
puppetSprite(X, 0)
end repeat
set the volume of sound 2 to 255
go(string(subsect))
puppetPalette(thePal)
set the castNum of sprite 13 to thePic
repeat with s = 14 to 18
set the visible of sprite s to 0
end repeat
set the visible of sprite 13 to 1
repeat with X = 1 to endVal
set the visible of sprite X to 1
end repeat
doTitleState()
doButtonState()
if transitionFlag = 1 then
puppetTransition(50, 2, 8, 1)
end if
set gOldSubSection to 0
end
on doTitleState
global subsect, page
if page > 0 then
set the visible of sprite 2 to 0
else
set the visible of sprite 2 to 1
end if
set currentSubSectionTitleSprite to subsect + 2
if (subsect > 0) and (page > 0) then
set the visible of sprite currentSubSectionTitleSprite to 0
set the visible of sprite 12 to 0
else
set the visible of sprite currentSubSectionTitleSprite to 1
set the visible of sprite 12 to 1
end if
if subsect = 0 then
set the visible of sprite 2 to 0
end if
end
on doButtonState
global section, subsect, page, linkReturn, gNumSubSections
if subsect = 0 then
repeat with SpriteNum = 19 to 23
set the visible of sprite SpriteNum to 0
end repeat
else
if subsect < gNumSubSections then
set the visible of sprite 19 to 1
set the visible of sprite 22 to 1
set the visible of sprite 23 to 1
else
set the visible of sprite 19 to 1
set the visible of sprite 22 to 0
set the visible of sprite 23 to 1
end if
end if
if subsect > 0 then
if page > 0 then
set the visible of sprite 20 to 1
else
set the visible of sprite 20 to 0
end if
if page < the number of lines in field subsect then
set the visible of sprite 21 to 1
else
set the visible of sprite 21 to 0
end if
end if
if count(linkReturn) = 0 then
set the visible of sprite 27 to 0
else
set the visible of sprite 27 to 1
end if
end
on doSound
global section, subsect, page, voicePlaying, VoxTimer
set locPage to page
if locPage < 10 then
put "0" before locPage
end if
set theSound to section & "." & subsect & "." & locPage