home *** CD-ROM | disk | FTP | other *** search
- on loadPIC aType, aFolder, aFileName, castName
- if the machineType = 256 then
- set aFile to the pathName & "PIC\" & aType & "\" & aFolder & "\" & aFileName & ".PIC"
- else
- set aFile to the pathName & "PIC:" & aType & ":" & aFolder & ":" & aFileName & ".PIC"
- end if
- set theCast to the number of cast castName
- set the fileName of cast theCast to aFile
- updateStage()
- end
-
- on loadLILPIC aType, aFolder, aFileName, castName
- put "L" into char 1 of aFileName
- if the machineType = 256 then
- set aFile to the pathName & "LILPIC\" & aType & "\" & aFolder & "\" & aFileName & ".PIC"
- else
- set aFile to the pathName & "LILPIC:" & aType & ":" & aFolder & ":" & aFileName & ".PIC"
- end if
- set theCast to the number of cast castName
- set the fileName of cast theCast to aFile
- updateStage()
- end
-
- on loadSound aFolder, aFileName, castName
- if the machineType = 256 then
- set aFile to the pathName & "AUDIO\" & aFolder & "\" & aFileName & ".AIF"
- else
- set aFile to the pathName & "AUDIO:" & aFolder & ":" & aFileName & ".AIF"
- end if
- set theCast to the number of cast castName
- set the fileName of cast theCast to aFile
- updateStage()
- end
-
- on updateIndexPhoto
- global gCurrentBook, gPhotoSprite, gCurrentRecipe, gCFTBook
- cursor(4)
- puppetSprite(gPhotoSprite, 1)
- if gCurrentBook = "personal" then
- set the castNum of sprite gPhotoSprite to the number of cast "personal filler"
- else
- if gCurrentBook = "Pasta" then
- set aFileName to DBMain()
- set aFolder to "PASTA"
- loadLILPIC("BEAUTY", aFolder, "l" & aFileName, "index photo")
- else
- if gCurrentBook = "Vegi" then
- set aFileName to DBMain()
- set aFolder to "VEGI"
- loadLILPIC("BEAUTY", aFolder, "l" & aFileName, "index photo")
- else
- if gCurrentBook = "Stir" then
- set aFileName to DBMain()
- set aFolder to "STIR"
- loadLILPIC("BEAUTY", aFolder, "l" & aFileName, "index photo")
- else
- if gCurrentBook = "Chick" then
- set aFileName to DBMain()
- set aFolder to "CHICK"
- loadLILPIC("BEAUTY", aFolder, "l" & aFileName, "index photo")
- end if
- end if
- end if
- end if
- end if
- updateStage()
- cursor(-1)
- end
-
- on namePalettes beginCast, endCast
- repeat with i = beginCast to endCast
- set aName to the name of cast i
- if word 1 of aName = "palette" then
- nothing()
- next repeat
- end if
- set newName to char 1 to offset(".", aName) - 1 of aName
- set the name of cast (i - 1) to newName
- move(cast i, cast (endCast + i))
- move(cast (i - 1), cast (((i - 1) / 2) + 1))
- end repeat
- end
-
- on loadPersonalIndexes
- global gDBResult, gCategory1, gCategory2, gCategory3, gCategory4, gCategory5, gPersonalBrowser, gPersonalIDDB, gRecipeIDDB
- set category1 to []
- set category2 to []
- set category3 to []
- set category4 to []
- set category5 to []
- set gPersonalIDDB to [:]
- DBBeginSaveSession()
- repeat while 1
- DBNextSetRecord("personal recipe")
- if gDBResult = 0 then
- set category to integer(DBGetSetField(3004))
- set title to DBGetSetField(3001)
- set id to integer(DBGetSetField(3000))
- addProp(gPersonalIDDB, title, id)
- if category = 1 then
- add(category1, title & RETURN)
- else
- if category = 2 then
- add(category2, title & RETURN)
- else
- if category = 3 then
- add(category3, title & RETURN)
- else
- if category = 4 then
- add(category4, title & RETURN)
- else
- if category = 5 then
- add(category5, title & RETURN)
- end if
- end if
- end if
- end if
- end if
- nothing()
- next repeat
- end if
- exit repeat
- end repeat
- sort(category1)
- sort(category2)
- sort(category3)
- sort(category4)
- sort(category5)
- set gCategory1 to listToString3(category1)
- set gCategory2 to listToString3(category2)
- set gCategory3 to listToString3(category3)
- set gCategory4 to listToString3(category4)
- set gCategory5 to listToString3(category5)
- set gPersonalBrowser to [:]
- set lists to [category1, category2, category3, category4, category5]
- set num to 0
- repeat with aList in lists
- repeat with anItem in aList
- set title to line 1 of anItem
- set num to num + 1
- addProp(gPersonalBrowser, title, num)
- end repeat
- end repeat
- DBEndSession()
- end
-