home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 315 / MB5_12.sis / mb5_12 (.txt) < prev    next >
Encoding:
EPOC OPL Source  |  2000-10-19  |  86.0 KB  |  4,863 lines

  1.  
  2.  
  3. APP MBornes5,&10000557
  4.     Rem This UID is reserved to Fred Botton. Please don't use!
  5.     Flags 1
  6.     icon "icons.mbm"
  7. ENDA
  8.  
  9. rem MBornes5 v1.2
  10. rem (c) Fr├⌐d├⌐ric Botton 1998         (fbotton@hol.fr)
  11. rem This source code is freely distributable, but I keep the copyright on it.
  12. rem You can use it, modify it, but don't distribute any modified version without my permission.
  13. rem Source code may contains bugs, errors, mistakes. I offer NO GUARANTEES. Use at your own risk.
  14. rem Known bugs: none reported yet 8-)
  15. rem Tbar shortcuts not implemented (yet).
  16. rem Good luck, reading it may be quite difficult due to my poor programming skills, and lack of rem's :)
  17.  
  18. rem Include "const.oph"
  19. Include "system.oxh"
  20. Include "bmp.oxh"
  21.  
  22. PROC mb5:
  23.     
  24.     Global fore%,back%,vide%,nom$(8),version$(3),defau%
  25.     Global Chemin$(150),Volume&,lang%,km1old%,km2old%
  26.     Global main1%(7),main2%(7),joue1%,joue2%,botte1%(4),botte2%(4)
  27.     Global limit1%,limit2%,km1%,km2%,poskm1%,poskm2%,trou1%,trou2%
  28.     Global carte%(106),deuxcent1%,deuxcent2%,posbotte1%,posbotte2%
  29.     Global visib%,fini%,tour%,manche%,reste%,depart%,premier%
  30.     Global decor1%,decor2%,decora%,decorb%,visib1%,visib2%
  31.     Global event&(20),pen1%,pen2%,okay%,arrivee%,cbotte%
  32.     Global fourre1%,fourre2%,parade1%,parade2%,last1%,last2%
  33.     Global forw1%,forw2%,player1$(15),player2$(15),player2a$(15),computer$(15)
  34.     Global Spr1&,Spr2&,spr3&,possible%,sprite%,jsound%
  35.     Global b1&,b2&,c1&,c2&,StatSound&,HandleSound&,anime%,voiture%
  36.     Global nbplay%,pause1%,level%,abort%,outgame%,force%,wid%,hei%
  37.     Global tb1a&,tb1b&,tb2a&,tb2b&,tb3a&,tb3b&,tb4a&,tb4b&
  38.  
  39.  
  40.     nom$="MBornes5":version$="1.2"
  41.     
  42.     Chemin$=LeChemin$:
  43.     wid%=gWidth
  44.     hei%=gHeight
  45.     Readini:
  46.     giPrint Localiz$:(1,lang%)
  47.     LOADM "z:\system\opl\toolbar.opo"
  48.     TBarLink:("Jeu")
  49. ENDP
  50.  
  51. PROC Jeu:
  52.     Local i%
  53.     
  54.     Randomize DateToSecs(Year,Month,Day,Hour,Minute,Second)
  55.     TBarMenu:
  56.     Creefore:
  57.     TbarShow:
  58.     Loadvide:
  59.     SprLoad:
  60.     Loadback:
  61.     visib1%=1
  62.     visib2%=1
  63.     nbplay%=1
  64.     pause1%=anime%*15
  65.     gUpdate Off
  66.     Afffore:
  67.     gUpdate On
  68.  
  69.     decor1%=gCreateBit(52,22,$101)
  70.     gCopy fore%,15,189,52,22,3    
  71.     decor2%=gCreateBit(52,22,$101)
  72.     gCopy fore%,508,189,52,22,3
  73.     decora%=gCreateBit(21,19,$101)
  74.     decorb%=gCreateBit(21,19,$101)
  75.     
  76.     fini%=0
  77.     Do
  78.         tour%=1
  79.         abort%=0
  80.         i%=Debute%:
  81.         If i%=0
  82.             Writeini:
  83.             Stop
  84.         Endif
  85.         GetPlayers:
  86.         forw1%=0
  87.         forw2%=0
  88.  
  89.         Do
  90.         
  91. rem            gUpdate Off
  92.             Afffore:
  93.             Vkm1:
  94.             Vkm2:
  95.             VReste:
  96. rem            gUpdate On
  97.             
  98.             Initvars:
  99.             depart%=1
  100.             Tirage:
  101.             trou1%=7
  102.             trou2%=7
  103.             manche%=0
  104.             If tour%=1
  105.                 premier%=Starter%:
  106.             Else
  107.                 premier%=3-premier%
  108.             Endif
  109.             Do
  110.                 If premier%=2 and depart%=1
  111.                     Rem rien
  112.                 Else
  113.                     rem on rejoue si placement d'une botte
  114.                     Do
  115.                         If manche%=0
  116.                             Play1:
  117.                         Endif
  118.                     Until cbotte%=0 Or Reste%=0
  119.                 Endif
  120.                 If manche%=0 and abort%=0
  121.                     rem on rejoue si placement d'une botte
  122.                     Do    
  123.                         If nbplay%=2
  124.                             Play2:
  125.                         Else
  126.                             Cplay2:
  127.                         Endif
  128.                     Until cbotte%=0 Or Reste%=0
  129.                 Endif
  130.             Until manche%<>0 or abort%=1
  131.             If abort%=0
  132.                 If km1%=1000 or km2%=1000
  133.                     Goal:
  134.                 Else
  135.                     Pause 15
  136.                 Endif
  137.                 Score:
  138.             Endif
  139.             rem manche terminee...
  140.             tour%=tour%+1
  141.         Until tour%=6 or abort%=1
  142.         If tour%=6 and abort%<>1
  143.             If forw1%>forw2%
  144.                 JoueSon:(1,0)
  145.                 Okidoki:(Player1$+Localiz$:(2,lang%))
  146.             Elseif forw1%<forw2%
  147.                 If nbplay%=2
  148.                     JoueSon:(1,0)
  149.                 Else
  150.                     JoueSon:(5,0)
  151.                 Endif
  152.                 Okidoki:(Player2$+Localiz$:(2,lang%))
  153.             Else
  154.                 If nbplay%=2
  155.                     JoueSon:(1,0)
  156.                 Else
  157.                     JoueSon:(6,0)
  158.                 Endif
  159.                 Okidoki:(Localiz$:(3,lang%))
  160.             Endif
  161.         Else
  162.             rem il y a eu abandon de la partie...
  163.         Endif
  164.     Until fini%=1
  165.  
  166.     SprUnload:
  167.     Unloadbit:
  168.     Writeini:
  169.     rem On quitte
  170. ENDP
  171.  
  172. PROC JoueSon:(x%,wait%)
  173.     Local Son$(255),i&
  174.     
  175.     Onerr battery::
  176.     If x%=0
  177.         Return
  178.     Endif
  179.     i&=StopSound&:
  180.     If i&=1
  181.         IOWaitStat32 i&
  182.     Endif
  183.     If x%=1
  184.         Son$=Chemin$+"sound1"
  185.     Elseif x%=2
  186.         Son$=Chemin$+"sound2"
  187.     Elseif x%=3
  188.         Son$=Chemin$+"sound3"
  189.     Elseif x%=4
  190.         Son$=Chemin$+"sound4"
  191.     Elseif x%=5
  192.         Son$=Chemin$+"sound5"
  193.     Elseif x%=6
  194.         Son$=Chemin$+"sound6"
  195.     Elseif x%=7
  196.         Son$=Chemin$+"sound7"
  197.     Elseif x%=8
  198.         Son$=Chemin$+"sound8"
  199.     Elseif x%=9
  200.         Son$=Chemin$+"sound9"
  201.     Endif
  202.     If Exist(son$) and Volume&<>0
  203.         If Wait%=1
  204.             HandleSound&=PlaySound:(Son$,Volume&)
  205.         Else
  206.             HandleSound&=PlaySoundA:(Son$,Volume&,StatSound&)
  207.         Endif
  208.         IOYield
  209.     Endif
  210.     Onerr Off
  211.     Return
  212. battery::
  213.     If err=-24
  214.         GiPrint Localiz$:(58,lang%)
  215.     Endif
  216.     Volume&=0
  217.     Onerr Off
  218. ENDP
  219.  
  220. PROC CPlay2:
  221.     Local end%,select%,ty%,played%,i%
  222.  
  223.     Affvoit:(1,km1%,2,3)
  224.     Affvoit:(2,km2%,1,3)
  225.     IOYield
  226.     cbotte%=0
  227.     depart%=0
  228.     main2%(trou2%)=Rndcompu%:
  229.     carte%(main2%(trou2%))=0
  230.     Affcarte:(2,Typecarte%:(main2%(trou2%)),trou2%)
  231.     JoueSon:(2,0)
  232.     reste%=reste%-1
  233.     Affreste:
  234.     trou2%=0
  235.     
  236.     played%=0
  237.     jsound%=0
  238.     rem si last interessant, on joue une botte...
  239.     If (last1%=1 or last1%=2) and played%=0
  240.         rem right of way ?
  241.         i%=Cherche:(6)
  242.         If i%<>0 and played%=0
  243.             Entoure2:(i%)
  244.             SpriteUse:(Spr1&)
  245.             SpriteDraw:
  246.             EntoureC:(6)
  247.             SpriteUse:(Spr2&)
  248.             SpriteDraw:
  249.             Pause pause1%
  250.             Affcarte:(2,0,i%)
  251.             Affcarte:(6,6,0)
  252.             Affcarte:(4,10,0)
  253.             Affcarte:(8,11,0)
  254.             main2%(i%)=0
  255.             trou2%=i%
  256.             joue2%=10
  257.             limit2%=11
  258.             botte2%(posbotte2%)=6
  259.             posbotte2%=posbotte2%+1
  260.             cbotte%=1
  261.             fourre2%=fourre2%+1
  262.             last2%=6
  263.             played%=1
  264.             SpriteDelete:(Spr1&)
  265.             SpriteDelete:(spr2&)
  266.             jsound%=4
  267.         Endif
  268.     Endif            
  269.     If last1%=4 and played%=0
  270.         rem Punc proof ?
  271.         i%=Cherche:(8)
  272.         If i%<>0 and played%=0
  273.             Entoure2:(i%)
  274.             SpriteUse:(Spr1&)
  275.             SpriteDraw:
  276.             EntoureC:(6)
  277.             SpriteUse:(Spr2&)
  278.             SpriteDraw:
  279.             Pause pause1%
  280.             Affcarte:(2,0,i%)
  281.             Affcarte:(6,8,0)
  282.             Affcarte:(4,10,0)
  283.             main2%(i%)=0
  284.             trou2%=i%
  285.             joue2%=10
  286.             botte2%(posbotte2%)=8
  287.             posbotte2%=posbotte2%+1
  288.             cbotte%=1
  289.             fourre2%=fourre2%+1
  290.             last2%=8
  291.             played%=1
  292.             SpriteDelete:(Spr1&)
  293.             SpriteDelete:(spr2&)
  294.             jsound%=4
  295.         Endif
  296.     Endif
  297.     If last1%=5 and played%=0
  298.         rem driving ace ?
  299.         i%=Cherche:(9)
  300.         If i%<>0 and played%=0
  301.             Entoure2:(i%)
  302.             SpriteUse:(Spr1&)
  303.             SpriteDraw:
  304.             EntoureC:(6)
  305.             SpriteUse:(Spr2&)
  306.             SpriteDraw:
  307.             Pause pause1%
  308.             Affcarte:(2,0,i%)
  309.             Affcarte:(6,9,0)
  310.             Affcarte:(4,10,0)
  311.             main2%(i%)=0
  312.             trou2%=i%
  313.             joue2%=10
  314.             botte2%(posbotte2%)=9
  315.             posbotte2%=posbotte2%+1
  316.             cbotte%=1
  317.             fourre2%=fourre2%+1
  318.             last2%=9
  319.             played%=1
  320.             SpriteDelete:(Spr1&)
  321.             SpriteDelete:(spr2&)
  322.             jsound%=4
  323.         Endif
  324.     Endif
  325.     If last1%=3 and played%=0
  326.         rem extra tank ?
  327.         i%=Cherche:(7)
  328.         If i%<>0 and played%=0
  329.             Entoure2:(i%)
  330.             SpriteUse:(Spr1&)
  331.             SpriteDraw:
  332.             EntoureC:(6)
  333.             SpriteUse:(Spr2&)
  334.             SpriteDraw:
  335.             Pause pause1%
  336.             Affcarte:(2,0,i%)
  337.             Affcarte:(6,7,0)
  338.             Affcarte:(4,10,0)
  339.             main2%(i%)=0
  340.             trou2%=i%
  341.             joue2%=10
  342.             botte2%(posbotte2%)=7
  343.             posbotte2%=posbotte2%+1
  344.             cbotte%=1
  345.             fourre2%=fourre2%+1
  346.             last2%=7
  347.             played%=1
  348.             SpriteDelete:(Spr1&)
  349.             SpriteDelete:(spr2&)
  350.             jsound%=4
  351.         Endif
  352.     Endif
  353.     rem si kilometres atteints par player 1 ou plus de cartes, on joue les bottes !
  354.     rem on sait qu'aucune botte n'est possible...
  355.     If reste%<=6 or ((km1%=800 or km1%>=900) and deuxcent1%<=1) or (km1%>=900 and deuxcent1%<=2)
  356.         rem on joue les eventuelles bottes
  357.         i%=Cherche:(6)
  358.         If i%<>0 and played%=0
  359.             Entoure2:(i%)
  360.             SpriteUse:(Spr1&)
  361.             SpriteDraw:
  362.             EntoureC:(6)
  363.             SpriteUse:(Spr2&)
  364.             SpriteDraw:
  365.             Pause pause1%
  366.             Affcarte:(2,0,i%)
  367.             Affcarte:(6,6,0)
  368.             If joue2%<>3 and joue2%<>4 and joue2%<>4
  369.                 joue2%=10
  370.                 Affcarte:(4,10,0)
  371.             Endif
  372.             Affcarte:(8,11,0)
  373.             main2%(i%)=0
  374.             trou2%=i%
  375.             limit2%=11
  376.             botte2%(posbotte2%)=6
  377.             posbotte2%=posbotte2%+1
  378.             cbotte%=1
  379.             parade2%=parade2%+1
  380.             last2%=6
  381.             played%=1
  382.             SpriteDelete:(Spr1&)
  383.             SpriteDelete:(spr2&)
  384.             jsound%=8
  385.         Endif
  386.         i%=Cherche:(8)
  387.         If i%<>0 and played%=0
  388.             Entoure2:(i%)
  389.             SpriteUse:(Spr1&)
  390.             SpriteDraw:
  391.             EntoureC:(6)
  392.             SpriteUse:(Spr2&)
  393.             SpriteDraw:
  394.             Pause pause1%
  395.             Affcarte:(2,0,i%)
  396.             Affcarte:(6,8,0)
  397.             If joue2%=4
  398.                 joue2%=10
  399.                 Affcarte:(4,10,0)
  400.             Endif
  401.             main2%(i%)=0
  402.             trou2%=i%
  403.             botte2%(posbotte2%)=8
  404.             posbotte2%=posbotte2%+1
  405.             cbotte%=1
  406.             parade2%=parade2%+1
  407.             last2%=8
  408.             played%=1
  409.             SpriteDelete:(Spr1&)
  410.             SpriteDelete:(spr2&)
  411.             jsound%=8
  412.         Endif
  413.         i%=Cherche:(9)
  414.         If i%<>0 and played%=0
  415.             Entoure2:(i%)
  416.             SpriteUse:(Spr1&)
  417.             SpriteDraw:
  418.             EntoureC:(6)
  419.             SpriteUse:(Spr2&)
  420.             SpriteDraw:
  421.             Pause pause1%
  422.             Affcarte:(2,0,i%)
  423.             Affcarte:(6,9,0)
  424.             If joue2%=5
  425.                 joue2%=10
  426.                 Affcarte:(4,10,0)
  427.             Endif
  428.             main2%(i%)=0
  429.             trou2%=i%
  430.             botte2%(posbotte2%)=9
  431.             posbotte2%=posbotte2%+1
  432.             cbotte%=1
  433.             parade2%=parade2%+1
  434.             last2%=9
  435.             played%=1
  436.             SpriteDelete:(Spr1&)
  437.             SpriteDelete:(spr2&)
  438.             jsound%=8
  439.         Endif
  440.         i%=Cherche:(7)
  441.         If i%<>0 and played%=0
  442.             Entoure2:(i%)
  443.             SpriteUse:(Spr1&)
  444.             SpriteDraw:
  445.             EntoureC:(6)
  446.             SpriteUse:(Spr2&)
  447.             SpriteDraw:
  448.             Pause pause1%
  449.             Affcarte:(2,0,i%)
  450.             Affcarte:(6,7,0)
  451.             If joue2%=3
  452.                 joue2%=10
  453.                 Affcarte:(4,10,0)
  454.             Endif
  455.             main2%(i%)=0
  456.             trou2%=i%
  457.             botte2%(posbotte2%)=7
  458.             posbotte2%=posbotte2%+1
  459.             cbotte%=1
  460.             parade2%=parade2%+1
  461.             last2%=7
  462.             played%=1
  463.             SpriteDelete:(Spr1&)
  464.             SpriteDelete:(spr2&)
  465.             jsound%=8
  466.         Endif
  467.     Endif
  468.     rem si jeu vide
  469.     If joue2%=0 and played%=0
  470.          rem feu vert ?
  471.          i%=Cherche:(10)
  472.         If i%<>0 and played%=0
  473.             Entoure2:(i%)
  474.             SpriteUse:(Spr1&)
  475.             SpriteDraw:
  476.             EntoureC:(4)
  477.             SpriteUse:(Spr2&)
  478.             SpriteDraw:
  479.             Pause pause1%
  480.             Affcarte:(2,0,i%)
  481.             Affcarte:(4,10,0)
  482.             main2%(i%)=0
  483.             trou2%=i%
  484.             joue2%=10
  485.             last2%=10
  486.             played%=1
  487.             SpriteDelete:(Spr1&)
  488.             SpriteDelete:(spr2&)
  489.             jsound%=8
  490.         Endif
  491.         rem right of way ?
  492.          i%=Cherche:(6)
  493.         If i%<>0 and played%=0
  494.             Entoure2:(i%)
  495.             SpriteUse:(Spr1&)
  496.             SpriteDraw:
  497.             EntoureC:(6)
  498.             SpriteUse:(Spr2&)
  499.             SpriteDraw:
  500.             Pause pause1%
  501.             Affcarte:(2,0,i%)
  502.             Affcarte:(6,6,0)
  503.             Affcarte:(4,10,0)
  504.             Affcarte:(8,11,0)
  505.             main2%(i%)=0
  506.             trou2%=i%
  507.             joue2%=10
  508.             limit2%=11
  509.             botte2%(posbotte2%)=6
  510.             posbotte2%=posbotte2%+1
  511.             cbotte%=1
  512.             parade2%=parade2%+1
  513.             last2%=6
  514.             played%=1
  515.             SpriteDelete:(Spr1&)
  516.             SpriteDelete:(spr2&)
  517.             jsound%=8
  518.         Endif        
  519.     Endif
  520.     rem si joueur place trop de kilos, on attaque 1 fois sur 5 si c'est possible
  521.     If last1%=19 or last1%=18
  522.         i%=1+(Rnd*5)
  523.         If i%=1
  524.             rem Attaque ?
  525.             If played%=0
  526.                 i%=Attaque%:
  527.                 If i%<>0
  528.                     played%=1
  529.                 Endif
  530.             Endif
  531.         Endif
  532.     Endif
  533.     rem si jeu feu vert
  534.     If joue2%=10 and played%=0
  535.         rem 200 ?
  536.         If deuxcent2%<=1 and km2%+200<=1000 and limit2%<>2 and played%=0
  537.             i%=Cherche:(19)
  538.             If i%<>0
  539.                 If km2%+200=1000
  540.                     rem et si des cartes bottes restaient ?
  541.                     played%=botsimp%:
  542.                 Endif
  543.                 If played%=0
  544.                     Entoure2:(i%)
  545.                     SpriteUse:(Spr1&)
  546.                     SpriteDraw:
  547.                     EntoureC:(10)
  548.                     SpriteUse:(Spr2&)
  549.                     SpriteDraw:
  550.                     Pause pause1%
  551.                     Affcarte:(2,0,i%)
  552.                     Affcarte:(10,19,0)
  553.                     main2%(i%)=0
  554.                     trou2%=i%
  555.                     poskm2%=poskm2%+1
  556.                     km2%=km2%+200
  557.                     deuxcent2%=deuxcent2%+1
  558.                     last2%=19
  559.                     played%=1
  560.                     SpriteDelete:(Spr1&)
  561.                     SpriteDelete:(spr2&)
  562.                     jsound%=8
  563.                     JoueSon:(jsound%,1)
  564.                     jsound%=0
  565.                     Affkm2:
  566.                 Endif
  567.             Endif
  568.         Endif
  569.         rem 100 ?
  570.         If km2%+100<=1000 and limit2%<>2 and played%=0
  571.             i%=Cherche:(18)
  572.             If i%<>0
  573.                 If km2%+100=1000
  574.                     rem et si des cartes bottes restaient ?
  575.                     played%=botsimp%:
  576.                 Endif
  577.                 If played%=0
  578.                     Entoure2:(i%)
  579.                     SpriteUse:(Spr1&)
  580.                     SpriteDraw:
  581.                     EntoureC:(10)
  582.                     SpriteUse:(Spr2&)
  583.                     SpriteDraw:
  584.                     Pause pause1%
  585.                     Affcarte:(2,0,i%)
  586.                     Affcarte:(10,18,0)
  587.                     main2%(i%)=0
  588.                     trou2%=i%
  589.                     poskm2%=poskm2%+1
  590.                     km2%=km2%+100
  591.                     last2%=18
  592.                     played%=1
  593.                     SpriteDelete:(Spr1&)
  594.                     SpriteDelete:(spr2&)
  595.                     jsound%=8
  596.                     JoueSon:(jsound%,1)
  597.                     jsound%=0
  598.                     Affkm2:
  599.                 Endif
  600.             Endif
  601.         Endif
  602.         rem 75 ?
  603.         If km2%+75<=1000 and limit2%<>2 and played%=0
  604.             i%=Cherche:(17)
  605.             If i%<>0
  606.                 If km2%+75=1000
  607.                     rem et si des cartes bottes restaient ?
  608.                     played%=botsimp%:
  609.                 Endif
  610.                 If played%=0
  611.                     Entoure2:(i%)
  612.                     SpriteUse:(Spr1&)
  613.                     SpriteDraw:
  614.                     EntoureC:(10)
  615.                     SpriteUse:(Spr2&)
  616.                     SpriteDraw:
  617.                     Pause pause1%
  618.                     Affcarte:(2,0,i%)
  619.                     Affcarte:(10,17,0)
  620.                     main2%(i%)=0
  621.                     trou2%=i%
  622.                     poskm2%=poskm2%+1
  623.                     km2%=km2%+75
  624.                     last2%=17
  625.                     played%=1
  626.                     SpriteDelete:(Spr1&)
  627.                     SpriteDelete:(spr2&)
  628.                     jsound%=8
  629.                     JoueSon:(jsound%,1)
  630.                     jsound%=0
  631.                     Affkm2:
  632.                 Endif
  633.             Endif
  634.         Endif
  635.         rem 50 ?
  636.         If km2%+50<=1000 and played%=0
  637.             i%=Cherche:(16)
  638.             If i%<>0
  639.                 If km2%+50=1000
  640.                     rem et si des cartes bottes restaient ?
  641.                     played%=botsimp%:
  642.                 Endif
  643.                 If played%=0
  644.                     Entoure2:(i%)
  645.                     SpriteUse:(Spr1&)
  646.                     SpriteDraw:
  647.                     EntoureC:(10)
  648.                     SpriteUse:(Spr2&)
  649.                     SpriteDraw:
  650.                     Pause pause1%
  651.                     Affcarte:(2,0,i%)
  652.                     Affcarte:(10,16,0)
  653.                     main2%(i%)=0
  654.                     trou2%=i%
  655.                     poskm2%=poskm2%+1
  656.                     km2%=km2%+50
  657.                     last2%=16
  658.                     played%=1
  659.                     SpriteDelete:(Spr1&)
  660.                     SpriteDelete:(spr2&)
  661.                     jsound%=8
  662.                     JoueSon:(jsound%,1)
  663.                     jsound%=0
  664.                     Affkm2:
  665.                 Endif
  666.             Endif
  667.         Endif
  668.         rem 25 ?
  669.         If km2%+25<=1000 and played%=0
  670.             i%=Cherche:(15)
  671.             If i%<>0
  672.                 If km2%+25=1000
  673.                     rem et si des cartes bottes restaient ?
  674.                     played%=botsimp%:
  675.                 Endif
  676.                 If played%=0
  677.                     Entoure2:(i%)
  678.                     SpriteUse:(Spr1&)
  679.                     SpriteDraw:
  680.                     EntoureC:(10)
  681.                     SpriteUse:(Spr2&)
  682.                     SpriteDraw:
  683.                     Pause pause1%
  684.                     Affcarte:(2,0,i%)
  685.                     Affcarte:(10,15,0)
  686.                     main2%(i%)=0
  687.                     trou2%=i%
  688.                     poskm2%=poskm2%+1
  689.                     km2%=km2%+25
  690.                     last2%=15
  691.                     played%=1
  692.                     SpriteDelete:(Spr1&)
  693.                     SpriteDelete:(spr2&)
  694.                     jsound%=8
  695.                     JoueSon:(jsound%,1)
  696.                     jsound%=0
  697.                     Affkm2:
  698.                 Endif
  699.             Endif
  700.         Endif
  701.     Endif
  702.     rem si jeu stop
  703.     If (joue2%=1 or joue2%=13 or joue2%=14 or joue2%=12) and played%=0
  704.         rem feu vert ?
  705.          i%=Cherche:(10)
  706.         If i%<>0
  707.             Entoure2:(i%)
  708.             SpriteUse:(Spr1&)
  709.             SpriteDraw:
  710.             EntoureC:(4)
  711.             SpriteUse:(Spr2&)
  712.             SpriteDraw:
  713.             Pause pause1%
  714.             Affcarte:(2,0,i%)
  715.             Affcarte:(4,10,0)
  716.             main2%(i%)=0
  717.             trou2%=i%
  718.             joue2%=10
  719.             last2%=10
  720.             played%=1
  721.             SpriteDelete:(Spr1&)
  722.             SpriteDelete:(spr2&)
  723.             jsound%=8
  724.         Endif
  725.         rem right of way ?
  726.          i%=Cherche:(6)
  727.         If i%<>0 and played%=0
  728.             Entoure2:(i%)
  729.             SpriteUse:(Spr1&)
  730.             SpriteDraw:
  731.             EntoureC:(6)
  732.             SpriteUse:(Spr2&)
  733.             SpriteDraw:
  734.             Pause pause1%
  735.             Affcarte:(2,0,i%)
  736.             Affcarte:(6,6,0)
  737.             Affcarte:(4,10,0)
  738.             Affcarte:(8,11,0)
  739.             main2%(i%)=0
  740.             trou2%=i%
  741.             joue2%=10
  742.             limit2%=11
  743.             botte2%(posbotte2%)=6
  744.             posbotte2%=posbotte2%+1
  745.             cbotte%=1
  746.             parade2%=parade2%+1
  747.             last2%=6
  748.             played%=1
  749.             SpriteDelete:(Spr1&)
  750.             SpriteDelete:(spr2&)
  751.             jsound%=8
  752.         Endif        
  753.     Endif
  754.     rem si jeu flat tire
  755.     If joue2%=4 and played%=0
  756.         rem spare tire ?
  757.         i%=Cherche:(13)
  758.         If i%<>0
  759.             Entoure2:(i%)
  760.             SpriteUse:(Spr1&)
  761.             SpriteDraw:
  762.             EntoureC:(4)
  763.             SpriteUse:(Spr2&)
  764.             SpriteDraw:
  765.             Pause pause1%
  766.             Affcarte:(2,0,i%)
  767.             Affcarte:(4,13,0)
  768.             main2%(i%)=0
  769.             trou2%=i%
  770.             joue2%=13
  771.             If botte2%(1)=6 or botte2%(2)=6 or botte2%(3)=6 or botte2%(4)=6
  772.                 Affcarte:(4,10,0)
  773.                 joue2%=10
  774.             Endif                
  775.             last2%=13
  776.             played%=1
  777.             SpriteDelete:(Spr1&)
  778.             SpriteDelete:(spr2&)
  779.             jsound%=8
  780.         Endif
  781.         rem punc proof ?
  782.         i%=Cherche:(8)
  783.         If i%<>0 and played%=0
  784.             Entoure2:(i%)
  785.             SpriteUse:(Spr1&)
  786.             SpriteDraw:
  787.             EntoureC:(4)
  788.             SpriteUse:(Spr2&)
  789.             SpriteDraw:
  790.             Pause pause1%
  791.             Affcarte:(2,0,i%)
  792.             Affcarte:(6,8,0)
  793.             Affcarte:(4,10,0)
  794.             main2%(i%)=0
  795.             trou2%=i%
  796.             joue2%=10
  797.             botte2%(posbotte2%)=8
  798.             posbotte2%=posbotte2%+1
  799.             cbotte%=1
  800.             parade2%=parade2%+1
  801.             last2%=8
  802.             played%=1
  803.             SpriteDelete:(Spr1&)
  804.             SpriteDelete:(spr2&)
  805.             jsound%=8
  806.         Endif
  807.     Endif
  808.     rem si jeu accident
  809.     If joue2%=5 and played%=0
  810.         rem repair ?
  811.         i%=Cherche:(14)
  812.         If i%<>0
  813.             Entoure2:(i%)
  814.             SpriteUse:(Spr1&)
  815.             SpriteDraw:
  816.             EntoureC:(4)
  817.             SpriteUse:(Spr2&)
  818.             SpriteDraw:
  819.             Pause pause1%
  820.             Affcarte:(2,0,i%)
  821.             Affcarte:(4,14,0)
  822.             main2%(i%)=0
  823.             trou2%=i%
  824.             joue2%=14
  825.             If botte2%(1)=6 or botte2%(2)=6 or botte2%(3)=6 or botte2%(4)=6
  826.                 Affcarte:(4,10,0)
  827.                 joue2%=10
  828.             Endif                
  829.             last2%=14
  830.             played%=1
  831.             SpriteDelete:(Spr1&)
  832.             SpriteDelete:(spr2&)
  833.             jsound%=8
  834.         Endif
  835.         rem driving ace ?
  836.         i%=Cherche:(9)
  837.         If i%<>0 and played%=0
  838.             Entoure2:(i%)
  839.             SpriteUse:(Spr1&)
  840.             SpriteDraw:
  841.             EntoureC:(6)
  842.             SpriteUse:(Spr2&)
  843.             SpriteDraw:
  844.             Pause pause1%
  845.             Affcarte:(2,0,i%)
  846.             Affcarte:(6,9,0)
  847.             Affcarte:(4,10,0)
  848.             main2%(i%)=0
  849.             trou2%=i%
  850.             joue2%=10
  851.             botte2%(posbotte2%)=9
  852.             posbotte2%=posbotte2%+1
  853.             cbotte%=1
  854.             parade2%=parade2%+1
  855.             last2%=9
  856.             played%=1
  857.             SpriteDelete:(Spr1&)
  858.             SpriteDelete:(spr2&)
  859.             jsound%=8
  860.         Endif
  861.     Endif
  862.     rem si jeu out of gas
  863.     If joue2%=3 and played%=0
  864.         rem gasoline ?
  865.         i%=Cherche:(12)
  866.         If i%<>0
  867.             Entoure2:(i%)
  868.             SpriteUse:(Spr1&)
  869.             SpriteDraw:
  870.             EntoureC:(4)
  871.             SpriteUse:(Spr2&)
  872.             SpriteDraw:
  873.             Pause pause1%
  874.             Affcarte:(2,0,i%)
  875.             Affcarte:(4,12,0)
  876.             main2%(i%)=0
  877.             trou2%=i%
  878.             joue2%=12
  879.             If botte2%(1)=6 or botte2%(2)=6 or botte2%(3)=6 or botte2%(4)=6
  880.                 Affcarte:(4,10,0)
  881.                 joue2%=10
  882.             Endif                
  883.             last2%=12
  884.             played%=1
  885.             SpriteDelete:(Spr1&)
  886.             SpriteDelete:(spr2&)
  887.             jsound%=8
  888.         Endif
  889.         rem extra tank ?
  890.         i%=Cherche:(7)
  891.         If i%<>0 and played%=0
  892.             Entoure2:(i%)
  893.             SpriteUse:(Spr1&)
  894.             SpriteDraw:
  895.             EntoureC:(6)
  896.             SpriteUse:(Spr2&)
  897.             SpriteDraw:
  898.             Pause pause1%
  899.             Affcarte:(2,0,i%)
  900.             Affcarte:(6,7,0)
  901.             Affcarte:(4,10,0)
  902.             main2%(i%)=0
  903.             trou2%=i%
  904.             joue2%=10
  905.             botte2%(posbotte2%)=7
  906.             posbotte2%=posbotte2%+1
  907.             cbotte%=1
  908.             parade2%=parade2%+1
  909.             last2%=7
  910.             played%=1
  911.             SpriteDelete:(Spr1&)
  912.             SpriteDelete:(spr2&)
  913.             jsound%=8
  914.         Endif
  915.     Endif
  916.     rem si jeu speed limit
  917.     If limit2%=2 and played%=0
  918.         rem end limit ?
  919.          i%=Cherche:(11)
  920.         If i%<>0
  921.             Entoure2:(i%)
  922.             SpriteUse:(Spr1&)
  923.             SpriteDraw:
  924.             EntoureC:(8)
  925.             SpriteUse:(Spr2&)
  926.             SpriteDraw:
  927.             Pause pause1%
  928.             Affcarte:(2,0,i%)
  929.             Affcarte:(8,11,0)
  930.             main2%(i%)=0
  931.             trou2%=i%
  932.             limit2%=11
  933.             last2%=11
  934.             played%=1
  935.             SpriteDelete:(Spr1&)
  936.             SpriteDelete:(spr2&)
  937.             jsound%=8
  938.         Endif
  939.         rem right of way ?
  940.          i%=Cherche:(6)
  941.         If i%<>0 and played%=0
  942.             Entoure2:(i%)
  943.             SpriteUse:(Spr1&)
  944.             SpriteDraw:
  945.             EntoureC:(6)
  946.             SpriteUse:(Spr2&)
  947.             SpriteDraw:
  948.             Pause pause1%
  949.             Affcarte:(2,0,i%)
  950.             Affcarte:(6,6,0)
  951.             Affcarte:(4,10,0)
  952.             Affcarte:(8,11,0)
  953.             main2%(i%)=0
  954.             trou2%=i%
  955.             joue2%=10
  956.             limit2%=11
  957.             botte2%(posbotte2%)=6
  958.             posbotte2%=posbotte2%+1
  959.             cbotte%=1
  960.             parade2%=parade2%+1
  961.             last2%=6
  962.             played%=1
  963.             SpriteDelete:(Spr1&)
  964.             SpriteDelete:(spr2&)
  965.             jsound%=8
  966.         Endif        
  967.     Endif
  968.     rem Attaque ?
  969.     If played%=0
  970.         i%=Attaque%:
  971.         If i%<>0
  972.             played%=1
  973.         Endif
  974.     Endif
  975.  
  976.     rem rien a jouer
  977.     If played%=0
  978.         i%=Defausse%:
  979.         defau%=Typecarte%:(main2%(i%))
  980.         Entoure2:(i%)
  981.         SpriteUse:(Spr1&)
  982.         SpriteDraw:
  983.         EntoureC:(11)
  984.         SpriteUse:(Spr2&)
  985.         SpriteDraw:
  986.         Pause pause1%
  987.         Affcarte:(2,0,i%)
  988.         Affcarte:(11,Typecarte%:(main2%(i%)),0)
  989.         main2%(i%)=0
  990.         trou2%=i%
  991.         last2%=0
  992.         played%=1
  993.         SpriteDelete:(Spr1&)
  994.         SpriteDelete:(spr2&)
  995.         jsound%=7
  996.     Endif
  997.  
  998.     JoueSon:(jsound%,1)
  999.         
  1000.     If km2%=1000 or reste%<=0
  1001.         manche%=1
  1002.     Endif
  1003.     
  1004. ENDP        
  1005.  
  1006. PROC Botsimp%:
  1007.     Local played%,i%
  1008.     
  1009.         played%=0
  1010.         rem on joue les eventuelles bottes
  1011.         i%=Cherche:(6)
  1012.         If i%<>0 and played%=0
  1013.             Entoure2:(i%)
  1014.             SpriteUse:(Spr1&)
  1015.             SpriteDraw:
  1016.             EntoureC:(6)
  1017.             SpriteUse:(Spr2&)
  1018.             SpriteDraw:
  1019.             Pause pause1%
  1020.             Affcarte:(2,0,i%)
  1021.             Affcarte:(6,6,0)
  1022.             Affcarte:(4,10,0)
  1023.             Affcarte:(8,11,0)
  1024.             main2%(i%)=0
  1025.             trou2%=i%
  1026.             joue2%=10
  1027.             limit2%=11
  1028.             botte2%(posbotte2%)=6
  1029.             posbotte2%=posbotte2%+1
  1030.             cbotte%=1
  1031.             parade2%=parade2%+1
  1032.             last2%=6
  1033.             played%=1
  1034.             SpriteDelete:(Spr1&)
  1035.             SpriteDelete:(spr2&)
  1036.             jsound%=8
  1037.         Endif
  1038.         i%=Cherche:(8)
  1039.         If i%<>0 and played%=0
  1040.             Entoure2:(i%)
  1041.             SpriteUse:(Spr1&)
  1042.             SpriteDraw:
  1043.             EntoureC:(6)
  1044.             SpriteUse:(Spr2&)
  1045.             SpriteDraw:
  1046.             Pause pause1%
  1047.             Affcarte:(2,0,i%)
  1048.             Affcarte:(6,8,0)
  1049.             Affcarte:(4,10,0)
  1050.             main2%(i%)=0
  1051.             trou2%=i%
  1052.             joue2%=10
  1053.             botte2%(posbotte2%)=8
  1054.             posbotte2%=posbotte2%+1
  1055.             cbotte%=1
  1056.             parade2%=parade2%+1
  1057.             last2%=8
  1058.             played%=1
  1059.             SpriteDelete:(Spr1&)
  1060.             SpriteDelete:(spr2&)
  1061.             jsound%=8
  1062.         Endif
  1063.         i%=Cherche:(9)
  1064.         If i%<>0 and played%=0
  1065.             Entoure2:(i%)
  1066.             SpriteUse:(Spr1&)
  1067.             SpriteDraw:
  1068.             EntoureC:(6)
  1069.             SpriteUse:(Spr2&)
  1070.             SpriteDraw:
  1071.             Pause pause1%
  1072.             Affcarte:(2,0,i%)
  1073.             Affcarte:(6,9,0)
  1074.             Affcarte:(4,10,0)
  1075.             main2%(i%)=0
  1076.             trou2%=i%
  1077.             joue2%=10
  1078.             botte2%(posbotte2%)=9
  1079.             posbotte2%=posbotte2%+1
  1080.             cbotte%=1
  1081.             parade2%=parade2%+1
  1082.             last2%=9
  1083.             played%=1
  1084.             SpriteDelete:(Spr1&)
  1085.             SpriteDelete:(spr2&)
  1086.             jsound%=8
  1087.         Endif
  1088.         i%=Cherche:(7)
  1089.         If i%<>0 and played%=0
  1090.             Entoure2:(i%)
  1091.             SpriteUse:(Spr1&)
  1092.             SpriteDraw:
  1093.             EntoureC:(6)
  1094.             SpriteUse:(Spr2&)
  1095.             SpriteDraw:
  1096.             Pause pause1%
  1097.             Affcarte:(2,0,i%)
  1098.             Affcarte:(6,7,0)
  1099.             Affcarte:(4,10,0)
  1100.             main2%(i%)=0
  1101.             trou2%=i%
  1102.             joue2%=10
  1103.             botte2%(posbotte2%)=7
  1104.             posbotte2%=posbotte2%+1
  1105.             cbotte%=1
  1106.             parade2%=parade2%+1
  1107.             last2%=7
  1108.             played%=1
  1109.             SpriteDelete:(Spr1&)
  1110.             SpriteDelete:(spr2&)
  1111.             jsound%=8
  1112.         Endif
  1113.         Return played%
  1114. ENDP
  1115.  
  1116.     
  1117. PROC Cherche:(c%)
  1118. rem recherche la carte c% dans le jeu de player 2
  1119. rem  retourne 0 si pas presente, numero de la carte sinon...
  1120.     Local i%,trouve%
  1121.     
  1122.     i%=1
  1123.     trouve%=0
  1124.     Do
  1125.         If TypeCarte%:(Main2%(i%))=c%
  1126.             trouve%=1
  1127.         Endif
  1128.         i%=i%+1
  1129.     Until trouve%=1 or i%=8
  1130.     If trouve%=1
  1131.         Return i%-1
  1132.     Else
  1133.         Return 0
  1134.     Endif
  1135. ENDP
  1136.  
  1137. PROC Attaque%:
  1138.     Local played%,i%
  1139.     
  1140.     played%=0
  1141.     rem attaque stop ?
  1142.     i%=Cherche:(1)
  1143.     If i%<>0 and played%=0
  1144.         If botte1%(1)<>6 and botte1%(2)<>6 and botte1%(3)<>6 and botte1%(4)<>6 and joue1%=10
  1145.             rem on attaque !
  1146.             Entoure2:(i%)
  1147.             SpriteUse:(Spr1&)
  1148.             SpriteDraw:
  1149.             EntoureC:(3)
  1150.             SpriteUse:(Spr2&)
  1151.             SpriteDraw:
  1152.             Pause pause1%
  1153.             Affcarte:(2,0,i%)
  1154.             Affcarte:(3,1,0)
  1155.             main2%(i%)=0
  1156.             trou2%=i%
  1157.             joue1%=1
  1158.             last2%=1
  1159.             played%=1
  1160.             SpriteDelete:(Spr1&)
  1161.             SpriteDelete:(spr2&)
  1162.             jsound%=3
  1163.         Endif
  1164.     Endif
  1165.     rem attaque flat tire ?
  1166.     i%=Cherche:(4)
  1167.     If i%<>0 and played%=0
  1168.         If botte1%(1)<>8 and botte1%(2)<>8 and botte1%(3)<>8 and botte1%(4)<>8 and joue1%=10
  1169.             rem on attaque !
  1170.             Entoure2:(i%)
  1171.             SpriteUse:(Spr1&)
  1172.             SpriteDraw:
  1173.             EntoureC:(3)
  1174.             SpriteUse:(Spr2&)
  1175.             SpriteDraw:
  1176.             Pause pause1%
  1177.             Affcarte:(2,0,i%)
  1178.             Affcarte:(3,4,0)
  1179.             main2%(i%)=0
  1180.             trou2%=i%
  1181.             joue1%=4
  1182.             last2%=4
  1183.             played%=1
  1184.             SpriteDelete:(Spr1&)
  1185.             SpriteDelete:(spr2&)
  1186.             jsound%=3
  1187.         Endif
  1188.     Endif
  1189.     rem attaque out of gas ?
  1190.     i%=Cherche:(3)
  1191.     If i%<>0 and played%=0
  1192.         If botte1%(1)<>7 and botte1%(2)<>7 and botte1%(3)<>7 and botte1%(4)<>7 and joue1%=10
  1193.             rem on attaque !
  1194.             Entoure2:(i%)
  1195.             SpriteUse:(Spr1&)
  1196.             SpriteDraw:
  1197.             EntoureC:(3)
  1198.             SpriteUse:(Spr2&)
  1199.             SpriteDraw:
  1200.             Pause pause1%
  1201.             Affcarte:(2,0,i%)
  1202.             Affcarte:(3,3,0)
  1203.             main2%(i%)=0
  1204.             trou2%=i%
  1205.             joue1%=3
  1206.             last2%=3
  1207.             played%=1
  1208.             SpriteDelete:(Spr1&)
  1209.             SpriteDelete:(spr2&)
  1210.             jsound%=3
  1211.         Endif
  1212.     Endif
  1213.     rem attaque accident ?
  1214.     i%=Cherche:(5)
  1215.     If i%<>0 and played%=0
  1216.         If botte1%(1)<>9 and botte1%(2)<>9 and botte1%(3)<>9 and botte1%(4)<>9 and joue1%=10
  1217.             rem on attaque !
  1218.             Entoure2:(i%)
  1219.             SpriteUse:(Spr1&)
  1220.             SpriteDraw:
  1221.             EntoureC:(3)
  1222.             SpriteUse:(Spr2&)
  1223.             SpriteDraw:
  1224.             Pause pause1%
  1225.             Affcarte:(2,0,i%)
  1226.             Affcarte:(3,5,0)
  1227.             main2%(i%)=0
  1228.             trou2%=i%
  1229.             joue1%=5
  1230.             last2%=5
  1231.             played%=1
  1232.             SpriteDelete:(Spr1&)
  1233.             SpriteDelete:(spr2&)
  1234.             jsound%=3
  1235.         Endif
  1236.     Endif
  1237.     rem attaque speed limit ?
  1238.     i%=Cherche:(2)
  1239.     If i%<>0 and played%=0
  1240.         If botte1%(1)<>6 and botte1%(2)<>6 and botte1%(3)<>6 and botte1%(4)<>6 and (limit1%=0 or limit1%=11)
  1241.             rem on attaque !
  1242.             Entoure2:(i%)
  1243.             SpriteUse:(Spr1&)
  1244.             SpriteDraw:
  1245.             EntoureC:(7)
  1246.             SpriteUse:(Spr2&)
  1247.             SpriteDraw:
  1248.             Pause pause1%
  1249.             Affcarte:(2,0,i%)
  1250.             Affcarte:(7,2,0)
  1251.             main2%(i%)=0
  1252.             trou2%=i%
  1253.             limit1%=2
  1254.             last2%=2
  1255.             played%=1
  1256.             SpriteDelete:(Spr1&)
  1257.             SpriteDelete:(spr2&)
  1258.             jsound%=3
  1259.         Endif
  1260.     Endif
  1261.     Return played%
  1262.     
  1263. ENDP
  1264.  
  1265. PROC Defausse%:
  1266.     Local i%
  1267.     
  1268.     rem si extra dans bottes de l'adversaire ?
  1269.     If botte1%(1)=7 or botte1%(2)=7 or botte1%(2)=7 or botte1%(2)=7
  1270.         i%=Cherche:(3)
  1271.         If i%<>0
  1272.             Return i%
  1273.         Endif
  1274.     Endif
  1275.     rem si driving dans bottes de l'adversaire ?
  1276.     If botte1%(1)=9 or botte1%(2)=9 or botte1%(2)=9 or botte1%(2)=9
  1277.         i%=Cherche:(5)
  1278.         If i%<>0
  1279.             Return i%
  1280.         Endif
  1281.     Endif
  1282.     rem si punc proof dans bottes de l'adversaire ?
  1283.     If botte1%(1)=8 or botte1%(2)=8 or botte1%(2)=8 or botte1%(2)=8
  1284.         i%=Cherche:(4)
  1285.         If i%<>0
  1286.             Return i%
  1287.         Endif
  1288.     Endif
  1289.     rem si right of way dans bottes de l'adversaire ?
  1290.     If botte1%(1)=6 or botte1%(2)=6 or botte1%(2)=6 or botte1%(2)=6
  1291.         i%=Cherche:(1)
  1292.         If i%<>0
  1293.             Return i%
  1294.         Endif
  1295.         i%=Cherche:(2)
  1296.         If i%<>0
  1297.             Return i%
  1298.         Endif
  1299.     Endif
  1300.     rem si deja 2 200 poses
  1301.     If deuxcent2%>=2
  1302.         i%=Cherche:(19)
  1303.         If i%<>0
  1304.             Return i%
  1305.         Endif
  1306.     Endif
  1307.     rem si extra dans bottes computer ?
  1308.     If botte2%(1)=7 or botte2%(2)=7 or botte2%(2)=7 or botte2%(2)=7
  1309.         i%=Cherche:(12)
  1310.         If i%<>0
  1311.             Return i%
  1312.         Endif
  1313.     Endif
  1314.     rem si driving dans bottes computer ?
  1315.     If botte2%(1)=9 or botte2%(2)=9 or botte2%(2)=9 or botte2%(2)=9
  1316.         i%=Cherche:(14)
  1317.         If i%<>0
  1318.             Return i%
  1319.         Endif
  1320.     Endif
  1321.     rem si punc proof dans bottes computer ?
  1322.     If botte2%(1)=8 or botte2%(2)=8 or botte2%(2)=8 or botte2%(2)=8
  1323.         i%=Cherche:(13)
  1324.         If i%<>0
  1325.             Return i%
  1326.         Endif
  1327.     Endif
  1328.     rem si right of way dans bottes computer ?
  1329.     If botte2%(1)=6 or botte2%(2)=6 or botte2%(2)=6 or botte2%(2)=6
  1330.         rem pas de end limit
  1331.         i%=Cherche:(11)
  1332.         If i%<>0
  1333.             Return i%
  1334.         Endif
  1335.         rem si feu vert actif, pas de feu vert. sinon garder le feu vert
  1336.         If joue2%=10
  1337.             i%=Cherche:(10)
  1338.             If i%<>0
  1339.                 Return i%
  1340.             Endif
  1341.         Endif
  1342.     Endif
  1343.     rem si +200 depasse les 1000 ?
  1344.     If km2%+200>1000
  1345.         rem pas de 200
  1346.         i%=Cherche:(19)
  1347.         If i%<>0
  1348.             Return i%
  1349.         Endif
  1350.     Endif
  1351.     rem si +100 depasse les 1000 ?
  1352.     If km2%+100>1000
  1353.         rem pas de 100
  1354.         i%=Cherche:(18)
  1355.         If i%<>0
  1356.             Return i%
  1357.         Endif
  1358.     Endif
  1359.     rem si +75 depasse les 1000 ?
  1360.     If km2%+75>1000
  1361.         rem pas de 75
  1362.         i%=Cherche:(17)
  1363.         If i%<>0
  1364.             Return i%
  1365.         Endif
  1366.     Endif
  1367.     rem si +50 depasse les 1000 ?
  1368.     If km2%+50>1000
  1369.         rem pas de 50
  1370.         i%=Cherche:(16)
  1371.         If i%<>0
  1372.             Return i%
  1373.         Endif
  1374.     Endif
  1375.     rem si +25 depasse les 1000 ?
  1376.     If km2%+25>1000
  1377.         rem pas de 25
  1378.         i%=Cherche:(15)
  1379.         If i%<>0
  1380.             Return i%
  1381.         Endif
  1382.     Endif
  1383.     rem si quadruples, virer !
  1384.     i%=Doubles%:(4)
  1385.     If i%<>0
  1386.         i%=Cherche:(i%)
  1387.         If i%<>0
  1388.             Return i%
  1389.         Endif
  1390.     Endif
  1391.     rem si triples, virer !
  1392.     i%=Doubles%:(3)
  1393.     If i%<>0
  1394.         i%=Cherche:(i%)
  1395.         If i%<>0
  1396.             Return i%
  1397.         Endif
  1398.     Endif
  1399.     rem si speed limit actif et 75, virer 75
  1400.     If limit2%=2
  1401.         i%=Cherche:(17)
  1402.         If i%<>0
  1403.             Return i%
  1404.         Endif
  1405.     Endif
  1406.     rem si doubles, virer !
  1407.     i%=Doubles%:(2)
  1408.     If i%<>0
  1409.         i%=Cherche:(i%)
  1410.         If i%<>0
  1411.             rem si 100 ou 200, ne pas virer...
  1412.             If Typecarte%:(main2%(i%))<>19 and Typecarte%:(main2%(i%))<>18
  1413.                 Return i%
  1414.             Endif
  1415.         Endif
  1416.     Endif
  1417.     rem si attaque presente, la virer...
  1418.     i%=Cherche:(1)
  1419.     If i%<>0
  1420.         Return i%
  1421.     Endif
  1422.     i%=Cherche:(4)
  1423.     If i%<>0
  1424.         Return i%
  1425.     Endif
  1426.     i%=Cherche:(3)
  1427.     If i%<>0
  1428.         Return i%
  1429.     Endif
  1430.     i%=Cherche:(5)
  1431.     If i%<>0
  1432.         Return i%
  1433.     Endif
  1434.     i%=Cherche:(2)
  1435.     If i%<>0
  1436.         Return i%
  1437.     Endif
  1438.     rem si 25, virer
  1439.     i%=Cherche:(15)
  1440.     If i%<>0
  1441.         Return i%
  1442.     Endif
  1443.     rem si 50, virer
  1444.     i%=Cherche:(16)
  1445.     If i%<>0
  1446.         Return i%
  1447.     Endif
  1448.     rem si 75, virer
  1449.     i%=Cherche:(17)
  1450.     If i%<>0
  1451.         Return i%
  1452.     Endif
  1453.     rem si 100, virer
  1454.     i%=Cherche:(18)
  1455.     If i%<>0
  1456.         Return i%
  1457.     Endif
  1458.     rem si 200, virer
  1459.     i%=Cherche:(19)
  1460.     If i%<>0
  1461.         Return i%
  1462.     Endif
  1463.     rem Rien trouve, on vire la carte 7 sauf si botte... et on descend jusqu'a trouver...
  1464.     If Typecarte%:(main2%(7))<>9 and Typecarte%:(main2%(7))<>8 and Typecarte%:(main2%(7))<>6 and Typecarte%:(main2%(7))<>7
  1465.         Return 7
  1466.     Elseif Typecarte%:(main2%(6))<>9 and Typecarte%:(main2%(6))<>8 and Typecarte%:(main2%(6))<>6 and Typecarte%:(main2%(6))<>7
  1467.         Return 6
  1468.     Elseif Typecarte%:(main2%(5))<>9 and Typecarte%:(main2%(5))<>8 and Typecarte%:(main2%(5))<>6 and Typecarte%:(main2%(5))<>7
  1469.         Return 5
  1470.     Elseif Typecarte%:(main2%(4))<>9 and Typecarte%:(main2%(4))<>8 and Typecarte%:(main2%(4))<>6 and Typecarte%:(main2%(4))<>7
  1471.         Return 4
  1472.     Elseif Typecarte%:(main2%(3))<>9 and Typecarte%:(main2%(3))<>8 and Typecarte%:(main2%(3))<>6 and Typecarte%:(main2%(3))<>7
  1473.         Return 3
  1474.     Endif
  1475. ENDP
  1476.  
  1477. PROC Doubles%:(t%)
  1478.     Local i%,cpt%,max%,maxc%,carte%
  1479.     
  1480.     max%=0
  1481.     maxc%=0
  1482.     carte%=1
  1483.     Do
  1484.         i%=1
  1485.         cpt%=0
  1486.         Do
  1487.             If Typecarte%:(main2%(i%))=carte%
  1488.                 cpt%=cpt%+1
  1489.             Endif
  1490.             i%=i%+1
  1491.         Until i%=8
  1492.         If cpt%>max%
  1493.             max%=cpt%
  1494.             maxc%=carte%
  1495.         Endif
  1496.         carte%=carte%+1
  1497.     Until carte%=20
  1498.     If max%=t%
  1499.         Return maxc%
  1500.     Else
  1501.         Return 0
  1502.     Endif
  1503. ENDP
  1504.  
  1505. PROC Play1:
  1506.     Local end%,select%,ty%,penold%
  1507.  
  1508.     If nbplay%=2
  1509.         If cbotte%=0
  1510.             If Depart%=0
  1511.                 Okidoki:(player2$+Localiz$:(4,lang%)+player1$+"...")    
  1512.                 visib2%=2
  1513.                 Visibles:(2)
  1514.             Endif
  1515.             Okidoki:(player1$+Localiz$:(5,lang%))
  1516.             visib1%=1
  1517.             Visibles:(1)
  1518.             depart%=0
  1519.         Endif
  1520.     Endif
  1521.     Affvoit:(1,km1%,1,3)
  1522.     Affvoit:(2,km2%,2,3)
  1523.     cbotte%=0
  1524.     main1%(trou1%)=Rndc%:(1)
  1525.     carte%(main1%(trou1%))=0
  1526.     Affcarte:(1,Typecarte%:(main1%(trou1%)),trou1%)
  1527.     JoueSon:(2,0)
  1528.     reste%=reste%-1
  1529.     Affreste:
  1530.     trou1%=0
  1531.     rem attente de reaction du joueur 1
  1532.     end%=0
  1533.     select%=0
  1534.     okay%=0
  1535.     pen1%=0
  1536.     pen2%=0
  1537.     event&(1)=0
  1538.     Do
  1539.         GetEvent32 event&()
  1540.         If event&(1)=10000 Or event&(1)=4150
  1541.             Menu:
  1542.         Elseif event&(1)=&404
  1543.             If Left$(getcmd$,1)="X"
  1544.                 Stop
  1545.             Endif
  1546.         Elseif event&(1)=$401
  1547.             giPrint Localiz$:(6,lang%)
  1548.         Elseif event&(1)=$402
  1549.             rem rien
  1550.         Elseif event&(1)=10001
  1551.             rem "Cutpaste"
  1552.         Elseif event&(1)=10002
  1553.             rem "Infrared"
  1554.         Elseif event&(1)=10003
  1555.             rem "Zoom in"
  1556.         Elseif event&(1)=10004
  1557.             rem "Zoom out"
  1558.         Elseif (event&(1) and &400)=0
  1559.             If event&(1)=$1B
  1560.                 CMDe%:
  1561.             Endif
  1562.         Elseif event&(1)=&408
  1563.             If pen1%=0
  1564.                 rem on affiche la carte choisie...
  1565.                 pen1%=Stylet1%:(event&(8),event&(9),0)
  1566.                 If pen1%>=100
  1567.                     pen1%=pen1%-100
  1568.                     Entoure1:(pen1%)
  1569.                     rem on affiche les arrivees possibles...
  1570.                     arrivee%=Arriv1%:
  1571.                     EntoureA:(arrivee%)
  1572.                     If possible%=1
  1573.                         SpriteUse:(Spr1&)
  1574.                         SpriteDraw:
  1575.                         SpriteUse:(Spr2&)
  1576.                         SpriteDraw:
  1577.                         SpriteUse:(Spr3&)
  1578.                         SpriteDraw:
  1579.                         sprite%=1
  1580.                     Else
  1581.                         SpriteUse:(Spr1&)
  1582.                         SpriteDraw:
  1583.                         SpriteUse:(Spr3&)
  1584.                         SpriteDraw:
  1585.                         sprite%=1
  1586.                     Endif
  1587.                 Else
  1588.                     pen1%=0
  1589.                     rem GiPrint "Select a card to play"
  1590.                 Endif
  1591. rem                Do
  1592. rem                    getEvent32 event&()
  1593. rem                    IOYield
  1594. rem                Until event&(1)<>&408
  1595.             Else
  1596.                 rem on traite la carte d'arrivee
  1597.                 penold%=pen2%
  1598.                 pen2%=Stylet1%:(event&(8),event&(9),pen1%)
  1599.                 If pen2%>=100 and pen2%<>penold% and pen2%<>pen1%+100
  1600.                     rem on rechoisit une carte. On efface la selection actuelle
  1601.                     If possible%=1
  1602.                         If sprite%=1
  1603.                             SpriteDelete:(Spr1&)
  1604.                             SpriteDelete:(Spr2&)
  1605.                             SpriteDelete:(Spr3&)
  1606.                             sprite%=0
  1607.                         Endif
  1608.                     Else
  1609.                         If sprite%=1
  1610.                             SpriteDelete:(Spr1&)
  1611.                             SpriteDelete:(Spr3&)
  1612.                             sprite%=0
  1613.                         Endif
  1614.                     Endif
  1615.                     pen1%=pen2%-100
  1616.                     Entoure1:(pen1%)
  1617.                     rem on affiche les arrivees possibles...
  1618.                     arrivee%=Arriv1%:
  1619.                     EntoureA:(arrivee%)                
  1620.                     If possible%=1
  1621.                         SpriteUse:(Spr1&)
  1622.                         SpriteDraw:
  1623.                         SpriteUse:(Spr2&)
  1624.                         SpriteDraw:
  1625.                         SpriteUse:(Spr3&)
  1626.                         SpriteDraw:
  1627.                         sprite%=1
  1628.                     Else
  1629.                         SpriteUse:(Spr1&)
  1630.                         SpriteDraw:
  1631.                         SpriteUse:(Spr3&)
  1632.                         SpriteDraw:
  1633.                         sprite%=1
  1634.                     Endif
  1635.                 Elseif pen2%=arrivee% or pen2%=-1
  1636.                     Place1:
  1637.                     Okay%=1
  1638.                 Else
  1639. rem                    GiPrint "Beuh!"
  1640.                 Endif    
  1641.             Endif
  1642.         Endif
  1643.         TbarOffer%:(event&(3),event&(4),event&(6),event&(7))
  1644.         IOYield
  1645.         event&(1)=0:event&(3)=0:event&(4)=0:event&(6)=0:event&(7)=0
  1646.  
  1647.     Until abort%=1 Or Okay%=1
  1648.     If km1%=1000 or reste%<=0
  1649.         manche%=1
  1650.     Endif
  1651. ENDP
  1652.  
  1653. PROC Play2:
  1654.     Local end%,select%,ty%,penold%
  1655.  
  1656.     If cbotte%=0
  1657.         If depart%=0
  1658.             Okidoki:(player1$+Localiz$:(4,lang%)+player2$+"...")
  1659.             visib1%=2
  1660.             Visibles:(1)
  1661.         Endif
  1662.         Okidoki:(player2$+Localiz$:(5,lang%))
  1663.         visib2%=1
  1664.         Visibles:(2)
  1665.         depart%=0
  1666.     Endif
  1667.     Affvoit:(1,km1%,2,3)
  1668.     Affvoit:(2,km2%,1,3)
  1669.     IOYield
  1670.     cbotte%=0
  1671.     main2%(trou2%)=Rndc%:(2)
  1672.     If main2%(trou2%)<1 or main2%(trou2%)>107
  1673.         dinit
  1674.         dtext "",gen$(main2%(trou2%),3),2
  1675.         dialog
  1676.     endif
  1677.     carte%(main2%(trou2%))=0
  1678.     Affcarte:(2,Typecarte%:(main2%(trou2%)),trou2%)
  1679.     JoueSon:(2,1)
  1680.     reste%=reste%-1
  1681.     Affreste:
  1682.     trou2%=0
  1683.     rem attente de reaction du joueur 2
  1684.     end%=0
  1685.     select%=0
  1686.     okay%=0
  1687.     pen1%=0
  1688.     pen2%=0
  1689.     event&(1)=0
  1690.     Do
  1691.         GetEvent32 event&()
  1692.         if event&(1)=10000 Or event&(1)=4150
  1693.             Menu:
  1694.         Elseif event&(1)=&404
  1695.             If Left$(getcmd$,1)="X"
  1696.                 Stop
  1697.             Endif
  1698.         Elseif event&(1)=10001
  1699.         rem    GiPrint "Cutpaste"
  1700.         Elseif event&(1)=10002
  1701.         rem    GiPrint "Infrared"
  1702.         Elseif event&(1)=10003
  1703.         rem    GiPrint "Zoom in"
  1704.         Elseif event&(1)=10004
  1705.         rem    GiPrint "Zoom out"
  1706.         Elseif (event&(1) and &400)=0
  1707.             If event&(1)=$1B
  1708.                 CMDe%:
  1709.             Endif
  1710.         Elseif event&(1)=&408
  1711.             If pen1%=0
  1712.                 rem on affiche la carte choisie...
  1713.                 pen1%=Stylet2%:(event&(8),event&(9),0)
  1714.                 If pen1%>=100
  1715.                     pen1%=pen1%-100
  1716.                     Entoure2:(pen1%)
  1717.                     rem on affiche les arrivees possibles...
  1718.                     arrivee%=Arriv2%:
  1719.                     EntoureA:(arrivee%)
  1720.                     If possible%=1
  1721.                         SpriteUse:(Spr1&)
  1722.                         SpriteDraw:
  1723.                         SpriteUse:(Spr2&)
  1724.                         SpriteDraw:
  1725.                         SpriteUse:(Spr3&)
  1726.                         SpriteDraw:
  1727.                         sprite%=1
  1728.                     Else
  1729.                         SpriteUse:(Spr1&)
  1730.                         SpriteDraw:
  1731.                         SpriteUse:(Spr3&)
  1732.                         SpriteDraw:
  1733.                         sprite%=1
  1734.                     Endif
  1735.                 Else
  1736.                     pen1%=0
  1737.                     rem GiPrint "Select a card to play"
  1738.                 Endif
  1739. rem                Do
  1740. rem                    getEvent32 event&()
  1741. rem                    IOYield
  1742. rem                Until event&(1)<>&408
  1743.             Else
  1744.                 rem on traite la carte d'arrivee
  1745.                 penold%=pen2%
  1746.                 pen2%=Stylet2%:(event&(8),event&(9),pen1%)
  1747.                 If pen2%>=100 and pen2%<>penold% and pen2%<>pen1%+100
  1748.                     rem on rechoisit une carte. On efface la selection actuelle
  1749.                     If possible%=1
  1750.                         If sprite%=1
  1751.                             SpriteDelete:(Spr1&)
  1752.                             SpriteDelete:(Spr2&)
  1753.                             SpriteDelete:(Spr3&)
  1754.                             sprite%=0
  1755.                         Endif
  1756.                     Else
  1757.                         If sprite%=1
  1758.                             SpriteDelete:(Spr1&)
  1759.                             SpriteDelete:(Spr3&)
  1760.                             sprite%=0
  1761.                         Endif
  1762.                     Endif
  1763.                     pen1%=pen2%-100
  1764.                     Entoure2:(pen1%)
  1765.                     rem on affiche les arrivees possibles...
  1766.                     arrivee%=Arriv2%:
  1767.                     EntoureA:(arrivee%)                
  1768.                     If possible%=1
  1769.                         SpriteUse:(Spr1&)
  1770.                         SpriteDraw:
  1771.                         SpriteUse:(Spr2&)
  1772.                         SpriteDraw:
  1773.                         SpriteUse:(Spr3&)
  1774.                         SpriteDraw:
  1775.                         sprite%=1
  1776.                     Else
  1777.                         SpriteUse:(Spr1&)
  1778.                         SpriteDraw:
  1779.                         SpriteUse:(Spr3&)
  1780.                         SpriteDraw:
  1781.                         sprite%=1
  1782.                     Endif
  1783.                 Elseif pen2%=arrivee% or pen2%=-1
  1784.                     Place2:
  1785.                 Else
  1786. rem                    GiPrint "Beuh!"
  1787.                 Endif    
  1788.             Endif
  1789.         Endif
  1790.         TbarOffer%:(event&(3),event&(4),event&(6),event&(7))
  1791.         IOYield
  1792.         event&(1)=0:event&(3)=0:event&(4)=0:event&(6)=0:event&(7)=0
  1793.         
  1794.     Until abort%=1 Or Okay%=1
  1795.     If km2%=1000 or reste%<=0
  1796.         manche%=1
  1797.     Endif
  1798. ENDP
  1799.  
  1800. PROC Place1:
  1801.     Local val%
  1802.     
  1803.     last1%=0
  1804.     If pen1%=-1
  1805.         Return
  1806.     Endif
  1807.     val%=Typecarte%:(main1%(pen1%))
  1808.     If pen2%=-1
  1809.         rem defausse
  1810.         Affcarte:(1,0,pen1%)
  1811.         If possible%=1
  1812.             If sprite%=1
  1813.                 SpriteDelete:(Spr1&)
  1814.                 SpriteDelete:(Spr2&)
  1815.                 SpriteDelete:(Spr3&)
  1816.                 sprite%=0
  1817.             Endif
  1818.         Else
  1819.             If sprite%=1
  1820.                 SpriteDelete:(Spr1&)
  1821.                 SpriteDelete:(Spr3&)
  1822.                 sprite%=0
  1823.             Endif
  1824.         Endif
  1825.         Affcarte:(11,val%,0)
  1826.         defau%=TypeCarte%:(main1%(pen1%))
  1827.         main1%(pen1%)=0
  1828.         trou1%=pen1%
  1829.         pen1%=0:pen2%=0:okay%=1
  1830.         JoueSon:(7,1)
  1831.     Elseif arrivee%=3
  1832.         Affcarte:(1,0,pen1%)
  1833.         If possible%=1
  1834.             If sprite%=1
  1835.                 SpriteDelete:(Spr1&)
  1836.                 SpriteDelete:(Spr2&)
  1837.                 SpriteDelete:(Spr3&)
  1838.                 sprite%=0
  1839.             Endif
  1840.         Else
  1841.             If sprite%=1
  1842.                 SpriteDelete:(Spr1&)
  1843.                 SpriteDelete:(Spr3&)
  1844.                 sprite%=0
  1845.             Endif
  1846.         Endif
  1847.         Affcarte:(3,val%,0)
  1848.         main1%(pen1%)=0
  1849.         trou1%=pen1%
  1850.         pen1%=0:pen2%=0:okay%=1
  1851.         joue1%=val%
  1852.         If val%=14 or val%=12 or val%=13
  1853.             If botte1%(1)=6 or botte1%(2)=6 or botte1%(3)=6 or botte1%(4)=6
  1854.                 joue1%=10
  1855.                 Affcarte:(3,10,0)
  1856.             Endif
  1857.         Endif
  1858.         JoueSon:(8,1)
  1859.     Elseif arrivee%=4
  1860.         Affcarte:(1,0,pen1%)
  1861.         If possible%=1
  1862.             If sprite%=1
  1863.                 SpriteDelete:(Spr1&)
  1864.                 SpriteDelete:(Spr2&)
  1865.                 SpriteDelete:(Spr3&)
  1866.                 sprite%=0
  1867.             Endif
  1868.         Else
  1869.             If sprite%=1
  1870.                 SpriteDelete:(Spr1&)
  1871.                 SpriteDelete:(Spr3&)
  1872.                 sprite%=0
  1873.             Endif
  1874.         Endif
  1875.         Affcarte:(4,val%,0)
  1876.         main1%(pen1%)=0
  1877.         trou1%=pen1%
  1878.         pen1%=0:pen2%=0:okay%=1
  1879.         joue2%=val%
  1880.         last1%=val%
  1881.         JoueSon:(3,1)
  1882.     Elseif arrivee%=5
  1883.         Affcarte:(1,0,pen1%)
  1884.         If possible%=1
  1885.             If sprite%=1
  1886.                 SpriteDelete:(Spr1&)
  1887.                 SpriteDelete:(Spr2&)
  1888.                 SpriteDelete:(Spr3&)
  1889.                 sprite%=0
  1890.             Endif
  1891.         Else
  1892.             If sprite%=1
  1893.                 SpriteDelete:(Spr1&)
  1894.                 SpriteDelete:(Spr3&)
  1895.                 sprite%=0
  1896.             Endif
  1897.         Endif
  1898.         Affcarte:(5,val%,0)
  1899.         main1%(pen1%)=0
  1900.         trou1%=pen1%
  1901.         pen1%=0:pen2%=0:okay%=1
  1902.         botte1%(posbotte1%)=val%
  1903.         posbotte1%=posbotte1%+1
  1904.         If val%=6
  1905.             If last2%=1 or last2%=2
  1906.                 fourre1%=fourre1%+1
  1907.                 JoueSon:(4,1)
  1908.             Else
  1909.                 parade1%=parade1%+1
  1910.                 JoueSon:(8,1)
  1911.             Endif
  1912.             If joue1%=0 or joue1%=1 or joue1%=14 or joue1%=12 or joue1%=13
  1913.                 joue1%=10
  1914.                 Affcarte:(3,10,0)
  1915.             Endif
  1916.             If limit1%=0 or limit1%=2
  1917.                 limit1%=11
  1918.                 Affcarte:(7,11,0)
  1919.             Endif
  1920.         Elseif val%=9
  1921.             If joue1%=5
  1922.                 joue1%=10
  1923.                 Affcarte:(3,10,0)
  1924.             Endif
  1925.             If last2%=5
  1926.                 fourre1%=fourre1%+1
  1927.                 JoueSon:(4,1)
  1928.             Else
  1929.                 parade1%=parade1%+1
  1930.                 JoueSon:(8,1)
  1931.             Endif
  1932.         Elseif val%=8
  1933.             If joue1%=4
  1934.                 joue1%=10
  1935.                 Affcarte:(3,10,0)
  1936.             Endif
  1937.             If last2%=4
  1938.                 fourre1%=fourre1%+1
  1939.                 JoueSon:(4,1)
  1940.             Else
  1941.                 parade1%=parade1%+1
  1942.                 JoueSon:(8,1)
  1943.             Endif
  1944.         Elseif val%=7
  1945.             If joue1%=3
  1946.                 joue1%=10
  1947.                 Affcarte:(3,10,0)
  1948.             Endif
  1949.             If last2%=3
  1950.                 fourre1%=fourre1%+1
  1951.                 JoueSon:(4,1)
  1952.             Else
  1953.                 parade1%=parade1%+1
  1954.                 JoueSon:(8,1)
  1955.             Endif
  1956.         Endif
  1957.         cbotte%=1
  1958.     Elseif arrivee%=7
  1959.         Affcarte:(1,0,pen1%)
  1960.         If possible%=1
  1961.             If sprite%=1
  1962.                 SpriteDelete:(Spr1&)
  1963.                 SpriteDelete:(Spr2&)
  1964.                 SpriteDelete:(Spr3&)
  1965.                 sprite%=0
  1966.             Endif
  1967.         Else
  1968.             If sprite%=1
  1969.                 SpriteDelete:(Spr1&)
  1970.                 SpriteDelete:(Spr3&)
  1971.                 sprite%=0
  1972.             Endif
  1973.         Endif
  1974.         Affcarte:(7,val%,0)
  1975.         main1%(pen1%)=0
  1976.         trou1%=pen1%
  1977.         pen1%=0:pen2%=0:okay%=1
  1978.         limit1%=val%
  1979.         JoueSon:(8,1)
  1980.     Elseif arrivee%=8
  1981.         Affcarte:(1,0,pen1%)
  1982.         If possible%=1
  1983.             If sprite%=1
  1984.                 SpriteDelete:(Spr1&)
  1985.                 SpriteDelete:(Spr2&)
  1986.                 SpriteDelete:(Spr3&)
  1987.                 sprite%=0
  1988.             Endif
  1989.         Else
  1990.             If sprite%=1
  1991.                 SpriteDelete:(Spr1&)
  1992.                 SpriteDelete:(Spr3&)
  1993.                 sprite%=0
  1994.             Endif
  1995.         Endif
  1996.         Affcarte:(8,val%,0)
  1997.         main1%(pen1%)=0
  1998.         trou1%=pen1%
  1999.         pen1%=0:pen2%=0:okay%=1
  2000.         limit2%=val%
  2001.         last1%=2
  2002.         JoueSon:(3,1)
  2003.     Elseif arrivee%=9
  2004.         Affcarte:(1,0,pen1%)
  2005.         If possible%=1
  2006.             If sprite%=1
  2007.                 SpriteDelete:(Spr1&)
  2008.                 SpriteDelete:(Spr2&)
  2009.                 SpriteDelete:(Spr3&)
  2010.                 sprite%=0
  2011.             Endif
  2012.         Else
  2013.             If sprite%=1
  2014.                 SpriteDelete:(Spr1&)
  2015.                 SpriteDelete:(Spr3&)
  2016.                 sprite%=0
  2017.             Endif
  2018.         Endif
  2019.         Affcarte:(9,val%,0)
  2020.         main1%(pen1%)=0
  2021.         trou1%=pen1%
  2022.         pen1%=0:pen2%=0:okay%=1
  2023.         poskm1%=poskm1%+1
  2024.         If val%=15
  2025.             km1%=km1%+25
  2026.         Elseif val%=16
  2027.             km1%=km1%+50
  2028.         Elseif val%=17
  2029.             km1%=km1%+75
  2030.         Elseif val%=18
  2031.             km1%=km1%+100
  2032.         Elseif val%=19
  2033.             km1%=km1%+200
  2034.             deuxcent1%=deuxcent1%+1
  2035.         Endif
  2036.         JoueSon:(8,1)
  2037.         Affkm1:
  2038.         last1%=val%
  2039.     Endif
  2040. ENDP
  2041.             
  2042. PROC Place2:
  2043.     Local val%
  2044.     
  2045.     last2%=0
  2046.     val%=Typecarte%:(main2%(pen1%))
  2047.     If pen2%=-1
  2048.         rem defausse
  2049.         Affcarte:(2,0,pen1%)
  2050.         If possible%=1
  2051.             If sprite%=1
  2052.                 SpriteDelete:(Spr1&)
  2053.                 SpriteDelete:(Spr2&)
  2054.                 SpriteDelete:(Spr3&)
  2055.                 sprite%=0
  2056.             Endif
  2057.         Else
  2058.             If sprite%=1
  2059.                 SpriteDelete:(Spr1&)
  2060.                 SpriteDelete:(Spr3&)
  2061.                 sprite%=0
  2062.             Endif
  2063.         Endif
  2064.         Affcarte:(11,val%,0)
  2065.         defau%=TypeCarte%:(main2%(pen1%))
  2066.         main2%(pen1%)=0
  2067.         trou2%=pen1%
  2068.         pen1%=0:pen2%=0:okay%=1
  2069.         JoueSon:(7,1)
  2070.     Elseif arrivee%=3
  2071.         Affcarte:(2,0,pen1%)
  2072.         If possible%=1
  2073.             If sprite%=1
  2074.                 SpriteDelete:(Spr1&)
  2075.                 SpriteDelete:(Spr2&)
  2076.                 SpriteDelete:(Spr3&)
  2077.                 sprite%=0
  2078.             Endif
  2079.         Else
  2080.             If sprite%=1
  2081.                 SpriteDelete:(Spr1&)
  2082.                 SpriteDelete:(Spr3&)
  2083.                 sprite%=0
  2084.             Endif
  2085.         Endif
  2086.         Affcarte:(3,val%,0)
  2087.         main2%(pen1%)=0
  2088.         trou2%=pen1%
  2089.         pen1%=0:pen2%=0:okay%=1
  2090.         joue1%=val%
  2091.         last2%=val%
  2092.         JoueSon:(3,1)
  2093.     Elseif arrivee%=4
  2094.         Affcarte:(2,0,pen1%)
  2095.         If possible%=1
  2096.             If sprite%=1
  2097.                 SpriteDelete:(Spr1&)
  2098.                 SpriteDelete:(Spr2&)
  2099.                 SpriteDelete:(Spr3&)
  2100.                 sprite%=0
  2101.             Endif
  2102.         Else
  2103.             If sprite%=1
  2104.                 SpriteDelete:(Spr1&)
  2105.                 SpriteDelete:(Spr3&)
  2106.                 sprite%=0
  2107.             Endif
  2108.         Endif
  2109.         Affcarte:(4,val%,0)
  2110.         main2%(pen1%)=0
  2111.         trou2%=pen1%
  2112.         pen1%=0:pen2%=0:okay%=1
  2113.         joue2%=val%
  2114.         If val%=14 or val%=12 or val%=13
  2115.             If botte2%(1)=6 or botte2%(2)=6 or botte2%(3)=6 or botte2%(4)=6
  2116.                 joue2%=10
  2117.                 Affcarte:(4,10,0)
  2118.             Endif
  2119.         Endif
  2120.         JoueSon:(8,1)
  2121.     Elseif arrivee%=6
  2122.         Affcarte:(2,0,pen1%)
  2123.         If possible%=1
  2124.             If sprite%=1
  2125.                 SpriteDelete:(Spr1&)
  2126.                 SpriteDelete:(Spr2&)
  2127.                 SpriteDelete:(Spr3&)
  2128.                 sprite%=0
  2129.             Endif
  2130.         Else
  2131.             If sprite%=1
  2132.                 SpriteDelete:(Spr1&)
  2133.                 SpriteDelete:(Spr3&)
  2134.                 sprite%=0
  2135.             Endif
  2136.         Endif
  2137.         Affcarte:(6,val%,0)
  2138.         main2%(pen1%)=0
  2139.         trou2%=pen1%
  2140.         pen1%=0:pen2%=0:okay%=1
  2141.         botte2%(posbotte2%)=val%
  2142.         posbotte2%=posbotte2%+1
  2143.         If val%=6
  2144.             If joue2%=0 or joue2%=1 or joue2%=14 or joue2%=12 or joue2%=13
  2145.                 joue2%=10
  2146.                 Affcarte:(4,10,0)
  2147.             Endif
  2148.             If limit2%=0 or limit2%=2
  2149.                 limit2%=11
  2150.                 Affcarte:(8,11,0)
  2151.             Endif
  2152.             If last1%=1 or last1%=2
  2153.                 fourre2%=fourre2%+1
  2154.                 JoueSon:(4,1)
  2155.             Else
  2156.                 parade2%=parade2%+1
  2157.                 JoueSon:(8,1)
  2158.             Endif
  2159.         Elseif val%=9
  2160.             If joue2%=5
  2161.                 joue2%=10
  2162.                 Affcarte:(4,10,0)
  2163.             Endif
  2164.             If last1%=5
  2165.                 fourre2%=fourre2%+1
  2166.                 JoueSon:(4,1)
  2167.             Else
  2168.                 parade2%=parade2%+1
  2169.                 JoueSon:(8,1)
  2170.             Endif
  2171.         Elseif val%=8
  2172.             If joue2%=4
  2173.                 joue2%=10
  2174.                 Affcarte:(4,10,0)
  2175.             Endif
  2176.             If last1%=4
  2177.                 fourre2%=fourre2%+1
  2178.                 JoueSon:(4,1)
  2179.             Else
  2180.                 parade2%=parade2%+1
  2181.                 JoueSon:(8,1)
  2182.             Endif
  2183.         Elseif val%=7
  2184.             If joue2%=3
  2185.                 joue2%=10
  2186.                 Affcarte:(4,10,0)
  2187.             Endif
  2188.             If last1%=3
  2189.                 fourre2%=fourre2%+1
  2190.                 JoueSon:(4,1)
  2191.             Else
  2192.                 parade2%=parade2%+1
  2193.                 JoueSon:(8,1)
  2194.             Endif
  2195.         Endif
  2196.         cbotte%=1
  2197.     Elseif arrivee%=7
  2198.         Affcarte:(2,0,pen1%)
  2199.         If possible%=1
  2200.             If sprite%=1
  2201.                 SpriteDelete:(Spr1&)
  2202.                 SpriteDelete:(Spr2&)
  2203.                 SpriteDelete:(Spr3&)
  2204.                 sprite%=0
  2205.             Endif
  2206.         Else
  2207.             If sprite%=1
  2208.                 SpriteDelete:(Spr1&)
  2209.                 SpriteDelete:(Spr3&)
  2210.                 sprite%=0
  2211.             Endif
  2212.         Endif
  2213.         Affcarte:(7,val%,0)
  2214.         main2%(pen1%)=0
  2215.         trou2%=pen1%
  2216.         pen1%=0:pen2%=0:okay%=1
  2217.         limit1%=val%
  2218.         last2%=2
  2219.         JoueSon:(3,1)
  2220.     Elseif arrivee%=8
  2221.         Affcarte:(2,0,pen1%)
  2222.         If possible%=1
  2223.             If sprite%=1
  2224.                 SpriteDelete:(Spr1&)
  2225.                 SpriteDelete:(Spr2&)
  2226.                 SpriteDelete:(Spr3&)
  2227.                 sprite%=0
  2228.             Endif
  2229.         Else
  2230.             If sprite%=1
  2231.                 SpriteDelete:(Spr1&)
  2232.                 SpriteDelete:(Spr3&)
  2233.                 sprite%=0
  2234.             Endif
  2235.         Endif
  2236.         Affcarte:(8,val%,0)
  2237.         main2%(pen1%)=0
  2238.         trou2%=pen1%
  2239.         pen1%=0:pen2%=0:okay%=1
  2240.         limit2%=val%
  2241.         JoueSon:(8,1)
  2242.     Elseif arrivee%=10
  2243.         Affcarte:(2,0,pen1%)
  2244.         If possible%=1
  2245.             If sprite%=1
  2246.                 SpriteDelete:(Spr1&)
  2247.                 SpriteDelete:(Spr2&)
  2248.                 SpriteDelete:(Spr3&)
  2249.                 sprite%=0
  2250.             Endif
  2251.         Else
  2252.             If sprite%=1
  2253.                 SpriteDelete:(Spr1&)
  2254.                 SpriteDelete:(Spr3&)
  2255.                 sprite%=0
  2256.             Endif
  2257.         Endif
  2258.         Affcarte:(10,val%,0)
  2259.         main2%(pen1%)=0
  2260.         trou2%=pen1%
  2261.         pen1%=0:pen2%=0:okay%=1
  2262.         poskm2%=poskm2%+1
  2263.         If val%=15
  2264.             km2%=km2%+25
  2265.         Elseif val%=16
  2266.             km2%=km2%+50
  2267.         Elseif val%=17
  2268.             km2%=km2%+75
  2269.         Elseif val%=18
  2270.             km2%=km2%+100
  2271.         Elseif val%=19
  2272.             km2%=km2%+200
  2273.             deuxcent2%=deuxcent2%+1
  2274.         Endif
  2275.         JoueSon:(8,1)
  2276.         Affkm2:
  2277.     Endif
  2278. ENDP
  2279.             
  2280.  
  2281. PROC Arriv1%:
  2282.  
  2283.     If Typecarte%:(main1%(pen1%))=10
  2284.         rem roll
  2285.         If joue1%=0 or joue1%=1 or joue1%=14 or joue1%=12 or joue1%=13
  2286.             Return 3
  2287.         Else
  2288.             Return -1
  2289.         Endif
  2290.     Elseif Typecarte%:(main1%(pen1%))=1
  2291.         rem stop
  2292.         If joue2%=10 and (botte2%(1)<>6 and botte2%(2)<>6 and botte2%(3)<>6 and botte2%(4)<>6)
  2293.             Return 4
  2294.         Else
  2295.             Return -1
  2296.         Endif
  2297.     Elseif Typecarte%:(main1%(pen1%))=2
  2298.         rem speed limit
  2299.         If (limit2%=0 or limit2%=11) and (botte2%(1)<>6 and botte2%(2)<>6 and botte2%(3)<>6 and botte2%(4)<>6)
  2300.             Return 8
  2301.         Else
  2302.             Return -1
  2303.         Endif
  2304.     Elseif Typecarte%:(main1%(pen1%))=11
  2305.         rem end limit
  2306.         If limit1%=2
  2307.             Return 7
  2308.         Else
  2309.             Return -1
  2310.         Endif
  2311.     Elseif Typecarte%:(main1%(pen1%))=14
  2312.         rem repair
  2313.         If joue1%=5
  2314.             Return 3
  2315.         Else
  2316.             Return -1
  2317.         Endif
  2318.     Elseif Typecarte%:(main1%(pen1%))=12
  2319.         rem gasoline
  2320.         If joue1%=3
  2321.             Return 3
  2322.         Else
  2323.             Return -1
  2324.         Endif
  2325.     Elseif Typecarte%:(main1%(pen1%))=13
  2326.         rem spare tire
  2327.         If joue1%=4
  2328.             Return 3
  2329.         Else
  2330.             Return -1
  2331.         Endif
  2332.     Elseif Typecarte%:(main1%(pen1%))=4
  2333.         rem flat tire
  2334.         If joue2%=10 and (botte2%(1)<>8 and botte2%(2)<>8 and botte2%(3)<>8 and botte2%(4)<>8)
  2335.             Return 4
  2336.         Else
  2337.             Return -1
  2338.         Endif
  2339.     Elseif Typecarte%:(main1%(pen1%))=3
  2340.         rem out of gas
  2341.         If joue2%=10 and (botte2%(1)<>7 and botte2%(2)<>7 and botte2%(3)<>7 and botte2%(4)<>7)
  2342.             Return 4
  2343.         Else
  2344.             Return -1
  2345.         Endif
  2346.     Elseif Typecarte%:(main1%(pen1%))=5
  2347.         rem accident
  2348.         If joue2%=10 and (botte2%(1)<>9 and botte2%(2)<>9 and botte2%(3)<>9 and botte2%(4)<>9)
  2349.             Return 4
  2350.         Else
  2351.             Return -1
  2352.         Endif
  2353.     Elseif Typecarte%:(main1%(pen1%))=15
  2354.         rem 25km
  2355.         If joue1%=10 and km1%<=975
  2356.             Return 9
  2357.         Else
  2358.             Return -1
  2359.         Endif
  2360.     Elseif Typecarte%:(main1%(pen1%))=16
  2361.         rem 50km
  2362.         If joue1%=10 and km1%<=950
  2363.             Return 9
  2364.         Else
  2365.             Return -1
  2366.         Endif
  2367.     Elseif Typecarte%:(main1%(pen1%))=17
  2368.         rem 75km
  2369.         If joue1%=10 and (limit1%<>2) and km1%<=925
  2370.             Return 9
  2371.         Else
  2372.             Return -1
  2373.         Endif
  2374.     Elseif Typecarte%:(main1%(pen1%))=18
  2375.         rem 100km
  2376.         If joue1%=10 and (limit1%<>2) and km1%<=900
  2377.             Return 9
  2378.         Else
  2379.             Return -1
  2380.         Endif
  2381.     Elseif Typecarte%:(main1%(pen1%))=19
  2382.         rem 200km
  2383.         If joue1%=10 and (limit1%<>2) and deuxcent1%<=1 and km1%<=800
  2384.             Return 9
  2385.         Else
  2386.             Return -1
  2387.         Endif
  2388.     Elseif Typecarte%:(main1%(pen1%))=9
  2389.         rem driving ace
  2390.         If 1
  2391.             Return 5
  2392.         Else
  2393.             Return -1
  2394.         Endif
  2395.     Elseif Typecarte%:(main1%(pen1%))=8
  2396.         rem punc proof
  2397.         If 1
  2398.             Return 5
  2399.         Else
  2400.             Return -1
  2401.         Endif
  2402.     Elseif Typecarte%:(main1%(pen1%))=6
  2403.         rem right of way
  2404.         If 1
  2405.             Return 5
  2406.         Else
  2407.             Return -1
  2408.         Endif
  2409.     Elseif Typecarte%:(main1%(pen1%))=7
  2410.         rem extra tank
  2411.         If 1
  2412.             Return 5
  2413.         Else
  2414.             Return -1
  2415.         Endif
  2416.     Endif
  2417. ENDP
  2418.  
  2419. PROC Arriv2%:
  2420.  
  2421.     If Typecarte%:(main2%(pen1%))=10
  2422.         rem roll
  2423.         If joue2%=0 or joue2%=1 or joue2%=14 or joue2%=12 or joue2%=13
  2424.             Return 4
  2425.         Else
  2426.             Return -1
  2427.         Endif
  2428.     Elseif Typecarte%:(main2%(pen1%))=1
  2429.         rem stop
  2430.         If joue1%=10 and (botte1%(1)<>6 and botte1%(2)<>6 and botte1%(3)<>6 and botte1%(4)<>6)
  2431.             Return 3
  2432.         Else
  2433.             Return -1
  2434.         Endif
  2435.     Elseif Typecarte%:(main2%(pen1%))=2
  2436.         rem speed limit
  2437.         If (limit1%=0 or limit1%=11) and (botte1%(1)<>6 and botte1%(2)<>6 and botte1%(3)<>6 and botte1%(4)<>6)
  2438.             Return 7
  2439.         Else
  2440.             Return -1
  2441.         Endif
  2442.     Elseif Typecarte%:(main2%(pen1%))=11
  2443.         rem end limit
  2444.         If limit2%=2
  2445.             Return 8
  2446.         Else
  2447.             Return -1
  2448.         Endif
  2449.     Elseif Typecarte%:(main2%(pen1%))=14
  2450.         rem repair
  2451.         If joue2%=5
  2452.             Return 4
  2453.         Else
  2454.             Return -1
  2455.         Endif
  2456.     Elseif Typecarte%:(main2%(pen1%))=12
  2457.         rem gasoline
  2458.         If joue2%=3
  2459.             Return 4
  2460.         Else
  2461.             Return -1
  2462.         Endif
  2463.     Elseif Typecarte%:(main2%(pen1%))=13
  2464.         rem spare tire
  2465.         If joue2%=4
  2466.             Return 4
  2467.         Else
  2468.             Return -1
  2469.         Endif
  2470.     Elseif Typecarte%:(main2%(pen1%))=4
  2471.         rem flat tire
  2472.         If joue1%=10 and (botte1%(1)<>8 and botte1%(2)<>8 and botte1%(3)<>8 and botte1%(4)<>8)
  2473.             Return 3
  2474.         Else
  2475.             Return -1
  2476.         Endif
  2477.     Elseif Typecarte%:(main2%(pen1%))=3
  2478.         rem out of gas
  2479.         If joue1%=10 and (botte1%(1)<>7 and botte1%(2)<>7 and botte1%(3)<>7 and botte1%(4)<>7)
  2480.             Return 3
  2481.         Else
  2482.             Return -1
  2483.         Endif
  2484.     Elseif Typecarte%:(main2%(pen1%))=5
  2485.         rem accident
  2486.         If joue1%=10 and (botte1%(1)<>9 and botte1%(2)<>9 and botte1%(3)<>9 and botte1%(4)<>9)
  2487.             Return 3
  2488.         Else
  2489.             Return -1
  2490.         Endif
  2491.     Elseif Typecarte%:(main2%(pen1%))=15
  2492.         rem 25km
  2493.         If joue2%=10 and km2%<=975
  2494.             Return 10
  2495.         Else
  2496.             Return -1
  2497.         Endif
  2498.     Elseif Typecarte%:(main2%(pen1%))=16
  2499.         rem 50km
  2500.         If joue2%=10 and km2%<=950
  2501.             Return 10
  2502.         Else
  2503.             Return -1
  2504.         Endif
  2505.     Elseif Typecarte%:(main2%(pen1%))=17
  2506.         rem 75km
  2507.         If joue2%=10 and (limit2%<>2) and km2%<=925
  2508.             Return 10
  2509.         Else
  2510.             Return -1
  2511.         Endif
  2512.     Elseif Typecarte%:(main2%(pen1%))=18
  2513.         rem 100km
  2514.         If joue2%=10 and (limit2%<>2) and km2%<=900
  2515.             Return 10
  2516.         Else
  2517.             Return -1
  2518.         Endif
  2519.     Elseif Typecarte%:(main2%(pen1%))=19
  2520.         rem 200km
  2521.         If joue2%=10 and (limit2%<>2) and deuxcent2%<=1 and km2%<=800
  2522.             Return 10
  2523.         Else
  2524.             Return -1
  2525.         Endif
  2526.     Elseif Typecarte%:(main2%(pen1%))=9
  2527.         rem driving ace
  2528.         If 1
  2529.             Return 6
  2530.         Else
  2531.             Return -1
  2532.         Endif
  2533.     Elseif Typecarte%:(main2%(pen1%))=8
  2534.         rem punc proof
  2535.         If 1
  2536.             Return 6
  2537.         Else
  2538.             Return -1
  2539.         Endif
  2540.     Elseif Typecarte%:(main2%(pen1%))=6
  2541.         rem right of way
  2542.         If 1
  2543.             Return 6
  2544.         Else
  2545.             Return -1
  2546.         Endif
  2547.     Elseif Typecarte%:(main2%(pen1%))=7
  2548.         rem extra tank
  2549.         If 1
  2550.             Return 6
  2551.         Else
  2552.             Return -1
  2553.         Endif
  2554.     Endif
  2555. ENDP
  2556.  
  2557. PROC Flush:
  2558.     If event&(1)=&408
  2559.         Do
  2560.              getEvent32 event&()
  2561.              IOYield
  2562.         Until event&(1)<>&408
  2563.     Endif
  2564. ENDP
  2565.  
  2566. PROC Playdrop:(c%,onoff%)
  2567.     Local x%,y%,dx%,dy%
  2568.     
  2569.     If c%=1
  2570.         x%=15:y%=9:dx%=52:dy%=22
  2571.     Elseif c%=2
  2572.         x%=15:y%=31:dx%=52:dy%=22
  2573.     Elseif c%=3
  2574.         x%=15:y%=53:dx%=52:dy%=22
  2575.     Elseif c%=4
  2576.         x%=15:y%=75:dx%=52:dy%=22
  2577.     Elseif c%=5
  2578.         x%=15:y%=97:dx%=52:dy%=22
  2579.     Elseif c%=6
  2580.         x%=15:y%=119:dx%=52:dy%=22
  2581.     Elseif c%=7
  2582.         x%=15:y%=141:dx%=52:dy%=67
  2583.     Endif    
  2584.  
  2585.     If onoff%=1    
  2586.         gUse decora%
  2587.         gCopy fore%,x%-16,y%+2,21,19,3    
  2588.         gUse decorb%
  2589.         gCopy fore%,x%+46,y%+2,21,19,3    
  2590.  
  2591.         gUse fore%
  2592.         gAt x%-16,y%+2
  2593.         gCopy back%,245,166,21,19,3
  2594.         gAt x%+46,y%+2
  2595.         gCopy back%,307,166,21,19,3
  2596.     Else
  2597.         gUse fore%
  2598.         gAt x%-16,y%+2
  2599.         gCopy decora%,0,0,21,19,3
  2600.         gAt x%+46,y%+2
  2601.         gCopy decorb%,0,0,21,19,3
  2602.     Endif
  2603. ENDP
  2604.  
  2605.  
  2606. PROC Stylet1%:(x&,y&,pen2%)
  2607.     Local pen%,xx%,yy%,dx%,dy%
  2608.     
  2609.     pen%=-2
  2610. rem    If pen2%<>0
  2611.         If x&>=15 And x&<=15+52 and y&>=9 and y&<=9+22
  2612.                 pen%=101
  2613.         Elseif x&>=15 And x&<=15+52 and y&>=31 and y&<=31+22
  2614.                 pen%=102
  2615.         Elseif x&>=15 And x&<=15+52 and y&>=53 and y&<=53+22
  2616.                 pen%=103
  2617.         Elseif x&>=15 And x&<=15+52 and y&>=75 and y&<=75+22
  2618.                 pen%=104
  2619.         Elseif x&>=15 And x&<=15+52 and y&>=97 and y&<=97+22
  2620.                 pen%=105
  2621.         Elseif x&>=15 And x&<=15+52 and y&>=119 and y&<=119+22
  2622.                 pen%=106
  2623.         Elseif x&>=15 And x&<=15+52 and y&>=141 and y&<=141+70
  2624.                 pen%=107
  2625.         Elseif x&>=74 and x&<=74+52 and y&>=21 and y&<=21+70
  2626.                 pen%=3
  2627.         Elseif x&>=449 and x&<=449+52 and y&>=21 and y&<=21+70
  2628.                 pen%=4
  2629.         Elseif x&>=131 and x&<=131+52 and y&>=21+((posbotte1%-1)*22) and y&<=21+((posbotte1%-1)*22)+70
  2630.                 pen%=5
  2631.         Elseif  x&>=392 and x&<=392+52 and y&>=21+((posbotte1%-1)*22) and y&<=21+((posbotte1%-1)*22)+70
  2632.                 pen%=6
  2633.         Elseif x&>=74 and x&<=74+52 and y&>=97 and y&<=97+70
  2634.                 pen%=7
  2635.         Elseif x&>=449 and x&<=449+52 and y&>=97 and y&<=97+70
  2636.                 pen%=8
  2637.         Elseif poskm1%=1 and x&>=190 and x&<=190+52 and y&>=24 and y&<=24+70
  2638.                 pen%=9
  2639.         Elseif poskm1%>=2 and poskm1%<=10 and x&>=190 and x&<=190+52 and y&>=24+((poskm1%-1-1)*13) and y&<=24+((poskm1%-1-1)*13)+70
  2640.                 pen%=9
  2641.         Elseif poskm1%>=11 and x&>=200 and x&<=200+52 and y&>=24+((poskm1%-10-1)*13) and y&<=24+((poskm1%-10-1)*13)+70
  2642.                 pen%=9            
  2643.         Elseif x&>=260 and x&<=260+52 and y&>=116 and y&<=116+70
  2644.                 pen%=-1
  2645.         Endif
  2646. rem    Endif
  2647.     Return pen%
  2648. ENDP
  2649.  
  2650. PROC Stylet2%:(x&,y&,pen2%)
  2651.     Local pen%,xx%,yy%,dx%,dy%
  2652.     
  2653.     pen%=-2
  2654. rem    If pen2%<>0
  2655.         If x&>=508 And x&<=508+52 and y&>=9 and y&<=9+22
  2656.                 pen%=101
  2657.         Elseif x&>=508 And x&<=508+52 and y&>=31 and y&<=31+22
  2658.                 pen%=102
  2659.         Elseif x&>=508 And x&<=508+52 and y&>=53 and y&<=53+22
  2660.                 pen%=103
  2661.         Elseif x&>=508 And x&<=508+52 and y&>=75 and y&<=75+22
  2662.                 pen%=104
  2663.         Elseif x&>=508 And x&<=508+52 and y&>=97 and y&<=97+22
  2664.                 pen%=105
  2665.         Elseif x&>=508 And x&<=508+52 and y&>=119 and y&<=119+22
  2666.                 pen%=106
  2667.         Elseif x&>=508 And x&<=508+52 and y&>=141 and y&<=141+70
  2668.                 pen%=107
  2669.         Elseif x&>=449 and x&<=449+52 and y&>=21 and y&<=21+70
  2670.                 pen%=4
  2671.         Elseif x&>=74 and x&<=74+52 and y&>=21 and y&<=21+70
  2672.                 pen%=3
  2673.         Elseif x&>=392 and x&<=392+52 and y&>=21+((posbotte2%-1)*22) and y&<=21+((posbotte2%-1)*22)+70
  2674.                 pen%=6
  2675.         Elseif x&>=131 and x&<=131+52 and y&>=21+((posbotte2%-1)*22) and y&<=21+((posbotte2%-1)*22)+70
  2676.                 pen%=5
  2677.         Elseif x&>=449 and x&<=449+52 and y&>=97 and y&<=97+70
  2678.                 pen%=8
  2679.         Elseif x&>=74 and x&<=74+52 and y&>=97 and y&<=97+70
  2680.                 pen%=7
  2681.         Elseif poskm2%=1 and x&>=321 and x&<=321+52 and y&>=24 and y&<=24+70
  2682.                 pen%=10
  2683.         Elseif poskm2%>=2 and poskm2%<=10 and x&>=321 and x&<=321+52 and y&>=24+((poskm2%-1-1)*13) and y&<=24+((poskm2%-1-1)*13)+70
  2684.                 pen%=10
  2685.         Elseif poskm2%>=11 and x&>=331 and x&<=331+52 and y&>=24+((poskm2%-10-1)*13) and y&<=24+((poskm2%-10-1)*13)+70
  2686.                 pen%=10        
  2687.         Elseif x&>=260 and x&<=260+52 and y&>=116 and y&<=116+70
  2688.                 pen%=-1
  2689.         Endif
  2690. rem    Endif
  2691.     Return pen%
  2692. ENDP
  2693.  
  2694. PROC Loadvide:
  2695.     vide%=gLoadBit(Chemin$+"mbornpe",1,0)
  2696. ENDP
  2697.     
  2698. PROC CreeFore:
  2699.     fore%=gCreate(0,0,wid%-71,hei%,0,$101)
  2700. ENDP
  2701.  
  2702. PROC Afffore:
  2703.     gUse fore%
  2704.     gAt 0,0
  2705.     gCopy vide%,0,0,640-71,240,3
  2706.     gVisible On
  2707. ENDP
  2708.  
  2709. PROC Loadback:
  2710.     Rem CZ┬árequires bitmap modification
  2711.     back%=gLoadBit(Chemin$+"mbornpa",1,lang%-1)
  2712. ENDP
  2713.  
  2714. PROC TypeCarte%:(carte%)
  2715.  
  2716.     If carte%>=1 and carte%<=5
  2717.         Return 1
  2718.     Elseif carte%>=6 and carte%<=9
  2719.         Return 2
  2720.     Elseif carte%>=10 and carte%<=12
  2721.         Return 3
  2722.     Elseif carte%>=13 and carte%<=15
  2723.         Return 4
  2724.     Elseif carte%>=16 and carte%<=18
  2725.         Return 5
  2726.     Elseif carte%=19
  2727.         Return 6
  2728.     Elseif carte%=20
  2729.         Return 7
  2730.     Elseif carte%=21
  2731.         Return 8
  2732.     Elseif carte%=22
  2733.         Return 9
  2734.     Elseif carte%>=23 and carte%<=36
  2735.         Return 10
  2736.     Elseif carte%>=37 and carte%<=42
  2737.         Return 11
  2738.     Elseif carte%>=43 and carte%<=48
  2739.         Return 12
  2740.     Elseif carte%>=49 and carte%<=54
  2741.         Return 13
  2742.     Elseif carte%>=55 and carte%<=60
  2743.         Return 14
  2744.     Elseif carte%>=61 and carte%<=70
  2745.         Return 15
  2746.     Elseif carte%>=71 and carte%<=80
  2747.         Return 16
  2748.     Elseif carte%>=81 and carte%<=90
  2749.         Return 17
  2750.     Elseif carte%>=91 and carte%<=102
  2751.         Return 18
  2752.     Elseif carte%>=103 and carte%<=106
  2753.         Return 19
  2754.     Endif
  2755. ENDP
  2756.  
  2757. PROC Affcarte:(e%,t%,p%)
  2758.     Local i%
  2759.  
  2760.     gUse fore%
  2761.     If e%=3
  2762.         rem joue1
  2763.         gAt 74,21
  2764.         Aff:(t%,1)
  2765.     Elseif e%=4
  2766.         rem joue2
  2767.         gAt 449,21
  2768.         Aff:(t%,1)
  2769.     Elseif e%=7
  2770.         rem limit1
  2771.         gAt 74,97
  2772.         Aff:(t%,1)
  2773.     Elseif e%=8
  2774.         rem limit2
  2775.         gAt 449,97
  2776.         Aff:(t%,1)
  2777.     Elseif e%=5
  2778.         rem botte1
  2779.         gAt 131,21+((posbotte1%-1)*22)
  2780.         Aff:(t%,1)
  2781.     Elseif e%=6
  2782.         rem botte2
  2783.         gAt 392,21+((posbotte2%-1)*22)
  2784.         Aff:(t%,1)
  2785.     Elseif e%=11
  2786.         rem defausse
  2787.         gAt 260,116
  2788.         Aff:(t%,1)
  2789.     Elseif e%=9
  2790.         If poskm1%>=1 And poskm1%<=9
  2791.             gAt 190,24+((poskm1%-1)*13)
  2792.             Aff:(t%,1)
  2793.         Elseif poskm1%>=10
  2794.             gAt 200,32+((poskm1%-10)*13)
  2795.             Aff:(t%,1)
  2796.         Endif    
  2797.     Elseif e%=10
  2798.         If poskm2%>=1 And poskm2%<=9
  2799.             gAt 321,24+((poskm2%-1)*13)
  2800.             Aff:(t%,1)
  2801.         Elseif poskm2%>=10
  2802.             gAt 331,32+((poskm2%-10)*13)
  2803.             Aff:(t%,1)
  2804.         Endif    
  2805.     Elseif e%=1
  2806.         If t%=0 And p%=7
  2807.             gAt 15,9+((p%-2)*22)
  2808.             Aff:(Typecarte%:(main1%(6)),1)
  2809.             gAt 15,189
  2810.             gCopy decor1%,0,0,52,22,3
  2811.         Else
  2812.             gAt 15,9+((p%-1)*22)
  2813.             If p%=7
  2814.                 Aff:(t%,1)
  2815.             Else
  2816.                 If main1%(p%+1)<>0
  2817.                     Aff:(t%,2)
  2818.                 Else
  2819.                     Aff:(t%,1)
  2820.                 Endif
  2821.             Endif
  2822.         Endif
  2823.     Elseif e%=2
  2824.         If t%=0 And p%=7
  2825.             If visib%=1
  2826.                 gAt 508,9+((p%-2)*22)
  2827.                 Aff:(Typecarte%:(main2%(6)),1)
  2828.                 gAt 508,189
  2829.                 gCopy decor2%,0,0,52,22,3
  2830.             Else
  2831.                 gAt 508,9+((p%-2)*22)
  2832.                 Aff:(-1,1)
  2833.                 gAt 508,189
  2834.                 gCopy decor2%,0,0,52,22,3
  2835.             Endif
  2836.         Else
  2837.             gAt 508,9+((p%-1)*22)
  2838.             If visib%=2
  2839.                 If t%=0
  2840.                     i%=0
  2841.                 Else
  2842.                     i%=-1
  2843.                 Endif
  2844.             Else
  2845.                 i%=t%
  2846.             Endif
  2847.             If p%=7
  2848.                 Aff:(i%,1)
  2849.             Else    
  2850.                 If main2%(p%+1)<>0
  2851.                     Aff:(i%,2)
  2852.                 Else
  2853.                     Aff:(i%,1)
  2854.                 Endif
  2855.             Endif
  2856.         Endif
  2857.     Endif
  2858. ENDP
  2859.  
  2860. PROC Aff:(c%,taille%)
  2861.     Local x%,y%
  2862.     If c%=-1
  2863.         x%=60:y%=154
  2864.     Elseif c%=0
  2865.         x%=114:y%=154
  2866.     Elseif c%=1
  2867.         x%=60:y%=10
  2868.     Elseif c%=2
  2869.         x%=384:y%=10
  2870.     Elseif c%=3
  2871.         x%=168:y%=82
  2872.     Elseif c%=4
  2873.         x%=60:y%=82
  2874.     Elseif c%=5
  2875.         x%=6:y%=154
  2876.     Elseif c%=6
  2877.         x%=384:y%=82
  2878.     Elseif c%=7
  2879.         x%=438:y%=82
  2880.     Elseif c%=8
  2881.         x%=330:y%=82
  2882.     Elseif c%=9
  2883.         x%=114:y%=82
  2884.     Elseif c%=10
  2885.         x%=6:y%=10
  2886.     Elseif c%=11
  2887.         x%=438:y%=10
  2888.     Elseif c%=12
  2889.         x%=222:y%=82
  2890.     Elseif c%=13
  2891.         x%=276:y%=82
  2892.     Elseif c%=14
  2893.         x%=6:y%=82
  2894.     Elseif c%=15
  2895.         x%=114:y%=10
  2896.     Elseif c%=16
  2897.         x%=168:y%=10
  2898.     Elseif c%=17
  2899.         x%=222:y%=10
  2900.     Elseif c%=18
  2901.         x%=276:y%=10
  2902.     Elseif c%=19
  2903.         x%=330:y%=10
  2904.     Endif
  2905.     
  2906.     If taille%=1
  2907.         gCopy back%,x%,y%,52,70,3
  2908.     Elseif taille%=2
  2909.         gCopy back%,x%,y%,52,22,3
  2910.     Endif
  2911.     
  2912. ENDP
  2913.  
  2914. PROC Tirage:
  2915.     Local ok%
  2916.     ok%=1
  2917.     
  2918.     Do
  2919.         main1%(ok%)=Rndc%:(1)
  2920.         carte%(main1%(ok%))=0
  2921.         If nbplay%=2
  2922.             Affcarte:(1,-1,ok%)
  2923.         Else
  2924.             Affcarte:(1,Typecarte%:(main1%(ok%)),ok%)
  2925.         Endif
  2926.         JoueSon:(2,1)
  2927.         reste%=reste%-1
  2928.         Affreste:
  2929.         main2%(ok%)=Rndc%:(2)
  2930.         carte%(main2%(ok%))=0
  2931.         If nbplay%=2
  2932.             Affcarte:(2,-1,ok%)
  2933.         Else
  2934.             If visib%=1
  2935.                 Affcarte:(2,Typecarte%:(main2%(ok%)),ok%)
  2936.             Else            
  2937.                 Affcarte:(2,-1,ok%)
  2938.             Endif
  2939.         Endif
  2940.         JoueSon:(2,1)
  2941.         reste%=reste%-1
  2942.         Affreste:
  2943.         ok%=ok%+1
  2944.     Until ok%=7    
  2945. ENDP
  2946.  
  2947. PROC Affreste:
  2948.     VReste:
  2949.     gUse fore%
  2950.     gColor 0,0,0
  2951.     If reste%>=100
  2952.         gAt 270,73
  2953.         gPrintB Gen$(reste%,3),30
  2954.     Elseif reste%>=10
  2955.         gAt 270+6,73
  2956.         gPrintB Gen$(reste%,2),20
  2957.     Else
  2958.         gAt 270+10,73
  2959.         gPrintB Gen$(reste%,1),10
  2960.     Endif
  2961. ENDP    
  2962.  
  2963. PROC VReste:
  2964.     gUse fore%
  2965.     gAt 270,57
  2966.     gFill 30,20,1
  2967. ENDP
  2968.  
  2969. PROC Affkm1:
  2970.     Vkm1:
  2971.     gUse fore%
  2972.     gColor 0,0,0
  2973.     If km1%>=1000
  2974.         gAt 185+10,24-4
  2975.         gPrintB Gen$(km1%,4),40
  2976.     Elseif km1%>=100
  2977.         gAt 185+10+6,24-4
  2978.         gPrintB Gen$(km1%,3),30
  2979.     Elseif km1%>=10
  2980.         gAt 185+10+8,24-4
  2981.         gPrintB Gen$(km1%,2),20
  2982.     Else
  2983.         gAt 185+10+14,24-4
  2984.         gPrintB Gen$(km1%,1),10
  2985.     Endif
  2986.     
  2987.     Affvoit:(1,km1%,1,voiture%)
  2988. ENDP
  2989.  
  2990. PROC Vkm1:
  2991.     gUse fore%
  2992.     gAt 185+10,24-4-16
  2993.     gFill 40,20,1
  2994. ENDP
  2995.  
  2996. PROC Affkm2:
  2997.     Vkm2:
  2998.     gUse fore%
  2999.     gColor 0,0,0
  3000.     If km2%>=1000
  3001.         gAt 318+10,24-4
  3002.         gPrintB Gen$(km2%,4),40
  3003.     Elseif km2%>=100
  3004.         gAt 318+10+6,24-4
  3005.         gPrintB Gen$(km2%,3),30
  3006.     Elseif km2%>=10
  3007.         gAt 318+10+8,24-4
  3008.         gPrintB Gen$(km2%,2),20
  3009.     Else
  3010.         gAt 318+10+14,24-4
  3011.         gPrintB Gen$(km2%,1),10
  3012.     Endif
  3013.  
  3014.     Affvoit:(2,km2%,1,voiture%)
  3015.  
  3016. ENDP
  3017.     
  3018. PROC Vkm2:
  3019.     gUse fore%
  3020.     gAt 321+10,24-4-16
  3021.     gFill 40,20,1
  3022. ENDP
  3023.  
  3024. PROC Rndc%:(p%)
  3025.     Local i%,ok%,dummy%
  3026.     
  3027.     ok%=0
  3028.     dummy%=1+int((Rnd*50))
  3029.     If dummy%<=(10-level%)
  3030.         rem on triche au tirage des cartes...
  3031. rem        giPrint "!"
  3032.         If p%=1
  3033.             If joue1%=0 or joue1%=1 or joue1%=14 or joue1%=12 or joue1%=13
  3034.                 rem on cherche un feu vert !
  3035.                 i%=23
  3036.                 Do
  3037.                     If carte%(i%)=1
  3038.                         ok%=1
  3039.                     Endif
  3040.                     i%=i%+1
  3041.                 Until ok%=1 or i%=37
  3042.             Endif
  3043.             If ok%=0 and joue1%=4
  3044.                 rem on recherche un spare tire
  3045.                 i%=49
  3046.                 Do
  3047.                     If carte%(i%)=1
  3048.                         ok%=1
  3049.                     Endif
  3050.                     i%=i%+1
  3051.                 Until ok%=1 or i%=54
  3052.             Endif
  3053.             If ok%=0 and joue1%=3
  3054.                 rem on recherche un gasoline
  3055.                 i%=43
  3056.                 Do
  3057.                     If carte%(i%)=1
  3058.                         ok%=1
  3059.                     Endif
  3060.                     i%=i%+1
  3061.                 Until ok%=1 or i%=49
  3062.             Endif
  3063.             If ok%=0 and joue1%=5
  3064.                 rem on recherche un repair
  3065.                 i%=55
  3066.                 Do
  3067.                     If carte%(i%)=1
  3068.                         ok%=1
  3069.                     Endif
  3070.                     i%=i%+1
  3071.                 Until ok%=1 or i%=61
  3072.             Endif
  3073.             If ok%=0 and limit1%=2
  3074.                 rem on recherche un end of limit
  3075.                 i%=37
  3076.                 Do
  3077.                     If carte%(i%)=1
  3078.                         ok%=1
  3079.                     Endif
  3080.                     i%=i%+1
  3081.                 Until ok%=1 or i%=43
  3082.             Endif
  3083.         Else
  3084.             If joue2%=0 or joue2%=1 or joue2%=14 or joue2%=12 or joue2%=13
  3085.                 rem on cherche un feu vert !
  3086.                 i%=23
  3087.                 Do
  3088.                     If carte%(i%)=1
  3089.                         ok%=1
  3090.                     Endif
  3091.                     i%=i%+1
  3092.                 Until ok%=1 or i%=37
  3093.             Endif
  3094.             If ok%=0 and joue2%=4
  3095.                 rem on recherche un spare tire
  3096.                 i%=49
  3097.                 Do
  3098.                     If carte%(i%)=1
  3099.                         ok%=1
  3100.                     Endif
  3101.                     i%=i%+1
  3102.                 Until ok%=1 or i%=54
  3103.             Endif
  3104.             If ok%=0 and joue2%=3
  3105.                 rem on recherche un gasoline
  3106.                 i%=43
  3107.                 Do
  3108.                     If carte%(i%)=1
  3109.                         ok%=1
  3110.                     Endif
  3111.                     i%=i%+1
  3112.                 Until ok%=1 or i%=49
  3113.             Endif
  3114.             If ok%=0 and joue2%=5
  3115.                 rem on recherche un repair
  3116.                 i%=55
  3117.                 Do
  3118.                     If carte%(i%)=1
  3119.                         ok%=1
  3120.                     Endif
  3121.                     i%=i%+1
  3122.                 Until ok%=1 or i%=61
  3123.             Endif
  3124.             If ok%=0 and limit2%=2
  3125.                 rem on recherche un end of limit
  3126.                 i%=37
  3127.                 Do
  3128.                     If carte%(i%)=1
  3129.                         ok%=1
  3130.                     Endif
  3131.                     i%=i%+1
  3132.                 Until ok%=1 or i%=43
  3133.             Endif
  3134.         Endif
  3135.     Endif
  3136.     If ok%=0
  3137.         ok%=0
  3138.         Do
  3139.             i%=1+Int(Rnd*106)
  3140.             If carte%(i%)=1
  3141.                 ok%=1
  3142.             Endif
  3143.         Until ok%=1
  3144.     Endif
  3145.     Return i%
  3146. ENDP
  3147.  
  3148. PROC Rndcompu%:
  3149.     Local i%,ok%,dummy%
  3150.  
  3151.     dummy%=1+int((Rnd*30))
  3152.     If dummy%<=(level%-1)
  3153.         rem on triche au tirage des cartes...
  3154. rem        giPrint "!"
  3155.         ok%=0
  3156.         If joue2%=0 or joue2%=1 or joue2%=14 or joue2%=12 or joue2%=13
  3157.             rem on cherche un feu vert !
  3158.             i%=23
  3159.             Do
  3160.                 If carte%(i%)=1
  3161.                     ok%=1
  3162.                 Endif
  3163.                 i%=i%+1
  3164.             Until ok%=1 or i%=37
  3165.         Endif
  3166.         If ok%=0 and joue2%=4
  3167.             rem on recherche un spare tire
  3168.             i%=49
  3169.             Do
  3170.                 If carte%(i%)=1
  3171.                     ok%=1
  3172.                 Endif
  3173.                 i%=i%+1
  3174.             Until ok%=1 or i%=54
  3175.         Endif
  3176.         If ok%=0 and joue2%=3
  3177.             rem on recherche un gasoline
  3178.             i%=43
  3179.             Do
  3180.                 If carte%(i%)=1
  3181.                     ok%=1
  3182.                 Endif
  3183.                 i%=i%+1
  3184.             Until ok%=1 or i%=49
  3185.         Endif
  3186.         If ok%=0 and joue2%=5
  3187.             rem on recherche un repair
  3188.             i%=55
  3189.             Do
  3190.                 If carte%(i%)=1
  3191.                     ok%=1
  3192.                 Endif
  3193.                 i%=i%+1
  3194.             Until ok%=1 or i%=61
  3195.         Endif
  3196.         If ok%=0 and limit2%=2
  3197.             rem on recherche un end of limit
  3198.             i%=37
  3199.             Do
  3200.                 If carte%(i%)=1
  3201.                     ok%=1
  3202.                 Endif
  3203.                 i%=i%+1
  3204.             Until ok%=1 or i%=43
  3205.         Endif
  3206.         If ok%=0 and km2%<=600
  3207.             rem on recherche un 200
  3208.             i%=103
  3209.             Do
  3210.                 If carte%(i%)=1
  3211.                     ok%=1
  3212.                 Endif
  3213.                 i%=i%+1
  3214.             Until ok%=1 or i%=106
  3215.         Endif
  3216.         If ok%=0 and km2%<=900
  3217.             rem on recherche un 100
  3218.             i%=91
  3219.             Do
  3220.                 If carte%(i%)=1
  3221.                     ok%=1
  3222.                 Endif
  3223.                 i%=i%+1
  3224.             Until ok%=1 or i%=103
  3225.         Endif
  3226.         If ok%=0 and km2%=925
  3227.             rem on recherche un 75
  3228.             i%=81
  3229.             Do
  3230.                 If carte%(i%)=1
  3231.                     ok%=1
  3232.                 Endif
  3233.                 i%=i%+1
  3234.             Until ok%=1 or i%=90
  3235.         Endif
  3236.         If ok%=0 and km2%=950
  3237.             rem on recherche un 50
  3238.             i%=71
  3239.             Do
  3240.                 If carte%(i%)=1
  3241.                     ok%=1
  3242.                 Endif
  3243.                 i%=i%+1
  3244.             Until ok%=1 or i%=81
  3245.         Endif
  3246.         If ok%=0 and km2%=975
  3247.             rem on recherche un 25
  3248.             i%=61
  3249.             Do
  3250.                 If carte%(i%)=1
  3251.                     ok%=1
  3252.                 Endif
  3253.                 i%=i%+1
  3254.             Until ok%=1 or i%=71
  3255.         Endif
  3256.         If ok%=0
  3257.             Do
  3258.                 i%=1+Int(Rnd*106)
  3259.                 If carte%(i%)=1
  3260.                     ok%=1
  3261.                 Endif
  3262.             Until ok%=1
  3263.         Endif
  3264.     Else
  3265.         ok%=0
  3266.         Do
  3267.             i%=1+Int(Rnd*106)
  3268.             If carte%(i%)=1
  3269.                 ok%=1
  3270.             Endif
  3271.         Until ok%=1
  3272.     Endif
  3273.     Return i%
  3274. ENDP
  3275.  
  3276. PROC Initvars:
  3277.     Local i%
  3278.     
  3279.     i%=1
  3280.     Do
  3281.         carte%(i%)=1
  3282.         i%=i%+1
  3283.     Until i%=107
  3284.     reste%=106
  3285.     i%=1
  3286.     Do
  3287.         main1%(i%)=0
  3288.         main2%(i%)=0
  3289.         i%=i%+1
  3290.     Until i%=8
  3291.     km1%=0:km2%=0
  3292.     poskm1%=1:poskm2%=1
  3293.     i%=1
  3294.     Do
  3295.         botte1%(i%)=0
  3296.         botte2%(i%)=0
  3297.         i%=i%+1
  3298.     Until i%=5
  3299.     posbotte1%=1:posbotte2%=1
  3300.     joue1%=0:joue2%=0
  3301.     deuxcent1%=0:deuxcent2%=0
  3302.     limit1%=0:limit2%=0
  3303.     fourre1%=0:fourre2%=0
  3304.     parade1%=0:parade2%=0
  3305.     km1old%=0
  3306.     km2old%=0
  3307.     defau%=0
  3308. ENDP
  3309.  
  3310. PROC Entoure1:(c%)
  3311.     Local x%,y%,dx%,dy%
  3312.     If c%=1
  3313.         x%=15:y%=9:dx%=52:dy%=22
  3314.     Elseif c%=2
  3315.         x%=15:y%=31:dx%=52:dy%=22
  3316.     Elseif c%=3
  3317.         x%=15:y%=53:dx%=52:dy%=22
  3318.     Elseif c%=4
  3319.         x%=15:y%=75:dx%=52:dy%=22
  3320.     Elseif c%=5
  3321.         x%=15:y%=97:dx%=52:dy%=22
  3322.     Elseif c%=6
  3323.         x%=15:y%=119:dx%=52:dy%=22
  3324.     Elseif c%=7
  3325.         x%=15:y%=141:dx%=52:dy%=67
  3326.     Endif    
  3327.     
  3328.     If dy%=67
  3329.         spr1&=SpriteOn&:(x%,y%,1)
  3330.     Else
  3331.         spr1&=SpriteOn&:(x%,y%,2)
  3332.     Endif
  3333. ENDP
  3334.  
  3335. PROC Entoure2:(c%)
  3336.     Local x%,y%,dx%,dy%
  3337.     If c%=1
  3338.         x%=508:y%=9:dx%=52:dy%=22
  3339.     Elseif c%=2
  3340.         x%=508:y%=31:dx%=52:dy%=22
  3341.     Elseif c%=3
  3342.         x%=508:y%=53:dx%=52:dy%=22
  3343.     Elseif c%=4
  3344.         x%=508:y%=75:dx%=52:dy%=22
  3345.     Elseif c%=5
  3346.         x%=508:y%=97:dx%=52:dy%=22
  3347.     Elseif c%=6
  3348.         x%=508:y%=119:dx%=52:dy%=22
  3349.     Elseif c%=7
  3350.         x%=508:y%=141:dx%=52:dy%=67
  3351.     Endif    
  3352.     
  3353.     If dy%=67
  3354.         spr1&=SpriteOn&:(x%,y%,1)
  3355.     Else
  3356.         spr1&=SpriteOn&:(x%,y%,2)
  3357.     Endif
  3358. ENDP
  3359.  
  3360. PROC EntoureA:(c%)
  3361.     Local x%,y%,dx%,dy%
  3362.     If c%<>-1    
  3363.         If c%=3
  3364.             x%=74:y%=21:dx%=52:dy%=67
  3365.         Elseif c%=4
  3366.             x%=449:y%=21:dx%=52:dy%=67
  3367.         Elseif c%=5
  3368.             If posbotte1%=1
  3369.                 x%=131:y%=21+((posbotte1%-1)*22):dx%=52:dy%=67
  3370.             Else
  3371.                 x%=131:y%=21+((posbotte1%-1-1)*22):dx%=52:dy%=67
  3372.             Endif
  3373.         Elseif c%=6
  3374.             If posbotte2%=1
  3375.                 x%=392:y%=21+((posbotte2%-1)*22):dx%=52:dy%=67
  3376.             Else
  3377.                 x%=392:y%=21+((posbotte2%-1-1)*22):dx%=52:dy%=67
  3378.             Endif
  3379.         Elseif c%=7
  3380.             x%=74:y%=97:dx%=52:dy%=67
  3381.         Elseif c%=8
  3382.             x%=449:y%=97:dx%=52:dy%=67
  3383.         Elseif c%=9
  3384.             If poskm1%=1
  3385.                 x%=190:y%=24:dx%=52:dy%=67
  3386.             Elseif poskm1%>=2 and poskm1%<=10
  3387.                 x%=190:y%=24+((poskm1%-1-1)*13):dx%=52:dy%=67
  3388.             Else
  3389.                 x%=200:y%=32+((poskm1%-10-1)*13):dx%=52:dy%=67
  3390.             Endif
  3391.         Elseif c%=10
  3392.             x%=321:y%=24:dx%=52:dy%=67
  3393.             If poskm2%=1
  3394.                 x%=321:y%=24:dx%=52:dy%=67
  3395.             Elseif poskm2%>=2 and poskm2%<=10
  3396.                 x%=321:y%=24+((poskm2%-1-1)*13):dx%=52:dy%=67
  3397.             Else
  3398.                 x%=331:y%=32+((poskm2%-10-1)*13):dx%=52:dy%=67
  3399.             Endif
  3400.         Endif
  3401.         spr2&=SpriteOn&:(x%,y%,1)
  3402.         possible%=1
  3403.     Else
  3404.         possible%=0
  3405.     Endif
  3406.  
  3407.     rem defausse
  3408.     x%=260:y%=116:dx%=52:dy%=67
  3409.     spr3&=SpriteOn&:(x%,y%,1)
  3410. ENDP
  3411.  
  3412. PROC EntoureC:(c%)
  3413.     Local x%,y%,dx%,dy%
  3414.     If c%<>-1    
  3415.         If c%=3
  3416.             x%=74:y%=21:dx%=52:dy%=67
  3417.         Elseif c%=4
  3418.             x%=449:y%=21:dx%=52:dy%=67
  3419.         Elseif c%=5
  3420.             If posbotte1%=1
  3421.                 x%=131:y%=21+((posbotte1%-1)*22):dx%=52:dy%=67
  3422.             Else
  3423.                 x%=131:y%=21+((posbotte1%-1-1)*22):dx%=52:dy%=67
  3424.             Endif
  3425.         Elseif c%=6
  3426.             If posbotte2%=1
  3427.                 x%=392:y%=21+((posbotte2%-1)*22):dx%=52:dy%=67
  3428.             Else
  3429.                 x%=392:y%=21+((posbotte2%-1-1)*22):dx%=52:dy%=67
  3430.             Endif
  3431.         Elseif c%=7
  3432.             x%=74:y%=97:dx%=52:dy%=67
  3433.         Elseif c%=8
  3434.             x%=449:y%=97:dx%=52:dy%=67
  3435.         Elseif c%=9
  3436.             If poskm1%=1
  3437.                 x%=190:y%=24:dx%=52:dy%=67
  3438.             Elseif poskm1%>=2 and poskm1%<=10
  3439.                 x%=190:y%=24+((poskm1%-1-1)*13):dx%=52:dy%=67
  3440.             Else
  3441.                 x%=200:y%=32+((poskm1%-10-1)*13):dx%=52:dy%=67
  3442.             Endif
  3443.         Elseif c%=10
  3444.             x%=321:y%=24:dx%=52:dy%=67
  3445.             If poskm2%=1
  3446.                 x%=321:y%=24:dx%=52:dy%=67
  3447.             Elseif poskm2%>=2 and poskm2%<=10
  3448.                 x%=321:y%=24+((poskm2%-1-1)*13):dx%=52:dy%=67
  3449.             Else
  3450.                 x%=331:y%=32+((poskm2%-10-1)*13):dx%=52:dy%=67
  3451.             Endif
  3452.         Elseif c%=11
  3453.             x%=260:y%=116:dx%=52:dy%=67
  3454.         Endif
  3455.         spr2&=SpriteOn&:(x%,y%,1)
  3456.         possible%=1
  3457.     Else
  3458.         possible%=0
  3459.     Endif
  3460.  
  3461. ENDP
  3462.  
  3463. PROC Visibles:(player%)
  3464.     Local i%
  3465.  
  3466.     i%=1
  3467.     Do
  3468.         If player%=1
  3469.             If visib1%=1                
  3470.                 gAt 15,9+((i%-1)*22)
  3471.                 If main1%(i%)=0
  3472.                     If i%<>7
  3473.                         Aff:(0,1)
  3474.                     Endif
  3475.                 Else
  3476.                     Aff:(Typecarte%:(main1%(i%)),1)
  3477.                 Endif
  3478.             Else
  3479.                 gAt 15,9+((i%-1)*22)
  3480.                 If main1%(i%)=0
  3481.                     If i%<>7
  3482.                         Aff:(0,1)
  3483.                     Endif
  3484.                 Else
  3485.                     Aff:(-1,1)
  3486.                 Endif
  3487.             Endif
  3488.         Else
  3489.             If visib2%=1
  3490.                 gAt 508,9+((i%-1)*22)
  3491.                 If main2%(i%)=0
  3492.                     If i%<>7
  3493.                         Aff:(0,1)
  3494.                     Endif
  3495.                 Else
  3496.                     Aff:(Typecarte%:(main2%(i%)),1)
  3497.                 Endif
  3498.             Else
  3499.                 gAt 508,9+((i%-1)*22)
  3500.                 If main2%(i%)=0
  3501.                     If i%<>7
  3502.                         Aff:(0,1)
  3503.                     Endif
  3504.                 Else
  3505.                     Aff:(-1,1)
  3506.                 Endif
  3507.             Endif
  3508.         Endif
  3509.         i%=i%+1
  3510.     Until i%=8
  3511. ENDP
  3512.  
  3513. PROC Okidoki:(text$)
  3514.     dInit
  3515.     dText "",text$,2
  3516.     dButtons "Ok",13 or $200
  3517.     Dialog
  3518. ENDP
  3519.  
  3520. PROC Score:
  3521.     Local score%,dx%,dy%,f1%,f2%,k1%,k2%,m1%,m2%,d1%,d2%,t1%,t2%
  3522.     
  3523.     dx%=450:dy%=186
  3524.     score%=gCreate(Int((wid%-71-dx%)/2),Int((hei%-dy%)/2),dx%,dy%,1,$311)
  3525.     gColor 0,0,0
  3526.     gAt 0,0:gLineto dx%-1,0:gLineto dx%-1,dy%-1:gLineto 0,dy%-1:gLineto 0,0
  3527.     gAt 1,1:gLineto dx%-1-1,1:gLineto dx%-1-1,dy%-1-1:gLineto 1,dy%-1-1:gLineto 1,1
  3528.     gFont 268436066
  3529.     gAt 10,16:gPrint Localiz$:(7,lang%)+Gen$(tour%,1)+Localiz$:(8,lang%)
  3530.     gAt 200,16:gPrint player1$
  3531.     gAt 320,16:gPrint player2$
  3532.     
  3533.     gColor 128,128,128:gAt 10,22:gLineto dx%-10,22
  3534.     
  3535.     gColor 0,0,0
  3536.     gAt 10,36:gPrint Localiz$:(9,lang%)
  3537.     gAt 200,36:gPrint forw1%
  3538.     gAt 320,36:gPrint forw2%
  3539.     
  3540.     gColor 128,128,128:gAt 10,41:gLineto dx%-10,41
  3541.  
  3542.     gColor 0,0,0
  3543.     gAt 10,55:gPrint Localiz$:(10,lang%)
  3544.     gAt 200,55:gPrint km1%
  3545.     gAt 320,55:gPrint km2%
  3546.     
  3547.     gColor 0,0,0
  3548.     gAt 10,69:gPrint Localiz$:(11,lang%)
  3549.     gAt 200,69:gPrint parade1%*100
  3550.     gAt 320,69:gPrint parade2%*100
  3551.     
  3552.     gColor 0,0,0
  3553.     gAt 10,83:gPrint Localiz$:(12,lang%)
  3554.     gAt 200,83:gPrint fourre1%*300
  3555.     gAt 320,83:gPrint fourre2%*300
  3556.     
  3557.     If parade1%+fourre1%=4
  3558.         f1%=300
  3559.     Endif
  3560.     If parade2%+fourre2%=4
  3561.         f2%=300
  3562.     Endif
  3563.     gColor 0,0,0
  3564.     gAt 10,97:gPrint Localiz$:(13,lang%)
  3565.     gAt 200,97:gPrint f1%
  3566.     gAt 320,97:gPrint f2%
  3567.  
  3568.     If km1%=1000
  3569.         k1%=300
  3570.     Endif    
  3571.     If km2%=1000
  3572.         k2%=300
  3573.     Endif    
  3574.     gColor 0,0,0
  3575.     gAt 10,111:gPrint Localiz$:(14,lang%)
  3576.     gAt 200,111:gPrint k1%
  3577.     gAt 320,111:gPrint k2%
  3578.     
  3579.     If km1%>km2% and km1%<>1000
  3580.         m1%=100
  3581.     Endif
  3582.     If km1%<km2% and km2%<>1000
  3583.         m2%=100
  3584.     Endif
  3585.     gColor 0,0,0
  3586.     gAt 10,125:gPrint Localiz$:(15,lang%)
  3587.     gAt 200,125:gPrint m1%
  3588.     gAt 320,125:gPrint m2%
  3589.     
  3590.     If deuxcent1%=0 and km1%=1000
  3591.         d1%=300
  3592.     Endif
  3593.     If deuxcent2%=0 and km2%=1000
  3594.         d2%=300
  3595.     Endif
  3596.     gColor 0,0,0
  3597.     gAt 10,139:gPrint Localiz$:(16,lang%)
  3598.     gAt 200,139:gPrint d1%
  3599.     gAt 320,139:gPrint d2%
  3600.     
  3601.     gColor 128,128,128:gAt 10,144:gLineto dx%-10,144
  3602.  
  3603.     t1%=km1%+(parade1%*100)+(fourre1%*300)+f1%+k1%+m1%+d1%
  3604.     t2%=km2%+(parade2%*100)+(fourre2%*300)+f2%+k2%+m2%+d2%
  3605.     gColor 0,0,0
  3606.     gAt 10,158:gPrint Localiz$:(17,lang%)
  3607.     gAt 200,158:gPrint t1%
  3608.     gAt 320,158:gPrint t2%
  3609.     
  3610.     gColor 128,128,128:gAt 10,163:gLineto dx%-10,163
  3611.  
  3612.     forw1%=forw1%+t1%
  3613.     forw2%=forw2%+t2%
  3614.     gColor 0,0,0
  3615.     gAt 10,177:gPrint Localiz$:(18,lang%)
  3616.     gAt 200,177:gPrint forw1%
  3617.     gAt 320,177:gPrint forw2%
  3618.     
  3619.     If nbplay%=2
  3620.         JoueSon:(1,0)
  3621.     Else
  3622.         If t1%>t2%
  3623.             JoueSon:(1,0)
  3624.         Elseif t1%<t2%
  3625.             JoueSon:(5,0)
  3626.         Else
  3627.             JoueSon:(6,0)
  3628.         Endif
  3629.     Endif
  3630.     
  3631.     outgame%=1
  3632.     WaitK:(score%)
  3633.     outgame%=0
  3634.     gClose score%
  3635. ENDP
  3636.  
  3637. PROC Starter%:
  3638.     Local i%
  3639.     
  3640.     i%=1+(Rnd*2)
  3641.     If i%=1
  3642.         Okidoki:(player1$+Localiz$:(19,lang%))
  3643.     Else
  3644.         Okidoki:(player2$+Localiz$:(19,lang%))
  3645.     Endif
  3646.     Return i%
  3647. ENDP
  3648.  
  3649. PROC SpriteOn&:(x%,y%,size%)
  3650.     Local Spr&
  3651.  
  3652.     If size%=1
  3653.         Spr&=SpriteCreate&:(fore%,x%,y%,0)
  3654.         SpriteAppend:(100000*4,b1&,b1&,1,0,0)
  3655.         SpriteAppend:(33333*4,b2&,b2&,1,0,0)
  3656.         SpriteAppend:(100000*4,b2&,b2&,1,0,0)
  3657.     Else
  3658.         Spr&=SpriteCreate&:(fore%,x%,y%,0)
  3659.         SpriteAppend:(100000*4,c1&,c1&,1,0,0)
  3660.         SpriteAppend:(33333*4,c2&,c2&,1,0,0)
  3661.         SpriteAppend:(100000*4,c2&,c2&,1,0,0)
  3662.     Endif    
  3663.     Return Spr&
  3664. ENDP
  3665.  
  3666. PROC SpriteOf:(spr&)
  3667.     SpriteDelete:(spr&)
  3668. ENDP
  3669.  
  3670. PROC SprLoad:
  3671.     b1&=BitmapLoad&:(Chemin$+"mbornpb",0)
  3672.     b2&=BitmapLoad&:(Chemin$+"mbornpb",1)
  3673.     c1&=BitmapLoad&:(Chemin$+"mbornpc",0)
  3674.     c2&=BitmapLoad&:(Chemin$+"mbornpc",1)
  3675.  
  3676. ENDP
  3677.  
  3678. PROC SprUnload:
  3679.     BitmapUnload:(b1&)
  3680.     BitmapUnload:(b2&)
  3681.     BitmapUnload:(c1&)
  3682.     BitmapUnload:(c2&)
  3683. ENDP
  3684.  
  3685. PROC About:
  3686.     dInit nom$+" v"+version$
  3687.     dText "",Localiz$:(20,lang%),2
  3688.     dText "","Copyright 1998",2
  3689.     dText "",Localiz$:(21,lang%)
  3690.     dButtons "Ok",13 or $200
  3691.     Dialog
  3692. ENDP
  3693.  
  3694. PROC Pfm:
  3695.     dInit "Psion Freeware Movement"
  3696.     dText "",Localiz$:(22,lang%),0
  3697.     dText "",Localiz$:(23,lang%),0
  3698.     dText "",Localiz$:(24,lang%),0
  3699.     dText "",Localiz$:(25,lang%),0
  3700.     dText "","http://www.electrolyte.demon.co.uk/psion_pfm.html",0
  3701.     dButtons "Ok",13 or $200
  3702.     Dialog
  3703. ENDP
  3704.  
  3705. PROC LeChemin$:
  3706.     Local p$(200),i%,c$(1)
  3707.     
  3708.     i%=Len(Cmd$(1))
  3709.     c$=""
  3710.     p$=""
  3711.     While c$<>"\"
  3712.         c$=Mid$(cmd$(1),i%,1)
  3713.         p$=c$+p$
  3714.         i%=i%-1
  3715.     Endwh
  3716.     p$=Mid$(Cmd$(1),1,i%+1)
  3717.     Return p$
  3718. ENDP
  3719.  
  3720. PROC TBarMenu:
  3721. rem    TBarInit:(Nom$,gWidth,gHeight)
  3722.     TBarInit:(Nom$,wid%,hei%)
  3723.     TBarPlay:
  3724. ENDP
  3725.  
  3726. PROC TBarPlay:
  3727.     Local ic$(100),a$(10)
  3728.  
  3729.     ic$=Chemin$+"mbornpd"
  3730.     tb1a&=gLoadBit(ic$,0,0)
  3731.     tb1b&=gLoadBit(ic$,0,1)
  3732.     tb2a&=gLoadBit(ic$,0,2)
  3733.     tb2b&=gLoadBit(ic$,0,3)
  3734.     tb3a&=gLoadBit(ic$,0,4)
  3735.     tb3b&=gLoadBit(ic$,0,5)
  3736.     tb4a&=gLoadBit(ic$,0,6)
  3737.     tb4b&=gLoadBit(ic$,0,7)    
  3738.  
  3739.     If lang%=1
  3740.         TBarButt:("a",1,Localiz$:(51,lang%),0,tb1a&,tb1b&,0)
  3741.         TBarButt:("p",2,Localiz$:(52,lang%),0,tb2a&,tb2b&,0)
  3742.         TBarButt:("e",3,Localiz$:(53,lang%),0,tb3a&,tb3b&,0)
  3743.         TBarButt:("h",4,Localiz$:(54,lang%),0,tb4a&,tb4b&,0)
  3744.     Elseif lang%=2
  3745.         TBarButt:("a",1,Localiz$:(51,lang%),0,tb1a&,tb1b&,0)
  3746.         TBarButt:("p",2,Localiz$:(52,lang%),0,tb2a&,tb2b&,0)
  3747.         TBarButt:("q",3,Localiz$:(53,lang%),0,tb3a&,tb3b&,0)
  3748.         TBarButt:("d",4,Localiz$:(54,lang%),0,tb4a&,tb4b&,0)
  3749.     Else
  3750.         Rem CZ
  3751.         TBarButt:("a",1,Localiz$:(51,lang%),0,tb1a&,tb1b&,0)
  3752.         TBarButt:("p",2,Localiz$:(52,lang%),0,tb2a&,tb2b&,0)
  3753.         TBarButt:("e",3,Localiz$:(53,lang%),0,tb3a&,tb3b&,0)
  3754.         TBarButt:("h",4,Localiz$:(54,lang%),0,tb4a&,tb4b&,0)
  3755.     Endif
  3756. ENDP
  3757.  
  3758. PROC Debute%:
  3759.     Local i%
  3760.     
  3761.     dInit Localiz$:(26,lang%)
  3762.     dChoice nbplay%,Localiz$:(27,lang%),Localiz$:(28,lang%)
  3763.     If lang%=1
  3764.         dButtons Localiz$:(29,lang%),-(%e or $200),Localiz$:(30,lang%),%s or $200
  3765.     Elseif lang%=2
  3766.         dButtons Localiz$:(29,lang%),-(%q or $200),Localiz$:(30,lang%),%j or $200
  3767.     Else
  3768.         Rem CZ
  3769.         dButtons Localiz$:(29,lang%),-(%e or $200),Localiz$:(30,lang%),%s or $200
  3770.     Endif
  3771.     i%=Dialog
  3772.     If lang%=1
  3773.         If i%=%s
  3774.             i%=1
  3775.         Else
  3776.             i%=0
  3777.         Endif
  3778.     Elseif lang%=2
  3779.         If i%=%j
  3780.             i%=1
  3781.         Else
  3782.             i%=0
  3783.         Endif
  3784.     Else
  3785.         If i%=%s
  3786.             i%=1
  3787.         Else
  3788.             i%=0
  3789.         Endif
  3790.     Endif
  3791.     If i%=1
  3792.         If nbplay%=1
  3793.             visib%=2
  3794.         Else
  3795.             visib%=1
  3796.         Endif
  3797.         Return 1
  3798.     Else
  3799.         Return 0
  3800.     Endif
  3801. ENDP
  3802.  
  3803. PROC GetPlayers:
  3804.     Local v%,l%
  3805.  
  3806.     If level%=1
  3807.         l%=1
  3808.     Elseif level%=4
  3809.         l%=2
  3810.     Else
  3811.         l%=3
  3812.     Endif
  3813.     v%=Volume&+1
  3814.  
  3815.     Do
  3816.         If nbplay%=1
  3817.             dInit "I.D."
  3818.             dEdit Player1$,Localiz$:(31,lang%),15
  3819.             If nbplay%=1
  3820.                 dChoice l%,Localiz$:(32,lang%),Localiz$:(33,lang%)
  3821.                 dChoice visib%,Localiz$:(34,lang%),Localiz$:(35,lang%)
  3822.             Endif
  3823.             dChoice v%,Localiz$:(36,lang%),Localiz$:(37,lang%)
  3824.             dButtons "Ok",13 or $200
  3825.             Dialog
  3826.             Player2$=Computer$
  3827.         Else
  3828.             player2$=player2a$
  3829.             dInit "I.D.'s"
  3830.             dEdit Player1$,Localiz$:(38,lang%),15
  3831.             dEdit Player2$,Localiz$:(39,lang%),15
  3832.             dChoice v%,Localiz$:(36,lang%),Localiz$:(37,lang%)
  3833.             dButtons "Ok",13 or $200
  3834.             Dialog
  3835.         Endif
  3836.         If Player1$="" or Player2$=""
  3837.             dInit
  3838.             dText "",Localiz$:(40,lang%),2
  3839.             dButtons "Ok",13 or $200
  3840.             Dialog
  3841.         Endif
  3842.     Until Player1$<>"" and Player2$<>""
  3843.     If nbplay%=1
  3844.         computer$=player2$
  3845.     Else
  3846.         player2a$=player2$
  3847.     Endif
  3848.  
  3849.     Volume&=v%-1
  3850.     If l%=1
  3851.         level%=1
  3852.     Elseif l%=2
  3853.         level%=4
  3854.     Else
  3855.         level%=10
  3856.     Endif
  3857.     pause1%=anime%*15
  3858.  
  3859. ENDP
  3860.  
  3861. PROC CMDa%:
  3862.     About:
  3863. ENDP
  3864.  
  3865. PROC CMDp%:
  3866.     rem Preferences
  3867.     Local l%,v%,visibo%,i%,a%,langold%
  3868.     
  3869.     If level%=1
  3870.         l%=1
  3871.     Elseif level%=4
  3872.         l%=2
  3873.     Else
  3874.         l%=3
  3875.     Endif
  3876.     v%=Volume&+1
  3877.     visibo%=visib%
  3878.     langold%=lang%
  3879.     dInit "Preferences"
  3880.     If nbplay%=1
  3881.         dChoice l%,Localiz$:(32,lang%),Localiz$:(33,lang%)
  3882.         dChoice visib%,Localiz$:(34,lang%),Localiz$:(35,lang%)
  3883.         dChoice v%,Localiz$:(36,lang%),Localiz$:(37,lang%)
  3884.     Endif
  3885.     dChoice anime%,Localiz$:(42,lang%),Localiz$:(43,lang%)
  3886.     dChoice voiture%,Localiz$:(56,lang%),Localiz$:(57,lang%)
  3887.     dChoice lang%,Localiz$:(55,lang%),"English,Francais,CZ"
  3888.     dButtons "Ok",13 or $200
  3889.     Dialog
  3890.     If lang%<>langold%
  3891.         Unloadtb:
  3892.         TBarPlay:
  3893.         Reload:
  3894.     Endif
  3895.     Volume&=v%-1
  3896.     If l%=1
  3897.         level%=1
  3898.     Elseif l%=2
  3899.         level%=4
  3900.     Else
  3901.         level%=10
  3902.     Endif
  3903.     If visibo%<>visib% and outgame%=0
  3904.         rem on change l'aspect des cartes de l'adversaire...
  3905.         i%=1
  3906.         Do
  3907.             Affcarte:(2,Typecarte%:(main2%(i%)),i%)
  3908.             i%=i%+1
  3909.         Until i%=8
  3910.     Endif    
  3911.     pause1%=anime%*15
  3912. ENDP
  3913.  
  3914. PROC CMDe%:
  3915.     abort%=Abandon%:
  3916. ENDP
  3917. PROC CMDq%:
  3918.     CMDe%:
  3919. ENDP
  3920.  
  3921. PROC CMDh%:
  3922.     Hailpe:
  3923. ENDP
  3924.  
  3925. PROC CMDd%:
  3926.     Hailpe:
  3927. ENDP
  3928.  
  3929. PROC Abandon%:
  3930.     rem abandon de la partie...
  3931.     Local i%
  3932.         
  3933.     dInit Localiz$:(44,lang%)
  3934.     dText "",Localiz$:(45,lang%),2
  3935.     If lang%=1
  3936.         dBUTTONS Localiz$:(46,lang%),-(%n or $200),Localiz$:(47,lang%),%y or $200
  3937.     Elseif lang%=2
  3938.         dBUTTONS Localiz$:(46,lang%),-(%n or $200),Localiz$:(47,lang%),%o or $200
  3939.     Else
  3940.         Rem CZ
  3941.         dBUTTONS Localiz$:(46,lang%),-(%n or $200),Localiz$:(47,lang%),%y or $200
  3942.     Endif
  3943.     i%=Dialog
  3944.     Rem CZ
  3945.     If (lang%=1 and i%=%y) or (lang%=2 and i%=%o) or (lang%=3 and i%=%y)
  3946.         Deletespr:
  3947.         If outgame%=1
  3948.             force%=1
  3949.         Endif
  3950.         Return 1
  3951.     Else
  3952.         Return 0
  3953.     Endif
  3954. ENDP
  3955.  
  3956. PROC Deletespr:
  3957.     Onerr spr1err::
  3958.     SpriteDelete:(spr1&)
  3959. spr1err::
  3960.     Onerr off
  3961.     Onerr spr2err::
  3962.     SpriteDelete:(spr2&)
  3963. spr2err::
  3964.     Onerr off
  3965.     Onerr spr3err::
  3966.     SpriteDelete:(spr3&)
  3967. spr3err::
  3968.     Onerr off
  3969. ENDP
  3970.  
  3971. PROC WaitK:(window%)
  3972.     Local ok%
  3973.     
  3974.     ok%=0
  3975.     event&(1)=0
  3976.     Do
  3977.         GetEvent32 event&()
  3978.         If event&(1)=10000 Or event&(1)=4150
  3979.             Menu:
  3980.         Elseif event&(1)=&404
  3981.             If Left$(getcmd$,1)="X"
  3982.                 Stop
  3983.             Endif
  3984.         Elseif event&(1)=$401
  3985.             giPrint Localiz$:(6,lang%)
  3986.         Elseif event&(1)=$402
  3987.             rem rien
  3988.         Elseif event&(1)=10001
  3989.             rem "Cutpaste"
  3990.         Elseif event&(1)=10002
  3991.             rem "Infrared"
  3992.         Elseif event&(1)=10003
  3993.             rem "Zoom in"
  3994.         Elseif event&(1)=10004
  3995.             rem "Zoom out"
  3996.         Elseif event&(1)=&408
  3997.             If event&(3)=window%
  3998.                 ok%=1
  3999.             Endif
  4000.         Elseif (event&(1) and &400)=0
  4001.             ok%=1
  4002.         Endif
  4003.         TbarOffer%:(event&(3),event&(4),event&(6),event&(7))
  4004.         IOYield
  4005.         event&(1)=0:event&(3)=0:event&(4)=0:event&(6)=0:event&(7)=0
  4006.     Until ok%=1 or force%=1
  4007.     force%=0
  4008. ENDP
  4009.  
  4010. PROC Readini:
  4011.     
  4012.     IsIni:
  4013.     OnErr zut1::
  4014.     Open """"+Chemin$+"mbornes5.ini"+"""",A,p1$,p2$,p3$,le%,v&,ani%,l%,voi%
  4015.         player1$=A.p1$
  4016.         player2a$=A.p2$
  4017.         computer$=A.p3$
  4018.         level%=A.le%
  4019.         Volume&=A.v&
  4020.         anime%=A.ani%
  4021.         lang%=A.l%
  4022.         voiture%=A.voi%
  4023.     Close
  4024.     Return
  4025. zut1::
  4026.     OnErr Off
  4027.     Trap Delete Chemin$+"mbornes5.ini"
  4028.     IsIni:
  4029.     Readini:
  4030. ENDP
  4031.  
  4032. PROC Writeini:
  4033.  
  4034.     IsIni:
  4035.     Delete Chemin$+"mbornes5.ini"
  4036.     Create """"+Chemin$+"mbornes5.ini"+"""",A,p1$,p2$,p3$,le%,v&,ani%,l%,voi%
  4037.         A.p1$=player1$
  4038.         A.p2$=player2a$
  4039.         A.p3$=computer$
  4040.         A.le%=level%
  4041.         A.v&=Volume&
  4042.         A.ani%=anime%
  4043.         A.l%=lang%
  4044.         A.voi%=voiture%
  4045.         Append
  4046.     Close
  4047. ENDP
  4048.  
  4049. PROC IsIni:
  4050.  
  4051.     If Not Exist(Chemin$+"mbornes5.ini")
  4052.         Create """"+Chemin$+"mbornes5.ini"+"""",A,p1$,p2$,p3$,le%,v&,ani%,l%,voi%
  4053.             A.p1$=""
  4054.             A.p2$=""
  4055.             A.p3$="Psion Series5"
  4056.             A.le%=4
  4057.             A.v&=2
  4058.             A.ani%=2
  4059.             A.l%=1
  4060.             A.voi%=2
  4061.             Append
  4062.         Close
  4063.     Endif
  4064. ENDP
  4065.  
  4066. PROC Help:
  4067.  
  4068.     if lang%=1
  4069.         RunApp&:("Data",Chemin$+"help-uk.hlp","",0)
  4070.     elseif lang%=2
  4071.         RunApp&:("Data",Chemin$+"help-fr.hlp","",0)
  4072.     else
  4073.         Rem CZ
  4074.         RunApp&:("Data",Chemin$+"help-cz.hlp","",0)
  4075.     endif
  4076. ENDP
  4077.  
  4078. PROC Menu:
  4079.     Local i%,h$(6),a$(6)
  4080.  
  4081.     If lang%=1    
  4082.         h$="phaefd"
  4083.     Elseif lang%=2
  4084.         h$="pdaqfd"
  4085.     Else
  4086.         Rem CZ
  4087.         h$="phaefd"
  4088.     Endif
  4089.     mInit
  4090.     If lang%=1
  4091.         mCard "MBornes5",Localiz$:(41,lang%),%p,Localiz$:(59,lang%),%d,Localiz$:(49,lang%),-(%a),Localiz$:(50,lang%),-(%e),"PFM",%f
  4092.     Elseif lang%=2
  4093.         mCard "MBornes5",Localiz$:(41,lang%),%p,Localiz$:(59,lang%),%d,Localiz$:(49,lang%),-(%a),Localiz$:(50,lang%),-(%q),"PFM",%f
  4094.     Else
  4095.         mCard "MBornes5",Localiz$:(41,lang%),%p,Localiz$:(59,lang%),%d,Localiz$:(49,lang%),-(%a),Localiz$:(50,lang%),-(%e),"PFM",%f
  4096.     Endif
  4097.     i%=Menu
  4098.     If i% And (Loc(h$,Chr$(i%))<>0)
  4099.         a$="Menu"+Chr$(i%)
  4100.         @(a$):
  4101.     Endif
  4102. ENDP
  4103.  
  4104. PROC Menup:
  4105.     CMDp%:
  4106. ENDP
  4107.  
  4108. PROC Menud:
  4109.     Help:
  4110. ENDP
  4111.  
  4112. PROC Menua:
  4113.     About:
  4114. ENDP
  4115.  
  4116. PROC Menue:
  4117.     CMDe%:
  4118. ENDP
  4119. PROC Menuq:
  4120.     Menue:
  4121. ENDP
  4122.  
  4123. PROC Menuf:
  4124.     Pfm:
  4125. ENDP
  4126.  
  4127. PROC Unloadbit:
  4128.     gClose vide%
  4129.     gClose back%
  4130.     gClose decor1%
  4131.     gClose decor2%
  4132.     gClose decora%
  4133.     gClose decorb%
  4134.     gClose fore%
  4135.     Unloadtb:
  4136. ENDP
  4137.  
  4138. PROC Unloadtb:
  4139.     gClose tb1a&
  4140.     gClose tb1b&
  4141.     gClose tb2a&
  4142.     gClose tb2b&
  4143.     gClose tb3a&
  4144.     gClose tb3b&
  4145.     gClose tb4a&
  4146.     gClose tb4b&
  4147. ENDP
  4148.  
  4149. PROC Hailpe:
  4150.     Local shelp%
  4151.     
  4152.     If Outgame%=1
  4153.         Return
  4154.     Endif
  4155.     gUpdate Off
  4156.     shelp%=gCreate(35,25,640-71-75,240-50,0,$311)
  4157.     gAt 0,0
  4158.     gLineto 640-71-75-1,0
  4159.     gLineto 640-71-75-1,240-50-1
  4160.     gLineto 0,240-50-1
  4161.     gLineto 0,0
  4162.     
  4163.     gAt 10,10
  4164.     Aff:(5,1)
  4165.     gAt 10+30,10+50
  4166.     Aff:(14,1)
  4167.     gAt 10+30+30,10+50+50
  4168.     Aff:(9,1)
  4169.     
  4170.     gAt 110,10
  4171.     Aff:(4,1)
  4172.     gAt 110+30,10+50
  4173.     Aff:(13,1)
  4174.     gAt 110+30+30,10+50+50
  4175.     Aff:(8,1)
  4176.     
  4177.     gAt 210,10
  4178.     Aff:(3,1)
  4179.     gAt 210+30,10+50
  4180.     Aff:(12,1)
  4181.     gAt 210+30+30,10+50+50
  4182.     Aff:(7,1)
  4183.     
  4184.     gAt 310,10
  4185.     Aff:(2,1)
  4186.     gAt 310+30,10+50
  4187.     Aff:(11,1)
  4188.     gAt 400,10
  4189.     Aff:(1,1)
  4190.     gAt 400+30,10+50
  4191.     Aff:(10,1)
  4192.     gAt 386,10+50+50
  4193.     Aff:(6,1)
  4194.     gUpdate On
  4195.     gVisible On
  4196.     
  4197.     outgame%=1
  4198.     WaitK:(shelp%)
  4199.     outgame%=0
  4200.     gClose shelp%
  4201. ENDP
  4202.  
  4203. PROC Reload:
  4204.     Local i%,old%
  4205.     
  4206.     gClose back%
  4207.     Loadback:
  4208.     rem If visib%=1
  4209.         i%=1
  4210.         Do
  4211.             AffCarte:(1,typecarte%:(main1%(i%)),i%)
  4212.             i%=i%+1
  4213.         Until i%=8
  4214.     rem Endif
  4215.     If visib%=1
  4216.         i%=1
  4217.             Do
  4218.             AffCarte:(2,typecarte%:(main2%(i%)),i%)
  4219.             i%=i%+1
  4220.         Until i%=8
  4221.     Endif
  4222.     If joue1%<>0
  4223.         AffCarte:(3,joue1%,0)
  4224.     Endif
  4225.     If joue2%<>0
  4226.         AffCarte:(4,joue2%,0)
  4227.     Endif
  4228.     If limit1%<>0
  4229.         AffCarte:(7,limit1%,0)
  4230.     Endif
  4231.     If limit2%<>0
  4232.         AffCarte:(8,limit2%,0)
  4233.     Endif
  4234.     old%=posbotte1%
  4235.     i%=1
  4236.     Do
  4237.         If botte1%(i%)<>0
  4238.             posbotte1%=i%
  4239.             AffCarte:(5,botte1%(i%),i%)
  4240.         Endif
  4241.         i%=i%+1
  4242.     Until i%=5
  4243.     posbotte1%=old%
  4244.     old%=posbotte2%
  4245.     i%=1
  4246.     Do
  4247.         If botte2%(i%)<>0
  4248.             posbotte2%=i%
  4249.             AffCarte:(6,botte2%(i%),i%)
  4250.         Endif
  4251.         i%=i%+1
  4252.     Until i%=5
  4253.     posbotte2%=old%
  4254.     If defau%<>0
  4255.         AffCarte:(11,defau%,0)
  4256.     Endif    
  4257. ENDP
  4258.  
  4259. PROC Localiz$:(c%,l%)
  4260.     Local s$(100)
  4261.     
  4262.     If c%=1
  4263.         If l%=1
  4264.             s$="Loading..."
  4265.         Elseif l%=2
  4266.             s$="Chargement en cours..."
  4267.         Else
  4268.             s$="CZLoading..."
  4269.         Endif
  4270.     Elseif c%=2
  4271.         If l%=1
  4272.             s$=" wins this one!"
  4273.         Elseif l%=2
  4274.             s$=" gagne cette partie !"
  4275.         Else
  4276.             s$="CZ wins this one!"
  4277.         Endif
  4278.     Elseif c%=3
  4279.         If l%=1
  4280.             s$="Draw game... Try again for a winner!"
  4281.         Elseif l%=2
  4282.             s$="Egalit├⌐... Rejouez pour qu'il y ait un vainqueur !"
  4283.         Else
  4284.             s$="CZDraw game... Try again for a winner!"
  4285.         Endif
  4286.     Elseif c%=4
  4287.         If l%=1
  4288.             s$=", hit Ok before handing machine to "
  4289.         Elseif l%=2
  4290.             s$=", faites Ok avant de passer la machine ├á "
  4291.         Else
  4292.             s$="CZ, hit Ok before handing machine to "
  4293.         Endif
  4294.     Elseif c%=5
  4295.         If l%=1
  4296.             s$=", hit Ok to play..."
  4297.         Elseif l%=2
  4298.             s$=", faites Ok pour jouer..."
  4299.         Else
  4300.             s$="CZ, hit Ok to play..."
  4301.         Endif
  4302.     Elseif c%=6
  4303.         If l%=1
  4304.             s$="Welcome back!"
  4305.         Elseif l%=2
  4306.             s$="Vous voil├á de retour !"
  4307.         Else
  4308.             s$="CZWelcome back!"
  4309.         Endif
  4310.     Elseif c%=7
  4311.         If l%=1
  4312.             s$="Hand "
  4313.         Elseif l%=2
  4314.             s$="Manche "
  4315.         Else
  4316.             s$="CZHand "
  4317.         Endif
  4318.     Elseif c%=8
  4319.         If l%=1
  4320.             s$=" on 5"
  4321.         Elseif l%=2
  4322.             s$=" sur 5"
  4323.         Else
  4324.             s$="CZ on 5"
  4325.         Endif
  4326.     Elseif c%=9
  4327.         If l%=1
  4328.             s$="Brought forward"
  4329.         Elseif l%=2
  4330.             s$="Report"
  4331.         Else
  4332.             s$="CZBrought forward"
  4333.         Endif
  4334.     Elseif c%=10
  4335.         If l%=1
  4336.             s$="Milestones"
  4337.         Elseif l%=2
  4338.             s$="Bornes"
  4339.         Else
  4340.             s$="CZMilestones"
  4341.         Endif
  4342.     Elseif c%=11
  4343.         If l%=1
  4344.             s$="Safeties"
  4345.         Elseif l%=2
  4346.             s$="Bottes"
  4347.         Else
  4348.             s$="CZSafeties"
  4349.         Endif
  4350.     Elseif c%=12
  4351.         If l%=1
  4352.             s$="Coups fourr├⌐s"
  4353.         Elseif l%=2
  4354.             s$="Coups fourr├⌐s"
  4355.         Else
  4356.             s$="CZCoups fourr├⌐s"
  4357.         Endif
  4358.     Elseif c%=13
  4359.         If l%=1
  4360.             s$="All safeties"
  4361.         Elseif l%=2
  4362.             s$="Toutes les bottes"
  4363.         Else
  4364.             s$="CZAll safeties"
  4365.         Endif
  4366.     Elseif c%=14
  4367.         If l%=1
  4368.             s$="Trip completed"
  4369.         Elseif l%=2
  4370.             s$="Voyage effectu├⌐"
  4371.         Else
  4372.             s$="CZTrip completed"
  4373.         Endif
  4374.     Elseif c%=15
  4375.         If l%=1
  4376.             s$="Trip uncompleted"
  4377.         Elseif l%=2
  4378.             s$="Voyage incomplet"
  4379.         Else
  4380.             s$="CZTrip uncompleted"
  4381.         Endif
  4382.     Elseif c%=16
  4383.         If l%=1
  4384.             s$="Cool trip (no 200's)"
  4385.         Elseif l%=2
  4386.             s$="Voyage cool (pas de 200)"
  4387.         Else
  4388.             s$="CZCool trip (no 200's)"
  4389.         Endif
  4390.     Elseif c%=17
  4391.         If l%=1
  4392.             s$="Total"
  4393.         Elseif l%=2
  4394.             s$="Total"
  4395.         Else
  4396.             s$="CZTotal"
  4397.         Endif
  4398.     Elseif c%=18
  4399.         If l%=1
  4400.             s$="Combined total"
  4401.         Elseif l%=2
  4402.             s$="Total combin├⌐"
  4403.         Else
  4404.             s$="CZCombined total"
  4405.         Endif
  4406.     Elseif c%=19
  4407.         If l%=1
  4408.             s$=" starts playing"
  4409.         Elseif l%=2
  4410.             s$=" commence cette partie"
  4411.         Else
  4412.             s$="CZ starts playing"
  4413.         Endif
  4414.     Elseif c%=20
  4415.         If l%=1
  4416.             s$="Freeware by Frederic Botton"
  4417.         Elseif l%=2
  4418.             s$="Un Freeware par Frederic Botton"
  4419.         Else
  4420.             s$="CZFreeware by Frederic Botton"
  4421.         Endif
  4422.     Elseif c%=21
  4423.         If l%=1
  4424.             s$="Support the Psion Freeware Movement!"
  4425.         Elseif l%=2
  4426.             s$="Supportez le Psion Freeware Movement !"
  4427.         Else
  4428.             s$="CZSupport the Psion Freeware Movement!"
  4429.         Endif
  4430.     Elseif c%=22
  4431.         If l%=1
  4432.             s$="The Psion Freeware Movement (PFM) has been"
  4433.         Elseif l%=2
  4434.             s$="Le Psion Freeware Movement (PFM) a ete"
  4435.         Else
  4436.             s$="CZThe Psion Freeware Movement (PFM) has been"
  4437.         Endif
  4438.     Elseif c%=23
  4439.         If l%=1
  4440.             s$="formed to encourage Psion programmers to"
  4441.         Elseif l%=2
  4442.             s$="mis en place pour encourager les d├⌐veloppeurs"
  4443.         Else
  4444.             s$="CZformed to encourage Psion programmers to"
  4445.         Endif
  4446.     Elseif c%=24
  4447.         If l%=1
  4448.             s$="release their software as Freeware."
  4449.         Elseif l%=2
  4450.             s$="├á distribuer leurs logiciels en Freeware."
  4451.         Else
  4452.             s$="CZrelease their software as Freeware."
  4453.         Endif
  4454.     Elseif c%=25
  4455.         If l%=1
  4456.             s$="For info about PFM, launched by Adam Dawes, visit"
  4457.         Elseif l%=2
  4458.             s$="Pour plus d'infos, visitez le site d'Adam Dawes"
  4459.         Else
  4460.             s$="CZFor info about PFM, launched by Adam Dawes, visit"
  4461.         Endif
  4462.     Elseif c%=26
  4463.         If l%=1
  4464.             s$="Starting a new game"
  4465.         Elseif l%=2
  4466.             s$="Nouvelle partie"
  4467.         Else
  4468.             s$="CZStarting a new game"
  4469.         Endif
  4470.     Elseif c%=27
  4471.         If l%=1
  4472.             s$="Type of game"
  4473.         Elseif l%=2
  4474.             s$="Type de jeu"
  4475.         Else
  4476.             s$="CZType of game"
  4477.         Endif
  4478.     Elseif c%=28
  4479.         If l%=1
  4480.             s$="Against Psion,2 human opponents"
  4481.         Elseif l%=2
  4482.             s$="Contre le Psion,2 adversaires humains"
  4483.         Else
  4484.             s$="CZAgainst Psion,2 human opponents"
  4485.         Endif
  4486.     Elseif c%=29
  4487.         If l%=1
  4488.             s$="Exit MBornes5"
  4489.         Elseif l%=2
  4490.             s$="Quitter MBornes5"
  4491.         Else
  4492.             s$="CZExit MBornes5"
  4493.         Endif
  4494.     Elseif c%=30
  4495.         If l%=1
  4496.             s$="Start game"
  4497.         Elseif l%=2
  4498.             s$="Jouer"
  4499.         Else
  4500.             s$="CZStart game"
  4501.         Endif
  4502.     Elseif c%=31
  4503.         If l%=1
  4504.             s$="Enter your name"
  4505.         Elseif l%=2
  4506.             s$="Saisissez votre nom"
  4507.         Else
  4508.             s$="CZEnter your name"
  4509.         Endif
  4510.     Elseif c%=32
  4511.         If l%=1
  4512.             s$="Level"
  4513.         Elseif l%=2
  4514.             s$="Niveau"
  4515.         Else
  4516.             s$="CZLevel"
  4517.         Endif
  4518.     Elseif c%=33
  4519.         If l%=1
  4520.             s$="Easy,Normal,Hard"
  4521.         Elseif l%=2
  4522.             s$="Facile,Normal,Difficile"
  4523.         Else
  4524.             s$="CZEasy,Normal,Hard"
  4525.         Endif
  4526.     Elseif c%=34
  4527.         If l%=1
  4528.             s$="Opponent hand is visible"
  4529.         Elseif l%=2
  4530.             s$="Main de l'adversaire visible"
  4531.         Else
  4532.             s$="CZOpponent hand is visible"
  4533.         Endif
  4534.     Elseif c%=35
  4535.         If l%=1
  4536.             s$="Yes,No"
  4537.         Elseif l%=2
  4538.             s$="Oui,Non"
  4539.         Else
  4540.             s$="CZYes,No"
  4541.         Endif
  4542.     Elseif c%=36
  4543.         If l%=1
  4544.             s$="Sound volume"
  4545.         Elseif l%=2
  4546.             s$="Volume du son"
  4547.         Else
  4548.             s$="CZSound volume"
  4549.         Endif
  4550.     Elseif c%=37
  4551.         If l%=1
  4552.             s$="Silence,Low,High,Maximum"
  4553.         Elseif l%=2
  4554.             s$="Silence,Faible,Fort,Maximum"
  4555.         Else
  4556.             s$="CZSilence,Low,High,Maximum"
  4557.         Endif
  4558.     Elseif c%=38
  4559.         If l%=1
  4560.             s$="Player 1, enter your name"
  4561.         Elseif l%=2
  4562.             s$="Joueur 1, saisissez votre nom"
  4563.         Else
  4564.             s$="CZPlayer 1, enter your name"
  4565.         Endif
  4566.     Elseif c%=39
  4567.         If l%=1
  4568.             s$="Player 2, enter your name"
  4569.         Elseif l%=2
  4570.             s$="Joueur 2, saisissez votre nom"
  4571.         Else
  4572.             s$="CZPlayer 2, enter your name"
  4573.         Endif
  4574.     Elseif c%=40
  4575.         If l%=1
  4576.             s$="Names must contain at least one letter"
  4577.         Elseif l%=2
  4578.             s$="Les noms doivent contenir au moins une lettre"
  4579.         Else
  4580.             s$="CZNames must contain at least one letter"
  4581.         Endif
  4582.     Elseif c%=41
  4583.         If l%=1
  4584.             s$="Preferences"
  4585.         Elseif l%=2
  4586.             s$="Pr├⌐f├⌐rences"
  4587.         Else
  4588.             s$="CZPreferences"
  4589.         Endif
  4590.     Elseif c%=42
  4591.         If l%=1
  4592.             s$="Cards animation"
  4593.         Elseif l%=2
  4594.             s$="Animation cartes"
  4595.         Else
  4596.             s$="CZCards animation"
  4597.         Endif
  4598.     Elseif c%=43
  4599.         If l%=1
  4600.             s$="Repeated once,Repeated twice,Repeated thrice"
  4601.         Elseif l%=2
  4602.             s$="R├⌐p├⌐t├⌐e une fois,R├⌐p├⌐t├⌐e deux fois,R├⌐p├⌐t├⌐e trois fois"
  4603.         Else
  4604.             s$="CZRepeated once,Repeated twice,Repeated thrice"
  4605.         Endif
  4606.     Elseif c%=44
  4607.         If l%=1
  4608.             s$="Abandon"
  4609.         Elseif l%=2
  4610.             s$="Abandonner"
  4611.         Else
  4612.             s$="CZAbandon"
  4613.         Endif
  4614.     Elseif c%=45
  4615.         If l%=1
  4616.             s$="Really wanna give up current game?"
  4617.         Elseif l%=2
  4618.             s$="Voulez-vous vraiment arr├¬ter la partie en cours ?"
  4619.         Else
  4620.             s$="CZReally wanna give up current game?"
  4621.         Endif
  4622.     Elseif c%=46
  4623.         If l%=1
  4624.             s$="No"
  4625.         Elseif l%=2
  4626.             s$="Non"
  4627.         Else
  4628.             s$="CZNo"
  4629.         Endif
  4630.     Elseif c%=47
  4631.         If l%=1
  4632.             s$="Yes"
  4633.         Elseif l%=2
  4634.             s$="Oui"
  4635.         Else
  4636.             s$="CZYes"
  4637.         Endif
  4638.     Elseif c%=48
  4639.         If l%=1
  4640.             s$="quick Help"
  4641.         Elseif l%=2
  4642.             s$="aiDe rapide"
  4643.         Else
  4644.             s$="CZquick Help"
  4645.         Endif
  4646.     Elseif c%=49
  4647.         If l%=1
  4648.             s$="About"
  4649.         Elseif l%=2
  4650.             s$="A propos"
  4651.         Else
  4652.             s$="CZAbout"
  4653.         Endif
  4654.     Elseif c%=50
  4655.         If l%=1
  4656.             s$="Exit"
  4657.         Elseif l%=2
  4658.             s$="Quitter"
  4659.         Else
  4660.             s$="CZExit"
  4661.         Endif
  4662.     Elseif c%=51
  4663.         If l%=1
  4664.             s$="About"
  4665.         Elseif l%=2
  4666.             s$="A"+Chr$(10)+"propos"
  4667.         Else
  4668.             s$="CZAbout"
  4669.         Endif
  4670.     Elseif c%=52
  4671.         If l%=1
  4672.             s$="Prefs"
  4673.         Elseif l%=2
  4674.             s$="Pr├⌐fs"
  4675.         Else
  4676.             s$="CZPrefs"
  4677.         Endif
  4678.     Elseif c%=53
  4679.         If l%=1
  4680.             s$="Exit"
  4681.         Elseif l%=2
  4682.             s$="Quitter"
  4683.         Else
  4684.             s$="CZExit"
  4685.         Endif
  4686.     Elseif c%=54
  4687.         If l%=1
  4688.             s$="quick"+Chr$(10)+"Help"
  4689.         Elseif l%=2
  4690.             s$="aiDe"+Chr$(10)+"rapide"
  4691.         Else
  4692.             s$="CZquick"+Chr$(10)+"Help"
  4693.         Endif
  4694.     Elseif c%=55
  4695.         If l%=1
  4696.             s$="Language"
  4697.         Elseif l%=2
  4698.             s$="Langue"
  4699.         Else
  4700.             s$="CZLanguage"
  4701.         Endif
  4702.     Elseif c%=56
  4703.         If l%=1
  4704.             s$="Car animation"
  4705.         Elseif l%=2
  4706.             s$="Animation voiture"
  4707.         Else
  4708.             s$="CZCar animation"
  4709.         Endif
  4710.     Elseif c%=57
  4711.         If l%=1
  4712.             s$="Slow,Normal,Fast"
  4713.         Elseif l%=2
  4714.             s$="Lente,Normale,Rapide"
  4715.         Else
  4716.             s$="CZSlow,Normal,Fast"
  4717.         Endif
  4718.     Elseif c%=58
  4719.         If l%=1
  4720.             s$="Batteries too low for sounds!"
  4721.         Elseif l%=2
  4722.             s$="Piles trop faibles pour du son !"
  4723.         Else
  4724.             s$="CZBatteries too low for sounds!"
  4725.         Endif
  4726.     Elseif c%=59
  4727.         If l%=1
  4728.             s$="Detailed helpfile"
  4729.         Elseif l%=2
  4730.             s$="fichier d'aide D├⌐taill├⌐e"
  4731.         Else
  4732.             s$="CZDetailed helpfile"
  4733.         Endif
  4734.     Endif
  4735.     Return s$
  4736. ENDP
  4737.  
  4738. PROC Affvoit:(player%,km%,coul%,anime%)
  4739.     Local x1%,y1%,i%,j%,step%
  4740.  
  4741.     rem Animation ? 1=lent 2=moyen 3=pas d'anim...
  4742.  
  4743.     If anime%=1
  4744.         step%=1
  4745.     Elseif anime%=2
  4746.         step%=3
  4747.     Else
  4748.         step%=9
  4749.     Endif
  4750.     If player%=1
  4751.         i%=((km%-km1old%)/25)*9
  4752.     Else
  4753.         i%=((km%-km2old%)/25)*9
  4754.     Endif
  4755.     
  4756.     If i%=0
  4757.         return
  4758.     Endif
  4759.     
  4760.     j%=0
  4761.     Do
  4762.         gUse fore%
  4763.         If player%=1
  4764.             gAt 79+((km1old%/25)*9)+j%,202
  4765.         Else
  4766.             gAt 79+((km2old%/25)*9)+j%,213
  4767.         Endif
  4768.         gCopy back%,433,164,19,10,3
  4769.         
  4770.         j%=j%+step%
  4771.         
  4772.         gUse fore%
  4773.         If player%=1
  4774.             gAt 79+((km1old%/25)*9)+j%,202
  4775.         Else
  4776.             gAt 79+((km2old%/25)*9)+j%,213
  4777.         Endif
  4778.         y1%=164
  4779.         If coul%=0
  4780.             x1%=433
  4781.         Elseif coul%=1
  4782.             x1%=381
  4783.         Else
  4784.             x1%=407
  4785.         Endif
  4786.         gCopy back%,x1%,y1%,19,10,3
  4787.         
  4788.         IOYield
  4789.     Until i%=j%
  4790.     If player%=1
  4791.         km1old%=km1%
  4792.     Else
  4793.         km2old%=km2%
  4794.     Endif
  4795.     
  4796. ENDP
  4797.  
  4798. PROC Goal:
  4799.     Local i%,p%
  4800.     
  4801.     JoueSon:(9,0)
  4802.     p%=1
  4803.     i%=0
  4804.     Do
  4805.         gUse fore%
  4806.         gAt 458,194
  4807.         gCopy back%,561,27,45,30,3
  4808.         Pause p%
  4809.         gAt 458,194
  4810.         gCopy back%,561,60,45,30,3
  4811.         Pause p%
  4812.         gAt 458,194
  4813.         gCopy back%,495,86,45,30,3
  4814.         Pause p%
  4815.         gAt 458,194
  4816.         gCopy back%,544,93,45,30,3
  4817.         Pause p%
  4818.         gAt 458,194
  4819.         gCopy back%,593,93,45,30,3
  4820.         Pause p%
  4821.         gAt 458,194
  4822.         gCopy back%,495,127,45,30,3
  4823.         Pause p%
  4824.         gAt 458,194
  4825.         gCopy back%,544,127,45,30,3
  4826.         Pause p%
  4827.         gAt 458,194
  4828.         gCopy back%,593,127,45,30,3
  4829.         Pause p%
  4830.         gAt 458,194
  4831.         gCopy back%,495,160,45,30,3
  4832.         Pause p%
  4833.         gAt 458,194
  4834.         gCopy back%,544,160,45,30,3
  4835.         Pause p%
  4836.         gAt 458,194
  4837.         gCopy back%,593,160,45,30,3
  4838.         Pause p%
  4839.         gAt 458,194
  4840.         gCopy back%,495,193,45,30,3
  4841.         Pause p%
  4842.         gAt 458,194
  4843.         gCopy back%,544,193,45,30,3
  4844.         Pause p%
  4845.         gAt 458,194
  4846.         gCopy back%,593,193,45,30,3
  4847.         Pause p%
  4848.         gAt 458,194
  4849.         gCopy back%,446,193,45,30,3
  4850.         Pause p%
  4851.         i%=i%+1
  4852.     Until i%=3
  4853.     gAt 458,194
  4854.     gCopy back%,561,27,45,30,3
  4855.  
  4856. ENDP
  4857.  
  4858. PROC debilos:
  4859. ENDP
  4860.  
  4861.  
  4862.  
  4863.