home *** CD-ROM | disk | FTP | other *** search
/ Hope PC Multimedia SuperPack 2 / HOMEPC.iso / TAROT / DOWNLOAD / VT3.ZIP / C1.DXR / 00221.ls < prev    next >
Encoding:
Text File  |  1995-11-02  |  1.6 KB  |  57 lines

  1. on CardPos X, Y
  2.   global CardsDealt, CardCoord, CCindexes, Cnt, CdNames, Opt
  3.   if (the frame >= label("diary")) and (the frame < label("reshow")) then
  4.     return 
  5.   end if
  6.   set CARD_WIDTH to 76
  7.   set CARD_HEIGHT to 127
  8.   set Cnt to 0
  9.   repeat with i = 1 to CardsDealt - 1
  10.     set t to CardCoord(mget, i)
  11.     set tX to value(item 1 of t)
  12.     set tY to value(item 2 of t)
  13.     if (X < (tX - (CARD_WIDTH / 2))) or (X > (tX + (CARD_WIDTH / 2))) or (Y < (tY - (CARD_HEIGHT / 2))) or (Y > (tY + (CARD_HEIGHT / 2))) then
  14.       nothing()
  15.       next repeat
  16.     end if
  17.     if the optionDown then
  18.       puppetSprite(25, 1)
  19.       set cName to line value(item i of CCindexes) of CdNames
  20.       set cName to chars(cName, 1, the number of chars in cName - 2)
  21.       set the castNum of sprite 25 to the number of cast cName
  22.       set the locH of sprite 25 to 320
  23.       set the locV of sprite 25 to 240
  24.       puppetTransition(50, 0, 64, 1)
  25.       updateStage()
  26.       cursor(-1)
  27.       return 
  28.       next repeat
  29.     end if
  30.     RevealCard(i)
  31.     Sound_Color(value(item i of CCindexes), 1)
  32.     puppetSprite(22, 0)
  33.     puppetSprite(23, 0)
  34.     cursor(-1)
  35.     updateStage()
  36.     return 
  37.   end repeat
  38.   return -1
  39. end
  40.  
  41. on displayLrgCard indx
  42.   global CdNames, CCindexes
  43.   if indx = 0 then
  44.     return 
  45.   end if
  46.   puppetSprite(25, 1)
  47.   set cName to line value(item indx of CCindexes) of CdNames
  48.   set cName to chars(cName, 1, the number of chars in cName - 2)
  49.   set the castNum of sprite 25 to the number of cast cName
  50.   set the locH of sprite 25 to 170
  51.   set the locV of sprite 25 to 275
  52.   puppetTransition(50, 0, 64, 1)
  53.   updateStage()
  54.   cursor(-1)
  55.   return 
  56. end
  57.