home *** CD-ROM | disk | FTP | other *** search
/ .net 1998 October / dotnet_50.iso / pc / media / moteur.dxr / 00013.ls < prev    next >
Encoding:
Text File  |  2000-10-02  |  4.5 KB  |  180 lines

  1. on startMovie
  2.   repeat with f = 13 to 15
  3.     sprite(f).blend = 0
  4.   end repeat
  5.   put EMPTY into field "prodb"
  6.   put EMPTY into field "themes"
  7.   put EMPTY into field "prod"
  8.   put EMPTY into field "rubrique"
  9.   sprite(13).visible = 1
  10.   sprite(14).visible = 1
  11.   sprite(15).visible = 1
  12.   sprite(16).visible = 1
  13.   sprite(17).visible = 1
  14.   sprite(30).visible = 1
  15.   visiblesprite()
  16. end
  17.  
  18. on visiblesprite
  19.   put EMPTY into field "des"
  20.   put EMPTY into field "texte"
  21.   put EMPTY into field "version"
  22.   put EMPTY into field "auteur"
  23.   put EMPTY into field "contact"
  24.   put EMPTY into field "titre"
  25.   sprite(8).visible = 0
  26.   sprite(9).visible = 0
  27.   sprite(10).visible = 0
  28. end
  29.  
  30. on ReFile
  31.   global recep, filenam
  32.   myfile = new(xtra("fileio"))
  33.   openFile(myfile, filenam, 1)
  34.   thefile = readFile(myfile)
  35.   put thefile into field recep
  36.   closeFile(myfile)
  37.   myfile = 0
  38.   if the machineType = 256 then
  39.     CleanFile()
  40.   end if
  41. end
  42.  
  43. on CleanFile
  44.   global AdLin, totali, recep
  45.   AdLin = 2
  46.   totali = member(recep).lineCount
  47.   repeat while (totali - 1) > 0
  48.     delete char 1 of line AdLin of field recep
  49.     AdLin = AdLin + 1
  50.     totali = totali - 1
  51.   end repeat
  52. end
  53.  
  54. on assem
  55.   global recep, filenam, categO
  56.   if the machineType = 256 then
  57.     filenam = the pathname & "srce" & categO & ".gfp"
  58.     recep = "prodb"
  59.     ReFile()
  60.   else
  61.     filenam = the pathname & "srce" & categO & ".gfm"
  62.     recep = "prodb"
  63.     ReFile()
  64.   end if
  65. end
  66.  
  67. on themes
  68.   global categO, totaline, nline, carac, themes, listhem, nbprod
  69.   put " " into field "themes"
  70.   listhem = []
  71.   nbprod = []
  72.   totaline = member("prodb").lineCount
  73.   nline = 1
  74.   themes = 1
  75.   repeat while nline <= totaline
  76.     carac = char 1 of line nline of field "prodb"
  77.     if carac <= 9 then
  78.       put line nline of field "prodb" into line themes of field "themes"
  79.       add(listhem, nline)
  80.       add(nbprod, value(char 1 to 2 of line nline of field "prodb"))
  81.       delete char 1 to 2 of line themes of field "themes"
  82.       themes = themes + 1
  83.     end if
  84.     nline = nline + 1
  85.   end repeat
  86. end
  87.  
  88. on prod
  89.   global indicthem, nprod, pline, listhem, linethem, nbprod, nbchar, nach, Achar, listprod, IChar, lili
  90.   linethem = getAt(listhem, indicthem)
  91.   nprod = getAt(nbprod, indicthem)
  92.   listprod = []
  93.   pline = linethem + 1
  94.   lili = 1
  95.   repeat while lili <= nprod
  96.     nach = 1
  97.     IChar = 1
  98.     nbchar = length(line pline of field "prodb")
  99.     Achar = char nach of line pline of field "prodb"
  100.     check()
  101.     pline = pline + 1
  102.     lili = lili + 1
  103.   end repeat
  104. end
  105.  
  106. on check
  107.   global IChar, nbchar, pline, nach, listprod, lili
  108.   repeat while IChar < nbchar
  109.     Achar = char nach of line pline of field "prodb"
  110.     if the machineType = 256 then
  111.       if Achar <> "¬ß" then
  112.         nach = nach + 1
  113.       else
  114.         add(listprod, nach)
  115.         put char 1 to nach - 1 of line pline of field "prodb" into line lili of field "prod"
  116.         IChar = nbchar + 1
  117.       end if
  118.       IChar = IChar + 1
  119.       next repeat
  120.     end if
  121.     if Achar <> "√ü" then
  122.       nach = nach + 1
  123.     else
  124.       add(listprod, nach)
  125.       put char 1 to nach - 1 of line pline of field "prodb" into line lili of field "prod"
  126.       IChar = nbchar + 1
  127.     end if
  128.     IChar = IChar + 1
  129.   end repeat
  130. end
  131.  
  132. on descript
  133.   global listprod, charprod, linethem, prodline, indicprod, filenam, chem, recep, drive, sep, chara, xcha
  134.   prodline = linethem + indicprod
  135.   xcha = length(line prodline of field "prodb")
  136.   charprod = getAt(listprod, indicprod)
  137.   chara = charprod + 1
  138.   chem = char chara to xcha of line prodline of field "prodb"
  139.   if the machineType = 256 then
  140.     drive = char 1 to 3 of the pathname
  141.     sep = "\"
  142.   else
  143.     drive = the applicationPath
  144.     sep = ":"
  145.   end if
  146.   filenam = drive & chem & sep & "filedesc.des"
  147.   recep = "des"
  148.   ReFile()
  149.   pingpong()
  150. end
  151.  
  152. on pingpong
  153.   global enil, inst, exe, capt, drive, chem, sep
  154.   enil = member("des").lineCount
  155.   if line 1 of field "des" = "NA" then
  156.     sprite(8).visible = 0
  157.   else
  158.     sprite(8).visible = 1
  159.     inst = line 1 of field "des"
  160.   end if
  161.   if line 2 of field "des" = "NA" then
  162.     sprite(9).visible = 0
  163.   else
  164.     sprite(9).visible = 1
  165.     exe = line 2 of field "des"
  166.   end if
  167.   if line 3 of field "des" = "NA" then
  168.     sprite(10).visible = 0
  169.   else
  170.     capt = line 3 of field "des"
  171.     importFileInto(member(39), drive & chem & sep & capt)
  172.     sprite(10).visible = 1
  173.   end if
  174.   put "Version : " & line 4 of field "des" into field "version"
  175.   put "Auteur : " & line 5 of field "des" into field "auteur"
  176.   put "Contact : " & line 6 of field "des" into field "contact"
  177.   put line 7 of field "des" into field "titre"
  178.   put line 8 to enil of field "des" into field "texte"
  179. end
  180.