home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 September / WPCSEP96.ISO / artw08f.dxr / 00020_ARTGraphics.ls < prev    next >
Encoding:
Text File  |  1996-07-09  |  7.4 KB  |  155 lines

  1. on ARTGraphics
  2.   global ARTGraphicsList, ARTWhichGraphics, ARTGraphicsLocList, ARTGraphicsBoxList, ArtGraphicsBoxSprite, ARTGraphicsVeiwFrame, IFLCanChange, ARTNoGo, IFLArtsNameSprite, ARTComp, ARTImageGO
  3.   repeat with g = 1 to count(ARTGraphicsList)
  4.     if rollOver(getAt(getAt(ARTGraphicsList, g), 1)) then
  5.       if the mouseDown and (getAt(getAt(ARTGraphicsList, g), 3) = 0) then
  6.         setAt(getAt(ARTGraphicsList, g), 3, 1)
  7.         if g = 1 then
  8.           if ARTWhichGraphics <> 1 then
  9.             set ARTWhichGraphics to 1
  10.             set ARTComp to 0
  11.             set LitTempList to getAt(ARTGraphicsList, g)
  12.             repeat with x = 4 to count(LitTempList)
  13.               set TwoLitTempList to getAt(LitTempList, x)
  14.               set the castNum of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 2)
  15.               set the locH of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 3)
  16.               set the locV of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 4)
  17.               set the ink of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 5)
  18.             end repeat
  19.             updateStage()
  20.           end if
  21.         else
  22.           if g = 2 then
  23.             if ARTWhichGraphics <> 2 then
  24.               set ARTComp to 0
  25.               set ARTWhichGraphics to 2
  26.               set LitTempList to getAt(ARTGraphicsList, g)
  27.               repeat with x = 4 to count(LitTempList)
  28.                 set TwoLitTempList to getAt(LitTempList, x)
  29.                 set the castNum of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 2)
  30.                 set the locH of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 3)
  31.                 set the locV of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 4)
  32.                 set the ink of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 5)
  33.               end repeat
  34.               updateStage()
  35.             end if
  36.           else
  37.             if g = 3 then
  38.               if ARTWhichGraphics <> 3 then
  39.                 set ARTComp to 1
  40.                 set ARTWhichGraphics to 3
  41.                 set LitTempList to getAt(ARTGraphicsList, g)
  42.                 repeat with x = 4 to count(LitTempList)
  43.                   set TwoLitTempList to getAt(LitTempList, x)
  44.                   set the castNum of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 2)
  45.                   set the locH of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 3)
  46.                   set the locV of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 4)
  47.                   set the ink of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 5)
  48.                 end repeat
  49.                 updateStage()
  50.               end if
  51.             end if
  52.           end if
  53.         end if
  54.         repeat with f = 1 to count(ARTGraphicsList)
  55.           if (getAt(getAt(ARTGraphicsList, f), 3) = 1) and (f <> g) then
  56.             set LastPlace to f
  57.             setAt(getAt(ARTGraphicsList, f), 3, 0)
  58.           end if
  59.         end repeat
  60.       end if
  61.       if getAt(getAt(ARTGraphicsList, g), 2) = 0 then
  62.         set the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) + 1
  63.         setAt(getAt(ARTGraphicsList, g), 2, 1)
  64.         repeat with f = 1 to count(ARTGraphicsList)
  65.           if (getAt(getAt(ARTGraphicsList, f), 2) = 1) and (f <> g) and (getAt(getAt(ARTGraphicsList, f), 3) = 0) then
  66.             set the castNum of sprite getAt(getAt(ARTGraphicsList, f), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, f), 1) - 1
  67.             setAt(getAt(ARTGraphicsList, f), 2, 0)
  68.           end if
  69.         end repeat
  70.       end if
  71.     end if
  72.   end repeat
  73.   repeat with g = 1 to count(ARTGraphicsList)
  74.     if not rollOver(getAt(getAt(ARTGraphicsList, g), 1)) then
  75.       if (getAt(getAt(ARTGraphicsList, g), 2) = 1) and (getAt(getAt(ARTGraphicsList, g), 3) = 0) then
  76.         set the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) - 1
  77.         setAt(getAt(ARTGraphicsList, g), 2, 0)
  78.       end if
  79.     end if
  80.   end repeat
  81.   if ARTWhichGraphics = 2 then
  82.     repeat with z = 1 to count(ARTGraphicsLocList)
  83.       if (the mouseH > getAt(getAt(ARTGraphicsLocList, z), 1)) and (the mouseH < getAt(getAt(ARTGraphicsLocList, z), 2)) and (the mouseV > getAt(getAt(ARTGraphicsLocList, z), 3)) and (the mouseV < getAt(getAt(ARTGraphicsLocList, z), 4)) then
  84.         set the locH of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 1)
  85.         set the locV of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 2)
  86.         updateStage()
  87.         if the mouseDown and (IFLCanChange = 1) then
  88.           repeat with b = 39 to 48
  89.             if rollOver(b) and (b <> IFLArtsNameSprite) then
  90.               set ARTNoGo to 1
  91.             end if
  92.           end repeat
  93.           if ARTNoGo = 0 then
  94.             set IFLCanChange to 0
  95.             set ARTGraphicsVeiwFrame to z
  96.             set ARTImageGO to 0
  97.             ARTLeaveArts(3)
  98.           end if
  99.           next repeat
  100.         end if
  101.         set ARTNoGo to 0
  102.       end if
  103.     end repeat
  104.     if (the mouseH < getAt(getAt(ARTGraphicsLocList, 1), 1)) or (the mouseH > getAt(getAt(ARTGraphicsLocList, 4), 2)) or (the mouseV < getAt(getAt(ARTGraphicsLocList, 1), 3)) or (the mouseV > getAt(getAt(ARTGraphicsLocList, 16), 4)) then
  105.       set the locH of sprite ArtGraphicsBoxSprite to 2000
  106.       updateStage()
  107.     end if
  108.   end if
  109.   if (ARTWhichGraphics = 1) or (ARTWhichGraphics = 2) then
  110.     if (the mouseH < 64) and (the mouseH > 28) and (the mouseV < 289) and (the mouseV > 253) then
  111.       set the castNum of sprite 48 to getAt(getAt(getAt(ARTGraphicsList, ARTWhichGraphics), 6), 2)
  112.       set the ink of sprite 48 to 36
  113.       set the locH of sprite 48 to 317
  114.       set the locV of sprite 48 to 189
  115.       put the ink of sprite 48 = 0
  116.       updateStage()
  117.       repeat while (the mouseH < 64) and (the mouseH > 28) and (the mouseV < 289) and (the mouseV > 253)
  118.       end repeat
  119.       set the locH of sprite 48 to 2000
  120.       updateStage()
  121.     end if
  122.   end if
  123.   if ARTWhichGraphics = 1 then
  124.     repeat with z = 1 to count(ARTGraphicsLocList)
  125.       if (the mouseH > getAt(getAt(ARTGraphicsLocList, z), 1)) and (the mouseH < getAt(getAt(ARTGraphicsLocList, z), 2)) and (the mouseV > getAt(getAt(ARTGraphicsLocList, z), 3)) and (the mouseV < getAt(getAt(ARTGraphicsLocList, z), 4)) then
  126.         set the locH of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 1)
  127.         set the locV of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 2)
  128.         updateStage()
  129.         if the mouseDown and (IFLCanChange = 1) then
  130.           repeat with b = 39 to 48
  131.             if rollOver(b) and (b <> IFLArtsNameSprite) then
  132.               set ARTNoGo to 1
  133.             end if
  134.           end repeat
  135.           if ARTNoGo = 0 then
  136.             set IFLCanChange to 0
  137.             set ARTGraphicsVeiwFrame to z
  138.             set ARTImageGO to 0
  139.             ARTLeaveArts(3)
  140.           end if
  141.           next repeat
  142.         end if
  143.         set ARTNoGo to 0
  144.       end if
  145.     end repeat
  146.     if (the mouseH < getAt(getAt(ARTGraphicsLocList, 1), 1)) or (the mouseH > getAt(getAt(ARTGraphicsLocList, 4), 2)) or (the mouseV < getAt(getAt(ARTGraphicsLocList, 1), 3)) or (the mouseV > getAt(getAt(ARTGraphicsLocList, 16), 4)) then
  147.       set the locH of sprite ArtGraphicsBoxSprite to 2000
  148.       updateStage()
  149.     end if
  150.   end if
  151.   if ARTWhichGraphics = 3 then
  152.     set ARTComp to 1
  153.   end if
  154. end
  155.