home *** CD-ROM | disk | FTP | other *** search
/ Sound, Music & MIDI Collection 2 / SMMVOL2.bin / DEMO / PRG / CIRCLES.ZIP / CI_MAIN.DIX / 00024_TCASTS.ls < prev    next >
Encoding:
Text File  |  1995-05-01  |  1.8 KB  |  70 lines

  1. on casts_import lstcast
  2.   global disk, dir_sep, demo
  3.   if the machineType <> 256 then
  4.     if chk_dir(the pathName, "INTER") then
  5.       set disk to "INTER"
  6.     else
  7.       set disk to "PLANET"
  8.     end if
  9.   else
  10.     if chk_dir(the pathName & "*.*", "INTER") then
  11.       set disk to "INTER"
  12.     else
  13.       set disk to "PLANET"
  14.     end if
  15.   end if
  16.   if the colorDepth >= 16 then
  17.     if demo then
  18.       set col1 to "08"
  19.       set col2 to "16"
  20.       set disk to "08Bit"
  21.     else
  22.       set col1 to "16"
  23.       set col2 to "08"
  24.       set disk to "16Bit"
  25.     end if
  26.   else
  27.     if the colorDepth >= 8 then
  28.       set col1 to "08"
  29.       set col2 to "16"
  30.       set disk to "08Bit"
  31.     else
  32.       set col1 to "04"
  33.       set col2 to "08"
  34.       set disk to "04Bit"
  35.     end if
  36.   end if
  37.   set getpath to the pathName & disk & dir_sep
  38.   repeat with i = 1 to the number of lines in field "CASTLST"
  39.     set s to word 1 of line i of field "CASTLST"
  40.     if s = "--END" then
  41.       exit repeat
  42.     end if
  43.     set loadpic to getpath & col1 & s & ".PIC"
  44.     set chkpic to col1 & s & ".PIC"
  45.     set setpic to s
  46.     importFileInto(cast lstcast, loadpic)
  47.     if the loaded of cast lstcast then
  48.       if the name of cast lstcast = chkpic then
  49.         set the name of cast lstcast to setpic
  50.         set lstcast to lstcast + 1
  51.         next repeat
  52.       end if
  53.     end if
  54.     set loadpic to getpath & col2 & s & ".PIC"
  55.     set chkpic to col2 & s & ".PIC"
  56.     set setpic to s
  57.     importFileInto(cast lstcast, loadpic)
  58.     if the loaded of cast lstcast then
  59.       if the name of cast lstcast = chkpic then
  60.         set the name of cast lstcast to setpic
  61.         set lstcast to lstcast + 1
  62.         next repeat
  63.       end if
  64.     end if
  65.     alert(s & ".PIC not found" & RETURN & "Wrong Installation or not enough memory")
  66.     return 0
  67.   end repeat
  68.   return 1
  69. end
  70.