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

  1. on ci_sup_open
  2.   global mywin, player, fcommand
  3.   if isdemo() then
  4.     set fcommand to EMPTY
  5.     exit
  6.   end if
  7.   cur_busy()
  8.   if objectp(mywin) then
  9.     forget(mywin)
  10.   end if
  11.   set horzOrigin to the stageLeft + 110
  12.   set vertOrigin to the stageTop + 112
  13.   set mywinrect to rect(horzOrigin, vertOrigin, horzOrigin + 400, vertOrigin + 225)
  14.   if player then
  15.     set mywin to window "ci_sup.dix"
  16.     set the rect of mywin to mywinrect
  17.     set the fileName of mywin to "ci_sup.dix"
  18.   else
  19.     set mywin to window "ci_sup.dir"
  20.     set the rect of mywin to mywinrect
  21.     set the fileName of mywin to "ci_sup.dir"
  22.   end if
  23.   set the titleVisible of mywin to 0
  24.   open(mywin)
  25.   pause()
  26. end
  27.  
  28. on ci_sup_ok
  29.   global mywin, player, fcommand, new_read, up_ini, memchange
  30.   put "ci_sup_ok"
  31.   put the windowList
  32.   set fcommand to EMPTY
  33.   if player then
  34.     close(window "ci_sup.dix")
  35.   else
  36.     close(window "ci_sup.dir")
  37.   end if
  38.   if the machineType <> 256 then
  39.     if objectp(mywin) then
  40.       forget(mywin)
  41.     end if
  42.   end if
  43.   set new_read to 1
  44.   save_ini()
  45.   if memchange then
  46.     put "ci_sup_ok memchange = TRUE"
  47.     clear_circle()
  48.     snd_done()
  49.     put "snd_done OK"
  50.     if snd_init() then
  51.       mem_update()
  52.       circlemaster()
  53.     else
  54.       put "ci_sup_ok ci_sup_open"
  55.       ci_sup_open()
  56.     end if
  57.   end if
  58.   updateStage()
  59. end
  60.  
  61. on ci_ins_open
  62.   global mywin, player, fcommand, demo
  63.   if demo then
  64.     set fcommand to "STR1"
  65.     exit
  66.   end if
  67.   cur_busy()
  68.   if objectp(mywin) then
  69.     forget(mywin)
  70.   end if
  71.   set horzOrigin to the stageLeft
  72.   set vertOrigin to the stageTop
  73.   set mywinrect to rect(horzOrigin, vertOrigin, horzOrigin + 640, vertOrigin + 480)
  74.   put "ci_ins_open"
  75.   if player then
  76.     set mywin to window "ci_inst.dix"
  77.     set the rect of mywin to mywinrect
  78.     set the fileName of mywin to "ci_inst.dix"
  79.   else
  80.     set mywin to window "ci_inst.dir"
  81.     set the rect of mywin to mywinrect
  82.     set the fileName of mywin to "ci_inst.dir"
  83.   end if
  84.   set the titleVisible of mywin to 0
  85.   open(mywin)
  86. end
  87.  
  88. on ci_ins_ok
  89.   global mywin, player, fcommand, new_read, up_ini
  90.   set fcommand to EMPTY
  91.   if objectp(mywin) then
  92.     forget(mywin)
  93.   end if
  94.   if up_ini = 0 then
  95.     play frame 9
  96.   else
  97.     circle_start1()
  98.     cur_on()
  99.     play frame 5
  100.   end if
  101. end
  102.  
  103. on loadlost
  104.   global fcommand, scommand, l_notload, namepause_bs, sel_scast, sel_name, sel_size, acwin, fl_msg, sel_seg, sel_vol, lost_cancel
  105.   if not (acwin = "FSEL") then
  106.     set idx to getAt(l_notload, 1)
  107.     if sel_name = EMPTY then
  108.       set lostsound to chars(Ar1sound(mget, idx), length(Ar1sound(mget, idx)) - 13, length(Ar1sound(mget, idx)))
  109.       set lost_cancel to 0
  110.       set tmpw to sndwin("ELEMENT " & RETURN & ">" & lostsound & "<" & RETURN & "not found. Select a new one ?", "ELEMENT " & RETURN & ">" & lostsound & "<" & RETURN & "nicht gefunden. Neu waehlen ?")
  111.       if tmpw = 1 then
  112.         set sel_scast to Ar1play(mget, idx)
  113.         fsel("SOUND")
  114.       else
  115.         if tmpw = 2 then
  116.           Ar1sound(mput, idx, namepause_bs)
  117.           set pcol to calccol(namepause_bs)
  118.           timeline(1)
  119.           if idx > 12 then
  120.             set selt to 2
  121.           else
  122.             set selt to 1
  123.           end if
  124.           set seli to get_pausesize(value(ar1pos(mget, idx)), selt)
  125.           Ar1time(mput, idx, seli)
  126.           Ar1col(mput, idx, pcol)
  127.           deleteAt(l_notload, 1)
  128.         else
  129.           put "cancel"
  130.           set lost_cancel to 1
  131.           set l_notload to []
  132.           set scommand to EMPTY
  133.           set fcommand to EMPTY
  134.           clear_circle()
  135.         end if
  136.       end if
  137.     else
  138.       Ar1sound(mput, idx, sel_name)
  139.       set pcol to calccol(sel_name)
  140.       Ar1col(mput, idx, pcol)
  141.       Ar1time(mput, idx, sel_size)
  142.       deleteAt(l_notload, 1)
  143.       set sel_name to EMPTY
  144.     end if
  145.     if (count(l_notload) < 1) and (lost_cancel = 0) then
  146.       displaysegs()
  147.       set scommand to EMPTY
  148.       set fcommand to EMPTY
  149.     end if
  150.   end if
  151. end
  152.  
  153. on demomixwin
  154.   global fcommand, spritecount, up_lang, idsw
  155.   sprite_save(47)
  156.   sprite_save(48)
  157.   cur_on()
  158.   set text to "This is a DEMO version of Circle Elements."
  159.   set the castNum of sprite 47 to the number of cast "DEMOMIX"
  160.   set the ink of sprite 47 to 36
  161.   sprite_show(47, 235, 244)
  162.   if up_lang = 1 then
  163.     set wincast to "DEMOMIXTXE"
  164.   else
  165.     set wincast to "DEMOMIXTXG"
  166.   end if
  167.   puppetTransition(9, 1, 5)
  168.   put text into field "MSGTXT"
  169.   set the castNum of sprite 48 to the number of cast wincast
  170.   set the ink of sprite 48 to 1
  171.   setfont(wincast)
  172.   set the editableText of sprite 48 to 0
  173.   sprite_show(48, 155, 180)
  174.   puppetSound("demomixsnd")
  175.   updateStage()
  176.   set showwalk to 1
  177.   repeat while soundBusy(1)
  178.     WALK(mnew, showwalk)
  179.     updateStage()
  180.     set showwalk to showwalk + 1
  181.     if showwalk = 13 then
  182.       set showwalk to 1
  183.     end if
  184.   end repeat
  185.   WALK(mrelease)
  186.   updateStage()
  187.   repeat while the mouseDown
  188.     nothing()
  189.   end repeat
  190.   repeat while 1
  191.     if the mouseDown then
  192.       exit repeat
  193.     end if
  194.   end repeat
  195.   alertrdremove()
  196. end
  197.