home *** CD-ROM | disk | FTP | other *** search
Wrap
on startMovie global userName, MaxChars, BackSnds, chanvols, mouseUp, qQuestion, DivType, logged, MaxCard, t, mouseUp, author, rIndex, mouseUp, moviePath, usrFileLocation, PlayBS, CardsDealt, tmpVar, CardCoord, FieldNames, UsrDivToneSet, UsrDivColourSet, UsrDivMeanSet, CCcards, Instruct, Sound_Level, Prnt, AnimPath, Cnt, Opt, PrntArray, CPosition, Snd1Max, Snd2Max set DivType to "Celtic Cross" set MaxChars to 10 set logged to 0 set MaxCard to 10 set rIndex to 1 set moviePath to the moviePath if machineType = 256 then openXLib("FILEIO") end if if CreateTables() = -1 then alert("Fatal Error creating Virtual Tarot reference tables!") end if set UsrDivToneSet to 1 set UsrDivColourSet to 1 set UsrDivMeanSet to 1 set Instruct to 0 set Prnt to 0 set Cnt to 0 set Opt to 0 set PlayBS to 1 set author to "Foster" set BackSnds to ArrayFactory(mnew) set chanvols to ArrayFactory(mnew) set CardCoord to ArrayFactory(mnew) set FieldNames to ArrayFactory(mnew) chanvols(mput, 1, the volume of sound 1) chanvols(mput, 2, the volume of sound 2) set usrFileLocation to "UnInitialized" set moviePath to the moviePath set CardsDealt to 1 set tmpVar to 5 set CCcards to "0,0,0,0,0,0,0,0,0,0" set PrntArray to ArrayFactory(mnew) set CPosition to ArrayFactory(mnew) CardCoord(mput, 1, "163,230") CardCoord(mput, 2, "220,275") CardCoord(mput, 3, "163,361") CardCoord(mput, 4, "63,230") CardCoord(mput, 5, "163,98") CardCoord(mput, 6, "310,230") CardCoord(mput, 7, "440,361") CardCoord(mput, 8, "560,275") CardCoord(mput, 9, "440,184") CardCoord(mput, 10, "560,98") CPosition(mput, 1, "CELTIC1") CPosition(mput, 2, "CELTIC2") CPosition(mput, 3, "CELTIC3") CPosition(mput, 4, "CELTIC4") CPosition(mput, 5, "CELTIC5") CPosition(mput, 6, "CELTIC6") CPosition(mput, 7, "CELTIC7") CPosition(mput, 8, "CELTIC8") CPosition(mput, 9, "CELTIC9") CPosition(mput, 10, "CELTIC10") if the machineType = 256 then BackSnds(mput, 1, "Themes\CCross1") BackSnds(mput, 2, "Themes\CCross1") BackSnds(mput, 3, "Themes\CCross1") BackSnds(mput, 4, "Themes\CCross1") else BackSnds(mput, 1, "Themes:CCross1") BackSnds(mput, 2, "Themes:CCross1") BackSnds(mput, 3, "Themes:CCross1") BackSnds(mput, 4, "Themes:CCross1") end if InitSnd() PlayBackSnds() end on idle if soundBusy(1) <> 1 then PlaySound(1, "Silence", 0, 1) end if if soundBusy(2) <> 1 then PlayBackSnds() end if end on Z q put the locH of sprite q && the locV of sprite q end on RevealCard CardIndex global CardCoord, CCcards set C to 22 set H to 23 puppetSprite(C, 1) puppetSprite(H, 1) set coord to CardCoord(mget, CardIndex) set Card to item CardIndex of CCcards set the castNum of sprite C to the number of cast Card set the locH of sprite C to value(item 1 of coord) set the locV of sprite C to value(item 2 of coord) set the locH of sprite H to value(item 1 of coord) set the locV of sprite H to value(item 2 of coord) puppetTransition(50, 1, 16, 1) updateStage() PlayCardVocal(CardIndex, 0) end on CCrandomCard global rIndex, CCindexes, CardsDealt, MaxCard, CdNames, Cnt, Opt, DigO set DigO to 1 if ((Cnt = 2) and (Opt = 2)) or Trumps then set Modulo to 22 else if (Cnt = 2) or DigO then set Modulo to 78 else set Modulo to 156 end if end if set rIndex to (random(Modulo) + the lastClick) mod Modulo if CardsDealt = 10 then set name to line rIndex of CdNames if (name contains "Knight") or (name contains "Page") or (name contains "Queen") or (name contains "King") then set rIndex to 0 end if end if repeat while (CCindexes contains string(rIndex)) or (CCindexes contains string(rIndex mod 78)) or (CCindexes contains string(rIndex + 78)) or ((rIndex mod 78) = 0) or (rIndex = 0) set rIndex to (random(Modulo) + the lastClick) mod Modulo if CardsDealt = 10 then set name to line rIndex of CdNames if (name contains "Knight") or (name contains "Page") or (name contains "Queen") or (name contains "King") then set rIndex to 0 end if end if end repeat PutCard("Move", MaxCard) end on PutCard move, MaxCard global CardsDealt, CardCoord, CardList, CCcards, CCindexes, CdNames, DigWaite, IllDigWaite, DigFoster, IllDigFoster, author, Dignified, rIndex, sndFile, ClrFile, UsrDivToneSet, Cnt if CardsDealt <= MaxCard then cursor(4) if move = "Move" then if CardsDealt = 1 then go(marker(CardsDealt + 1)) else go(marker(CardsDealt)) end if end if puppetSprite(CardsDealt + 10, 0) puppetSprite(CardsDealt + 10, 1) set CardName to line rIndex of CdNames set tmp to char 1 to the number of chars in CardName - 2 of CardName set the castNum of sprite (CardsDealt + 10) to the number of cast CardName puppetTransition(26, 1, 128, 1) if move = "Move" then go(the frame + 1) end if set the locH of sprite (CardsDealt + 10) to value(item 1 of CardCoord(mget, CardsDealt)) set the locV of sprite (CardsDealt + 10) to value(item 2 of CardCoord(mget, CardsDealt)) puppetTransition(26, 1, 128, 1) updateStage() put rIndex into item CardsDealt of CCindexes put CardName into item CardsDealt of CCcards PlayCardVocal(CardsDealt, 0) if UsrDivToneSet and ((rIndex < 23) or ((rIndex mod 78) < 23)) then set the volume of sound 1 to 255 Sound_Color(value(item CardsDealt of CCindexes), 0) end if set CardsDealt to CardsDealt + 1 set Cnt to the controlDown if move = "Move" then if CardsDealt <= MaxCard then go(label("idle") + 1) cursor(-1) else go("Fini") end if end if else go("intro") end if end on ToggleSound global UsrDivToneSet if UsrDivToneSet = 1 then set UsrDivToneSet to 0 set the locH of sprite 4 to -500 set the locV of sprite 4 to -500 else set the locH of sprite 4 to 321 set the locV of sprite 4 to 457 set UsrDivToneSet to 1 end if end on ToggleColour global UsrDivColourSet if UsrDivColourSet = 1 then set UsrDivColourSet to 0 set the locH of sprite 3 to -500 set the locV of sprite 3 to -500 else set UsrDivColourSet to 1 set the locH of sprite 3 to 399 set the locV of sprite 3 to 457 end if end on ToggleVoice global UsrDivMeanSet if UsrDivMeanSet = 1 then set UsrDivMeanSet to 0 set the locH of sprite 5 to -500 set the locV of sprite 5 to -500 else set the locH of sprite 5 to 246 set the locV of sprite 5 to 457 set UsrDivMeanSet to 1 end if end on CreateTables global moviePath, sndFile, ClrFile, CardList, CdNames, CardMeanWaite, DigWaite, IllDigWaite, CardMeanFoster, DigFoster, IllDigFoster set fileObj to FileIO(mnew, "read", moviePath & "SndFile") if objectp(fileObj) = 0 then alert("Error reading Sound File" && moviePath && fileObj) return -1 end if set sndFile to fileObj(mReadFile) fileObj(mdispose) set fileObj to FileIO(mnew, "read", moviePath & "ClrFile") if objectp(fileObj) = 0 then alert("Error reading Colour File" && moviePath && fileObj) return -1 end if set ClrFile to fileObj(mReadFile) fileObj(mdispose) if the machineType = 256 then set fileObj to FileIO(mnew, "read", moviePath & "Meanings\CDWaite") else set fileObj to FileIO(mnew, "read", moviePath & "Meanings:CDWaite") end if if objectp(fileObj) = 0 then alert("Error reading Waite Meaning File") return -1 end if set CardMeanWaite to fileObj(mReadFile) fileObj(mdispose) if the machineType = 256 then set fileObj to FileIO(mnew, "read", moviePath & "Meanings\DWaite") else set fileObj to FileIO(mnew, "read", moviePath & "Meanings:DWaite") end if if objectp(fileObj) = 0 then alert("Error reading Waite Dignified File") return -1 end if set DigWaite to fileObj(mReadFile) fileObj(mdispose) if the machineType = 256 then set fileObj to FileIO(mnew, "read", moviePath & "Meanings\IDWaite") else set fileObj to FileIO(mnew, "read", moviePath & "Meanings:IDWaite") end if if objectp(fileObj) = 0 then alert("Error reading Waite Ill-Dignified File") return -1 end if set IllDigWaite to fileObj(mReadFile) fileObj(mdispose) if the machineType = 256 then set fileObj to FileIO(mnew, "read", moviePath & "Meanings\CDFoster") else set fileObj to FileIO(mnew, "read", moviePath & "Meanings:CDFoster") end if if objectp(fileObj) = 0 then alert("Error reading Foster Meaning File") return -1 end if set CardMeanFoster to fileObj(mReadFile) fileObj(mdispose) if the machineType = 256 then set fileObj to FileIO(mnew, "read", moviePath & "Meanings\DFoster") else set fileObj to FileIO(mnew, "read", moviePath & "Meanings:DFoster") end if if objectp(fileObj) = 0 then alert("Error reading Foster Dignified File") return -1 end if set DigFoster to fileObj(mReadFile) fileObj(mdispose) if the machineType = 256 then set fileObj to FileIO(mnew, "read", moviePath & "Meanings\IDFoster") else set fileObj to FileIO(mnew, "read", moviePath & "Meanings:IDFoster") end if if objectp(fileObj) = 0 then alert("Error reading Foster Ill-Dignified File") return -1 end if set IllDigFoster to fileObj(mReadFile) fileObj(mdispose) if the machineType = 256 then set fileObj to FileIO(mnew, "read", moviePath & "Meanings\CardNmes") else set fileObj to FileIO(mnew, "read", moviePath & "Meanings:CardNmes") end if if objectp(fileObj) = 0 then alert("Error reading CardNames File" && moviePath && fileObj) return -1 end if set CardList to fileObj(mReadFile) fileObj(mdispose) if the machineType = 256 then set fileObj to FileIO(mnew, "read", moviePath & "Meanings\CdNames") else set fileObj to FileIO(mnew, "read", moviePath & "Meanings:CdNames") end if if objectp(fileObj) = 0 then alert("Error reading CdNames File" && moviePath && fileObj) return -1 end if set CdNames to fileObj(mReadFile) fileObj(mdispose) return end factory ArrayFactory