global gTransPath, gFileList, myXObj, gBootName, gPaintPath, gCDFilesPath, gWin31Tag
on startMovie
set handCursor to [the number of member "Pointer", the number of member "Mask"]
cursor(handCursor)
set the mouseDownScript to "dontPassEvent"
set the mouseUpScript to "dontPassEvent"
if the colorDepth <> 8 then
alert("Please set your monitor to display 256 colors")
quit()
end if
set gCDFilesPath to the moviePath
set gFileList to [#LPtheme, #Tanzania, #England, #Sweden, #Austrlia, #Japan, #Germany, #India, #Spain, #Brazil]
if the machineType <> 256 then
if objectp(myXObj) then
myXObj(mdispose)
end if
openXLib(the moviePath & "Xtras:misc_x Xobj")
set myXObj to misc_x(mnew)
set gBootName to myXObj(mBootname)
set gTransPath to gBootName & ":Pretend:LP3Trans:"
set gPaintPath to gBootName & ":Pretend:LP3Paint:"
if myXObj(mFileExists, gTransPath & "LPTheme.aif") = 0 then
copyMusic(#Mac)
end if
if myXObj(mFileExists, gPaintPath & "paint3.dxr") = 0 then
copyPaint(#Mac)
end if
if myXObj(mFileExists, gPaintPath & "Xtras:fill xobj") = 0 then
copyXtras(#Mac)
end if
if objectp(myXObj) then
myXObj(mdispose)
end if
closeXLib(the moviePath & "Xtras:misc_x Xobj")
else
if objectp(myXObj) then
myXObj(mdispose)
end if
openXLib(the moviePath & "Xtras\misc_x.dll")
set myXObj to misc_x(mnew)
set gTransPath to "C:\Pretend\LP3Trans\"
set gPaintPath to "C:\Pretend\LP3Paint\"
if myXObj(mFileExists, gTransPath & "LPTheme.aif") = 0 then
copyMusic(#PC)
end if
if myXObj(mFileExists, gPaintPath & "paint3.dxr") = 0 then
copyPaint(#PC)
end if
if myXObj(mFileExists, gPaintPath & "Xtras\fill.dll") = 0 then
copyXtras(#PC)
end if
if objectp(myXObj) then
myXObj(mdispose)
end if
closeXLib(the moviePath & "Xtras\misc_x.dll")
end if
preLoadCast()
puppetSprite(8, 0)
end
on stopMovie
repeat with i = 1 to 48
set the visible of sprite i to 1
set the blend of sprite i to 100
end repeat
end
on blendSprite whichSprite, direction, howFast
if direction = #in then
set the blend of sprite whichSprite to 0
set the visible of sprite whichSprite to 1
repeat while the blend of sprite whichSprite < 100
set the blend of sprite whichSprite to the blend of sprite whichSprite + howFast
updateStage()
end repeat
else
repeat while the blend of sprite whichSprite > 0
set the blend of sprite whichSprite to the blend of sprite whichSprite - howFast
updateStage()
end repeat
set the visible of sprite whichSprite to 0
end if
end
on wait howLong
startTimer()
repeat while (the timer < howLong) and (the mouseDown = 0)
nothing()
end repeat
end
on copyMusic whichPlat
puppetSprite(8, 1)
set the loc of sprite 8 to point(318, 273)
updateStage()
set howManyFiles to count(gFileList)
if whichPlat = #Mac then
if (myXObj(mSpaceOnVol, gBootName) / 1024 / 1024) < 5 then
alert("Let's Pretend 3 requires a minimum of 5 megabytes of free hard drive space. Please make more space available on your hard drive and try again.")
quit()
end if
repeat with i = 1 to howManyFiles
set whichFile to string(getAt(gFileList, i)) & ".aif"
myXObj(mCopyFile, the moviePath & "LP3Trans:" & whichFile, gTransPath & whichFile)
if i > 2 then
set the memberNum of sprite 8 to the memberNum of sprite 8 + 1
end if
updateStage()
end repeat
else
if (myXObj(mSpaceOnVol, "C:\") / 1024 / 1024) < 5 then
alert("Let's Pretend 3 requires a minimum of 5 megabytes of free hard drive space. Please make more space available on your hard drive and try again.")
quit()
end if
if myXObj(mInsureFolder, gTransPath) = 0 then
repeat with i = 1 to howManyFiles
set whichFile to string(getAt(gFileList, i)) & ".aif"
myXObj(mCopyFile, the moviePath & "LP3Trans\" & whichFile, gTransPath & whichFile)
if i > 2 then
set the memberNum of sprite 8 to the memberNum of sprite 8 + 1
end if
updateStage()
end repeat
end if
end if
end
on copyPaint whichPlat
if whichPlat = #Mac then
myXObj(mCopyFile, the moviePath & "LP3Paint:paint3.dxr", gPaintPath & "paint3.dxr")
else
if myXObj(mInsureFolder, gPaintPath) = 0 then
myXObj(mCopyFile, the moviePath & "LP3Paint\paint3.dxr", gPaintPath & "paint3.dxr")
end if
end if
set the memberNum of sprite 8 to the memberNum of sprite 8 + 1
updateStage()
end
on copyXtras whichPlat
if whichPlat = #Mac then
myXObj(mCopyFile, the moviePath & "Xtras:Fill XObj", gPaintPath & "Xtras:Fill XObj")
myXObj(mCopyFile, the moviePath & "Xtras:PrintoMatic_Lite", gPaintPath & "Xtras:PrintOMatic_Lite")
myXObj(mCopyFile, the moviePath & "Xtras:ScrnUtil 1.0.3", gPaintPath & "Xtras:ScrnUtil 1.0.3")
else
if myXObj(mInsureFolder, gPaintPath & "Xtras") = 0 then
myXObj(mCopyFile, the moviePath & "Xtras\Fill.dll", gPaintPath & "Xtras\Fill.dll")
if gWin31Tag then
myXObj(mCopyFile, the moviePath & "Xtras\POMlite.x16", gPaintPath & "Xtras\POMLite.x16")
myXObj(mCopyFile, the moviePath & "Xtras\ScrnUtil.x16", gPaintPath & "Xtras\ScrnUtil.x16")
else
myXObj(mCopyFile, the moviePath & "Xtras\POMlite.x32", gPaintPath & "Xtras\POMlite.x32")
myXObj(mCopyFile, the moviePath & "Xtras\ScrnUtil.x32", gPaintPath & "Xtras\ScrnUtil.x32")