home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / testsoft / muzea / exemusei / indice.dir / 00031_Script_•INIT < prev    next >
Text File  |  1997-04-09  |  2KB  |  78 lines

  1. on inindi
  2.   global gSkr, gP, gLab, gI, gT, gF, gH, gW
  3.   put gW
  4.   put 0 into gW
  5.   put 0 into Z
  6.   put 0 into N
  7.   puppetSprite 12,1
  8.   puppetSprite 13,1
  9.   puppetSprite 24,1
  10.   puppetSprite 25,1
  11.   puppetSprite 26,1
  12.   puppetSprite 32,1
  13.   if gH=1 then
  14.     put 0 into gH
  15.   else
  16.     if gLab="" or voidP(gLab)=1 or length(glab)<>12 then
  17.       nothing
  18.     else
  19.       put value(chars(gLab, 5, 5)) into c
  20.       put value(chars(gLab, 6, 6)) into d
  21.       if c=0 then
  22.         if d < 5 then
  23.           put 1 into i
  24.         else
  25.           put 35 into i
  26.         end if
  27.       else if c=1 then
  28.         if d < 3 then
  29.           put 71 into i
  30.         else
  31.           put 100 into i
  32.         end if
  33.       else if c=5 then
  34.         put 139 into i
  35.       end if
  36.       put chars(gLab, 5, 7) into R
  37.       put the number of lines in field "RicLinea" into L
  38.       repeat with N = i to L
  39.         if line N of field "RicLinea" = R then 
  40.           put 1 into Z
  41.           exit repeat
  42.         end if
  43.       end repeat
  44.     end if
  45.     if Z=0 then
  46.       put -9 into N
  47.     else
  48.       put line N of field "NumLinea" into N
  49.       put integer(N - 1)  INTO N
  50.     end if
  51.     put gSkr*N into gI
  52.   end if
  53.   put the top of sprite 20 - the bottom of sprite 19 into FT
  54.   put the top of sprite 28 - the bottom of sprite 27 - 2*the height of sprite 24 into pB
  55.   put gSkr*the number of lines in field "LabSalto" - FT into pT
  56.   put pT/pB into gF
  57.   put (FT/gSkr)*gSkr - gSkr into gP
  58.   put gI - FT/2 into S
  59.   -- put the top of sprite 12 - S into T
  60.   put 19 - S into T
  61.   put the top of sprite 24 + S/gF into B
  62.   put the top of sprite 20 - gSkr*the number of lines in field "LabSalto" into U
  63.   put the bottom of sprite 19 + gSkr into D
  64.   if T <= U then
  65.     put U into T
  66.     put the top of sprite 28 - the height of sprite 24 into B
  67.   else if T >= D then
  68.     put D into T
  69.     put the bottom of sprite 27 into B
  70.   end if
  71.   set the locH of sprite 32 = 9000
  72.   set the locV of sprite 12 = T
  73.   set the locV of sprite 13 = T + gI + the height of sprite 13/2
  74.   set the locV of sprite 24 = B
  75.   spriteBox 25, 609, the bottom of sprite 27, 619, B
  76.   spriteBox 26, 609, B+the height of sprite 24, 619, the top of sprite 28
  77.   updatestage
  78. end