home *** CD-ROM | disk | FTP | other *** search
/ PC/CD Gamer UK 39 / PCGAMER39.bin / games / amber / amberhub.dxr / 00038.ls < prev    next >
Encoding:
Text File  |  1996-11-08  |  1.6 KB  |  37 lines

  1. on testSndDelay soundFile, officialTime, optionSwitch
  2.   global gSoundPath, gSoundDelay
  3.   set sndChannel to 4
  4.   if optionSwitch = #quietly then
  5.     set the volume of sound sndChannel to 0
  6.   else
  7.     set the volume of sound sndChannel to 255
  8.   end if
  9.   set startTime to the ticks
  10.   sound playFile sndChannel, soundFile
  11.   repeat while soundBusy(sndChannel)
  12.   end repeat
  13.   set stopTime to the ticks
  14.   set elapsed to stopTime - startTime
  15.   put "  elapsed = " & elapsed
  16.   set gSoundDelay to min(30, elapsed - officialTime)
  17.   put "  new gSoundDelay = " & gSoundDelay
  18.   puppetSound(sndChannel, 0)
  19.   sound stop sndChannel
  20. end
  21.  
  22. on toggleTransitions qualityDesired
  23.   global gStopTransitions, oPuppeteer, gTransQuality
  24.   set gTransQuality to qualityDesired
  25.   if qualityDesired = #None then
  26.     set gStopTransitions to 1
  27.   else
  28.     set gStopTransitions to 0
  29.   end if
  30.   if qualityDesired = #Better then
  31.     setProp(the lsMachineProfile of oPuppeteer, #transitions, [#turnRight: "02,1,16,TRUE", #turnLeft: "01,1,16,TRUE", #forward: "09,1,8,TRUE", #lookAt: "09,1,8,TRUE", #backOff: "10,1,8,TRUE", #lookUp: "03,1,16,TRUE", #lookDown: "04,1,16,TRUE", #fadeIn: "50,2,8,TRUE", #slowMontage: "50,3,8,TRUE", #nextPage: "2,2,32,TRUE", #prevPage: "1,2,32,TRUE"])
  32.   end if
  33.   if qualityDesired = #Best then
  34.     setProp(the lsMachineProfile of oPuppeteer, #transitions, [#turnRight: "02,1,16,TRUE", #turnLeft: "01,1,16,TRUE", #forward: "26,2,0,TRUE", #lookAt: "26,2,0,TRUE", #backOff: "26,2,0,TRUE", #lookUp: "03,1,16,TRUE", #lookDown: "04,1,16,TRUE", #fadeIn: "26,2,0,TRUE", #slowMontage: "26,3,0,TRUE", #nextPage: "2,2,16,TRUE", #prevPage: "1,2,16,TRUE"])
  35.   end if
  36. end
  37.