to ! :&obj :&p [:&h "parent] [:objet ifelse list? :&obj [(listeversmot :&obj "_)][:&obj]]~ [:&v (rproph :objet ifelse listp :&p [first :&p][:&p] :&h)][:&qui :&qui] si liste? :&obj [pourtous [ftortue ? ! ? :&p] :&obj stop] if emptyp :&v [sisinon liste? :&p [.maybeoutput run :&p][op []]] if wordp :&v[op :&v] if "# = first :&v [ ifelse listp :&p ~ [.maybeoutput run fput char 40 fput last :&v lput char 41 bf :&p ]~ [.maybeoutput run bf :&v]] op :&v end to !o :& .maybeoutput ! :objet :& end to !s :&obj :classe :&p [:&h "parent]~ [:objet ifelse list? :&obj [(listeversmot :&obj "_)][:&obj]]~ [:&par :classe ] [:&v (rproph :&par ifelse listp :&p [first :&p][:&p] :&h)] if emptyp :&v [ifelse list? :&p [.maybeoutput apply first :&p bf :&p ][op []]] if wordp :&v[op :&v] if "# = first :&v [ ifelse listp :&p ~ [.maybeoutput run fput char 40 fput last :&v lput char 41 bf :&p ]~ [.maybeoutput run bf :&v]] op :&v end to !tous :&l :&mess si mot? :&l[make "&l (list :&l)] pourtous [! ? :&mess ]:&l end to # op :template.number end to $ :&&% :n :&% op word :&&% word char :n :&% end to &acc :x for[i 224 252] [if memberp char :i :x[op "true]] op "false end to &acc2 :x for[i 224 252] [if subsngp char :i :x[op "true]] op "false end to &accel :& if emptyp :& [op 0] ifelse numberp :& [op :&][op run :&] end to &add ifelse " = :&mot [][make "& lput :&mot :& make "&mot " ] end to &animer local "anim make "anim comboboxgettext "cbanim ifelse not emptyp :anim~ [make "anim first :anim ifelse not namep :anim~ [messagebox[Animation] se :anim [n'existe pas] ]~ [(pr "\( "anime.joue word ": :anim "\) ) (anime.joue chose :anim) ]][pr "anime.joue anime.joue] end to &avert catch "error [messagebox "Avertissement (se [Un bug dans la version actuelle de MSWLOGO provoque un message ] ~ [LOGO16 ERROR] [lors du chargement de certaines images.] char 13 car 13 ~ [Dans ce cas: appuyer 3 fois sur "Ignore".])] end TO &cible END to &corps [:&%l ll][:&l []] until [memberp first :&%l [fin end]] [make "&l lput :&%l :&l if eofp [op :&l] make "&%l ll ] op :&l end TO &croix :& [:&p posxyz ][:pen pen] li sisinon clavier = 90[ fz dernier mousepos][fpos mousepos] av 5 ic re 10 li av 5 dr 90 av 5 ic re 10 li fposxyz :&p setpen :pen END to &init make "&nouveau "true make "&avert "true copydef "soit "localmake pprop "objet "fval [# objet.fval] pprop "objet "methode [# objet.methode] pprop "objet "ajoute [# objet.ajoute] pprop "objet "cree [# objet.cree] donne "ecran.taille activearea ( ecran.fsecu convsel [-500 -500 500 500]) donne "&mswlogoscreen (ph 0 0 ecran.resolutionx ecran.resolutiony - 22) donne "&Commander ( liste 2 ecran.resolutiony - 222 ecran.resolutionx - 24 172) fixe "tortue "couleur 0 fixe "tortue "bidon 0 FTORTUE "0 CRAYON.FCOULEUR 0 BIDON.FCOULEUR 0 DONNE "&3D "FALSE donne "&ctrl "false DONNE "&MAJ "FALSE donne "&ecran.plein "true ! "tortue [crée "t_1 -1] ! "tortue [crée "t_2 -2] ! "tortue [crée "t_3 -3] ! "t_1 [crée "oeil ] ! "t_2 [crée "regard] ! "t_3 [crée "lampe] fixe "t_1 "nom "oeil fixe "t_2 "nom "regard fixe "t_3 "nom "lampe fixe "facette "hauteur 30 multitortues outils unbury [[] [lpos lrotdist lcapdist startup]] er [[] [startup]] donne "&pileevclavier [] fclavier [edition.touches1] [edition.touches2] copydef "taillecrayon "crayon.taille copydef "ftaillecrayon "crayon.ftaille copydef "pà "ftortue if existp "config.lgo[save "c:\\null erasefile "C:\\null load "Config.lgo &config] vt pr version buryall end to &llig [:&l ll] while [char 126 = last :&l ][make "&l se :&l ll] op :&l end TO &objet3d catch "error :&obj3d soit "&er error si non vide? :&er [donne "&error :&er donne "&observe "faux messagebox [Erreur objet 3d ]~ `[une erreur s'est produite dans ,[:&obj3d] ,[car 13 ]l'objet est supprimé.] ~ efobjet3d ] END to &parse [:&l ll ] if eofp [stop] if :&l = [] [&parse stop] if "\; = first :&l[&parse stop] if memberp first :&l [to pour] [define first bf :&l fput &supp: bf bf :&l &corps] &parse end to &part :& [:p1[]][:p2[]] localmake "r bf :& make "& first :& repeat count :r [ localmake "&x first :r ~ ifelse beforep :&x :& [make "p1 lput :&x :p1][make "p2 lput :&x :p2] ~ make "r bf :r] op list :p1 :p2 end TO &prtraj (pr "\( "film.ftrajet quoted :&film quoted anime.nom "\) ) END to &supanim localmake "anim comboboxgettext "cbanim if not emptyp :anim~ [ make "anim first :anim if yesnobox [Animation] (se "Supprimer :anim "?) ~ [ repete compte :&animations [comboboxdeletestring "cbanim 0 ] anime.supprime :anim attends 5 ~ pourtous [comboboxaddstring "cbanim ?] :&animations er list [] (list :anim) ] ] (pr "anime.supprime quoted :anim) end to &supp: :&l if :&l = [] [op []] ifelse listp first :&l [op fput( fput bf first first :&l bf first :&l ) &supp: bf :&l]~ [op fput bf first :&l &supp: bf :&L] end to &supprime :& [:type gprop :& "type][:activep gprop :& "active] if :activep = [] [stop] desactive :& if emptyp :type [stop] apply word :type "delete ( list :&) end to &tnouv :& si :&mess [si boiteouinon [Nouvelle tortue] `[Créer la tortue ,[:&] ?][tortue.nouvelle ?] stop] tortue.nouvelle ? end to &tradprim if emptyp comboboxgettext "cbwprim [comboboxsettext "cbwprim COMBOBOXGETTEXT "WCBTRAD] if not emptyp comboboxgettext "cbwprim [ COMBOBOXSETTEXT "WCBTRAD ~ ifelse radiobuttonget "chkprimfr ~ [gprop "&en first comboboxgettext "cbwprim ]~ [ gprop "&fr first comboboxgettext "cbwprim ]] end to &videoboxjoue (pr "|( video.joue | video.pos "|)| ) video.joue staticupdate "statvidpos video.pos end to .aurevoir if yesnobox "Quitter ~ (se [Vous avez ] $ "peut- 234 "tre [choisi Quitter par erreur.]~ $ " 13 " [Voulez-vous revenir ] $ " 224 " [LOGO ?]) [stop] if not ( [[][][]] = contents)[if yesnobox [Quitter][Sauver votre travail avant de quitter ?]~ [donne "&pileevsouris [] donne "&pileevclavier[] sauvepage]] fzoneactive :ecran.taille bye end TO .version op version END TO 2d si :&3d [efsouris] donne "&3d "faux enroule END TO 2d? ra non :&3d END TO 3d si non :&3d [fsouris [][][donne "&3dtort qui donne "&observe "vrai]~ [ftortue :&3dtort donne "&observe "faux][si :&observe [observe]]] donne "&observe "faux donne "&3d "vrai donne "&distobs 600 perspective vg END TO 3d? ra :&3d END TO ?? :& op rprop ? :& END to ?rest [:which 1] output bf item :which :template.lists end to ` :backq.list if emptyp :backq.list [op []] if equalp first :backq.list ", ~ [op fput run first bf :backq.list ` bf bf :backq.list] if equalp first :backq.list ",@ ~ [op se run first bf :backq.list ` bf bf :backq.list] if wordp first :backq.list [op fput first :backq.list ` bf :backq.list] op fput ` first :backq.list ` bf :backq.list end to aaa ; ; This example gives you an idea of how 3D space looks. ; ; Note also that the object is not moving. Your view onto ; 3D space is what is moving. ; perspective cs ht ; "Fly" the EYE turtle in an ARC around the object and axis setturtle -1 ; Now fly at an altitude of 600 feet ; Do *NOT* remove safety belts, *ALL* flights are non smoking. sety 600 setturtle 0 ; Keep flying repeat 72 ~ [ ; Now fly at a gentle arc aorund object ; Always looking at turtle -2 (which is still at home by default) setturtle -1 ; Level out for ARC (we are still pointing +Y axis) lt 90 rr 90 arc2 5 1000 ; Restore to pointing +Y axis because turtle -1 also effects which end is "UP" lr 90 rt 90 setturtle 0 ; Clear screen will not reset turtle -1 or -2 (PERSPECTIVE will though) cs ; Draw the 2 objects always in the same place cube axis wait 10 ] end to abs :x op ifelse :x >0 [:x] [- :x] end to active :& pprop :& "active "true bury (list [][] (list :&)) end to activep :& [:mess "true][:active ( "true = gprop :& "active)] if and :mess :active ~ [messagebox "Message se (list "La word word "fen char 234 "tre :& )[ est ouverte] op :active] op :active end to adbase :nom :data [:rubriques bf rprop :nom "rubr][:obj first :data][:val bf :data] repeat count :val [dprop :obj first :rubriques first :val make "rubriques bf :rubriques~ make "val bf :val] push :nom :obj end to af :&com :& (show :&com :&) op :& end TO aff donne "&aff "true END POUR AFVIES [:p pos] FSELECTION :CADRE IMAGE.COUPE ETIQUETTE :VIES lc fpos :p END pour aidelogo execute :aide.mess end TO aj :source :dest [:txt listboxgetselect :source] if listp :txt[make "txt first :txt] make "source word "& bf bf bf :source if not memberp :txt thing :source[listboxaddstring :dest :txt push :source :txt] END to ajbuff make "edtext comboboxgettext "cmbbuff comboboxaddstring "cmbbuff :edtext comboboxsettext "cmbbuff :edtext make "&pilemem lput :edtext :&pilemem end to ajourcoul [:r scrollbarget "scrcoulR ][:v scrollbarget "scrcoulV ][:b scrollbarget "scrcoulB ] staticupdate "statcoulBval scrollbarget "scrcoulB staticupdate "statcoulVval scrollbarget "scrcoulV staticupdate "statcoulRval scrollbarget "scrcoulR setfloodcolor coulrgb :r :v :b bitblock 30 30 end to ajourdynval :nom [:wn rprop :nom "fen] staticupdate word "stat.vxVal :wn form gprop :nom "vx0 5 2 staticupdate word "stat.vyVal :wn form gprop :nom "vy0 5 2 staticupdate word "stat.axVal :wn form valacc gprop :nom "ax0 5 2 staticupdate word "stat.ayVal :wn form valacc gprop :nom "ay0 5 2 staticupdate word "stat.vdirVal :wn form gprop :nom "vd 5 2 staticupdate word "stat.vintVal :wn form gprop :nom "vi 5 2 staticupdate word "stat.posVal :wn gprop :nom "pos0 end to ajourimage if ( activep "images "false) ~ [if bitindex = first item ( scrollbarget "scrim ) :&pilemem [ staticupdate "imageboxstatrect :rect ]] end to ajourlistimages setbitindex :index staticupdate "imageboxstatvalm form bitindex 5 0 staticupdate "imageboxstatrect image.rect make "edtext comboboxgettext "cmbbuff staticupdate "imageboxstatimnom nomimage bitindex scrollset bitindex end pour ajourvitesse fpos :pos.v SI NON :&MAJ [donne "vi distance mousepos] si non :&ctrl [donne "vd 450 - vers mousepos ~ si :vd > 360 [donne "vd :vd - 360]] fcap 450 - :vd si ( abs (reste round (450 - :vd ) 360 ) - vers mousepos ) > 90 [donne "vi -:vi] av :vi donne "&cb1 form ifelse :&pol [:vd] [:vi * cos :vd] 5 2 donne "&cb2 form ifelse :&pol [:vi] [:vi * sin :vd] 5 2 comboboxsettext word "comb.vx0Val rprop :&nom "fen :&cb1 comboboxsettext word "comb.vy0Val rprop :&nom "fen :&cb2 end TO ajoute :& :l ra sisinon membre :& :l [:&][md :& :l] END TO ajoutedernier :& :&l op ifelse memberp :& :&l [:&l][lput :& :&l] END TO ajoutepremier :& :&l op ifelse memberp :& :&l [:&l][fput :& :&l] END TO ajprop :&o :&p :&v[:&prop rprop :&o :&p] if emptyp :&v [stop] ; if listp :&v [ajprop :&o :&p first :&v ajprop :&o :&p bf :&v stop] if wordp :&prop[make "&prop (list :&prop)] if memberp :&v :&prop [stop] pprop :&o :&p lput :&v :&prop END TO ajproph :&o :&p :&v[:&prop rproph :&o :&p] if emptyp :&v [stop] if listp :&v [ajprop :&o :&p first :&v ajprop :&o :&p bf :&v stop] if wordp :&prop[make "&prop (list :&prop)] if memberp :&v :&prop [stop] pprop :&o :&p lput :&v :&prop END TO ajprops :&o :&p :&v[:&prop rprop :&o :&p] if emptyp :&v [stop] ajprop :&o :&p first :&v ajprops :&o :&p bf :&v END TO ajusteimage [ :masque ifelse :&mode < 10 [-1][bitindex + 1]][:rect selection][:index 1022][:inter 1023][:oldind bitindex][:pos pos][:pen pen] lc setbitindex :oldind fpos [-500 500] (image.colle :masque image.rect :oldind :inter "false) setbitindex :index image.copie bitfit rectl :rect recth :rect (image.colle :masque ( image.rect :inter ) :inter :inter "false) fimagerect :rect setpen :pen setpos :pos END to ancêtres :n [:parent rprop :n "parent] if "objet = :parent [op [objet]] if emptyp :parent [op []] op fput :parent ancêtres :parent end to and [:X] 2 OP APPLY "AND2 MAP [MEMBERP ? [TRUE VRAI]] :X end TO anime[:l :&lanime] [:pen pen] donne "&lanimeact :l lc fpos premier :l setpen :pen settimer 1 100 [locale "p if emptyp :&lanimeact [cleartimer 1 stop ] donne "p pop "&lanimeact~ if not (:p = pos) [fpos :p]] END to anime.active si clavier = 17 [donne "&ctrl "vrai] si et :&ctrl clavier = 86 [ec "image.colle image.colle] si et :&ctrl clavier = 67 [ec "image.copie image.copie] si et :&ctrl clavier = 88 [ec "image.coupe image.coupe] si et :&ctrl clavier = 90 [ec "image.annule image.annule] si et :&mode = 10 clavier = 226[sisinon :&film.stop[IMAGE.SECU film.boucle][film.stop]] si et :&mode = 10 clavier = 32[IMAGE.SECU film.af pr "film.af] si et :&mode = 10 clavier = 9 [IMAGE.SECU film.suite (pr "film.suite)] si clavier = 65 [ fanime] si clavier = 84 [couleurs] si clavier = 80 [pr "peins peins] si clavier = 83 [pr "image.secu image.secu] si clavier = 89 [pr "selectionne selectionne] si clavier = 90 [pr "image.annule image.annule] si clavier =70 [ windowcreate "main "well "Formes 260 55 50 50[]~ buttoncreate "well "btelq "X 0 0 10 10 [windowdelete "well] ~ buttoncreate "well "btel "Ellipse 5 10 35 10 [pr "image.ellipse image.ellipse setfocus[Mswlogo Screen]]~ buttoncreate "well "btrect "Rectangle 5 20 35 10 [pr "image.rectangle image.rectangle setfocus[Mswlogo Screen] ] ] si clavier = 191 [sisinon visible?[ct][mt]] si et clavier > 47 clavier < 58[ftortue clavier - 48 (pr "ftortue clavier - 48) ] si clavier =69 [ image.edition pr "image.edition] si clavier = 78 [pr [image.secu nettoie ] image.secu nettoie ] si clavier = 71 [ ifelse "penup = first pen [gc pu pr [bg li]][pr "bg gc] ] si clavier = 67 [ ifelse "penup = first pen [ bc pu pr [bc li]][pr "bc bc] ] si clavier =73 [ ifelse "penup = first pen [ ic pu pr [ic li]][pr "ic ic ]] si clavier = 27 [sisinon :&ecran.plein~ [unicon[commander ] unicon[outils] donne "&ecran.plein "false setfocus [Mswlogo Screen]] ~ [icon[commander ] icon[outils] donne "&ecran.plein "true setfocus [Mswlogo Screen]]] end to anime.cbnomme localmake "&&anim comboboxgettext "cbanim ifelse emptyp :&&anim[stop] [make "&&anim first :&&anim] if memberp :&&anim item 2 buried [messagebox "erreur ~ se :&&anim [est un nom utilisé par le système] stop] ifelse memberp :&&anim :&animations [comboboxsettext "cbanim :&&anim ] ~ [comboboxaddstring "cbanim :&&anim comboboxsettext "cbanim :&&anim ] anime.nomme :&&anim (pr "anime.nomme quoted :&&anim) end to anime.desactive si clavier = 17 [donne "&ctrl "faux] si clavier = 65 [efanime] end TO anime.init donne "&lanime [] END TO anime.joue[:l :&lanime] [:tortue tortue][:pen pen] if emptyp :l[(ec char 59 [Pas d'animation] )stop] donne "&joue "vrai donne "&lanimeact :l ftortue :tortue li fpos premier :l setpen :pen settimer 17 300 [if emptyp :&lanimeact [cleartimer 17 donne "&joue "faux stop ] ~ ftortue :tortue fpos pop "&lanimeact if :&mode = 10 [film.suite]] while [:&joue][] pr se char 59 [Fin de l'animation ] setturtle :tortue setpen :pen END TO anime.nom soit "&anim sisinon (activep "animation "false)[comboboxgettext "cbanim][:&&anim] si vide? :&anim [ra "&lanime] ra premier :&anim END TO anime.nomme :nom [:nom2 []] if memberp :nom item 2 buried [messagebox "Erreur (se [Le nom ] :nom [est utilisé par le systÞme]) stop] donne :nom :&lanime dprop :nom "trajet :&lanime if not memberp :nom :&animations [ push "&animations :nom] END to anime.pos [ :%anim anime.nom] [ :&traj ! :%anim "trajet] [:&pos pop "&traj ] dprop :%anim "trajet md :&pos :&traj ra :&pos end to anime.saisie unbury [[][&lanime]] lc if (activep "animation "false)[staticupdate "statan ~ [Pour saisir une animation : appuyer bouton droit, touche A et bouger la souris. ]]~ fclavier[anime.active ]~ [anime.desactive ] fsouris [bi ht ][lc mt ]~ [ fpos mousepos make "&dess "true ] ~ [make "&dess "false pr list "fpos pos ~ efsouris efclavier ~ if (activep "animation "false)[staticupdate "statan [] ]]~ [if :&dess [fpos mousepos] ] end to anime.saisir unbury [[][&lanime]] lc if (activep "animation "false)[staticupdate "statan ~ [Pour saisir une animation : appuyer bouton droit, touche A et bouger la souris. ]]~ fclavier[anime.active ]~ [anime.desactive ] fsouris [bi ht ][lc mt ]~ [ fpos mousepos make "&dess "true ] ~ [make "&dess "false pr list "fpos pos ~ efsouris efclavier ~ if (activep "animation "false)[staticupdate "statan [] ]]~ [if :&dess [fpos mousepos] ] end to anime.stop si :&joue [cleartimer 17] donne "&joue "faux end TO anime.supprime :nom donne "&animations filtre[not (? = :nom)] :&animations END TO animer windowcreate "main "animation "Animation 0 50 80 150 [] buttoncreate "animation "btq "X 0 0 10 10 ~ [donne "&&anim comboboxgettext "cbanim desactive "animation windowdelete "animation] comboboxcreate "animation "cbanim 0 35 70 55 pourtous [comboboxaddstring "cbanim ?] :&animations active "animation buttoncreate "animation "btjoue "Jouer 15 0 30 10~ [&animer] buttoncreate "animation "bstop "Stop 45 0 30 10 [pr "anime.stop anime.stop] buttoncreate "animation "btnouv "Nouvelle 15 10 30 10 [pr "anime.init comboboxsettext "cbanim " anime.init] buttoncreate "animation "btenr "Saisir 45 10 30 10[ anime.saisie pr "anime.saisie ] buttoncreate "animation "btsupp "Supprimer 37 25 37 10~ [&supanim ] buttoncreate "animation "btnomme "Nommer 0 25 37 10~ [ anime.cbnomme ] staticcreate "animation "statan []0 90 70 50 END to annulcap if emptyp :&cappile [stop] local "oldcap make "oldcap pop "&cappile if emptyp :&cappile[buttondelete "annulcap staticupdate "capstatm "|Cap initial|] pprop "capbox "oldcap first :oldcap pprop "capbox "oldcap last :oldcap staticupdate "capstatvalm first :oldcap ;staticupdate "capdistval last :oldcap scrollbarset "capboxbarre 0 360 round first :oldcap ;scrollbarset "capboxdistbarre 0 500 round last :oldcap end to annulpos setpos pop "&pospile if emptyp :&pospile[buttondelete "posboxannul staticupdate "posstatm "|Pos. initiale .| ] pprop "posbox "val pos staticupdate "posstatvalm pos end to arc :direction :speed ; draws worm trail ; direction -1 (left arc), 0 (straight), 1 (right arc) ; mode -1 (reverse :directions) 1 (normal :directions) rt 5 * :direction * :mode repeat 6 [fd 2 rt (10 * :direction * :mode) wait :speed] lt 5 * :direction * :mode end to arc2 :ang :rad ellipsa2 :ang :rad :rad 0 end pour arctan2 :x :y [:rap (abs :x ) / abs :y] si :x < 0 [op ifelse :y >0 [90 + abs arctan :x / :y] [-(90 + abs arctan :x / :y)] ] op arctan ( abs :x) / :y end to arrondis :x [:m 100] op (round :x * :m)/ :m end to ascii2 :& op reste 256 + rawascii :& 256 end to ask :turtle :command localmake "saveturtle turtle setturtle :turtle localmake "maybeoutput runresult :command setturtle :saveturtle if emptyp :maybeoutput [stop] output first :maybeoutput end pour attendsque :cond si execute :cond [stop] attendsque :cond end to av :&[:par] ! qui mp "av mp :& :par end TO av.tate :n [:&mvt sisinon :n > 0 ["av]["re]] repete abs :n [invoke :&mvt 1 tate si :stop [stop]] END to avannul [:pos gprop "avbox "pos][:olddist pop "&avpile] if emptyp :&avpile [buttondelete "avboxannul] pprop "avbox "distdef :olddist staticupdate "avstatval :olddist scrollbarset "avscrol 0 300 :olddist end to avbox [:p pos][:pen pen] if activep "avbox[stop] active "avbox make "&avpile [] pprop "avbox "pos :p pprop "avbox "pen :pen pprop "avbox "val 0 pprop "avbox "distdef 0 windowcreate "root "avbox [Tester av / re ] 10 60 100 100 [] staticcreate "avbox "avstat "|distance| 0 0 30 10 staticcreate "avbox "avstatval 0 40 0 15 10 staticcreate "avbox "avstatpos "|position| 0 10 30 10 staticcreate "avbox "avstatposval :p 40 10 50 10 buttoncreate "avbox "avquit "Quitter 5 70 80 10 [ setpos gprop "avbox "pos~ av gprop "avbox "distdef setpen gprop "avbox "pen~ supprime "avbox] buttoncreate "avbox "avmodif "modifier 5 40 80 10 [modifav] scrollbarcreate "avbox "avscrol 5 20 80 10 [scrollav] scrollbarset "avscrol 0 300 0 end TO ballee.deplace END TO bc ! qui [bc] END TO bg ! qui [bg] END TO bi ! qui [bi] END TO bidon.couleur ra ! qui.nom "bidon END TO bidon.fcouleur :& si non ou nombre? :& liste? :& [donne "& ! :& "pixel] ! qui.nom [donne "bidon :& ] SETFLOODCOLOR :& END TO bit.pave :x :y if not pencolor = :coul[crayon.fcouleur pencolor] bitblock :x :y END TO bitcolle[:pos position] [:pen pen] lc setpos (posbg image.rect) bitpaste setpos :pos setpen :pen END TO bitcopie :l :h [:pos position] [:pen pen] lc fpos posbg bitcopy :l :h fpos :pos setpen :pen END TO bitcoupe :l :h [:pos position] [:pen pen] lc fxy premier pos (dernier pos) - :l bitcut :l :h fpos :pos setpen :pen END TO bitindex.modif [:text comboboxgettext "imageboxcmbind] 1 if not numberp first :text[messagebox [Erreur] se first :text [n'est pas un nombre] stop] if 1 = compte :text ~ [make "&pilemem remove find[ (first ?) = first :text] :&pilemem :&pilemem~ scrollset 0 comboboxsettext "imageboxcmbind [] stop] scrollset :text comboboxsettext "imageboxcmbind [] END pour bitmap.cache [:p pos] efbitmap fpos :&bitm.pos setpen :&bitm.pen ifelse :&bit.vis [st][ht] ftortue :&bitm.tortue fpos :p end pour bitmap.montre [:p pos] if [0 0] = bitsize[stop] donne "&bitm.tortue tortue ftortue bitindex donne "&bit.vis shownp mt donne "&bitm.pen pen donne "&bitm.pos pos lc fbitmap fpos :p end TO boitecomb.ajoute :&btc :& si listp :& [make "& listeversmot :&] if memberp :& gprop :&btc "list [stop] boitecomb.insligne :&btc :& boitecomb.range :&btc :& END TO BOITECOMB.def windowcreate "main "defboitecomb [Définir une boîte combinée] 0 50 100 100 [] buttoncreate "defboitecomb "defbtcmbbtq "X 0 0 10 10 [windowdelete "defboitecomb] staticcreate "defboitecomb "defbtcmbstatNom "Nom 0 10 30 10 comboboxcreate "defboitecomb "defbtcmbcmbNom 30 10 70 10 buttoncreate "defboitecomb "defbtcmbbtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defboitecomb "defbtcmbbtcree "Créer 30 50 45 10 [~ localmake "data (se " comboboxgettext "defbtcmbcmbNom selection )~ apply "comboboxcreate :data (pr "boitecomb.crée ""Ecran fput ( list first bf :data) bf bf :data) ] buttoncreate "defboitecomb "defbtcmbbtef "Effacer 30 60 45 10~ [comboboxdelete comboboxgettext "defbtcmbcmbNom ( pr "boitecomb.ef (list comboboxgettext "defbtcmbcmbNom ))] END TO boitecomb.enleve :&n :& [:pos 0] if listp :& [make "& listeversmot :&] if not memberp :& gprop :&n "list [stop] ignore find [make "pos # ? = :& ] gprop :&n "list pprop :&n "list enleve :& rprop :&n "list comboboxdeletestring :&n :pos - 1 END TO boitecomb.enlevetexte :&n boitecomb.enleve :&n boitecomb.texte :&n END TO boitecomb.liste :&n op gprop :&n "list end TO boitecomb.range :&btc :&v pprop :&btc "list lput :&v gprop :&btc "list END TO boiteliste.def windowcreate "main "defboiteliste [Définir une boîte de liste ] 0 50 100 100 [] buttoncreate "defboiteliste "defbtlstbtq "X 0 0 10 10 [windowdelete "defboiteliste] staticcreate "defboiteliste "defbtlststatNom "Nom 0 10 30 10 comboboxcreate "defboiteliste "defbtlstcmbNom 30 10 70 10 buttoncreate "defboiteliste "defbtlstbtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defboiteliste "defbtlstbtcree "Créer 30 50 45 10 [~ localmake "data (se " comboboxgettext "defbtlstcmbNom selection )~ apply "listboxcreate :data (pr "boiteliste.crée ""Ecran fput (list first bf :data) bf bf :data) ] buttoncreate "defboiteliste "defbtlstbtef "Effacer 30 60 45 10~ [listboxdelete comboboxgettext "defbtlstcmbNom ( pr "boiteliste.ef (list comboboxgettext "defbtlstcmbNom ))] END TO boiteliste.enleve :&n :& [:pos 0] ignore find [make "pos # ? = :& ] gprop :&n "list pprop :&n "list enleve :& rprop :&n "list comboboxdeletestring :&n :pos - 1 END to bougecap [:c cap] if []= gprop "capbox "active [stop] scrollbarset "capboxbarre 0 360 round cap staticupdate "capstatval form :c 5 2 fcap :c end TO bouton.def windowcreate "main "defbouton [Définir un bouton] 0 50 100 100 [] buttoncreate "defbouton "defboutbtq "X 0 0 10 10 [windowdelete "defbouton] staticcreate "defbouton "defboutstataff "Affichage 0 20 30 10 comboboxcreate "defbouton "defboutcmbAff 30 20 70 10 staticcreate "defbouton "defboutstatNom "Nom 0 10 30 10 comboboxcreate "defbouton "defboutcmbNom 30 10 70 10 comboboxcreate "defbouton "defboutcmbAction 30 30 70 10 staticcreate "defbouton "defboutstatAction "Action 0 30 30 10 buttoncreate "defbouton "defboutbtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defbouton "defboutbtcree "Créer 30 50 45 10 [~ localmake "data (se " list comboboxgettext "defboutcmbNom ~ comboboxgettext "defboutcmbAff selection (list comboboxgettext "defboutcmbAction))~ apply "buttoncreate :data (pr "bouton.crée ""Ecran :data) ] buttoncreate "defbouton "defboutbtef "Effacer 30 60 45 10~ [buttondelete comboboxgettext "defboutcmbNom ( pr "bouton.ef (list comboboxgettext "defboutcmbNom ))] END TO bouton? :n make "&click "false mouseon [make "&btn 0 mouseoff make "&click "true ][]~ [make "&btn 1 mouseoff make "&click "true ][][] until[:&click][] op :n = :&btn END to boutonradio.def windowcreate "main "defbttr [Définir un bouton radio] 0 50 100 100 [] buttoncreate "defbttr "defbttrbtq "X 0 0 10 10 [windowdelete "defbttr] staticcreate "defbttr "defbttrstataff "Affichage 0 30 30 10 comboboxcreate "defbttr "defbttrcmbAff 30 30 70 10 staticcreate "defbttr "defbttrstatGr "Groupe 0 10 30 10 comboboxcreate "defbttr "defbttrcmbGr 30 10 70 10 staticcreate "defbttr "defbttrstatNom "Nom 0 20 30 10 comboboxcreate "defbttr "defbttrcmbNom 30 20 70 10 buttoncreate "defbttr "defbttrbtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defbttr "defbttrbtcree "Créer 30 50 45 10 [ ~ localmake "data (se " (list comboboxgettext "defbttrcmbGr comboboxgettext "defbttrcmbNom ~ comboboxgettext "defbttrcmbAff ) selection ) apply "radiobuttoncreate :data~ (pr "boutonradio.crée ""Ecran :data)] buttoncreate "defbttr "defbttrbtef "Effacer 30 60 45 10~ [radiobuttondelete comboboxgettext "defbttrcmbNom ~ (show "boutonradio.ef comboboxgettext "defbttrcmbNom) ] end to boutoradio.def windowcreate "main "defbtr [Définir un stat] 0 50 100 100 [] buttoncreate "defbtr "defbtrbtq "X 0 0 10 10 [windowdelete "defbtr] staticcreate "defbtr "defbtrstataff "Affichage 0 20 30 10 comboboxcreate "defbtr "defbtrcmbAff 30 20 70 10 staticcreate "defbtr "defbtrstatGr "Groupe 0 10 30 10 comboboxcreate "defbtr "defbtrcmbGr 30 10 70 10 staticcreate "defbtr "defbtrstatNom "Nom 0 10 30 10 comboboxcreate "defbtr "defbtrcmbNom 30 10 70 10 buttoncreate "defbtr "defbtrbtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defbtr "defbtrbtcree "Créer 30 50 45 10 [ ~ localmake "data (se " (list comboboxgettext "defbtrcmbNom comboboxgettext "defbtrcmbNom ~ comboboxgettext "defbtrcmbAff ) selection ) apply "staticcreate :data~ (pr "stat.crée ""Ecran :data)] buttoncreate "defbtr "defbtrbtef "Effacer 30 60 45 10~ [staticdelete comboboxgettext "defbtrcmbNom ~ (show "stat.ef comboboxgettext "defbtrcmbNom) ] end to buryall bury contents end to buryname :names bury namelist :names end TO butine dr 180 - hasard 360 av 10 END to cachecapbox windowdelete "capbox end to cacheoutils[:active rprop "outils "active] if emptyp :active [stop] desactive "outils desactive "capbox desactive "posbox windowdelete "outils messagebox "Message [Taper 'outils' pour ramener la barre d'outils] pr "outils end TO cacherect [:nomrect "selection][:rect rprop :nomrect "rect] if (rectvisible? :nomrect) [marquerect :rect] efrectvisible? END to cap ra ! qui [heading] end to capbox [:oldcap heading] pprop "capbox "val :oldcap pprop "capbox "oldcap :oldcap dprop "capbox "dist 0 pprop "capbox "pen pen setpensize [2 2] pprop "capbox "pos pos if activep "capbox [stop] active "capbox make "&cappile[] windowcreate "root "capbox [Tester le cap] 0 45 80 130 [] buttoncreate "capbox "capboxquit "X 0 0 10 10~ [capboxquitte] staticcreate "capbox "capstat "|Cap vu| 15 5 50 10 staticcreate "capbox "capstatval form :oldcap 6 2 50 5 30 10 ;scrollbarcreate "capbox "capboxdistbarre 3 35 70 10 [testdist] scrollbarcreate "capbox "capboxbarre 3 15 70 10 [testcap ] ;staticcreate "capbox "capdist "|Distance| 15 25 50 10 ;staticcreate "capbox "capdistval form 0 5 2 50 25 30 10 staticcreate "capbox "capstatfcap "|Absolu: fcap| 11 45 50 10 staticcreate "capbox "capstatvalfcap form :oldcap 5 2 53 45 30 10 staticcreate "capbox "capstatdr "Relatif: 11 55 50 10 staticcreate "capbox "capstatvaldr " 37 55 30 10 ;staticcreate "capbox "capstatav "avance 20 65 50 10 ;staticcreate "capbox "capstatvalav " 50 65 30 10 staticcreate "capbox "capstatm "|Cap initial| 3 75 55 10 staticcreate "capbox "capstatvalm form :oldcap 5 2 50 75 30 10 buttoncreate "capbox "capboxviser "Viser 5 105 60 10 [ vise ] buttoncreate "capbox "capboxmodif "Modifier 5 85 60 10 [modifcap] buttoncreate "capbox "capboxcomfcap "C 0 45 10 10 [(pr "fcap arrondis cap) ] buttoncreate "capbox "capboxcomdr "C 0 55 10 10 ~ [pr ifelse 180 > rprop "capbox "dr [se "dr rprop "capbox "dr ][se "ga 360 - rprop "capbox "dr ]] ;buttoncreate "capbox "capboxcomav "C 5 65 10 10 [(pr "av rprop "capbox "dist ) ] staticupdate "capstatval form :oldcap 5 2 scrollbarset "capboxbarre 0 360 round :oldcap ;scrollbarset "capboxdistbarre 0 500 0 fcap :oldcap end to capboxquitte if ( activep "vise "false) [efsouris desactive "vise] remprop "capbox "active setheading gprop "capbox "oldcap ic setpos gprop "capbox "pos setpen gprop "capbox "pen windowdelete "capbox end to capvers :pos op remainder round 180 + vers :pos 360 end to caract if not emptyp gprop "caract "active [ (pr "car keyboardvalue) stop] staticcreate "outils "caract "---- 280 2 20 10 pprop "caract "active "true keyboardon [staticupdate "caract keyboardvalue] end to carre, [:x] sisinon vide? :x [ftortue "carre] [demande "carre premier :x] end to case :& :n [:%& " ] repete :n [ ifelse emptyp :&[make "%& word :%& char 32]~ [make "%& word :%& first :& make "& bf :& ]] op :%& end to centre scrollx 0 scrolly 0 end to cercle [:&x] 1 .maybeoutput apply "CIRCLE :&x end to cercle2 [:&x] 1 .maybeoutput apply "CIRCLE2 :&x end to changeindex :index ifelse emptyp :index [Make "index 0] [make "index first :index]~ ifelse numberp :index[ setbitindex :index staticupdate "imageboxstatvalm ~ form bitindex 5 0][messagebox "Erreur list :index [non valable]] end pour changesignex :pos ra liste -premier :pos dernier :pos END pour charge :&fich [:fichtmp :&fichtemp][:oldprocs :procedures][:&fichtemp :&fich]~ [:fichedit "c:\\temp\\verso.][:&W writer][:&r reader] locale "%procs dprop "enregistre "fichier :&fich load :&fich ignore verifprocs make "&nouveau "false end TO chargeimage :fich [:imp "false][:index 1023] [:r reader] [:pos pos] [:pen pen] (local "iml "imh) if emptyp :fich [stop] IF LISTP :FICH[MAKE "FICH FIRST :FICH] if not memberp ". :fich[make "fich word :fich ".bmp] if not existp :fich [messagebox "Erreur (se [le fichier]~ :FICH [N'EXISTE PAS.]) STOP] if :imp [(pr [chargeimage ] word "" nomfichec :fich )] openread :fich setread :fich setreadpos 18 make "iml ( ascii2 rc ) + 256 * ascii2 rc setreadpos 22 make "imh ( ascii2 rc ) + 256 * ascii2 rc close :fich setread :r dprop "charge "rect (se :pos :iml :imh) dprop "charge "fich nomfichec :fich (copieimage imchrect :index) lc fpos list first pos (last pos ) - :imh bitload :fich fpos :pos setpen :pen fselection imchrect end to chargeprog catch "error [load "c:edit.tmp] local "& make "& error if emptyp :& [stop] make "&error :& if "chargeprog = item 3 :&[ if yesnobox [Erreur dans l'edition] (se mess :& :& char 13 [Editer de nouveau ?] )~ [traitprog stop ] ] end to chat, [:x] ftortue "chat end TO cherche :&sub :l op filtre [substring? :&sub ?]:l END to chercheitem :i :l [:n 0] if emptyp :l [op -1] if :i = first :l [op :n] op( chercheitem :i bf :l :n + 1) end to chim [:n scrollbarget "scrim] if :n > compte :&pilemem[make "n count :&pilemem scrollbarset "scrim 1 :n :n] setbitindex first item :n :&pilemem staticupdate "imageboxstatvalm form bitindex 5 0 staticupdate "imageboxstatimnom bf item :N :&pilemem staticupdate "imageboxstatrect image.rect end to choc? :%but [:&delta 10] soit "%x xcor - first :%but soit "%y ycor - last :%but op and (abs :%x )< :&delta (abs :%y )< :&delta end to choixbuff (local "index "edtext "rang) if activep "|Memoires_images| [stop] active "|Memoires_images| windowcreate "main "buff [Memoires images] 150 100 90 110 [] buttoncreate "buff "buffquitter [X] 0 0 10 10 [ desactive "|Memoires_images| windowdelete "buff ] comboboxcreate "buff "cmbbuff 0 10 80 70 if not namep "&pilemem [make "&pilemem [[0 Presse Papier] [1023 Ecran]]] pourtous [comboboxaddstring "cmbbuff ?]:&pilemem comboboxsettext "cmbbuff find [ bitindex = first ?] :&pilemem buttoncreate "buff "btbuffsup "Supprimer 5 80 80 10 [ make "&pilemem enleveimage ] buttoncreate "buff "btbuffmodif "OK 70 0 20 10 [boutonok ] end TO ciblee.deplace END to closeall foreach allopen [close ?] end to coche.def windowcreate "main "defcoche [Définir une coche] 0 50 100 100 [] buttoncreate "defcoche "defcochebtq "X 0 0 10 10 [windowdelete "defcoche] staticcreate "defcoche "defcochestataff "Affichage 0 30 30 10 comboboxcreate "defcoche "defcochecmbAff 30 30 70 10 staticcreate "defcoche "defcochestatGr "Groupe 0 10 30 10 comboboxcreate "defcoche "defcochecmbGr 30 10 70 10 staticcreate "defcoche "defcochestatNom "Nom 0 20 30 10 comboboxcreate "defcoche "defcochecmbNom 30 20 70 10 buttoncreate "defcoche "defcochebtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defcoche "defcochebtcree "Créer 30 50 45 10 [ ~ localmake "data (se " (list comboboxgettext "defcochecmbGr comboboxgettext "defcochecmbNom ~ comboboxgettext "defcochecmbAff ) selection ) apply "checkboxcreate :data~ ( pr "coche.crée ""Ecran :data)] buttoncreate "defcoche "defcochebtef "Effacer 30 60 45 10~ [checkboxdelete comboboxgettext "defcochecmbNom ~ (show "coche.ef comboboxgettext "defcochecmbNom) ] end TO colle.fmode :& setbitmode ifelse :& < 10 [ :&][1] staticupdate "statimageboxmodeval :& staticupdate "statimageboxmodetxt item :& :&limmodes END to colleimage [:rect image.rect] [ :index bitindex] [:indexsave 1023]~ [:&aj ifelse (activep "images "false) [ checkboxget "chkaj] [:&ajim]]~ [:&op ifelse (activep "images "false) [ checkboxget "chkop] [:&opim]]~ [:oldindex bitindex][:pos pos][:pen pen][:vis shownp][:bitmode bitmode] setbitindex :index if emptyp :rect [bitpaste stop ] lc ct if :&aj [ajusteimage (copieimage image.rect :indexsave) fselection image.rect fpos posbg ~ ifelse :&op [setbitmode 5 bitpaste bitpaste setbitmode :bitmode][bitpaste]~ setbitindex :oldindex fpos :pos ajourimage setpen :pen ~ if :vis [mt] fimagerect selection stop ] fpos (posbg :rect) if not :index = :indexsave [sauvecran :indexsave :rect ] ifelse :&op [setbitmode 5 bitpaste bitpaste setbitmode :bitmode][bitpaste] fpos :pos fselection se pos bf bf :rect setbitindex :oldindex setpen :pen if :vis [mt] end to colleimagesel [:index bitindex][:buff 1023] if not ( bitindex = :buff) [setbitindex :buff copieimagesel ] setbitindex :index (colleimage sel) end to combine :this :those if wordp :those [output word :this :those] output fput :this :those end to combinel :this :those if wordp :those [output word :those :this] output lput :this :those end to cond [:&%] 1 catch "cond[ foreach :&% [if run first ? [run bf ? throw "cond]]] end pour connecter netshutdown donne "correspondant attrape "error [BOITEQUESTION "Réseau ~ [Avec qui voulez-vous vous connecter ? ]] si non vide? error [stop] NETPAIR :correspondant end to conv :x if :x = [][op :x ] if listp first :x [op conv first conv .bf :x] op fput convm first :x conv bf :x end to convcoul :n donne "n 64 - :n make "r (bitand :n 1) make "n ashift :n -1 make "v (bitand :n 1) make "n ashift :n -1 make "b (bitand :n 1) make "n ashift :n -1 make "r1 (bitand :n 1) make "n ashift :n -1 make "v1 (bitand :n 1) make "n ashift :n -1 make "b1 (bitand :n 1) make "n ashift :n -1 op (se ( :r1) * 2 * 85 + 85 * :r ~ ( :v1) * 2 * 85 + 85 * :v ~ ( :b1) * 2 * 85 + 85 * :b ) end to convm :& if :& =[] [op "] op word af "> char first :& convm bf :& end to convsel :sel op (list item 1 :sel item 4 :sel ( item 3 :sel) ~ - item 1 :sel ( item 4 :sel ) - item 2 :sel) end to coorx output first pos end to coory output first butfirst pos end to coorz [:&x] 1 .maybeoutput apply "zcor :&x end to COPIEDEF :&1 :&2 [:&dico "true] if :&dico [DICO :&1 :&2] if :&1 = :&2 [stop] if not procedurep :&2 [stop] erase :&1 copydef :&1 :&2 end to copieimage[:rect selection ][:index bitindex][:oldindex bitindex][:pen pen ][:pos pos][:vis shownp] lc ct setbitindex :index fpos ( rectposbg :rect) bitcopy rectl :rect recth :rect fimagerect :rect fpos :pos setpen :pen setbitindex :oldindex if :vis [mt] end to copieimagesel [:pen pen][:p pos] lc fpos selectionpos bitcopy selectionl selectionh pprop word "turtle turtle "width selectionl pprop word "turtle turtle "heighth selectionh pprop word "turtle turtle "pos pos setpos :p setpen :pen end to couleur op pencolor end TO couleur.efaction efprop :objet "action END TO couleur.faction :&action !o [donne "action :&action] END TO couleur.nom.action op ! !o "pixel "action END TO couleur.nom.efaction ! !o "pixel [efaction] END TO couleur.nom.faction :&act ! !o "pixel [donne "action :&act] END TO couleurbox [:oldindex bitindex][:pen pen][:vis shownp] if activep "couleurbox[stop] active "couleurbox ct pprop "couleurbox "pos pos pprop "couleurbox "pen :pen pprop "couleurbox "vis :vis lc fpos (posbg (se pos 30 30 ) )setbitindex 1023 bitcopy 30 30 windowcreate "main "couleurbox "Couleurs 200 0 120 85 [] staticcreate "couleurbox "statcoulR "R 75 10 10 10 staticcreate "couleurbox "statcoulV "V 75 20 10 10 staticcreate "couleurbox "statcoulB "B 75 30 10 10 staticcreate "couleurbox "statcoulRval " 85 10 30 10 staticcreate "couleurbox "statcoulVval " 85 20 30 10 staticcreate "couleurbox "statcoulBval " 85 30 30 10 buttoncreate "couleurbox "btcoulquit "X 0 0 10 10~ [fermefen "couleurbox bitpaste setbitindex :oldindex ~ fpos gprop "couleurbox "pos setpen gprop "couleurbox "pen~ if rprop "couleurbox "vis [mt] ] scrollbarcreate "couleurbox "scrcoulR 0 10 70 10 [ajourcoul] scrollbarcreate "couleurbox "scrcoulV 0 20 70 10 [ajourcoul ] scrollbarcreate "couleurbox "scrcoulB 0 30 70 10 [ajourcoul] scrollbarset "scrcoulR 0 255 item 1 floodcolor scrollbarset "scrcoulV 0 255 item 2 floodcolor scrollbarset "scrcoulB 0 255 item 3 floodcolor groupboxcreate "couleurbox "coulgr 0 40 110 18 radiobuttoncreate "couleurbox "coulgr "btrcray "Crayon 5 46 32 9 radiobuttoncreate "couleurbox "coulgr "btrpeint "Peinture 40 46 35 9 radiobuttoncreate "couleurbox "coulgr "btrfond "fond 80 46 25 9 buttoncreate "couleurbox "btrcoulmodif "Modifier 35 60 30 10 [modifcouleur] buttoncreate "couleurbox "btrcoulorig "Original 0 60 35 10 [coulorig] END to couleurboxquitte bitpaste setbitindex :oldindex crayon.fcouleur gprop "couleurbox "pencolorval bidon.fcouleur gprop "couleurbox "floodcolorval if radiobuttonget "btrfond [if not yesnobox "Danger~ [Le chanement de fond supprimera l'imageactuelle. Renoncer ?]~ [setscreencolor gprop "couleurbox "screencolorval]] fenetre.ef "couleurbox desactive "couleurbox fpos gprop "couleurbox "pos if rprop "couleurbox "vis [mt] setbitmode rprop "couleurbox "bitmode end TO couleurs [:oldind bitindex][:vis shownp][:bm bitmode] if activep "couleurbox[stop] setbitmode 1 make "oldindex :oldind pprop "couleurbox "bitmode :bm active "couleurbox ct pprop "couleurbox "pos position pprop "couleurbox "vis :vis pprop "couleurbox "pencolor pencolor pprop "couleurbox "floodcolor floodcolor pprop "couleurbox "screencolor screencolor pprop "couleurbox "pencolorval pencolor pprop "couleurbox "floodcolorval floodcolor pprop "couleurbox "screencolorval screencolor lc fpos (posbg (se pos 30 30 ) )setbitindex 1023 bitcopy 30 30 windowcreate "main "couleurbox "Couleurs 160 120 150 105 [] staticcreate "couleurbox "statcoulR "R 95 10 10 10 staticcreate "couleurbox "statcoulV "V 95 20 10 10 staticcreate "couleurbox "statcoulB "B 95 30 10 10 staticcreate "couleurbox "statcoulRval " 105 10 30 10 staticcreate "couleurbox "statcoulVval " 105 20 30 10 staticcreate "couleurbox "statcoulBval " 105 30 30 10 buttoncreate "couleurbox "btcoulquit "X 0 0 10 10~ [couleurboxquitte] scrollbarcreate "couleurbox "scrcoulR 0 10 90 10 [ajourcoul] scrollbarcreate "couleurbox "scrcoulV 0 20 90 10 [ajourcoul ] scrollbarcreate "couleurbox "scrcoulB 0 30 90 10 [ajourcoul] scrollbarset "scrcoulR 0 255 item 1 floodcolor scrollbarset "scrcoulV 0 255 item 2 floodcolor scrollbarset "scrcoulB 0 255 item 3 floodcolor groupboxcreate "couleurbox "coulgr 0 40 130 18 radiobuttoncreate "couleurbox "coulgr "btrcray "Crayon 5 46 42 9 radiobuttoncreate "couleurbox "coulgr "btrpeint "Peinture 50 46 40 9 radiobuttoncreate "couleurbox "coulgr "btrfond "fond 90 46 30 9 staticcreate "couleurbox "statccray gprop "couleurbox "pencolor 5 60 40 10 staticcreate "couleurbox "statcpeint gprop "couleurbox "floodcolor 50 60 40 10 staticcreate "couleurbox "statcecran gprop "couleurbox "screencolor 95 60 40 10 buttoncreate "couleurbox "btrcoulmodif "Modifier 35 80 30 10 [modifcouleur] buttoncreate "couleurbox "btrcoulorig "Original 0 80 35 10 [coulorig] END to couleursous [:px pixel] ; si vide? ! :px "parent[! "couleur [cree :px]] op :px end TO coulmodif if radiobuttonget "btrcray[setpencolot ~ coulrgb scrollbarget "scrcoulR scrollbarget "scrcoulV scrollbarget "scrcoulB] if radiobuttonget "btrpeint[setfloodcolor~ coulrgb scrollbarget "scrcoulR scrollbarget "scrcoulV scrollbarget "scrcoulB] if radiobuttonget "btrfond[setscreencolor ~ coulrgb scrollbarget "scrcoulR scrollbarget "scrcoulV scrollbarget "scrcoulB] END TO coulorig [:pencolor gprop "couleurbox "pencolor]~ [:floodcolor gprop "couleurbox "floodcolor]~ [:screencolor gprop "couleurbox "screencolor] if radiobuttonget "btrcray~ [ scrollbarset "scrcoulR 0 255 first :pencolor~ scrollbarset "scrcoulV 0 255 item 2 :pencolor~ scrollbarset "scrcoulB 0 255 item 3 :pencolor~ staticupdate "statccray :pencolor] if radiobuttonget "btrpeint~ [ scrollbarset "scrcoulR 0 255 first :floodcolor ~ scrollbarset "scrcoulV 0 255 item 2 :floodcolor~ scrollbarset "scrcoulB 0 255 item 3 :floodcolor~ staticupdate "statcpeint :floodcolor ] if radiobuttonget "btrfond ~ [ scrollbarset "scrcoulR 0 255 first :screencolor~ scrollbarset "scrcoulV 0 255 item 2 :screencolor~ scrollbarset "scrcoulB 0 255 item 3 :screencolor~ staticupdate "statcpeint :screencolor ] END to coulRGB :r :g :b op ( list :r :g :b) end to coupeimage[:rect selection ][:index bitindex][:oldindex bitindex][:pen pen ][:pos pos][:vis shownp] lc ct setbitindex :index fpos ( rectposbg :rect) bitcut rectl :rect recth :rect fimagerect :rect fpos :pos setpen :pen setbitindex :oldindex if :vis [mt] end to coupeimagesel [:pen pen][:p pos] lc fpos selectionpos bitcut selectionl selectionh fimagesel setpos :p setpen :pen end TO crayon.couleur [:&qui qui] [:&coul ! :&qui "couleur] si :&qui = qui[si non :&coul = pencolor [crayon.fcouleur pencolor]] op ! :&qui "couleur end to crayon.fcouleur :& ! qui[crayon.fcouleur :&] end to crayon.fcouleur0 :& si non (ou liste? :& nombre? :&) [donne "& ! :& "pixel] setpc :& ! qui [donne "couleur :&] end to creebase :nom :rubriques dprop :nom "rubr :rubriques make :nom [] end pour croixsuisse repete 4[av 50 dr 90 av 50 dr 90 av 50 ga 90] end POUR D.ANIME [:D :&DYNAM] REPETE COMPTE :D [DYNAMIQUE.DEPLACE pop "D] donne "&t :&t + :&dt END pour decalage :&pos :&pos2 ra liste (premier :&pos2) - premier :&pos (dernier :&pos2 ) - dernier :&pos end TO decale :dec si vide? :dec [stop] fxy (premier pos )+ premier :dec (dernier pos )+ dernier :dec END pour deconnecter netshutdown end to delim make "&lig bf :&lig until ["\| = first :&lig ] [ show :&lig make "&mot word :&mot first :&lig make "&lig bf :&lig] make "&lig bf :&lig make "& lput :&mot :& make "&mot " end to demamde :& :action [:&qui :&qui] ra obtiens :& :action end to demande :& :action [:&&t qui] si mot? :action [donne "action (list :action)] sisinon mot? :& [ftortue :& localmake "&res runresult :action ~ ftortue :&&t ifelse emptyp :&res [stop][op first :&res]]~ [localmake "&res pourtous.ra.ph [ftortue ? runresult :action]:& ~ ftortue :&&t ifelse emptyp :&res [stop][op :&res]] end to demande0 :& :action [:&&t qui] si mot? :action [donne "action (list :action)] sisinon mot? :& [ftortue :& localmake "&res runresult :action ~ ftortue :&&t ifelse emptyp :&res [stop][op first :&res]]~ [localmake "&res pourtous.ra.ph [ftortue ? runresult :action]:& ~ ftortue :&&t ifelse emptyp :&res [stop][op :&res]] end pour depart li ftortue 2 fpos [400 200] donne "vx -5 donne "vy -10 + hasard 20 fsouris[efsouris halt ][][][][raquette]balle end TO deplace3d [:&t tortue] soit "&pos possouris si turtle = 1019[li] sisinon clavier = 90 [fz dernier :&pos ][fpos :&pos] END to dequeue :queue local "result make "result first thing :queue make :queue butfirst thing :queue output :result end to desactive :& remprop :& "active end to descendants :& op filter [memberp :& ancêtres ?] last contents end TO dessiner [:vis shownp] donne "&ctrl "false ifelse ( activep "dessin "false) [pr se char 59 [dessin desactivé ]~ ifelse shownp [st][ht]desactive "dessin efsouris efclavier ~ if( activep "outils "false)[ staticupdate "desschk "] ] ~ [pr se char 59 [dessin activé ]~ pr se char 59 [N = nouveau Z = annule E = édite P = peins F = formes ]~ pr se char 59 [T = teintes C = crayon G = gomme ]~ setfocus[mswlogo screen]~ active "dessin lc make "&dess "false ~ if( activep "outils "false)~ [ if( activep "outils "false)[ staticupdate "desschk mousepos]] ~ fclavier[anime.active if clavier = 17 [donne "&ctrl "true ]~ if clavier = 86 [donne "&film.sprite "vrai]~ if clavier = 16 [ifelse vide? :&films [bitmap.montre (pr "ftortue tortue "fbitmap) ~ fen.factive [MSWLOGO SCREEN] ] [donne "&film.sprite "vrai]]]~ [anime.desactive if ( clavier = 17)[donne "&ctrl "false] ~ if clavier = 86 [donne "&film.sprite "faux] ~ if clavier = 16 [ifelse vide? :&films[bitmap.cache (pr "efbitmap "ftortue tortue) ] ~ [donne "&film.sprite "faux]]]~ fsouris [PD ht pr "bi ][PU mt pr "li ]~ [ make "&oldpos position make "&oldcap cap ~ setpos mousepos if :&film.sprite [film.af]~ make "&dess "true ] ~ [setpos mousepos make "&dess "false prmove ~ if :&ctrl [estampe pr "estampe ] ]~ [if :&dess [setpos mousepos if :&film.sprite [film.af]] ~ if( activep "outils "false)[ staticupdate "desschk mousepos] ]] END to dialogfileopen :&pat op long_filename dialogfileopen2 :&pat end to dialogfilesave :&pat op (list long_filename dialogfilesave2 :&pat) end to dialogueouvrefichier :sel[:fich []] make "fich dialogfileopen :sel if emptyp :fich [op []] op first :fich END TO dialsauve dialogcreate "root "dialsauve [Enregistrer] 100 70 150 80[dialsauve0] end pour dialsauve0 staticcreate "dialsauve "stq (se [Enregistrer le contenu de la memoire sous] page "?) 10 10 130 40 buttoncreate "dialsauve "btoui "Oui 10 50 30 10 [donne "rep "true dialogdelete "dialsauve] buttoncreate "dialsauve "btnon [Autre nom] 50 50 40 10 [donne "rep "false dialogdelete "dialsauve] buttoncreate "dialsauve "btan "Annuler 100 50 40 10 [donne "rep [] dialogdelete "dialsauve] END TO DICO :&1 :&2 if not memberp :&1 :prim [make "prim fput :&1 :prim] pprop "&en :&1 :&2 pprop "&fr :&2 :&1 END TO dinamique.deplace END pour dirlab si clavier = 73 [ fcap 0 av 5 ] si clavier = 74 [ fcap 270 av 5 ] si clavier = 75 [ fcap 90 av 5 ] si clavier = 77 [ fcap 180 av 5 ] si clavier = 83 [efclavier ] si clavier = 76 [ lc] si clavier = 66 [ nc] si clavier = 71 [ gc] end to dist op (round 100 * gprop "posbox "dist)/100 end to distance :but [:x xcor ][:y ycor] make "x :x - first :but make "y :y - last :but op sqrt :x * :x + :y * :y end TO distobs ra :&distobs END to donnepage :&&fich if :&&fich = "? [MAKE "&&fich DIALOGFILEOPEN "*.LGO] IF EMPTYP :&&fich [STOP] IF LISTP :&&fich [make "&&fich first :&&fich] bury[[][&&fich]] if not( memberp ". :&&fich)[ make "&&fich word :&&fich ".lgo] if not existp :&&fich [messagebox "Erreur se :&&fich [n'existe pas.] stop] if :&&fich = page [catch "error [ifelse yesnobox [Recharger]~ [Recharger la version sur disque ?][(pr "donnepage word "" nomfichec :&&fich) charge page ]~ [(donnepage "?)] STOP]] if not emptyp error [( ec char 59 "Annulation) stop] if not ( contents = [[][][]])[ catch "error [if not yesnobox [Mode de chargement]~ [Conserver les procédures en mémoire ?] [ if not emptyp page ~ [ if catch "error [yesnobox "Attention! (se [Ceci peut modifier votre travail en mémoire] ~ car 13 [Voulez-vous sauver le contenu actuel] )][sauvepage]~ if not emptyp error [( ec char 59 "Annulation) stop]] if not emptyp error~ [(pr char 59 "Annulation) stop]]~ ] erall ~ dprop "enregistre "fichier :&&fich (pr "donnepage word "" nomfichec page ) charge page ~ bury [[][&&fich][enregistre ] ]stop] ~ dprop "enregistre "fichier :&&fich charge page (pr "donnepage word "" nomfichec page) bury [[][&&fich][enregistre ]] end TO dr :& ! qui [dr :&] END to drawface setheading 30 pu repeat 12 ~ [~ fd 120 ~ setx xcor-12 ~ sety ycor+12 ~ make "sh heading setheading 90 label repcount ~ setheading :sh setx xcor+12 ~ sety ycor-12 ~ bk 120 ~ rt 30 ~ ] end to drbox if not emptyp gprop "drbox "active ~ [messagebox "Message se (list "Cette word word "fen char 234 "tre)[ est ouverte] stop] pprop "drbox "active "true pprop "drbox "val 0 pprop "drbox "cap cap make "&drpile [] windowcreate "root "drbox [Tester dr / ga] 5 60 100 100 [] staticcreate "drbox "drstat "|Action vue: dr| 13 0 50 10 staticcreate "drbox "drstatval 0 60 0 30 10 staticcreate "drbox "drstatm "|angle. initial| 13 10 50 10 staticcreate "drbox "drstatvalm 0 60 10 30 10 buttoncreate "drbox "drboxquit "Quitter 15 65 60 10 ~ [ remprop "drbox "active dr gprop "drbox "val windowdelete "drbox] buttoncreate "drbox "drboxmodif "Modifier 15 35 60 10 [modifpos] buttoncreate "drbox "drboxcomm "Commande 15 55 60 10~ [(show "dr gprop "drbox "val) ] scrollbarcreate "drbox "drbar 5 25 80 10 [scrolldrga ] scrollbarset "drbar 0 360 0 end to drboxangle op (scrollbarget "drbar) - 180 end to dyamique.desactive :nom make "&dynam remove :nom :&dynam end pour dyn.cree.invalide if emptyp comboboxgettext "dynNom~ [messagebox [Avertissement][Il faut un nom de tortue dynamique ]op "true] if emptyp comboboxgettext "dynNotort~ [messagebox [Avertissement][Il faut un No de tortue]op "true] if not numberp first comboboxgettext "dynNotort~ [messagebox[Avertissement][Le No de tortue n'est pas un nombre]op "true] op "false end TO dynabox if activep "dynabox [stop] active "Dyncree bury[[][][dynabox]] windowcreate "main "Dyncree [Tortue Dynamique] 0 30 90 90[] buttoncreate "Dyncree "btdynquit "X 0 0 10 10 ~ [desactive "Dyncree windowdelete "Dyncree ] buttoncreate "Dyncree "btdyncree "Crée 20 0 30 10 ~ [ifelse dyn.cree.invalide[] ~ [dynamique.cree first comboboxgettext "dynNom first ~ comboboxgettext "dynNotort ~ (pr "dynamique.cree quoted first comboboxgettext "dynNom ~ comboboxgettext "dynNotort)]~ comboboxsettext "dynNom [] comboboxsettext "dynNotort []] staticcreate "Dyncree "nomstat [Nom.] 2 10 25 10 comboboxcreate "Dyncree "dynNom 28 10 50 10 staticcreate "Dyncree "notortstat [No tortue:] 2 25 25 10 comboboxcreate "Dyncree "dynNotort 28 25 20 10 buttoncreate "Dyncree "btdynact "Active 2 40 40 10 ~ [(pr "dynamique.active quoted first listboxgetselect "Lstdynact)~ if not emptyp :&dynamdes [dynamique.active first listboxgetselect "Lstdynact]] buttoncreate "Dyncree "btdynsupp "Supprime 44 40 40 10 [dynamique.ef first listboxgetselect "Lstdynact ] listboxcreate "Dyncree "Lstdynact 2 50 70 30 if not namep "&dynamdes[make "&dynamdes[]] pourtous [ listboxaddstring "Lstdynact list ? rprop ? "tortue ] :&dynamdes END TO dynambox :nom [:wn gprop :nom "fen][:t turtle] if not (activep :nom "false)[active :nom] ifelse emptyp :wn [ make "wn word "dyn bf gensym dprop :nom "fen :wn ]~ [messagebox "Avertissement (se :nom "existe $ "d 233 $ "j 224 ".) stop] setturtle rprop :nom "tortue windowcreate "main :wn list :nom rprop :nom "tortue 0 145 120 100[] fen.factive list :nom rprop :nom "tortue buttoncreate :wn word "bt.quit. :wn "X 0 0 10 10~ (list "dprop word "" :nom ""coorpol "radiobuttonget word ""rdp :wn ~ "dynamique.desactive word "" :nom "\( "pr ""dynamique.desactive~ "quoted word "" :nom "\) ) buttoncreate :wn word "bt.vit. :wn "Vitesse 15 10 25 10 list "vitesse word "" :nom staticcreate :wn word "stat.vx :wn "Vx0 0 21 12 10 staticcreate :wn word "stat.vy :wn "Vy0 0 31 12 10 staticcreate :wn word "stat.ax :wn "ax0 0 45 12 10 staticcreate :wn word "stat.ay :wn "ay0 0 55 12 10 staticcreate :wn word "stat.pos :wn "pos0 0 67 16 10 staticcreate :wn word "stat.vxVal :wn form rprop.num :nom "vx0 5 2 15 21 30 10 staticcreate :wn word "stat.vyVal :wn form rprop.num :nom "vy0 5 2 15 31 30 10 staticcreate :wn word "stat.axVal :wn form valacc rprop.num :nom "ax0 5 2 15 45 30 10 staticcreate :wn word "stat.ayVal :wn form valacc rprop.num :nom "ay0 5 2 15 55 30 10 if emptyp rprop :nom "pos0 [pprop :nom "pos0 [0 0] ] staticcreate :wn word "stat.posVal :wn rprop :nom "pos0 20 67 30 10 staticcreate :wn word "stat.vdir :wn "Vdir 45 21 15 10 staticcreate :wn word "stat.vint :wn "Vint 45 31 15 10 staticcreate :wn word "stat.vdirVal :wn form rprop.num :nom "vd 3 0 60 21 23 10 staticcreate :wn word "stat.vintVal :wn form rprop.num :nom "vi 3 0 60 31 23 10 comboboxcreate :wn word "comb.vx0Val :wn 85 21 30 10 comboboxcreate :wn word "comb.vy0Val :wn 85 31 30 10 comboboxcreate :wn word "comb.ax0Val :wn 55 45 60 10 comboboxcreate :wn word "comb.ay0Val :wn 55 55 60 10 comboboxcreate :wn word "comb.pos0Val :wn 75 67 40 10 buttoncreate :wn word "btn.init. :wn "Init 15 0 20 10 list "dynamique.init word "" :nom buttoncreate :wn word "btnanime. :wn "Anime 38 0 25 10 [dynamique.anime] buttoncreate :wn word "btnstop. :wn "Stop 66 0 15 10 [dynamique.stop] buttoncreate :wn word "btnnettoie. :wn "Nettoie 84 0 32 10 [nettoie] groupboxcreate :wn word "grboxcoor :wn 85 10 25 10 radiobuttoncreate :wn word "grboxcoor :wn word "rdc :wn "C 80 12 15 8 radiobuttoncreate :wn word "grboxcoor :wn word "rdp :wn "P 95 12 15 8 radiobuttonset word "rdp :wn rprop :nom "coorpol radiobuttonset word "rdc :wn not rprop :nom "coorpol staticcreate :wn word "stat.coul :wn "Couleur 0 77 25 10 staticcreate :wn word "stat.coulVal :wn 0 30 77 10 10 scrollbarcreate :wn word "scrol.coulVal :wn 50 77 20 10~ (list "dprop word "" :nom ""coul "scrollbarget word ""scrol.coulVal :wn~ "staticupdate word ""stat.coulVal :wn "scrollbarget word ""scrol.coulVal :wn ) setturtle :t END TO dynamique.active :nom if not namep "&dynam [make "&dynam[]] make "&dynam ajoutedernier :nom :&dynam if (activep "Dyncree "false) [listboxdeletestring2 "Lstdynact ~ :nom :&dynamdes] make "&dynamdes retire :nom :&dynamdes dynambox :nom END to dynamique.anime fenetre donne "&anime "vrai settimer 1 :&dt [eventcheck D.ANIME ] end TO dynamique.ax0 :nom :pos [:wn gprop :nom "fen] comboboxsettext word "comb.axVal :wn :pos END TO dynamique.ay0 :nom :pos [:wn gprop :nom "fen] comboboxsettext word "comb.ay0Val :wn :pos END TO dynamique.c :nom :pos [:wn gprop :nom "fen] if memberp :pos [true vrai][make "pos "true] if memberp :pos [false faux][make "pos "false] radiobuttonset word "rdp :wn not :pos radiobuttonset word "rdc :wn :pos END TO dynamique.cree :nom :t [:vx 0][:vy 0][:ax 0][:ay -9.81] if not nom? "&dynam [donne "&dynam []] if not nom? "&dynamdes [donne "&dynamdes []] if memberp :nom se :&dynam :&dynamdes ~ [messagebox [Avertissement] list :nom "existe throw "toplevel] if memberp :t :&dynnum ~ [messagebox [Avertissement] (se [La tortue ] :t "est $ "utilis 233 "e) throw "toplevel] push "&dynnum :t pprop :nom "coorpol "true pprop :nom "tortue :t pprop :nom "vx :vx pprop :nom "vy :vy pprop :nom "ax :ax pprop :nom "ay :ay pprop :nom "vx0 :vx pprop :nom "vy0 :vy pprop :nom "ax0 :ax pprop :nom "ay0 :ay pprop :nom "vd 0 pprop :nom "vi 0 push "&dynamdes :nom dynamique.active :nom END TO dynamique.deplace :nom [:vx rprop.num :nom "vx]~ [:vy rprop.num :nom "vy]~ [:ax rprop :nom "ax]~ [:ay rprop :nom "ay]~ [:arret "faux][:&tort tortue] setturtle rprop :nom "tortue setpc rprop.num :nom "coul si ou 500 < abs coorx 500 < coory[dynamique.stop ~ messagebox "avertissement [tortue hors limites stop]] local "p donne "p pos local "dt donne "dt :&resol * :&dt /1000 if definedp word :nom ".deplace [catch "error (list word :nom ".deplace)~ donne "&error error if not emptyp :&error ~ [dynamique.stop messagebox "avertissement [Une erreur s'est produite, utilisez le bouton erreur]] ] si :arret [stop] donne "t :t +:dt localmake "&but list coorx + :vx * :dt coory + :vy * :dt setheading vers :&but lc setpos :&but bc av 1 lc re 1 dprop :nom "vx :vx +( :dt * &accel :ax ) dprop :nom "vy :vy +( :dt * &accel :ay) dprop :nom "x coorx dprop :nom "y coory dprop :nom "pos position setturtle :&tort END to dynamique.desactive :nom if not (activep :nom "false) [messagebox "Attention se :nom [n'est pas active] stop] make "&dynam retire :nom :&dynam windowdelete rprop :nom "fen desactive :nom efprop :nom "fen make "&dynamdes ajoutedernier :nom :&dynamdes if (activep "Dyncree "false) [listboxaddstring "Lstdynact ~ list :nom rprop :nom "tortue] end TO dynamique.ef :nom[:af "true] [:&fen rprop :nom "fen][:t rprop :nom "tortue ] if :af [if not yesnobox [Attention]( se [Supprimer la tortue dynamique] :nom "?)[stop]] if not emptyp :&fen [windowdelete :&fen] efprops :nom if (activep "Dyncree "false) [listboxdeletestring2 "Lstdynact ~ :nom :&dynamdes] donne "&dynamdes retire :nom :&dynamdes donne "&dynam retire :nom :&dynam donne "&dynnum retire :t :&dynnum montre mot :nom ".deplace si procedurep mot :nom ".deplace [er mot :nom ".deplace] END TO dynamique.fpos0 :nom :pos [:wn gprop :nom "fen] comboboxsettext word "comb.pos0Val :wn :pos END TO dynamique.ini END TO dynamique.init :nom [:pen pen][:wn rprop :nom "fen][:&tort tortue] test not emptyp :wn iftrue [dprop :nom "coorpol radiobuttonget word "rdp :wn ] donne "&t 0 donne "t 0 if emptyp rprop :nom "pos0 [dprop :nom "pos0 [0 0]] iftrue [initdynval :nom ] pprop :nom "vx gprop :nom "vx0 pprop :nom "vy gprop :nom "vy0 pprop :nom "ax gprop :nom "ax0 pprop :nom "ay gprop :nom "ay0 fcap 450 - rprop :nom "vd iftrue [ajourdynval :nom ] ;local "pen donne "pen pen setturtle rprop :nom "tortue lc setpos rprop :nom "pos0 penpaint pd mt ftortue :&tort setpen :pen END TO dynamique.stop si non :&anime [stop] cleartimer 1 donne "&anime "faux END TO dynamique.supprimetout pourtous [desactive ?]SE :&DYNAM :&DYNAMDES make "&dynnum [] make "&dynam [] make "&dynamdes [] END TO dynamique.vx0 :nom :pos [:wn gprop :nom "fen] comboboxsettext word "comb.vx0Val :wn :pos END TO dynamique.vy0 :nom :pos [:wn gprop :nom "fen] comboboxsettext word "comb.vy0Val :wn :pos END TO ecc :& local "&c repeat count :&[make "&c pop "& ifelse 13 = :&c [ec "][ type char :&c ]] ec " END TO ecran.fsecu [ :s selection] donne "ecran.secu :s END TO ecran.resolution ; Note DLLs are not always called .DLL IFELSE or 32 = ITEM 2 MACHINE 40 = ITEM 2 MACHINE ~ [dllload "user32.dll ][dllload "user.dll] localmake "&res ph dllcall [w GetSystemMetrics w 0]dllcall [w GetSystemMetrics w 1] dllfree ra :&res END TO ecran.resolutionx ra premier ecran.resolution END TO ecran.resolutiony ra dernier ecran.resolution END to ed :&[:wr writer][:procs[]][ :names []] [ :plists[]] local [ &err] noyield setcursorwait if wordp :& [make "& (list :&)] if emptyp :& [make "&[[]]] ifelse listp first :&[make "procs first :& if not emptyp bf :& ~ [ make "names first bf :& if not emptyp bf bf :& [ make "plists last :&]]] ~ [make "procs filter [ and procedurep ? not primitivep ? ] :&~ make "names filter [namep ? ] :&~ make "plists filter [not emptyp plist ? ] :&~ make "undefined filter [and not primitivep ? not memberp ?~ (se :procs :names :plists) ] :&] yield openwrite "c:edit.tmp setwrite "c:edit.tmp foreach :undefined[(pr "TO ?) pr "END ] make "&err error if not emptyp :&err[make "&error :&err] catch "error [im (list :procs :names :plists)] make "&err error if not emptyp :&err[make "&error :&err close "c:edit.tmp setwrite :wr (pr "Erreur :&err) ~ stop] close "c:edit.tmp setwrite :wr traitprog end to edall edit contents end to edf [:x dialogfileopen "*.* ] windowfileedit :x [ ] end to edfich [ :&n :&sufftxt ][:action []][:&imp "false] 1 montre :&n si "* = premier :&n [make "&n dialogfileopen :&n] if :&n =[][ stop] donne "&sufftxt mot "* suffixe :&n if :&imp [(pr "edfich quoted nomfichec :&n)] make "&lastedit :&n windowfileedit :&n [] end to editer :& [:w writer][:r reader] openwrite "edit.lgo setwrite "edit.lgo if definedp :& [po :&] setwrite :w close "edit.lgo windowfileedit "edit.lgo [interprete] end TO edition.touches END TO edition.touches1 si clavier = 17 [donne "&ctrl "true] si et :&ctrl clavier = 86 [ec "image.colle image.colle] si et :&ctrl clavier = 67 [ec "image.copie image.copie] si et :&ctrl clavier = 88 [ec "image.coupe image.coupe] si et :&ctrl clavier = 90 [ec "image.annule image.annule] si et :&ctrl clavier = 82 [ec "fen.init fen.init] si et :&ctrl clavier = 83 [ec "image.secu image.secu] si et :&ctrl clavier = 89 [ec "selectionne selectionne] si et :&ctrl clavier = 69 [ image.edition pr "image.edition] si et :&mode = 10 clavier = 226[sisinon :&film.stop[IMAGE.SECU film.boucle][film.stop]] si et :&mode = 10 clavier = 32[IMAGE.SECU film.af pr "film.af] si et :&mode = 10 clavier = 9 [IMAGE.SECU film.suite (pr "film.suite)] si clavier = 27 [sisinon :&ecran.plein~ [unicon[commander ] unicon[outils] donne "&ecran.plein "false setfocus [Mswlogo Screen]] ~ [icon[commander ] icon[outils] donne "&ecran.plein "true setfocus [Mswlogo Screen]]] END To edition.touches2 si clavier = 17 [donne "&ctrl "false] end pour efanime cleartimer 17 mt end to efcapbox windowdelete "capbox end to efclavier keyboardoff ifelse 1 < compte :&pileevclavier[ignore pop "&pileevclavier][apply "keyboardon first :&pileevclavier stop] if emptyp :&pileevclavier [ stop] apply "keyboardon first :&pileevclavier end to effichier [:& dialogfileopen "*.lgo]1 if emptyp :& [stop] if listp :& [donne "& first :&] if not existp :& [messagebox [Effacer](se [Le fichier] :& [n'existe pas]) stop] if yesnobox "AVERTISSEMENT se [effacer le fichier ] :&[erasefile :&] end pour efmem :&box [:& listboxgetselect :&box ] locale "&obj locale "&objl make "&obj[] bury[[][&box &obj]] if "lstprocs = :&box [make "&obj (list :&) make "&objl first contents] if "lstnoms = :&box [make "&obj (list [] :&) make "&objl item 2 contents] if "lstprops = :&box [make "&obj (list [] [] :& ) make "&objl last contents] si yesnobox [Attention] se "Effacer :&~ [ listboxdeletestring2 :&box first :& :&objl er :&obj ] end TO efobjet3d donne "&obj3d [] END to efoutils if (activep "dessin "false) [dessiner] windowdelete "outils windowdelete "icout desactive "outils desactive "posbox desactive "capbox desactive "imagebox end TO efprops :& er (list [][](list :&) ) END to efrectvisible? [:nomrect "selection] remprop :nomrect "vis end to efsouris mouseoff ifelse emptyp :&pileevsouris[stop][ignore pop "&pileevsouris] if emptyp :&pileevsouris [ stop] apply "mouseon first :&pileevsouris end to ellipsa2 :ang :radius_x :radius_y :startang local "penstate make "penstate pendownp local "x make "x -(sin :startang)*:radius_x local "y make "y -(cos :startang)*:radius_y pu rt 90 fd sqrt (:x*:x + :y*:y) lt :startang if :penstate [pd] ellipsearc :ang :radius_x :radius_y :startang make "x -(sin :ang+:startang)*:radius_x make "y -(cos :ang+:startang)*:radius_y pu rt :ang+:startang-180 fd sqrt (:x*:x + :y*:y) rt 90 if :penstate [pd] end to ellipse :rad1 :rad2 ellipsearc 360 :rad1 :rad2 0 end to ellipse.arc2 [:&x] 4 .maybeoutput apply "ELLIPSA2 :&x end to ellipse2 :radius_x :radius_y ellipsa2 360 :radius_x :radius_y 0 end to enchaine [ :&] 1 (local "c% "&suite ) make "&suite bf :& make "& first :& make "c% [] si emptyp :& [op []] si wordp :& [repete compte :&[queue "c% ascii2 pop "&]~ op ifelse 13 = last :C% [ ( se :C% enchaine :&suite)]~ [ ( se :C% 32 enchaine :&suite)]] op( se enchaine first :& enchaine bf :& enchaine :&suite) end TO enfants :&obj op rprop :&obj "enfants END to enleveimage [:im comboboxgettext "cmbbuff ] [:n 0 ][:l :&pilemem] if bitindex = first :im [messagebox [Erreur ][On ne peut pas eliminer l'image en cours]~ op :&pilemem ] if emptyp :l [op []] if :im = first :l [if (activep "|Memoires_images| "false) ~ [comboboxdeletestring "cmbbuff :n ]~ op bf :l] op fput first :l ( enleveimage :im :n + 1 bf :l) end to enlprop :&o :&p :&v[:&prop rproph :&o :&p] if wordp :&prop [make "&prop (list :&prop)] make "&prop remove :&v :&prop ifelse emptyp :&prop [remprop :&o :&p][pprop :&o :&p :&prop] end to enlprops :&o :&p :&v[:&prop rproph :&o :&p] if emptyp :&v [stop] if listp :&v [enlprop :&o :&p first :&v enlprops :&o :&p bf :&v stop] if wordp :&prop [make "&prop (list :&prop)] make "&prop remove :&v :&prop ifelse emptyp :&prop [remprop :&o :&p][pprop :&o :&p :&prop] end to enlÞve [:&x] 2 .maybeoutput apply "remove :&x end to enlève [:&x] 2 .maybeoutput apply "remove :&x end to enmot :&c [:m " ] repete compte :&c [queue "m char pop "&c] op :m end pour enregistre :fich[:%wr writer][:%read reader][:%source :&FICHTEMP] if not memberp ". :fich [make "fich word :fich ".lgo] IF NAMEP "&DYNAM [if not emptyp :&dynam ~ [pourtous [dynamique.desactive ?]:&dynam]] IF NAMEP "&DYNAMDES [if not emptyp :&dynamdes~ [deterre[[][&dynamdes][utilisateur]]]] local "%lig enterre[[][%lig fich %wr %source %read][enregistre]] catch "error [enregistre2] localmake "& :&error make "&error error if not emptyp :&error [ setwrite [] setread[] closeall ~ (pr char 59 [Erreur de fichier : Tous les fichiers seront fermés] )run bf bf bf :erract stop] make "&error :& end pour enregistre2 noyield setcursorwait openwrite :fich setwrite :fich (pr $ " 59 " "Version $ "fran 231 "aise) pr [if not definedp "lib [frsetup]] ; openread :%source ; setread :%source ; until [eofp] [donne "%lig rw pr :%lig ] po :&procedures po filter [not memberp ? :&procedures ]first contents im fput [] bf contents setwrite :%wr setread :%read close :fich ;close :%source enterre "utilisateur end TO entiers :de :a if :de > :a [op []] op fput :de entiers 1 + :de :a END to envoyer2 :command [:dest "tous] ; this sends a command to all machines in the ring including this machine which will ; be last, if you get the response of your command then you know all the other machines ; also got it. ; if we can't send it now queue it up and we can send it when it's ok if not netconnectsendvalue (list :thismachine ph :command :dest ) ~ [ make "savequeue fput netacceptreceivevalue :savequeue ] end to erall erase contents end to ern :names erase namelist :names end pour erract erreur end TO erreur traiterr [] END TO essai [:x ] ec :x END TO estampe [:b bitmode][:old bitmode ][:f fen.active] if [0 0] = bitsize~ [ ic tortue.dessin stop] fbitmode :b bitpaste fen.factive :f fbitmode :old END to et [:X] 2 OP APPLY "AND2 MAP [MEMBERP ? [TRUE VRAI]] :X end pour etiquette :&txt li image.secu li label :&txt end TO etire :& :F fxy :f * premier :& :f * dernier :& END TO etoile repete 5[av 100 dr 144] END to existp :& local "err if memberp :& allopen [close :&] catch "error [openread :& close :&] make "err error ifelse emptyp :err [op "true][ op not (18 = first :err)] end TO ExplorerIexplore.exe END to face, [:x] sisinon vide? :x [ftortue "face] [demande "face premier :x] end TO face.av :n [:h !o "hauteur] si non pc = !o "couleur [!o [donne "couleur pc]] cabre 90 poly.def fd :h pique 90 fd :n pique 90 fd :h pique 90 fd :n pique 90 poly.fin pique 90 fd :n END to facette, [:x] sisinon vide? :x [ftortue "facette] [demande "facette premier :x] end TO facette.av :& soit "h !o "hauteur cabre 90 poly.def repete 2[fd :h pique 90 fd :& pique 90] poly.fin pique 90 fd :& END to faire.de_a [:&x] 2 .maybeoutput apply "FOR :&x end TO fanime ct si non nom? "&lanime [donne "&lanime[]] settimer 17 200 [queue "&lanime mousepos] END to faux op "faux end to fbidon :x bidon.fcouleur :x end TO fcap :& [:par] ! qui mp "fcap mp :& :par END TO fcapdist :& fcap premier :& av dernier :& END TO fchaine :&nom [ :&c enmot rprop "chaines :&nom] pprop "chaines enchaine questionbox list "Chaine: :&nom :&c END TO fclavier [:ev]2 push "&pileevclavier :ev apply "keyboardon :ev END to fcouleur :x ! qui.nom [crayon.fcouleur :x] ! qui.nom [bidon.fcouleur :x] end TO fdistobs :&d donne "&distobs :&d observe END TO fen.ferme :&n if (activep :&n "false)[windowdelete :&n desactive :&n] END to fen.frect :w :rect [ :x first :rect] [:y first bf :rect ][ :l first bf bf :rect][ :h last :rect] if wordp :w [make "W (list :w)] ; Note DLLs are not always called .DLL IFELSE or 32 = ITEM 2 MACHINE 40 = ITEM 2 MACHINE [RESIZEMAIN32 STOP ][dllload "user.exe] ; Get Window Handle to Main Window make "hwnd dllcall lput :w [w FindWindow l 0 s ] ; Now Resize it make "status dllcall (list "w "MoveWindow "w :hwnd "w :x "w :y "w :l "w :h "w "1) dllfree end TO fen.init fen.frect "Commander :&commander fen.frect [Mswlogo Screen] :&MswlogoScreen fen.frect "outils :&FENoutils END TO fen.restaure [:fich "C:\\winnt\\logo.ini] unicon "outils icon [-outils-] unicon "commander unicon "commandes if namep "commander.rect [ fen.frect "commander :commander.rect~ fen.frect "commandes :commander.rect~ fen.frect [mswlogo screen] :Mswlogo.rect~ fen.frect [outils] :outils.rect stop ] enterre[[][mswlogo.rect commander.rect]] (lect.logo.ini :fich) donne "commander.rect lisrect rprop "fen "commander donne "mswlogo.rect lisrect rprop "fen "screen fen.frect "commander :commander.rect fen.frect "commandes :commander.rect fen.frect [mswlogo screen] :Mswlogo.rect fen.frect [outils] :outils.rect END pour fermefen :f desactive :f fenetre.ef :f end to ffond :x setscreencolor convcoul :x end TO fgroupe :nom :l if wordp :l [make "l (list :l)] pourtous [dprop ? "groupe :nom] :l END TO Filesinternet ec "files END TO film [:MODE 10][:&t tortue] image.fmode :MODE (EC "image.fmode :MODE) if activep "film [stop] make "&affmode "false donne "&aff "false active "film bury[[][][film]] windowcreate "main "film "Film 300 20 75 275 [] staticcreate "film "statfilm.deb "Début 2 10 30 10 comboboxcreate "film "comb.deb 40 10 20 8 staticcreate "film "statfilm.n [Nb. d'images] 2 18 30 20 comboboxcreate "film "comb.n 40 22 20 8 buttoncreate "film "filmbtquit "X 0 0 10 10 [ desactive "film windowdelete "film] buttoncreate "film "btfilm.ouvre "Ouvrir 2 40 60 10 [film.ouverture] buttoncreate "film "btfilm.commandes "Commandes 2 53 60 10 ~ [setfocus [mswlogo screen] pr [film.commandes ]film.commandes ] buttoncreate "film "btfilm.af "Affiche 2 66 30 10 ~ [pr "image.secu image.secu setfocus [mswlogo screen]pr [film.af ]film.af ] buttoncreate "film "btfilm.suite "Suite 35 66 30 10 ~ [pr "image.secu image.secu setfocus [mswlogo screen]pr [film.suite ]film.suite ] buttoncreate "film "btfilm.montre "Montre 2 78 30 10 ~ [pr "image.secu image.secu setfocus [mswlogo screen]film.bt.montre ] buttoncreate "film "btfilm.cache "Cache 35 78 30 10 ~ [pr "image.secu image.secu setfocus [mswlogo screen]film.bt.cache] buttoncreate "film "btfilm.boucle "boucle 2 90 60 10 ~ [ setfocus [mswlogo screen]pr "image.secu image.secu pr "film.boucle film.boucle] buttoncreate "film "btfilm.stop "stop 2 100 60 10 [setfocus [mswlogo screen] pr "film.stop film.stop] staticcreate "film "statfilm.scr "tortue 2 124 70 10 staticcreate "film "stattfilm.act.titre "Action: 2 133 30 10 staticcreate "film "stattfilm.act " 2 140 75 18 comboboxcreate "film "comb.act 0 160 60 10 buttoncreate "film "btfilm.act.ok "Ok 60 160 15 10 [film.btok.action] staticcreate "film "stattfilm.clav2 "Clavier: 0 180 75 20 comboboxcreate "film "combfilm.clav 0 202 60 10 buttoncreate "film "btfilm.clav.ok "Ok 60 202 15 10 ~ [localmake "clav comboboxgettext "combfilm.clav ~ ifelse emptyp :clav [film.efclavier ec "film.efclavier ][apply "film.fclavier :clav (ec "film.fclavier :clav )] ~ staticupdate "stattfilm.clav2 ph "Clavier: comboboxgettext "combfilm.clav] comboboxsettext "combfilm.clav rprop mot "image 1021 "clavier staticupdate "stattfilm.clav2 ph "Clavier: comboboxgettext "combfilm.clav scrollbarcreate "film "scr.film 2 112 70 10 [ film.scroll.act ] scrollbarset "scr.film 1 compte :&films rang :&film :&films buttoncreate "film "btfilm.sel [Sélectionner le fond ] 2 220 70 10~ [pr [fselection film.rect] fselection film.rect] buttoncreate "film "btfilm.ffond [Copier vers le fond] 2 232 70 10 [pr "film.ffond film.ffond] buttoncreate "film "btfilm.decale [Décaler la tortue] 2 244 70 10 [film.fdecale ] buttoncreate "film "btfilm.anim [Importer le trajet] 2 254 70 10 ~ [ &prtraj film.ftrajet ] setturtle :&t END TO film.action [:&f rprop :&FILM "ACTION] ra :&F END TO film.af [:ind bitindex][:&vis visible?][:tortue tortue] fbitindex 1020 bitpastetoindex 1021 0 0 if :&mode < 10 [ bitpastetoindex 1021 film.x film.y film.af.fin stop] repete compte :&films [ localmake "&film item compteur :&films ~ (setturtle film.tortue :&film) ~ si "vrai = rprop :&film "visible[localmake "&P POS decale rprop :&film "DECALE ~ donne "ind (film.pos :&film) ~ fbitindex :ind + 1 fbitmode 5~ bitpastetoindex 1021 film.x film.y ~ fbitindex :ind fbitmode 4 ~ bitpastetoindex 1021 film.x film.y fpos :&p] ] film.af.fin end to film.af.fin [:rect rprop "image1021 "rect] fbitindex 1021 fbitmode 1 localmake "p posint fpos liste premier :rect (premier sp :rect) - dernier :rect bitpaste fbitindex :ind fpos :p setturtle :tortue end TO film.af2 [:ind bitindex][:&vis visible?][:tortue tortue] if :&vis [ct] fbitindex 1020 bitpastetoindex 1021 0 0 if :&mode < 10 [ bitpastetoindex 1021 film.x film.y film.af.fin stop] repete compte :&films [ localmake "&t item compteur :&films ~ (setturtle film.tortue :&t) ~ si "vrai = rprop :&t "visible[ ~ donne "ind (film.pos :&t) ~ fbitindex :ind + 1 fbitmode 5~ bitpastetoindex 1021 film.x film.y ~ fbitindex :ind fbitmode 4 ~ bitpastetoindex 1021 film.x film.y ] ] film.af.fin end TO film.anime [:&film :&film] setpos (anime.pos :&film) END pour film.boucle [:clavier rprop mot "image 1021 "clavier][:&%F :&film] image.secu setfocus[mswlogo screen] si non vide? :clavier [apply "fclavier :clavier] si :&film.stop [donne "&film.stop "faux film.joue0] donne "&film :&%f end pour film.bt.cache localmake "F item scrollbarget "scr.film :&films ~ (pr "\( "film.cache quoted :f "\) ) (film.cache :f )film.af pr "film.af end pour film.bt.montre localmake "F item scrollbarget "scr.film :&films ~ (pr "\( "film.montre quoted :f "\) ) (film.montre :f )film.af pr "film.af end pour film.btok.action localmake "&F item scrollbarget "scr.film :&films (montre "\( "film.faction comboboxgettext "comb.act quoted :&f "\) ) (film.faction comboboxgettext "comb.act :&f ) staticupdate "stattfilm.act comboboxgettext "comb.act end TO film.cache [:f :&film] [:&m "vrai] dprop :f "visible "faux END to film.clavier ra rprop "image1021 "clavier end TO film.commandes [:pos [0 0]][:x premier :pos ][:y dernier :pos] if (activep "filmbox "true)[stop] active "filmbox windowcreate "main "filmbox [Commandes du film] :x :y 153 35 [] buttoncreate "filmbox "filmquit "X 0 0 10 10 [pr "film.ferme film.ferme ] buttoncreate "filmbox "film.film "Film 120 0 30 10 [pr "film film ] buttoncreate "filmbox "film.stop "stop 95 12 20 10 ~ [pr "film.stop film.stop setfocus [mswlogo screen]] buttoncreate "filmbox "film.boucle "\> 60 12 30 10 ~ [pr "film.boucle setfocus [mswlogo screen] film.boucle ] buttoncreate "filmbox "film.af "Af. 10 12 20 10 [film.af setfocus [mswlogo screen]] buttoncreate "filmbox "film.suite "\>\| 35 12 20 10 [film.suite setfocus [mswlogo screen]] END TO film.couleursous [:&f :&film] ra rprop :&f "couleursous END pour film.debut [:&film :&film] ra rprop :&film "debut end TO film.decale [:&film :&film] ra rprop :&film "decale END TO film.def :nom :ndebut :n [:tortue tortue] 4 (film.fdebut :ndebut :nom ) (film.fn :n :nom) (film.ftortue :tortue :nom) if non membre? :nom :&films[queue "&films :nom ] if emptyp film.rect[fselection [-500 500 1000 1000] film.ffond fselection :sel] donne "&film :nom END TO film.efaction[:&film] pourtous [efprop ? "action ] :&f END TO film.efclavier efprop "image1021 "clavier END pour film.enregistre :nom :deb :n LOCALE "X repete :n [DONNE "X COMPTEUR fbitindex :X - 1 + :deb image.colle image.enregistre (mot :nom :x ".bmp)] end pour film.faction :action [:&f :&film ] si mot? :&F [dprop :&f "action :action stop] pourtous [ dprop ? "action :action ]:&f END TO film.fclavier :t1 :t2 dprop "image1021 "clavier liste :t1 :t2 END pour film.fdebut :ndebut[:&film :&film] dprop :&film "debut :ndebut dprop :&film "pos :ndebut end TO film.fdecale [:dec []][:&film :&film] [:&pos pos] si vide? :dec [film.fdecale.montre] dprop :&film "decale :dec film.af END pour film.fdecale.montre (film.fdecale [0 0] :&film)film.af windowcreate "main "decale "Décalage 200 0 100 25[]active "decale staticcreate "decale "statdecrect "Décalage: 5 0 100 10 donne "&dec "false fsouris [][donne "&pos2 possouris efsouris donne "&dec "true] ~ [][donne "&pos2 possouris efsouris donne "&dec "true] ~ [staticupdate "statdecrect ph "Décalage: decalage possouris :&pos] until [:&dec][] donne "dec decalage :&pos2 :&pos (montre "\( "film.fdecale :dec quoted :&film "\) ) windowdelete "decale end to film.Ferme if (activep "filmbox "false)~ [desactive "filmbox windowdelete "filmbox] film.stop end TO film.ffond [:ind bitindex] [:p pos][:pen pen] image.findex [1020 fond 1]image.copie image.findex [1021 fond 2] image.copie donne "film.origine sd sd image.rect dprop "&film "rect image.rect image.findex :ind li setpos :p setpen :pen END TO film.fimage :N [:&f filtre [tortue = film.tortue ?] :&films] pourtous [dprop ? "pos 2 * (:n - 1) + film.debut ?]:&f END pour film.fn :n [:&film :&film] dprop :&film "n :n end to film.fond[:ind bitindex][:&m :&mode] fbitindex 1020 si vide? image.rect [boitemessage "erreur [Pas de fond défini] stop] fselection image.rect image.fmode 1 image.colle image.fmode :&m end TO film.fpos :pos fpos :pos film.af END TO film.ftortue :n [:&film :&film] dprop :&film "tortue :n ajprop turtle "film :&film END TO film.ftortue.pos :pos [:&f :&film] pourtous [dprop ? "decale :pos]:&F END TO film.ftrajet[:&film :&film][:&anim anime.nom] fixe :&film "trajet chose :&anim END pour film.gif :name :deb :n [ :t 0][:delay 40] [:loop -1] [:ncoul 4][:trans [0 0 0]] localmake "append "false if not member? ". :name [make "name word :name ".gif] repete :n[fbitindex compteur - 1 + :deb bitcolle attends :t ~ (gifsave :name :delay :append :loop :ncoul :trans) make "append "true] end TO film.image [:&film :&film] localmake "Pos rprop :&film "pos localmake "deb rprop :&film "debut localmake "n rprop :&film "n localmake "max 2 * :n + :deb - 1 if :pos > :max [donne "pos :deb dprop :&film "pos :deb] if :pos < 0[donne "pos :max dprop :&film "pos :max] ra :pos END pour film.incruste :deb :n [ :t 10] [:action []][:&pas sisinon :&mode = 10 [2][1]] repete :n[fbitindex :&pas * (compteur - 1 )+ :deb ~ film.af attends :t execute :action] end to film.init donne "&film.pos film.debut end pour film.joue :deb :n [:t 5] [:action[]][:tortue tortue][:&film mot "&film :tortue] si non :&mode = 10[repete :n [fbitindex :deb + compteur - 1 bitpaste attends :t~ execute :action]stop] si :&film = mot "&film :tortue[film.def :&film :deb :n :tortue] dprop :&film "pos :deb repete :n [film.suite attends :t execute :action] end pour film.joue0 si :&film.stop [stop] noyield film.suite yield film.joue0 end TO film.montre [:f :&film][:&m "vrai] dprop :f "visible "vrai END pour film.n [:&film :&film] ra rprop :&film "n end pour film.ouverture if emptyp comboboxgettext "comb.deb[boitemessage "erreur[Pas d'image de début]stop] if emptyp comboboxgettext "comb.n[boitemessage "erreur[Pas de nombre d'images]stop] localmake "&debut premier comboboxgettext "comb.deb localmake "&n premier comboboxgettext "comb.n apply "film.ouvre ( ph "? :&debut :&n ) setfocus [Mswlogo Screen] end pour film.ouvre :nom :ndebut :n [:Xfich " ][:suff bf :&imsuff][:&pas ifelse 10 = :&mode [2][1]]~ [:sel :&selvis][:&tort turtle] localmake "&pr "false localmake "&xfich not numberp :xfich if "? = :nom [make "nom dialogfileopen word "* :suff make "&pr "true] localmake "&s member ". :nom if not emptyp :&s [make "suff :&s make "nom bl bl bl bl :nom ] while [numberp last :nom ][if :&Xfich [make "Xfich mot last :nom :Xfich ] ~ make "nom bl :nom] make "&imsuff :&s if :&pr [(pr "film.ouvre quoted mot nomfichec :nom :xfich :ndebut :n)] make "&film mot nomfich :nom :ndebut si non membre? :&film :&films [queue "&films :&film] si vide? (film.tortue :&film)[dprop :&film "tortue compte :&films ] ftortue rprop :&film "tortue if (activep "film "false) [scrollbarset "scr.film 1 compte :&films rang :&film :&films] ct li ! "film [crée :&film tortue] dprop :&film "n :n dprop :&film "debut :ndebut dprop :&film "pos :ndebut (image.secu 1022) setturtle :&tort repete :n [DONNE "X COMPTEUR ~ IMAGE.Findex ( LISTE :&pas * (:X - 1 ) + :ndebut nomfich :NOM COMPTEUR )~ image.fmode 1 image.ouvre (mot :nom :Xfich :suff) image.copie~ if :&pas = 2[ image.findex(liste image.index + 1 "masque image.index) ~ image.copie ~ if not :&selvis [selection.cadre]fy ycor - 2 fx xcor + 2 bidon.fcouleur [0 0 0] peins ~ vaselection fpos posbg selection.cadre fbitmode 4 bitpaste fbitmode 1 bitcopy rectl imchrect recth imchrect ]vaselection~ if numberp :xfich[donne "xfich :xfich + 1] ] if :&pas = 2[image.fmode 10] if :sel [selection.cadre] (image.annule 1022) ftortue rprop :&film "tortue localmake "sel selection if emptyp film.rect[fselection [-500 500 1000 1000] film.ffond fselection :sel] dprop :&film "visible "vrai end TO film.pos [:&film :&film] localmake "Pos rprop :&film "pos localmake "deb rprop :&film "debut localmake "n rprop :&film "n localmake "max 2 * :n + :deb - 1 if :pos > :max [donne "pos :deb dprop :&film "pos :deb] ra :pos END TO film.rect [:rect rprop "image1020 "rect] ra :rect END pour film.scroll.act si vide? :&films [staticupdate "statfilm.scr [Pas de film] stop] make "&film item scrollbarget "scr.film :&films localmake "&tortue rprop :&film "tortue (ec "ftortue :&tortue ) ftortue :&tortue staticupdate "statfilm.scr (ph :&film ": "Tortue tortue ) make "&act film.action staticupdate "stattfilm.act :&act comboboxsettext "comb.act :&act end TO film.scrollact END pour film.sprite :deb :n [ :t 100] [:action []][:timer 1] make "&timer :timer make "&xsprite 0 make "&deb :deb make "&nsprite :n settimer :&timer :t [catch "error ~ [fbitindex :&deb + reste :&xsprite :&nsprite ~ bitcolle make "&xsprite :&xsprite + 1 ] make "&error error~ if not emptyp :&error [cleartimer :&timer]] end pour film.stop[:clavier rprop mot "image 1021 "clavier] si non vide? :&pileevclavier [si :clavier = premier :&pileevclavier[efclavier]] donne "&film.stop "vrai end TO film.suite [:&pas sisinon :&mode = 10 [2][1]][:&t2 tortue] localmake "&t 0 repete compte :&films [donne "&film item compteur :&films ~ si "vrai = rprop :&film "visible[~ make "&t (film.tortue :&film)dprop :&film "couleursous couleursous ~ ftortue :&t execute rprop :&film "action ] ~ dprop :&film "pos :&pas + (film.image :&film)] film.af setturtle :&t2 END TO film.supprime[:&film :&film] ! :&film "supprime donne "&films enleve :&film :&films END TO FILM.TORTUE :&f ra rprop :&f "tortue END TO film.trajet [:&film :&film] setpos (anime.pos :&film) END TO film.x [:x (premier posint )- (premier rprop "image1020 "rect) ] ra ifelse :x < 0 [0][:x] end TO film.y [:y (dernier posint )-~ (premier sp rprop "image1020 "rect)~ + dernier rprop "image1020 "rect] donne "Y :y - dernier rprop mot "image bitindex "rect ra ifelse :y <0 [0][:y] END to filter :filter.template :template.list [:template.number 1] ~ [:template.lists (list :template.list)] if emptyp :template.list [op :template.list] if apply :filter.template (list first :template.list) ~ [op combine (first :template.list) ~ (filter :filter.template bf :template.list :template.number+1)] op (filter :filter.template bf :template.list :template.number+1) end TO fim.suite END to fimagerect :rect [:index bitindex] pprop word "image :index "rect :rect bury(list [][]word "image :index) ajourimage end to fimagesel fimagerect selection end to find :find.template :template.list [:template.number 1] ~ [:template.lists (list :template.list)] if emptyp :template.list [op []] if apply :find.template (list first :template.list) [op first :template.list] op (find :find.template bf :template.list :template.number+1) end to fixe :&obj :&prop :&val ! :&obj [donne :&prop :&val] end TO fobjet3d :& si mot? :& [donne "& (list :&)] donne "&obj3d :& END .macro for :for.values :for.instr ~ [:for.var first :for.values] ~ [:for.initial run first bf :for.values] ~ [:for.final run first bf bf :for.values] ~ [:for.step forstep] ~ [:for.tester (ifelse :for.step < 0 ~ [[:for.initial < :for.final]] ~ [[:for.initial > :for.final]])] local :for.var catch "for.catchtag [op for.done runresult [forloop :for.initial]] op [] end to for.done :for.result if emptyp :for.result [op [stop]] op list "output quoted first :for.result end .macro foreach [:foreach.inputs] 2 catch "foreach.catchtag ~ [op foreach.done runresult ~ [foreach1 bl :foreach.inputs last :foreach.inputs 1]] op [] end to foreach.done :foreach.result if emptyp :foreach.result [op [stop]] op list "output quoted first :foreach.result end to foreach1 :template.lists :foreach.template :template.number if emptyp first :template.lists [throw "foreach.catchtag] apply :foreach.template firsts :template.lists .maybeoutput foreach1 bfs :template.lists :foreach.template :template.number+1 end to forientation [:&x] 1 .maybeoutput apply "setorientation :&x end to forloop :for.initial make :for.var :for.initial if run :for.tester [throw "for.catchtag] run :for.instr .maybeoutput forloop (:for.initial + :for.step) end to forstep if equalp count :for.values 4 [op run last :for.values] op ifelse :for.initial > :for.final [-1] [1] end To forward.path wriggle.there :directions 0 ; draw old segments fast make "directions lput new.direction :directions ; add new segment arc last :directions 10 ; draw new segment slow reverse.path ; go back to tail end to fpapiercentre supgauche scrollx 200 scrolly 300 end TO fpapiersupgauche scrollx -400 scrolly -600 END to fpos :& [ :coul ! qui "couleur] ! qui[fpos :&] end TO fposxyz :& ! qui [fposxyz :&] END TO frotdist :& dr premier :& av dernier :& END to frsetup if definedp "outils[stop] make "workdir "G:\\mswlogo\\ load word :workdir "def.lgo end POUR fselection :rect [:pen pen][:selvis :&selvis] if :selvis [marquerect selection] if emptyp :rect [messagebox "Erreur~ (se "fselection [ n'aime pas] (list :rect ) "comme "données) stop] if not bf bf selection = [ 0 0][setactivearea tailleversrect selection] pprop "selection "rect :rect lc fpos bl bl selection if :selvis [marquerect selection] END TO fsouris [:ev] 5 push "&pileevsouris :ev apply "mouseon :ev END TO ftortue :&tort [:&mess "TRUE] si liste? :&tort [ donne "&qui :&tort stop] si nombre? :&tort [si :&tort < 0 [setturtle :&tort stop] ~ localmake "&nom mot "t :&tort ] si non nombre? :&tort [localmake "&nom :&tort donne "&tort ! :&nom "tortue] si vide? ! :&nom "parent [(tortue.nouvelle :&nom "false) donne "&tort ! :&nom "tortue] donne "&qui :&nom setturtle :&tort setpc ! qui.nom "couleur setfc ! qui.nom "bidon END to fversion[:&efprim "false] er "pà make "version time Make "startup [&init ] if (activep "outils "false) [efoutils] er [[][commander.rect]] er [[][mswlogo.rect]] make "&procedures[] make "&suff ".bmp er[[&config]] pourtous [! ? [supprime]] filtre [not membre? ?[ film t0 t_1 t_2 t_3 facette ]] enfants "tortue pourtous [! [supprime]] filtre [not membre ? [oeil lampe regard vide ] ] enfants "nom_de_tortue pourtous [(film.supprime ?)] :&films unburyall bury :lib bury [[][][&fr &en]] ; if yesnobox "Nondisp [Chercher les procedures non disponibles...]~ ; [make "lwnondisp filter [(text "ac) = text ?]procedures] bury :lwnondisp (montre "procedures compte procedures) donne "&cachees " pourtous [donne "&cachees mot :&cachees ?] first enterrees repete compte :&pilemem [remprop word "image first item repcount :&pilemem "rect] make "&pileevsouris [] make "&pileevclavier[] make "&selvis "false make "&error [] make "&lanime [] make "&animations[] remprop "dessin "active remprop "enregistre "fichier make "&pilemem[[0 Presse papier][01022 Image Ajustee][01023 Ancien Ecran]] make "&ajim "false make "&configpers "false if :&efprim[er [[][&primen &prim]]] pr version er[[][lpos lrotdist lcapdist ]] make "&save dialogfilesave "*.lgo if not emptyp :&save [save first :&save] outils buryall end TO fx :& [ :coul ! qui "couleur] si not pencolor = :coul[crayon.fcouleur pencolor] setpc ! qui "couleur setx :& END TO fxy :&x :&y[ :coul ! qui "couleur] si not pencolor = :coul[crayon.fcouleur pencolor] setpc ! qui "couleur setxy :&x :&y END TO fxyz :&x :&y :&z[ :coul ! qui "couleur] si not pencolor = :coul[crayon.fcouleur pencolor] setpc ! qui "couleur setxy :&x :&y :&z END TO fy :&[ :coul ! qui "couleur] si not pencolor = :coul[crayon.fcouleur pencolor] setpc ! qui "couleur sety :& END TO fz :&z[ :coul ! qui "couleur] si not pencolor = :coul[crayon.fcouleur pencolor] setpc ! qui "couleur setz :&z END TO ga :& dr -:& END TO gc ! qui [bg] END to gensym[:&symb "g] if not namep "gensym.number [make "gensym.number 0] make "gensym.number :gensym.number + 1 output (word :&symb ". :gensym.number) end TO gifloadsize :name[:r reader] openread :name setread :name setreadpos 6 localmake "width ascii rc make "width :width + 256 * ascii rc localmake "height ascii rc make "height :height + 256 * ascii rc op list :width :height close :name setread :r END to globe_1, [:x] sisinon vide? :x [ftortue "Globe_1] [demande "Globe_1 premier :x] end to groupe :nom [:procs se first contents first buried ]~ [:names se first bf contents first bf buried ]~ [:plists se first bf bf contents first bf bf buried ] noyield setcursorwait op (se filter [:nom = rprop ? "groupe] :procs filter [:nom = rprop ? "groupe]:names ~ filter [:nom = rprop ? "groupe] :plists) yield end TO groupe.def windowcreate "main "defgr [Définir un groupe] 0 50 100 100 [] buttoncreate "defgr "defgrbtq "X 0 0 10 10 [windowdelete "defgr] staticcreate "defgr "defgrstatNom "Nom 0 10 30 10 comboboxcreate "defgr "defgrcmbNom 30 10 70 10 buttoncreate "defgr "defgrbtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defgr "defgrbtcree "Créer 30 50 45 10 [ ~ localmake "data (mp " mp comboboxgettext "defgrcmbNom selection ) ~ apply "groupboxcreate :data~ (pr "groupe.crée ""Ecran :data)] buttoncreate "defgr "defgrbtef "Effacer 30 60 45 10~ [groupboxdelete comboboxgettext "defgrcmbNom ~ (show "groupe.ef comboboxgettext "defgrcmbNom) ] end pour groupe.deterre :nom unbury filter [:nom = rprop ? "groupe ] first buried unbury namelist filter [:nom = rprop ? "groupe ] first bf buried unbury pllist filter [:nom = rprop ? "groupe ] last buried end pour groupe.enterre :nom bury filter [:nom = rprop ? "groupe ] procedures bury namelist filter [:nom = rprop ? "groupe ] first bf contents bury pllist filter [:nom = rprop ? "groupe ] last contents end pour hello boitemessage "Bienvenue [Bonjour] end TO ic ! qui [ic] END to icon :window windowset :window 6 end to iconeoutils windowcreate "main "icout "-outils- 270 22 30 25[ icon "-outils-] buttoncreate "icout "bticout "Activer 0 0 30 10 [unicon "outils icon "-outils-] end .macro if :c :act1 [:act2 []] ifelse2 memberp :c [true vrai] [op :act1] [op :act2] end .macro ifelse :c :act1 :act2 op ifelse2 memberp :c [true vrai] [:act1] [:act2] end to ignore :stuff end TO im :& if emptyp :& [stop] ifelse listp first :& [improcs first :&~ if not emptyp bf :& [imnoms first bf :& ~ if not emptyp bf bf :& [improps first bf bf :&] ]]~ [improc :&] END pour image.annule [:sec 1023] [:bitind bitindex][:sel selection][:pos position] [:pen pen][:mode :&mode][:bitmode bitmode] donne "&mode 1 fbitmode 1 setbitindex :sec pu setpos bl bl image.rect bitcolle setbitindex :bitind pu setpos :pos setpen :pen donne "&mode :mode fbitmode :bitmode end to image.colle[ :masque ifelse :&mode < 10 [-1][bitindex + 1]] [:rect [] ] [ :index bitindex] [:indexsave 1023]~ [:&aj ifelse (activep "images "false) [ checkboxget "chkaj] [:&ajim]]~ [:&op ifelse (activep "images "false) [ checkboxget "chkop] [:&opim]]~ [:oldindex bitindex][:pos position][:pen pen][:vis shownp][:bitmode bitmode]~ [:selvis :&selvis] if :selvis [marquerect selection] setbitindex :index if [0 0] = bitsize [messagebox "Erreur se[Pas d'image pour l'index]bitindex stop] make "rect se position bitsize pu ht if :&aj [ajusteimage fselection image.rect setpos posbg ~ ifelse :&op [setbitmode 5 bitpaste bitpaste setbitmode :bitmode]~ [bitpaste] setbitindex :oldindex setpos :pos ajourimage setpen :pen ~ if :vis [mt] stop ] setpos (posbg :rect) if not :index = :indexsave [sauvecran :indexsave :rect ] ifelse :&op [setbitmode 5 bitpaste bitpaste setbitmode :bitmode]~ [ifelse :masque <0 [bitpaste][setbitmode 5 setbitindex :masque bitpaste ~ setbitmode 4 setbitindex :index bitpaste setbitmode :bitmode]] if :selvis [marquerect selection] setpos :pos fselection se position bf bf :rect setbitindex :oldindex setpen :pen if :vis [mt] end to image.copie[:rect selection ][:index bitindex][:oldindex bitindex]~ [:pen pen ][:pos pos][:vis shownp][:selvis :&selvis] if :selvis [marquerect selection] pu ht setbitindex :index setpos ( rectposbg :rect) bitcopy rectl :rect recth :rect fimagerect :rect if :selvis [marquerect selection] pu setpos :pos setpen :pen setbitindex :oldindex if :vis [mt] end to image.coupe[:rect selection ][:index bitindex][:oldindex bitindex]~ [:pen pen ][:pos position][:vis shownp][:selvis :&selvis] if :selvis [marquerect selection] pu ht setpos ( rectposbg :rect) setbitindex 1023 bitcopy rectl :rect recth :rect fimagerect :rect setbitindex :index bitcut rectl :rect recth :rect fimagerect :rect if :selvis [marquerect selection] setpos :pos setpen :pen setbitindex :oldindex if :vis [mt] end TO image.edition windowcreate "main "&edit "Edition 0 55 60 70[]~ buttoncreate "&edit "bt&editq "X 0 0 10 10 [windowdelete "&edit] ~ buttoncreate "&edit "bt&ann "| Annuler (/z) | 0 10 60 10 [pr "image.annule image.annule setfocus[Mswlogo Screen] ] ~ buttoncreate "&edit "bt&sel "| Selectionner (/y) | 0 20 60 10 [pr "selectionne selectionne setfocus[Mswlogo Screen]]~ buttoncreate "&edit "bt&coup "| Couper (/x) | 0 30 60 10 [pr "image.coupe image.coupe setfocus[Mswlogo Screen] ] ~ buttoncreate "&edit "bt&cop "| Copier (/c) | 0 40 60 10 [pr "image.copie image.copie setfocus[Mswlogo Screen] ] ~ buttoncreate "&edit "bt&col "| Coller (/v) | 0 50 60 10 [pr "image.colle image.colle setfocus[Mswlogo Screen] ] ~ setfocus[Mswlogo Screen] END TO image.ellipse [:s selection] [:p pos] [:pen pen][:c cap][:&svis :&selvis] image.secu if :&svis[selection.cadre] selectionne localmake "sel selection localmake "posel list item 1 :sel (item 2 :sel )-( dernier :sel ) / 2 lc fpos :posel fcap 0 bi (montre "lc "fpos :posel "fcap 0 "bi "ellipse2 (item 4 :sel) /2 ( item 3 :sel ) /2 "lc ) ellipse2 (item 4 :sel) /2 ( item 3 :sel ) /2 lc fselection :s if :&svis[selection.cadre] lc fpos :p fcap :c setpen :pen END to image.enregistre :fich[:imp "false] [:rect selection ][:act activearea][:pos pos][:pen pen] setactivearea tailleversrect selection if [[]]= :fich [ stop] marquerect :rect attends 10 marquerect :rect local "fich2 ifELSE listp :fich [make "fich2 :fich make "fich first :fich ][MAKE "FICH2 (LIST :FICH)] if not memberp ". :fich [if not emptyp :fich[make "fich word :fich :&imsuff]] ifelse ".gif = member ". :fich~ [catch "error [apply "gifsave :fich2 donne "&imsuff "*.gif]]~ [bitsave :fich donne "&imsuff "*.bmp] if :imp[(pr [image.enregistre ] (list FPUT nomfichec :fich bf :fich2 ) )] setactivearea :act fpos :pos setpen :pen end TO image.fbitmode END TO image.findex :n scrollset :n END TO image.fmode :n [:&a :&aff] ifelse (activep "images "false)~ [donne "&aff "false scrollbarset "scrmode 1 10 :n donne "&aff :&a]~ [donne "&mode :n ifelse :n < 10 [fbitmode :n][fbitmode 1]] END TO image.ftmode END POUR image.h op recth image.rect END TO image.index op bitindex END POUR image.l[:index bitindex] op rectl (image.rect :index) END TO image.mode op :&mode END TO image.nom op bf find [bitindex = first ? ] :&pilemem END TO image.ouvre :fich [:imp "false][:index 1023] [:r reader] [:pos pos]~ [:pen pen][:selvis :&selvis][:ind bitindex] noyield (local "iml "imh) if emptyp :fich [stop] IF LISTP :FICH[MAKE "FICH FIRST :FICH] if not memberp ". :fich[make "fich word :fich sp :&imsuff] localmake "suff member ". :fich make "&imsuff word "* :suff if :imp [(pr [image.ouvre ] word "" nomfichec :fich )] ifelse :suff = ".gif~ [make "iml gifsize :fich]~ [make "iml bitloadsize :fich] make "imh dernier :iml make "iml premier :iml dprop "charge "rect (se :pos :iml :imh) dprop "charge "fich nomfichec :fich if :selvis [marquerect selection] fselection (liste -500 500 :iml :imh) (copieimage selection :index) lc fpos list first pos (last pos ) - :imh ifelse :suff = ".gif~ [gifload :fich]~ [bitload :fich] fpos [-500 500] (copieimage selection 0) (colleimage selection :index) fpos :pos fselection ph pos sp sp selection (copieimage selection :index) (colleimage selection 0) setpen :pen fselection imchrect if :selvis [marquerect selection] yield end to image.rect [:index bitindex] op rprop word "image :index "rect end to image.rectangle[:s selection][:p pos][:pen pen][:&svis :&selvis] if :&svis[selection.cadre] selectionne li fcap 0 fpos sd sd selection fy coory - dernier selection (show "li "fcap 0 "fpos pos "rectangle2 item 4 selection item 3 selection "li ) bi rectangle2 item 4 selection item 3 selection lc fselection :s if :&svis[selection.cadre] li fpos :p setpen :pen end to image.secu [:sec 1023] [:bind bitindex][:pos position][:pen pen] ;li setpos ( posbg :ecran.secu sd sd :ecran.secu) setbitindex :sec apply "bitcopy sp sp :ecran.secu fimagerect :ecran.secu setbitindex :bind setpos :pos setpen :pen end POUR imagerectici [:pos pos] op (se :pos image.l+ first pos image.h + last pos) END to images if activep "images [stop] make "&affmode "false donne "&aff "false active "images bury[[][][images]] windowcreate "main "imagebox "Images 305 10 75 220 [] buttoncreate "imagebox "imageboxbtquit "X 0 0 10 10 [ desactive "images~ make "&ajim checkboxget "chkaj make "&opim checkboxget "chkop ~ windowdelete "imagebox] buttoncreate "imagebox "imageboxbtok "OK 60 0 10 10 ~ [(bitindex.modif ) (pr "image.findex bitindex) ] staticcreate "imagebox "imageboxstatvalm form bitindex 5 0 0 20 18 10 staticcreate "imagebox "imageboxstatimnom nomimage bitindex 20 20 70 10 comboboxcreate "imagebox "imageboxcmbind 10 0 45 10 staticcreate "imagebox "imageboxstatrect image.rect 0 10 70 10 scrollbarcreate "imagebox "scrim 0 30 65 8[chim if :&aff [ (pr "image.findex bitindex) ]] scrollset bitindex buttoncreate "imagebox "btccharge "Ouvrir 2 40 60 10~ [(image.ouvre dialogfileopen :&imsuff "true) setfocus [Mswlogo Screen]] buttoncreate "imagebox "btsauve "Enregistrer 2 50 60 10~ [(image.enregistre dialogfilesave :&imsuff "true) setfocus [Mswlogo Screen]] buttoncreate "imagebox "btfilm "Film 2 63 60 10~ [pr "film film setfocus [Mswlogo Screen]] buttoncreate "imagebox "btannul "Annuler 2 75 60 10~ [image.annule pr "image.annule setfocus [Mswlogo Screen]] buttoncreate "imagebox "btcoupe "Couper 2 85 60 10 [image.coupe pr "image.coupe setfocus [Mswlogo Screen]] buttoncreate "imagebox "btcopie "Copier 2 95 60 10 [image.copie pr "image.copie setfocus [Mswlogo Screen]] buttoncreate "imagebox "btcollel "Coller 2 105 60 10 [image.colle pr "image.colle setfocus [Mswlogo Screen]] groupboxcreate "imagebox "grim 1 111 61 22 checkboxcreate "imagebox "grim "chkaj "Ajuster 5 116 40 8 if :&ajim [checkboxset "chkaj 1] checkboxcreate "imagebox "grim "chkop "Transparent 5 124 50 8 if :&opim [checkboxset "chkop 1] buttoncreate "imagebox "btsel "Sélectionner 2 136 60 10 [selectionne pr "selectionne ] buttoncreate "imagebox "btmontresel [Voir /cacher] 2 146 40 10 ~ [pr "selection.cadre marquerect selection setfocus [Mswlogo Screen]] buttoncreate "imagebox "btvasel [Aller] 42 146 20 10 [vaselection setfocus [Mswlogo Screen]] buttoncreate "imagebox "btselim [Sel. <- Image.rect] 2 156 60 10 [fselection image.rect] staticcreate "imagebox "statimageboxmode [Mode colle:] 0 180 45 8 staticcreate "imagebox "statimageboxmodeval bitmode 50 180 10 8 staticcreate "imagebox "statimageboxmodetxt item bitmode :&limmodes 0 168 70 8 scrollbarcreate "imagebox "scrmode 0 187 60 10 [donne "&mode scrollbarget "scrmode ~ colle.fmode :&mode ~ if :&aff [ if :&affmode[ (pr "image.fmode :&MODE)]] ] scrollbarset "scrmode 1 10 :&mode make "&affmode "true end to imchrect op rprop "charge "rect end TO imnom :& ( show "donne word "" :& obj.im thing :&) END to imnoms :& if not emptyp :& [foreach :& [imnom ?]] end to improc :& po :& END to improcs :& foreach :& [improc ?] end TO improp :& [:lp plist :&] local "prop repeat count :lp [ifelse ( 1 = remainder repcount 2) ~ [make "prop item repcount :lp ]~ [(show "dprop obj.im :& obj.im :prop obj.im item repcount :lp)]] END to improps :& if not emptyp :& [foreach :& [improp ?]] end To inchworm cs ht pennormal local [mode direction directions] make "mode 1 ; direction normal make "directions [] repeat 5 [make "directions fput new.direction :directions] ; create new worm wriggle.there :directions 10 ; draw worm emerging from 'home' reverse.path ; go back to tail end to initdynval :nom [:wn rprop :nom "fen][:&pol rprop :nom "coorpol] ~ [:vx0 comboboxgettext word "comb.vx0Val :wn]~ [:vy0 comboboxgettext word "comb.vy0Val :wn]~ [:ax0 comboboxgettext word "comb.ax0Val :wn]~ [:ay0 comboboxgettext word "comb.ay0Val :wn]~ [:pos0 comboboxgettext word "comb.pos0Val :wn] donne "pos0 :pos0 if not emptyp :pos0 [pprop :nom "pos0 :pos0] if not emptyp :vx0 [ifelse :&pol [ pprop :nom "vd run :vx0] [ pprop :nom "vx0 run :vx0]] if not emptyp :vy0 [ifelse :&pol [ pprop :nom "vi run :vy0 ][ pprop :nom "vy0 run :vy0]] if not emptyp :ax0 [pprop :nom "ax0 first :ax0] if not emptyp :ay0 [pprop :nom "ay0 first :ay0] local[vd vi] ifelse rprop :nom "coorpol [donne "vi rprop :nom "vi donne "vd rprop :nom "vd dprop :nom "vx0 :vi * cos :vd~ dprop :nom "vy0 :vi * sin :vd ]~ [donne "vx0 rprop :nom "vx0 donne "vy0 rprop :nom "vy0 ~ dprop :nom "vd ifelse 0 = :vx0 ~ [ ifelse :vy0 = 0 [0][ifelse :vy0 >0 [90][-90] ]]~ [ifelse :vy0 = 0 [0][(arctan2 :vx0 :vy0)]] dprop :nom "vi sqrt :vx0 * :vx0 + :vy0 * :vy0] end to ins :& :l [:n 0] if emptyp :l [op (list :&)] if beforep (first first :l) first :&[op fput first :l ( ins :& bf :l :n + 1)] if (first first :l) = first :& [op fput :& bf :l ] op fput :& :l end to ins.num :& :l [:n 0] if emptyp :l [op (list :&)] if (first first :l) < first :&[op fput first :l ( ins.num :& bf :l :n + 1)] if (first first :l) = first :& [op fput :& bf :l ] op fput :& :l end TO interface windowcreate "main "interface "Interface 0 50 100 100 [] buttoncreate "interface "intbtq "X 0 0 10 10 [windowdelete "interface] buttoncreate "interface "intbtbouton "Bouton 0 10 45 10 [bouton.def ] buttoncreate "interface "intbtstat "Texte 0 20 45 10 [stat.def ] buttoncreate "interface "intbtlst "boiteliste 0 30 45 10 [boiteliste.def ] buttoncreate "interface "intbtcmb "boitecomb 0 40 45 10 [boitecomb.def ] buttoncreate "interface "intbtgr [Groupe] 50 10 45 10 [groupe.def ] buttoncreate "interface "intbtrad [Bouton radio] 50 20 45 10 [boutonradio.def ] buttoncreate "interface "intbtcoche "Coche 50 30 45 10 [coche.def ] ;buttoncreate "interface "intbtbouton "Bouton 0 10 30 10 [bouton.def ] END to interprete [:r reader] if not memberp "edit.lgo allopen [openread "edit.lgo] setread "edit.lgo setreadpos 0 &parse setread :r close "edit.lgo pr "**** end to interpreter[:lprocs []] [:mess (se $ "Proc 233 "dures $ "d 233 $ "j 224 " $ "d 233 "finies:)]~ [:%cont first contents] noyield setcursorwait ; ( pr $ " 59 " $ "Interpr 233 "tation "de nomfichec :&fichtemp) make "lprocs verifprocs if :lprocs = [!erreur!] ~ [ if yesnobox [Erreur d'edition][Editer de nouveau ? ]~ [windowfileedit :&fichtemp [ interpreter] ]stop ] if not emptyp :lprocs [( pr $ " 59 " "erreur: :mess :lprocs ) if yesnobox [Erreur]~ (se :mess $ " 13 " :lprocs $ " 13 " [Editer de nouveau ? ]) ~ [windowfileedit :&fichtemp [ interpreter] ]stop ] local "er make "er error catch "error [(type char 59 char 32 last bl time char 32 "sauvegarde: char 32 ~ "| avant édition dans: |) save "c:\\temp\\edition.tmp load :&fichtemp ] make "er error if emptyp :er [pr (word char 59 "| après édition dans: | :&fichtemp) ~ pourtous [if yesnobox [Supprimer] (se ? [n'est plus dans l' Editeur ] $ " 13 " [supprimer] ?)~ [er ?]] filtre [not membre? ? :&procedures ]first contents yield stop] make "&error :er (pr car 59 "erreur first :er) if yesnobox [Erreur :er] [Editer de nouveau ? ]~ [windowfileedit :&fichtemp [ interpreter ]stop ] end to invoke :function [:inputs] 2 .maybeoutput apply :function :inputs end to item2 :N :l if :n > count :l [messagebox "erreur (se "item :n :l [n'existe pas]) op[]] op item :n :l end to jean, [:x] ftortue "jean end pour jeu0 si :viestab = 0 [jeu stop] lc fpos :posdebut donne "vies :vies0 afvies pilote donne "viestab :viestab - 1 end TO jouesons :& [:n 1] [:imp "false] if emptyp :&[stop] sonbox if listp :&[make "& first :&] if :imp [(pr [joueson ] word "" nomfichec :& :n ) ] make "&son :& joueson :& :n END to jules, [:x] sisinon vide? :x [ftortue "jules] [demande "jules premier :x] end to lampe, [:x] sisinon vide? :x [ftortue "lampe] [demande "lampe premier :x] end TO lc ! qui [li] END TO lect.logo.ini [:fich ifelse existp "C:\\windows\\logo.ini ["C:\\windows\\logo.ini][] ] if emptyp :fich [fen.init stop] openread :fich setread :fich (local "&l ) donne "&l rw until [ "|[logo]| = :&l] [donne "&l rw ] make "& [] until [emptyp :&l] [donne "&l rw queue "& :&L ] close :fich setread [] until [emptyp :& ][donne "&l runparse first :&~ if not emptyp :&l [ dprop "fen first :&l last :&l ] donne "& bf :& ] END TO li ! qui "li END TO lib :&% :&& :n er :&% push "&prim :&% pprop "&en :&% :&& pprop "&fr :&& :&% define :&% (list list [&x] :n (list ".maybeoutput "apply word char 34 :&& ":&x) ) END to lisbase :nom :fich [:lecture reader] openread :fich setread :fich creebase :nom rl until [eofp] [make "&l rl pr :&l if not emptyp :&l [adbase :nom :&l]] close :fich setread :lecture end POUR liscar setfocus [mswlogo screen] make "&keyb "false keyboardon[make "&keyb "true] until [:&keyb] op ascii2 keyboardvalue END pour lisrect :w [:& " ] until [emptyp :w ] [make "& word :& ifelse 44 = ascii2 first :w [car 32 ][first :w ] make "w bf :w] op runparse :& end pour listboxdeletestring2 :&n :& :&objl local "n if not emptyp find [ make "n # - 1 ? = :& ]:&objl [ listboxdeletestring :&n :n] end TO listeversmot :&&l [:&subst char 32] if emptyp :&&l [op "] ifelse emptyp bf :&&l [op first :&&l][op (mot premier :&&l :&subst (listeversmot sp :&&l :&subst))] END to ll [:&lig rw] if :&lig = [] [op []] if :&lig = " [op [] ] ifelse &acc :&lig [op trait.lig][op parse :&lig] end .macro localmake :name :value output (list "local (word "" :name) "apply ""make (list :name :value)) end TO long_dialogfileopen :in_name localmake "out_name dialogfileopen :in_name localmake "fix_name first :out_name repeat (count :out_name)- 1 [make "fix_name (word :fix_name char 32 ~ item repcount + 1 :out_name)] op :fix_name END TO long_filename :out_name if wordp :out_name[op :out_name] if emptyp :out_name [op[]] localmake "fix_name first :out_name repeat (count :out_name)- 1 [make "fix_name (word :fix_name char 32 ~ item repcount + 1 :out_name)] op :fix_name END TO loop END to map :map.template [:template.lists] 2 op map1 :template.lists 1 end to map.se :map.se.template [:template.lists] 2 op map.se1 :template.lists 1 end to map.se1 :template.lists :template.number if emptyp first :template.lists [output []] output sentence (apply :map.se.template firsts :template.lists) ~ (map.se1 bfs :template.lists :template.number+1) end to map1 :template.lists :template.number if emptyp first :template.lists [output first :template.lists] output combine (apply :map.template firsts :template.lists) ~ (map1 bfs :template.lists :template.number+1) end to marquerect :r [:x1 item 1 :r][:y1 item 2 :r][:x2 sum :x1 item 3 :r][:y2 difference :y1 last :r]~ [:pos pos][:pen pen][:vis shownp] ct setpensize [1 1] pu setpos list :x1 - 1 :y1 penreverse pd setpos list :x2 :y1 setpos list :x2 :y2 - 1 setpos list :x1 - 1 :y2 - 1 setpos list :x1 - 1 :y1 + 1 pu setpos :pos setpen :pen if :vis[mt] make "&selvis non :&selvis end pour max :l [:n 0] si vide? :l [ra :n] si :n > premier :l[ra (max sp :l :n)] ra (max sp :l premier :l) end TO mcisonbox[:&nom " ]1 if (activep "mcisonbox "true)[stop] local "max make "max son.longueur active "mcisonbox if not namep "&pas [make "&pas 1] windowcreate "main "mcisonbox word "Son:\ nomfich :&nom 139 35 173 35 [] staticcreate "mcisonbox "statsonpostitre "Position: 20 0 30 10 staticcreate "mcisonbox "statmcisonpos son.pos 50 0 40 10 buttoncreate "mcisonbox "mcisonquit "X 0 0 10 10 [pr "son.ferme son.ferme ] buttoncreate "mcisonbox "sondeb "\<\< 15 10 20 10 ~ [ pr "son.debut son.debut ] buttoncreate "mcisonbox "sonar "\< 40 10 20 10 ~ [ son.re :&pas ] buttoncreate "mcisonbox "son.stop "stop 65 10 20 10 ~ [pr "son.stop son.stop (pr "son.fpos son.pos)] buttoncreate "mcisonbox "son.play "play 90 10 20 10 ~ [prsonjoue son.joue ] buttoncreate "mcisonbox "son.av "\> 115 10 20 10 ~ [ son.av :&pas ] buttoncreate "mcisonbox "son.fin "\>\> 140 10 20 10 ~ [pr "son.fin son.fin ] END to mcisons :a [:imp "false] (pr "son.ouvre quoted (word char 124 nomfichec :a char 124)) son.ouvre :a ( pr "mcisonbox quoted (word char 124 nomfichec :a char 124)) (mcisonbox :a) end TO mcisonstatupdate if (activep "mcisonbox "false)[staticupdate "statmcisonpos son.pos] END TO membox if activep "Memoire [stop] active "Memoire bury[[][][memoire]] make "&procs [] make "&noms [] make "&props [] windowcreate "main "membox "Memoire 0 15 105 230 [] staticcreate "membox "statedtout (se "A $ " 233 "diter) 20 0 40 10 buttoncreate "membox "btmemboxquitte "X 0 0 10 10~ [desactive "Memoire windowdelete "membox] listboxcreate "membox "lsted 20 10 80 40 staticcreate "membox "statproc $ "Proc 233 "dures 20 50 40 10 listboxcreate "membox "lstprocs 20 60 80 45 foreach procedures [listboxaddstring "lstprocs ?] staticcreate "membox "statnoms "Noms 20 105 40 10 listboxcreate "membox "lstnoms 20 115 80 45 foreach item 2 names [listboxaddstring "lstnoms ?] staticcreate "membox "statprop $ "Propri 233 $ "t 233 "s 20 160 40 10 listboxcreate "membox "lstprops 20 170 80 45 foreach last plists [listboxaddstring "lstprops ?] buttoncreate "membox "btedt [Tout Editer] 60 0 40 10 [ ed (list :&procs :&noms :&props)] buttoncreate "membox "btedtp "Tout 80 50 18 10 [ pourtous [(aj "lstprocs "lsted ?) ]procedures ] buttoncreate "membox "btadprocs "Aj 60 50 18 10~ [aj "lstprocs "lsted ] buttoncreate "membox "btedp "Ed 0 60 18 10 [ed (list listboxgetselect "lstprocs)] buttoncreate "membox "btefp "Ef 0 70 18 10 [efmem "lstprocs] buttoncreate "membox "btedtn "Tout 80 105 18 10 [pourtous [(aj "lstnoms "lsted ?) ] item 2 names] buttoncreate "membox "btadnoms "Aj 60 105 18 10~ [aj "lstnoms "lsted ] buttoncreate "membox "btedn "Ed 0 115 18 10 [ed (list [] listboxgetselect "lstnoms)] buttoncreate "membox "btefn "Ef 0 125 18 10 [efmem "lstnoms] buttoncreate "membox "btedtpr "Tout 80 160 18 10 [ pourtous [(aj "lstprops "lsted ?)]last plists] buttoncreate "membox "btadprops "Aj 60 160 18 10~ [aj "lstprops "lsted] buttoncreate "membox "btedpr "Ed 0 170 18 10 [ed(list [] [] listboxgetselect "lstprops)] buttoncreate "membox "btefpr "Ef 0 180 18 10 [efmem "lstprops] END to mess :&mess [:errmess rprop "&err first :&mess][:l []] (local "mess "var) if emptyp :errmess [op []] make "mess first :errmess make "var last :errmess repeat count :var [queue "l item2 item repcount :var item 2 :&mess] make "var :l make "l [] repeat count :mess [make "x item repcount :mess ifelse :x = "?[ queue "l first :var make "var bf :var]~ [queue "l :x]] op :l end TO methodes :&obj [:lp lprop :&obj] si vide? :lp [stop] si "# = premier premier sp :lp ~ [(ec premier :lp )] (methodes :&obj sp sp :lp) eND to modifav [:dist gprop "avbox "val][:pos gprop "avbox "pos] if emptyp :&avpile [buttoncreate "avbox "avboxannul "Annuler 5 60 80 10 [avannul]] push "&avpile gprop "avbox "distdef pprop "avbox "distdef :dist scrollbarset "avscrol 0 300 :dist end to modifcap [:oldcap gprop "capbox "oldcap][:cap gprop "capbox "val][:dist rprop "capbox "dist] if emptyp :&cappile [buttoncreate "capbox "annulcap "Annuler 5 95 60 10 [annulcap]~ staticupdate "capstatm "|Nouveau cap|] push "&cappile list :oldcap :dist pprop "capbox "oldcap :cap pprop "capbox "dist :dist staticupdate "capstatvalm form :cap 5 2 ;staticupdate "capdistval form :dist 5 2 staticupdate "capstatvaldr " ;staticupdate "capstatvalav " end TO modifcouleur [:r scrollbarget "scrcoulR ][:v scrollbarget "scrcoulV ][:b scrollbarget "scrcoulB ] if radiobuttonget "btrcray[(montre "crayon.fcouleur (liste :r :v :b)) pprop "couleurbox "pencolorval coulrgb :r :v :b ] if radiobuttonget "btrpeint[(montre "bidon.fcouleur (liste :r :v :b))pprop "couleurbox "floodcolorval coulrgb :r :v :b ] if radiobuttonget "btrfond[(montre "ecran.fcouleur (liste :r :v :b)) pprop "couleurbox "screencolorval coulrgb :r :v :b ] staticupdate "statccray gprop "couleurbox "pencolorval staticupdate "statcpeint gprop "couleurbox "floodcolorval staticupdate "statcecran gprop "couleurbox "screencolorval END to modifpos if emptyp :&pospile [buttoncreate "posbox "posboxannul "Annuler 15 105 60 10 [annulpos]~ staticupdate "posstatm "|Nouvelle pos.|] push "&pospile gprop "posbox "val pprop "posbox "val pos staticupdate "posstatvalm pos end to montrer dprop "montrer "cap cap dprop "montrer "pen pen if (activep "montrer "false) [stop] active "montrer make "&lpos (list pos) make "&lrel [] make "&lcap[] fsouris [montrer1 ] [efsouris desactive "montrer ]~ [ montrer2 ][ ] ~ [ if (activep "posbox "false)[ staticupdate "posstatval mousepos ]~ pprop "posbox "rot rotation gprop "posbox "oldpos ~ pprop "posbox "dist distance gprop "posbox "oldpos ] end to montrer1 setscrollpos "false lc setpos mousepos fcap rprop "montrer "cap scrollbarset "posy 0 400 400 - valide ycor 400 scrollbarset "posx 0 600 valide xcor 600 setscrollpos "true setpos mousepos if checkboxget "btrlpos [make "lpos :&lpos(show "donne ""Lpos :&lpos)] if checkboxget "btrlrel [make "lrotdist posversrotdist :&lpos (show "donne ""Lrotdist :lrotdist)] if checkboxget "btrlcap [make "lcapdist posverscapdist :&lpos(show "donne ""Lcapdist :lcapdist )] setpen rprop "montrer "pen end to montrer2 fpos mousepos dprop "posbox "rel ( se rotation last :&lpos ~ form distance last :&lpos 0 2 ) dprop "posbox "cap ( se capvers last :&lpos ~ form distance last :&lpos 0 2 ) if radiobuttonget "btrpos [(show "fpos pos)] if radiobuttonget "btrrel [ (pr "dr first gprop "posbox "rel~ "av last gprop "posbox "rel)~ staticupdate "posstatvalrel gprop "posbox "rel ] if radiobuttonget "btrcap [( pr "fcap first gprop "posbox "cap~ "av last rprop "posbox "cap) ~ staticupdate "posstatvalcap gprop "posbox "cap ] fcap capvers last :&lpos queue "&lpos pos end to mousecopy [:t turtle] ; Will not work while Perspective is on make "mouse.savepen pen buryname "mouse.savepen make "mouse.savescrunch scrunch buryname "mouse.savescrunch make "mouse.savepensize pensize buryname "mouse.savepensize setscrunch 1 1 setpensize [1 1] setturtle -1 make "&posxyz posxyz setposxyz [5 0 863] setturtle :t fsouris [mousecopy.down] [mousecopy.up] [] [] [if (activep "selection "false)~ [staticupdate "selrect mousepos]] if not (activep "selection "false)~ [Print [Utiliser la souris pour montrer la zone à copier]] end to mousecopy.down ; Init P1 and P2 and SelectionBox make "mousecopy.p1 mousepos make "mousecopy.p2 mousepos buryname "mousecopy.p1 buryname "mousecopy.p2 mousecopy.selection ; Activate Mouse Move efsouris fsouris [mousecopy.down] [mousecopy.up] [] [] [mousecopy.move] end to mousecopy.move ; Erase Box, Reset P2 and draw Again mousecopy.selection make "mousecopy.p2 mousepos mousecopy.selection setpos mousepos if (activep "selection "false)~ [staticupdate "selrect se :mousecopy.p1 :mousecopy.p2] end to mousecopy.selection ; Draw a bounding PX Box localmake "x1 first :mousecopy.p1 localmake "y1 last :mousecopy.p1 localmake "x2 first :mousecopy.p2 localmake "y2 last :mousecopy.p2 pu setxy :x1 :y1 px setxy :x2 :y1 setxy :x2 :y2 setxy :x1 :y2 setxy :x1 :y1 pu end to mousecopy.up [:&turt turtle] ; Erase Box mousecopy.selection ; Get Final P2 make "mousecopy.p2 mousepos localmake "x1 first :mousecopy.p1 localmake "y1 last :mousecopy.p1 localmake "x2 first :mousecopy.p2 localmake "y2 last :mousecopy.p2 ; Calculate Width, Height and Lower Left Corner localmake "width abs :x1 - :x2 localmake "height abs :y1 - :y2 localmake "x ifelse :x1 < :x2 [:x1] [:x2] localmake "y ifelse :y1 < :y2 [:y1] [:y2] pu ; Define selection fselection (list :x :y + :height :width :height) ; Done efsouris setturtle -1 setposxyz :&posxyz setturtle :&turt ifelse (activep "selection "false)[selectionne.fin][image.copie] setpen :mouse.savepen setscrunch first :mouse.savescrunch last :mouse.savescrunch setpensize :mouse.savepensize end TO multi.crée :&nom :&narg si multi.procedure? :&nom[boitemessage "Erreur [,[:&nom ] est déjà une multi procédure]stop] copydef mot :&nom "%orig :&nom er :&nom define :&nom `[[[X] ,[:&narg]] [.maybeoutput ! qui [ apply ,[quoted mot :&nom "%orig ] :x]]] END TO multi.ef :&nom si non procedurep mot :&nom "%orig [boitemessage "erreur `[,[:&nom ] n'est pas une multi procédure] stop] copydef :&nom mot :&nom "%orig er mot :&nom "%orig END TO multi.procedure? :&nom ra procedurep mot :&nom "%orig END TO multitortue multi.crée "mt 0 multi.crée "ct 0 multi.crée "pique 1 multi.crée "cabre 1 multi.crée "id 1 multi.crée "ig 1 multi.crée "forientation 1 multi.crée "fposxyz 1 multi.crée "fx 1 multi.crée "fy 1 multi.crée "fz 1 END TO multitortues END to mvtrel op (list "dr form 180 + rotation :oldpos 5 2 "av form distance :oldpos 5 2 ) end to name :name.value.input :name.variable.input make :name.variable.input :name.value.input end to namelist :names if wordp :names [output list [] (list :names)] output list [] :names end to netpair :remotemachine netstartup ifelse netaccepton 5124 [print [Prêt]] [run netacceptreceivevalue] ~ [ MessageBox "Statut [Appuyer Ok lorsque les 2 machines ont ce message] ] ~ [MessageBox "Statut [Le réseau ne peut assurer la réception] ] if not netconnecton :remotemachine 5124 [print [Prêt]] []~ [ MessageBox "Statut [Le réseau ne peut assurer l'émission] ] end TO nettoie make "&selvis "false clean setfocus[Mswlogo Screen] END to new.direction op (-1 + random 3) ;generate -1, 0, 1 directions end to nomfich :& until [not memberp "\\ :&][make "& bf :&] op :& end to nomfichec :& if listp :& [op first :&] op map [ifelse or ? = "\\ (ascii ?) = 32 [word "\\ ?][?]] :& end to nomimage :n[:l :&pilemem] make "l filter [:n = first ?] :l if emptyp :l [op :l] op bf first :l end to nommepage :x if not memberp ". :x [make "x word :x ".lgo] if existp :x [if yesnobox "Avertissement (se [La page ] :x ~ [existe, voulez-vous choisir un autre nom ?])~ [make "fich dialogfilesave "*.lgo~ ifelse emptyp :fich [stop][nommepage first :fich] stop] ] dprop "enregistre "fichier :x pr se [Nom de cette page : ] nomfichec page end to non :& OP NOT2 MEMBERP :& [VRAI TRUE] end to nonaff donne "&aff "false end to not :& OP NOT2 MEMBERP :& [VRAI TRUE] end TO nouvellepage if yesnobox[nouvelle page]~ (se [La commande Nouvellepage risque de vous fait perdre votre programme et vos dessins.]~ $ " 13 " [Annuler cette commande ?]) [stop] if yesnobox [Nouvellepage] [Voulez-vous effacer le contenu de la mémoire ?]~ [if not contents = [[][][]] [ if yesnobox [Nouvelle page] ~ [Voulez vous sauver le contenu de la mémoire ?] ~ [sauvepage ]]erall make "&nouveau "true ] efprops "utilisateur efprops "enregistre if not yesnobox [Conserver le graphique ] [Voulez-vous garder le graphique ?]~ [vg centre efoutils windowdelete " outils fen.init ] if not yesnobox [Conserver l'historique ] [Voulez-vous garder l'historique ?][vt ec version ] fen.init END POUR np :& nommepage :& END TO obj.im :& if " = :& [op "" ] if [] = :& [op []] if numberp :& [op :&] if wordp :& [if memberp "\\ :& [make "& nomfichec :& ] op word ""\| word :& "\|] op fput obj.im2 first :& obj.im2 bf :& END TO obj.im2 :& if " = :& [op " ] if [] = :& [op []] if numberp :& [op :&] if wordp :& [if memberp "\\ :& [make "& nomfichec :& ] ~ op ifelse "" = first :& [quoted word "\| word bf :& "\|][word "\| word :& "\|]] op fput obj.im2 first :& obj.im2 bf :& END to objet.aj :&n :&val ajprop :objet :&n :&val end TO objet.ajoute :&rubr :&v ajprop :objet :&rubr :&v END to objet.ancêtres show :objet op ancêtres :objet end TO objet.cree :&obj if list? :&obj [donne "&obj (listeversmot :&obj "_)] pprop :&obj "parent :objet ajprop :objet "enfants :&obj END TO objet.detruis END TO objet.detruit [:enf rprop :objet "enfants][:par rprop :objet "parent] si non vide? :enf [! :enf [detruit ]] si non vide? :par [enlprop :par "enfants :objet ] efprops :objet END TO objet.donne :&rubr :&v pprop :objet :&rubr :&v END TO objet.détruit objet.supprime END to objet.ef :&name remprop :objet :&name end TO objet.efaction efprop :objet "action END TO objet.enfants ra rprop :objet "enfants END to objet.enleve :&n :&val enlprop :objet :&n :&val end TO objet.faction :&action !o [donne "action :&action] END TO objet.fval :&rubr :&v dprop :objet :&rubr :&v END TO objet.init END TO objet.methode :&n [:&nom word :objet word ". :&n][:&meth rprop :objet :&n] si non vide? :&meth[si "# = premier :&meth[ed sp :&meth stop]] pprop :objet :&n list "# :&nom ed :&nom END TO objet.methodeh :&n [:&nom word :objet word ". :&n][:&meth rproph :objet :&n] si non vide? :&meth[si "# = premier :&meth[ed sp :&meth stop]] pprop :objet :&n list "# :&nom ed :&nom END TO objet.nomme :&nom localmake "&obj& :objet localmake "&ancnom !o "nom si non vide? :&ancnom [! :&ancnom [enleve "objet :&obj&]] !o[donne "nom :&nom] ! "nom [crée :&nom] ! :&nom [ajoute "objet :&obj&] END TO objet.nouveau[:&inst (gensym :objet)] !o [crée :&inst] ra :&inst END TO objet.supprime [:enf rprop :objet "enfants][:par rprop :objet "parent] si non vide? :enf [! :enf [detruit ]] si non vide? :par [enlprop :par "enfants :objet ] efprops :objet END pour objet3d ra :&obj3d end pour observe [:&t turtle] ftortue -1 soit "factx (ecran.resolutionx ) / 405 soit "facty (ecran.resolutiony ) / 200 soit "P round -(premier mousepos)/ :factx soit "d round (dernier mousepos) / :facty si :d > 90[donne "d 90] si :d < -90[donne "d -90] soit "y :&distobs * sin :d soit "x :&distobs *(cos :d )* sin -:p soit "z :&distobs * (cos :d)* cos :p fposxyz (liste :x :y :z) ftortue :&t poly.af si non vide? :&obj3d [&objet3d] si (activep "outils "false)[ staticupdate "desschk list round :p round :d] end TO obtiens :&obj :&prop ra apply "! liste :&obj :&prop END to oeil, [:x] sisinon vide? :x [ftortue "oeil] [demande "oeil premier :x] end to oiseau1, [:x] sisinon vide? :x [ftortue "Oiseau1] [demande "Oiseau1 premier :x] end to oo :a ifelse equalp ": :a [output char 32] [output :a] end to or [:X] 2 OP APPLY "OR2 MAP [MEMBERP ? [TRUE VRAI]] :X end to orientation output (list roll pitch heading) end to ou [:X] 2 OP APPLY "OR2 MAP [MEMBERP ? [TRUE VRAI]] :X end to outils fclavier[si clavier = 82 [fen.init]][] if activep "outils [stop] if not namep "&video[make "&video "*.avi] if not namep "&son[make "&son "*.wav] windowcreate "root "outils "outils 0 22 310 35 [] active "outils buttoncreate "outils "suppoutils "X 0 0 8 10~ [icon "outils ] buttoncreate "outils "restfen "R 0 10 8 10~ [ec "fen.init fen.init] buttoncreate "outils "cap [Cap ] 216 0 24 10[capbox] buttoncreate "outils "position "Position 240 0 34 10[posbox] buttoncreate "outils "dyna "|Tort. dyn| 274 0 35 10[dynabox] buttoncreate "outils "images "Images 138 0 30 10[images] buttoncreate "outils "sons "Sons 191 0 22 10~ [ ifelse :&mci [mcisons dialogfileopen :&son ]~ [(jouesons dialogfileopen "*.wav 1 "true)]] buttoncreate "outils "video "Vidéo 168 0 23 10[(video dialogfileopen :&video "true)] buttoncreate "outils "anim "Anim. 163 10 20 10[animer] buttoncreate "outils "bout "Interface 183 10 30 10[interface] buttoncreate "outils "dessin "Dessin 247 10 26 10 [pr "dessiner dessiner] buttoncreate "outils "notes "Etiquette 216 10 31 10~ [donne "&r reader setread [] make "&etiq rw setread :&r etiquette :&etiq~ pr list "etiquette (list :&etiq) ] staticcreate "outils "desschk " 275 10 30 10 buttoncreate "outils "aide "Aide 117 10 18 10[aidelogo] buttoncreate "outils "fich "Textes 138 10 25 10[(edfich :&sufftxt [] "true)] buttoncreate "outils "verso "Programme 92 0 43 10[verso] buttoncreate "outils "erreur "Erreur 92 10 25 10[traiterr error] buttoncreate "outils "quitter "Quitter 12 10 35 10 [.aurevoir ] buttoncreate "outils "memoire "Mémoire 57 0 33 10 [membox] buttoncreate "outils "charger "Ouvrir 12 0 23 10 [(donnepage "? )] buttoncreate "outils "nouv "Nouv. 35 0 22 10 [(nouvellepage )] buttoncreate "outils "sauver "Enregistrer 47 10 43 10 [(sauvepage )] end TO ouvre :fich openread :fich setread :fich END to page op gprop "enregistre "fichier end pour peins [:mode "false] [:bid ! qui.nom "bidon] si liste? :bid [si liste? qui.nom [demande qui.nom [peins] stop]] image.secu if not floodcolor = :bid[bidon.fcouleur floodcolor donne "bid floodcolor] setfloodcolor :bid (fill :mode) end to pen op (list (ifelse pendownp ["pendown] ["penup]) ~ penmode pensize pencolor [1]) end TO penta repete 5[av 100 dr 72] END pour pentagone repete 5 [av 100 dr 72 ] end to pi output 3.141592653589793227020265931059839203954 end to pick :list output item (1+random count :list) :list end TO pilote si clavier = ascii "I[fcap 0] si clavier = ascii "J [fcap 270] si clavier = ascii "K [fcap 90] si clavier = ascii "M [fcap 180] END to pixel.action [:&pix pixel] op ! :&pix "action end TO pixel.efaction [:&pix pixel] efprop :&pix "action END TO pixel.efnom [:&nom ! pixel "nom] si vide? :&nom[stop] efprop (listeversmot ! :&nom "pixel "_ ) "nom ! :&nom "detruit END to pixel.faction :&act [:&pix pixel][:&parent ! :&pix "parent] si vide? :&parent [! "pixel [cree :&pix]] ! :&pix [faction :&act] end to pixel.fnom :&nom [:&pix pixel][:&parent ! :&pix "parent] si vide? :&parent [! "couleur [cree :&pix]] ! "couleur.nom [cree :&nom] ! :&nom [donne "pixel :&pix] ! :&pix[donne "nom :&nom] end TO pixel.nom[:&pix pixel][:&nom ! :&pix "nom] si vide? :&nom[donne "&nom (listeversmot :&pix "_)] op :&nom END to pixel.nomme :&nom [:&pix pixel][:&parent ! :&pix "parent] si vide? :&parent [! "couleur [cree :&pix]] ! "couleur.nom [cree :&nom] ! :&nom [donne "pixel :&pix] ! :&pix[donne "nom :&nom] end TO pixel.rgb :& op sisinon (ou liste? :& nombre? :& ) [:&][! :& "pixel] END to pllist :names if wordp :names [output (list [] [] (list :names))] output (list [] [] :names) end TO pointversvirgule :N ra pourtous.ra [ifelse ". = ? [",][?]] :n END to poly.draw [:n !o "n][:w !o "w] repeat :n[fd :w rt 360 /:n] end to pop :stack local "result make "result first thing :stack make :stack butfirst thing :stack output :result end to pos ra ! qui.nom [position] end to pos.faction :&act [:&pos posint][:&parent ! :&pos "parent] si vide? :&parent [! "couleur [cree :&pos]] ! :&pos [faction :&act] end to pos2 :rect op list round ( (rectl :rect) + premier :rect)~ round( (-recth :rect) + premier sp :rect) end TO posbg [:rect selection][:pos position] op liste first :pos (last :pos) - recth :rect END to posbox [:oldpos posint ] if activep "posbox [stop] pprop "posbox "oldpen pen if activep "posbox [stop] pu active "posbox pprop "posbox "val :oldpos pprop "posbox "oldpos :oldpos pprop "posbox "noscroll "false make "&pospile [] windowcreate "root "posbox [Tester la position] 5 55 100 150 [] buttoncreate "posbox "posboxquit "X 0 0 10 10 ~ [posbox.ferme] staticcreate "posbox "posstat "|position vue| 18 0 50 10 staticcreate "posbox "posstatval :oldpos 60 0 30 10 staticcreate "posbox "posstatvalfpos " 30 15 70 10 buttoncreate "posbox "posboxcomfpos "C 10 15 10 10 [pr (list "fpos pos) ] staticcreate "posbox "posstatvalrel " 30 25 70 10 buttoncreate "posbox "posboxcomrel "C 10 25 10 10~ [ ifelse pos = gprop "posbox "val [ ] [pr (list "dr ( rotation gprop "posbox "val )~ "av distance gprop "posbox "val) ] ] staticcreate "posbox "posstatvalcap " 30 35 70 10 buttoncreate "posbox "posboxcomcap "C 10 35 10 10~ [ifelse pos = gprop "posbox "val [ ] [ pr (list "fcap capvers gprop "posbox "val~ "av distance gprop "posbox "val) ] ] staticcreate "posbox "posstatlp "|Liste pos| 30 45 50 10 staticcreate "posbox "posstatlrot "|Liste rot dist| 30 55 50 10 staticcreate "posbox "posstatlcap "|Liste cap dist| 30 65 50 10 groupboxcreate "posbox "posgr 20 5 8 60 radiobuttoncreate "posbox "posgr "btrreset "Rien 20 8 30 8 radiobuttoncreate "posbox "posgr "btrpos " 20 15 8 10 radiobuttoncreate "posbox "posgr "btrrel " 20 25 8 10 radiobuttoncreate "posbox "posgr "btrcap " 20 35 10 10 radiobuttonset "btrrel :&posrel radiobuttonset "btrcap :&poscap radiobuttonset "btrpos :&posabs radiobuttonset "btrreset :&posrien checkboxcreate "posbox "posgr "btrlpos " 20 45 10 10 checkboxcreate "posbox "posgr "btrlrel " 20 55 10 10 checkboxcreate "posbox "posgr "btrlcap " 20 65 10 10 staticcreate "posbox "posstatm "|pos. initiale| 13 75 50 10 staticcreate "posbox "posstatvalm :oldpos 60 75 30 10 buttoncreate "posbox "posboxvisert "Montrer 15 85 60 10 [montrer pr "montrer ] buttoncreate "posbox "posboxmodif "Modifier 15 95 60 10 [modifpos] scrollbarcreate "posbox "posy 0 10 10 110 [scrollposy] scrollbarcreate "posbox "posx 10 117 80 10 [ scrollposx] scrollbarset "posy 0 400 (400 - valide ycor 400) scrollbarset "posx 0 600 valide xcor 600 end to posbox.ferme if (activep "montrer "false) [efsouris desactive "montrer] desactive "posbox fpos gprop "posbox "val make "&posabs radiobuttonget "btrpos make "&posrien radiobuttonget "btrreset make "&poscap radiobuttonget "btrcap make "&posrel radiobuttonget "btrrel setpen gprop "posbox "oldpen windowdelete "posbox end to posint [:pos position][:x first :pos][:y last :pos] op list round :x round :y end POUR possouris op mousepos END TO posverscapdist :&L [:vis shownp] [:p pos][:pen pen] local[& ] ct lc fpos first :&l make "&l map [make "& pos fpos ? fcap reste round 180 + vers :& 360 list cap distance :&]:&l setpos :p setpen :pen if :vis [mt] op :&l END TO posversrotdist :&L [:vis shownp] [:p pos][:pen pen] local[& &c] ct lc fpos first :&l make "&l map [make "& pos make "&c cap fpos ? fcap reste round 180 + vers :& 360 list cap - :&c distance :&]:&l setpos :p setpen :pen if :vis [mt] op :&l END to pourtous :&act [:l] 2 localmake "&res [] make "&act (Ph "queue ""&res "runresult (list :&act)) apply "pourtous0 fput :&act :l si vide? filtre [non vide? ?] :&res [stop] ra pourtous.ra.ph [?] :&res end to pourtous0 [:l] 2 apply "foreach lput first :l bf :l end to primitives make "&en [] windowcreate "main "Wprim "Primitives 40 50 150 180 [] buttoncreate "Wprim "btwproj "Projets 13 0 30 10~ [ignore shell se :&navigateur ~ [http://www.angelfire.com/pa/mswlogoinfo/actil.html]] buttoncreate "Wprim "btwout [Guide des outils] 45 0 60 10~ [ignore shell se :&navigateur ~ [http://www.angelfire.com/pa/mswlogoinfo/outils.html]] buttoncreate "Wprim "bttut [Didacticiel] 108 0 38 10~ [ignore shell se :&navigateur ~ [http://www.angelfire.com/pa/mswlogoinfo/didac/didac.html]] buttoncreate "Wprim "btDICO [Dictionaire des primitives] 5 12 90 10~ [ignore shell se :&navigateur ~ [http://www.angelfire.com/pa/mswlogoinfo/doc/dico.html]] COMBOBOXcreate "Wprim "WCBTRAD 60 150 80 10 buttoncreate "Wprim "btwprimtrad "Traduire 3 130 30 10 [&tradprim ] staticcreate "Wprim "Wstprim [Liste des primitives ] 5 40 70 11 ; staticcreate "Wprim "Wsttrad [Traduction: ] 5 150 55 10 groupboxcreate "Wprim "gbwprim 5 30 0 0 radiobuttoncreate "Wprim "gbwprim "chkprimfr "Fr-An 3 145 35 8 radiobuttoncreate "Wprim "gbwprim "chkprimen "An-Fr 3 155 30 8 radiobuttonset "chkprimfr "true radiobuttonset "chkprimen "false comboboxcreate "Wprim "cbwprim 35 57 110 10 buttoncreate "Wprim "btwprimq "X 0 0 10 10 [windowdelete "Wprim] buttoncreate "Wprim "btwprimaide "Aide 3 52 30 11~ [ifelse emptyp comboboxgettext "cbwprim [help][help ifelse radiobuttonget "chkprimen [ comboboxgettext "cbwprim ]~ [ gprop "&en first comboboxgettext "cbwprim ]]] buttoncreate "Wprim "btwprimen "Anglais 110 40 35 11~ [noyield comboboxdelete "cbwprim radiobuttonset "chkprimen "true ~ radiobuttonset "chkprimfr "false ~ comboboxcreate "Wprim "cbwprim 35 55 110 90 ~ pourtous [comboboxaddstring "cbwprim ? ] :&primen yield ] buttoncreate "Wprim "btwprimfr "Français 73 40 35 11~ [ comboboxdelete "cbwprim radiobuttonset "chkprimfr "true~ radiobuttonset "chkprimen "false~ comboboxcreate "Wprim "cbwprim 35 55 110 90~ noyield setcursorwait pourtous [comboboxaddstring "cbwprim ? ] :&prim yield ] end to prmove if or :&posrien :&posabs[pr list "fpos posint] if :&poscap [ localmake "cap (180 + towards :&oldpos ) if :cap > 360 [make "cap :cap - 360] ~ fcap :cap pr (list "fcap form :cap 0 2 "av form distance :&oldpos 0 2)] if :&posrel [ localmake "rot rotation :&oldpos dr :rot ~ pr(list "dr :rot "av form distance :&oldpos 0 2)] end to processus [:qui :qui] localmake "obj :objet si nombre? :obj [donne "obj mot "t :obj] ftortue :obj execute !o "action end to processus_0 execute !o "action end to processus_1 execute !o "action end to proportion :& [:rect image.rect]~ [:dx difference premier :rect premier :&] make "dx abs :dx op (list premier :rect premier sp :rect :dx (recth :rect) * :dx /rectl :rect) end POUR proportionrect :P [:pos posint ] [:l imagel][:h image.h] op (se :pos (first :pos) + round :p * :l (last :pos) + round :p * :h) END to proppos op pos2 (proportion :pos se :selpos1 bf bf image.rect) end to prsonjoue ( pr "\( "son.joue son.pos "\) ) end to push :stack :item make :stack fput :item thing :stack end to queue :queue :item make :queue lput :item thing :queue end pour qui[:&qui :&qui] si nombre? :&qui[ra sisinon :&qui < 0 [mot "t_ abs :&qui][mot "t :&qui]] ra :&qui end pour qui.id [:&qui :&qui] si liste? :&qui[ra pourtous.ra [tortue.id ?] :&qui] ra tortue.id :&qui end TO qui.nom [:&qui :&qui] si liste? :&qui[ra pourtous.ra [tortue.nom ?]:&qui] ra tortue.nom :&qui END TO qui.numero [:&qui :&qui] si liste? :&qui [ra pourtous [tortue.numero ?]:&qui] ra tortue.numero :&qui END POUR quittepage pr [en developpement] END to quoted :stuff if wordp :stuff [op word "" :stuff] op :stuff end to radiobouton.def windowcreate "main "defbttr [Définir un stat] 0 50 100 100 [] buttoncreate "defbttr "defbttrbtq "X 0 0 10 10 [windowdelete "defbttr] staticcreate "defbttr "defbttrstataff "Affichage 0 30 30 10 comboboxcreate "defbttr "defbttrcmbAff 30 30 70 10 staticcreate "defbttr "defbttrstatGr "Groupe 0 10 30 10 comboboxcreate "defbttr "defbttrcmbGr 30 10 70 10 staticcreate "defbttr "defbttrstatNom "Nom 0 20 30 10 comboboxcreate "defbttr "defbttrcmbNom 30 20 70 10 buttoncreate "defbttr "defbttrbtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defbttr "defbttrbtcree "Créer 30 50 45 10 [ ~ localmake "data (se " list comboboxgettext "defbttrcmbNom ~ comboboxgettext "defbttrcmbAff selection ) apply "radiobuttoncreate :data~ (pr "boutonradio.crée ""Ecran :data)] buttoncreate "defbttr "defbttrbtef "Effacer 30 60 45 10~ [radiobuttondelete comboboxgettext "defbttrcmbNom ~ (show "boutonradio.ef comboboxgettext "defbttrcmbNom) ] end to radiobuttonset :&n :& radiobuttonset.old :&n or :& = 1 :& = "true end POUR ramenetexte edfich END to rang :& :l [:n 1] if emptyp :l [op 0 ] if :& = first :l [op :n] op (rang :& sp :l ( :n + 1)) end TO range :& :&l if emptyp :&l [op (list :&)] si avant? :& premier :&l [op fput :& :&l] op fput first :&l range :& bf :&l END TO range0 :& :&l if emptyp :&l [op (list :&)] si avant? :& premier :&l [op fput :& :&l] op fput first :&l range0 :& bf :&l END to re :& av -:& end TO re.tate :n [:&mvt sisinon :n > 0 ["re]["av]] repete abs :n [invoke :&mvt 1 tate] END to rect :p1 :p2[:x1 first :p1][:x2 first :p2][:y1 last :p1][:y2 last :p2] op (se ifelse :x1 < :x2[:x1 ][:x2] ifelse :y1> :y2 [:y1][:y2]~ abs :x1- :x2 abs :y1 - :y2 ) end to rectangle :l1 :l2 [:pen pen][:p posxyz] li re :l2 /2 ga 90 re :l1 /2 rectangle2 :l1 :l2 setposxyz :p dr 90 setpen :pen end TO rectangle2 :l1 :l2 [:pen pen] bi repete 2 [av :l1 dr 90 av :l2 dr 90] setpen :pen END to recth :rect op( item 4 :rect) end to rectici [:pos pos][:rect image.rect] op (se :pos (first :pos)+ rectl :rect (last :pos) + recth :rect) end to rectl :rect op( item 3 :rect) end to rectpos :rect op bl bl :rect end to rectposbg [:rect selection] op( list first :rect (item 2 :rect) - recth :rect ) end to recttaille :rect op list rectl :rect recth :l end TO redefinis :nouv :def [:redefp "true] erase :nouv copydef :nouv :def END to reduce :reduce.function :reduce.list if emptyp bf :reduce.list [op first :reduce.list] op apply :reduce.function (list (first :reduce.list) ~ (reduce :reduce.function bf :reduce.list)) end to regard, [:x] sisinon vide? :x [ftortue "regard] [demande "regard premier :x] end to remove :thing :list output filter [not equalp ? :thing] :list end to resizemain32 ; Load the User System Kernel dllload "user32.dll ; Get Handle to Main Window (Note args are in REVERSE order) make "hwnd dllcall (SE [l FindWindowA s] (LIST :W) [ l 0]) ; Resize Main Window make "status dllcall (list "l "MoveWindow "w "1 "l :H "l :L "l :Y "l :X "l :hwnd) dllfree end POUR restaure pr [en developpement] END to restaureimage [:int 1023] colleimage :int :int end to restauremagesel [:index bitindex][:buff bitindex + 512] setbitindex :buff colleimagesel setbitindex :index end pour retire :&x :l if emptyp :L [op []] if :&x = first :l [op bf :l] op fput first :l retire :&x bf :l end to reverse :in [:out ifelse listp :in [[]] ["]] if emptyp :in [output :out] output (reverse bf :in combine first :in :out) end To reverse.path make "mode -1 ; reverse :directions rt 180 wriggle.back :directions 0 ; go back to tail fast rt 180 penerase ; erase worm or use 'setpencolor 6' to leave a trail make "mode 1 arc first :directions 10 ; draw 'last' segment slow pennormal ; draw normal worm make "directions bf :directions ; delete tail segment forward.path end pour rond repete 360 [av 1 dr 1] end to rot op gprop "posbox "rot end to rotation :pos [:vers difference (towards :pos) cap] ifelse pos = :pos [op 0][op remainder round 540 + :vers 360] end to roundpos :&p op list round coorx round coory end TO rprop.num :& :&p[:&res rprop :& :&p] op ifelse emptyp :&res [0][:&res] END to rproph :&o :&p [:&h "parent][:&v rprop :&o :&p] if not emptyp :&v [op :&v] make "&o rprop :&o :&h if emptyp :&o [op []] op (rproph :&o :&p :&h) end to rvbverscoul :& [:r first :&] [:v first bf :&] [:b last :&] donne "r :r / 85 donne "v :v / 85 donne "b :b / 85 donne "r1 ( bitand :r 2) /2 donne "b1 ( bitand :b 2) /2 donne "v1 ( bitand :v 2) /2 donne "r bitand :r 1 donne "v bitand :v 1 donne "b bitand :b 1 donne "r ( :r + 2 * :v + 4 * :b + 8 * :r1 + 16 * :v1 + 32 * :b1) op ifelse :r > 0 [64 - :r][:r] end TO rw2[:&x "][:&w "] until[(or eofp( :&x = car 9) :&x = car 13) ][make "&x rc make "&w word :&w :&x ] op list :&w :&x END to sa fpos ( posbg :rect) setbitindex :indexsave bitcopy rectl :rect recth :rect setbitindex :index fpos :pos setpen :pen setbitmode :bitmode setbitindex :oldindex end TO sauve END to sauvecran :indexsave :rect [:bitmode bitmode][:oldindex bitindex] lc setbitmode 1 setbitindex :indexsave fimagerect (se first :pos ( last pos ) + recth :rect bf bf :rect) bitcopy rectl :rect recth :rect setbitindex :index setbitmode :bitmode setbitindex :oldindex end to sauveimage :fich[:imp "false] [:rect selection ][:act activearea][:pos pos][:pen pen] setactivearea tailleversrect selection marquerect :rect if emptyp :fich [marquerect :rect stop] if wordp :fich [make "fich (list :fich)] marquerect :rect make "fich first :fich if not memberp ". :fich [make "fich word :fich ".bmp] bitsave :fich if :imp[(pr [sauveimage ] word "" nomfichec :fich )] setactivearea :act fpos :pos setpen :pen end to sauvepage [:fich page] bury[[][fich]] if contents = [[][][]] [messagebox "Enregistrer (se "La $ "m 233 "moire [est vide.] ) stop] ifelse emptyp :fich [catch "error [make "fich dialogfilesave "*.lgo ]~ ifelse emptyp :fich [stop][nommepage first :fich]]~ [dialsauve si :rep = [] [stop]~ if not :rep [make "fich dialogfilesave "*.lgo~ ifelse emptyp :fich [stop][nommepage first :fich]]] pr ( se "enregistre word "" nomfichec page ) enregistre page end to sauvesous [:fich gprop "enregistre "fichier] make "fich first dialogfilesave :fich if emptyp :fich [stop] if not memberp ". :fich[make "fich Word :fich ".lgo] pprop "enregistre "fichier :fich type [sauvegarde de :] type char 32 save :fich end to sauvetout [:& dialogfilesave "*.lgo] if listp :& [make "& first :&] unburyall fversion if emptyp :&[stop] if not existp :& [save first :& stop] ifelse yesnobox [Fichier existant] (se [Le fichier] :& [existe, faut-il le remplacer ?]) [ save :&][] end pour savecontents openwrite :fich setwrite :fich pr [if not defindep "lib [frsetup]] im contents setwrite :wr close :fich end to scrollav [:p gprop "avbox "pos] local "dist setpensize [2 2] if not (pos = :p) [ic fpos :p] make "dist scrollbarget "avscrol pprop "avbox "val :dist staticupdate "avstatval :dist ic av :dist staticupdate "avstatposval roundpos pos end to scrolldrga fcap gprop "drbox "cap dr drboxangle test drboxangle >0 iftrue [staticupdate "drstat "|Action vue: dr| staticupdate "drstatval drboxangle] iffalse [staticupdate "drstat "|Action vue: ga| staticupdate "drstatval ( -drboxangle)] dprop "drbox "angle drboxangle end TO scrollget END to scrollpos [:s gprop "posbox "scroll] op ifelse emptyp :s [true][:s] end to scrollposx [:oldpos gprop "posbox "val][:scroll scrollpos] ;eventcheck if :scroll [fx -300 + scrollbarget "posx ] staticupdate "posstatval posint staticupdate "posstatvalfpos (list "fpos posint) staticupdate "posstatvalrel ifelse posint = :oldpos [[dr 0 av 0]]~ [(list "dr rotation :oldpos "av form distance :oldpos 5 2 )] staticupdate "posstatvalcap ifelse posint = :oldpos [(se "fcap cap "av 0)]~ [(list "fcap capvers :oldpos "av form distance :oldpos 5 2 )] end to scrollposy [:oldpos gprop "posbox "val][:scroll scrollpos] if :scroll [fy 200 - scrollbarget "posy] ;eventcheck staticupdate "posstatval posint staticupdate "posstatvalfpos (list "fpos posint) staticupdate "posstatvalrel ifelse posint = :oldpos["]~ [(list "dr rotation :oldpos "av form distance :oldpos 5 2 )] staticupdate "posstatvalcap ifelse posint = :oldpos ["]~ [(list "fcap capvers :oldpos "av form distance :oldpos 5 2 )] end to scrollset :it [:txt :it] [:&a :&aff] IF LISTP :IT [make "&pilemem ins.num :txt :&pilemem] ifelse numberp :it [make "txt (list :it)][make "it first :txt] fbitindex :it repete count :&pilemem [if :it = first item repcount :&pilemem~ [if (activep "images "false) [scrollbarset "scrim 1 count :&pilemem repcount ~ donne "&aff :&a stop]] ] donne "&aff :&a end to scrx :x make "scrollx :scrollx + :x scrollx :x end to scry :x make "scrolly :scrolly + :x scrolly :y end to sel op rprop "selection "rect end to selection op gprop "selection "rect end TO selection.cadre [:&t turtle][:&pos pos ] setturtle -1 localmake "&posxyz posxyz setposxyz [0 0 863] setturtle :&t marquerect selection setturtle -1 fposxyz :&posxyz setturtle :&T pu setpos :&pos END TO selection.fin END TO selection.ici op se pos bf bf selection END to selectionh op last selectiontaille end to selectionl op first selectiontaille end to selectionne [:click "false][:pen pen][:posinit position][:vis shownp][:selvis :&selvis][:T tortue] make "&selection "false windowcreate "main "selection "Selection 200 0 100 25[] active "selection staticcreate "selection "selrect "Selection 5 0 90 10 ct make "stop "false make "&prop "false if :selvis [marquerect selection] mousecopy wait 10 until [:&selection] [eventcheck] if :vis [mt] if :selvis [marquerect selection] setactivearea tailleversrect selection setturtle :t li setpos :posinit if :vis [mt]setpen :pen setfocus[Mswlogo Screen] end TO selectionne.fin windowdelete "selection desactive "selection make "&selection "true END to selectionpos op bl bl selection end to selectiontaille op list difference item 3 selection first selection difference last sel item 2 selection end to separ :& op memberp :& (list char 13 char 9 char 32) end to setorientation :yxz lt heading down pitch lr roll setroll item 1 :yxz setpitch item 2 :yxz setheading item 3 :yxz end to setpen :pen_data ifelse equalp first bf :pen_data "reverse ~ [penreverse] ~ [ifelse equalp first bf :pen_data "erase ~ [penerase] ~ [penpaint] ] setpensize first bf bf :pen_data setpencolor first bf bf bf :pen_data setpenpattern first bf bf bf bf :pen_data ifelse equalp first :pen_data "penup [penup] [pendown] end to setscrollpos :& dprop "posbox "scroll :& end .macro si :c :act1 [:act2 []] ifelse2 memberp :c [true vrai] [op :act1] [op :act2] end .macro sisinon :c :act1 :act2 op ifelse2 memberp :c [true vrai] [:act1] [:act2] end to skip.bl until [not separ first :&lig][make "&lig bf :&lig] end .macro localmake :name :value output (list "local (word "" :name) "apply ""make (list :name :value)) end to son [:x] 2 SOUND :x end TO son.av :& ifelse son.pos < son.longueur [son.fpos son.pos + :&][son.fin] mcisonstatupdate END TO son.debut mci [seek son to start] mcisonstatupdate END to son.Ferme if (activep "mcisonbox "false)~ [desactive "mcisonbox windowdelete "mcisonbox] SI (ACTIVEP "PLAY "FALSE ) [SON.STOP] (mci [close son]) end TO son.fin mci [seek son to end] mcisonstatupdate END TO son.fpos :n mci (se "seek "son "to :n "wait ) sonstatupdate END to son.joue [:deb []][ :fin []] if (activep "play "false) [stop] active "play mci [break son on 32] settimer 1 5 [mcisonstatupdate] if not emptyp :deb[make "deb se "from :deb] if not emptyp :fin[make "fin se "to :fin ] (mci (se "play "son :deb :fin "notify )~ [cleartimer 1 mcisonstatupdate desactive "play]) end to son.longueur local "res make "res runresult[ mci[status son length]] ifelse emptyp :res [op 0][op first first :res] end TO son.midi make "&midi "true make "&son "*.mid make "&mci "true make "&pas 1 END TO son.ouvre :& local "type ifelse ".mid = member ". :& [make "type "sequencer son.midi]~ [make "type "waveaudio son.wavemci] make "&canal mci (sentence [open] (word "" :& "") "type :type [ alias son]) END to son.pos op first mci [status son position] end TO son.re :& ifelse son.pos > :& [son.fpos son.pos - :&][son.debut] mcisonstatupdate END TO son.stop mci [ stop son ] sonstatupdate END TO son.wave make "&mci "false make "&pas 100 END TO son.wavemci make "&midi "false make "&son "*.wav make "&mci "true make "&pas 100 END to sonbox [:&nom " ] if activep "sonbox [stop"] active "sonbox windowcreate "main "sonbox word "Son:\ nomfich :&nom 139 35 173 35 [] buttoncreate "sonbox "sonquit "X 0 0 10 10 [~ desactive "sonbox windowdelete "sonbox] buttoncreate "sonbox "sonstop "stop 65 10 20 10 ~ [joueson " 1 ] buttoncreate "sonbox "sonplay "play 90 10 20 10 [joueson :&son 1] END TO sonstatupdate local "box make "box ifelse :&mci ["mcison]["son] if (activep word :box "box "false)[staticupdate word "stat word :box "pos son.pos] END to sounds print mci [open c:/windows/media/chimes.wav type waveaudio alias wa] print mci [open c:/windows/media/ding.wav type waveaudio alias w2] mci [seek wa to start] mci [play wa wait] repeat 2~ [~ mci [seek w2 to start]~ mci [play w2 wait]~ ] mci [close w2] mci [seek wa to start] (mci [play wa notify] [mci [close wa]]) end to souris op first :&pileevsouris end to sourisstop [:ev ifelse emptyp :&pileevsouris[[]][ pop "&pileevsouris]] mouseoff if emptyp :ev [ stop] apply "mouseon :ev end to sprite cs ; Load an Image of a Car in Buffer 1 setbitindex 1 localmake "size bitloadsize "car.bmp bitload "car.bmp bitcut first :size last :size ; Load an Image of a Car "MASK" in Buffer 2 setbitindex 2 localmake "size bitloadsize "carmask.bmp bitload "carmask.bmp bitcut first :size last :size ; Load a Background Image in Buffer 3 setbitindex 3 localmake "roadsize bitloadsize "road.bmp bitload "road.bmp bitcut first :roadsize last :roadsize ; Reserve a buffer the same size as the background in Buffer 4 setbitindex 4 bitcut first :roadsize last :roadsize ; Move the car across the road repeat first :roadsize~ [ ; Calculate coordinates that zip down the middle localmake "newx repcount localmake "newy round ((last :roadsize)/2) ; Make a fresh copy of the background into buffer 4 setbitindex 3 setbitmode 1 bitpastetoindex 4 0 0 ; Punch a hole in buffer 4 where we wish to place the car (AND in the Mask) setbitindex 1 setbitmode 3 bitpastetoindex 4 :newx :newy ; Now place the car exactly in the hole without disturbing the background (OR in the Image) setbitindex 2 setbitmode 2 bitpastetoindex 4 :newx :newy ; Now drop the combined image onto the screen (this will be an instant change to the user no flicker) setbitindex 4 setbitmode 1 bitpaste ] end to stat.def windowcreate "main "defstat [Définir un stat] 0 50 100 100 [] buttoncreate "defstat "defstatbtq "X 0 0 10 10 [windowdelete "defstat] staticcreate "defstat "defstatstataff "Affichage 0 20 30 10 comboboxcreate "defstat "defstatcmbAff 30 20 70 10 staticcreate "defstat "defstatstatNom "Nom 0 10 30 10 comboboxcreate "defstat "defstatcmbNom 30 10 70 10 buttoncreate "defstat "defstatbtsel "Sélectionner 30 40 45 10 [selectionne] buttoncreate "defstat "defstatbtcree "Créer 30 50 45 10 [ ~ localmake "data (se " list comboboxgettext "defstatcmbNom ~ comboboxgettext "defstatcmbAff selection ) apply "staticcreate :data~ ( pr "stat.crée ""Ecran :data)] buttoncreate "defstat "defstatbtef "Effacer 30 60 45 10~ [staticdelete comboboxgettext "defstatcmbNom ~ (show "stat.ef comboboxgettext "defstatcmbNom) ] end POUR stoptout throw "toplevel END TO suffixe :& [:&suff "] si non membre? ". :& [ra "] si ". = dernier :& [ra mot ". :&suff] ra (suffixe sd :& mot dernier :& :&suff) END TO supgauche scrollx -400 scrolly -600 END TO suppimage make "&pilemem enleveimage END TO supprime END TO SYSTEME? :& [:rep rprop "utilisateur :&] if not emptyp :rep [op :rep] if memberp :& first buried[ op "true] dprop "utilisateur :& "false op "false END TO T :N :K LOCAL "RESULT MAKE "RESULT GPROP (WORD "N :N) (WORD "K :K) IF NOT EMPTYP :RESULT [OUTPUT :RESULT] MAKE "RESULT REALT :N :K PPROP (WORD "N :N) (WORD "K :K) :RESULT OUTPUT :RESULT END to t0, [:x] sisinon vide? :x [ftortue "t0] [demande "t0 premier :x] end to t2, [:x] sisinon vide? :x [ftortue "t2] [demande "t2 premier :x] end to t_1, [:x] sisinon vide? :x [ftortue "t_1] [demande "t_1 premier :x] end to t_2, [:x] sisinon vide? :x [ftortue "t_2] [demande "t_2 premier :x] end to t_3, [:x] sisinon vide? :x [ftortue "t_3] [demande "t_3 premier :x] end POUR tab op char 9 END to tailleimage :n op rprop "image :n end TO taillerect :r op( list bl bl :r (rectl :r) + item 1 :r (recth :r) + item 2 :r) END TO tailleversrect :r if (first bf bf :r) < 2 [donne "r lput last :r (list first :r first bf :r 2 )] if (last :r )< 2 [donne "r lput 2 bl :r] if [0 0] = bf bf :r[ donne "r ph bl bl :r [1 1 ]] op( se round first :r round (item 2 :r ) - recth :r round (rectl :r) + item 1 :r round item 2 :r ) END to tate localmake "coul ! (listeversmot couleursous "_) "action localmake "pix ! (listeversmot posint "_) "action catch "error :coul donne "&error error ~ si non vide? :&error [pr (se "Erreur char 59 first :&error ) ~ messagebox "Erreur :&errmessage throw "toplevel] catch "error :pix donne "&error error ~ si non vide? :&error [pr (se "Erreur char 59 first :&error ) ~ messagebox "Erreur :&errmessage throw "toplevel] end TO tate.av :n [:&mvt sisinon :n > 0 ["av]["re]] repete abs :n [invoke :&mvt 1 ] END TO tate.re :n [:&mvt sisinon :n > 0 ["re]["av]] repete abs :n [invoke :&mvt 1 ] END .macro test :& OP ( SE "TEST2 WORD "" MEMBRE? :& [TRUE VRAI] ) end to testcap [:oldcap gprop "capbox "oldcap ][:dist gprop "capbox "dist][:pos rprop "capbox "pos] local "p2 ic fpos :pos setheading scrollbarget "capboxbarre pprop "capbox "val heading ;lc av :dist make "p2 pos re :dist ;ic fpos :p2 ;eventcheck staticupdate "capstatval form heading 5 2 staticupdate "capstatvalfcap form heading 5 2 make "dr round difference heading :oldcap if :dr < 0 [make "dr :dr + 360] pprop "capbox "dr :dr ifelse :dr = 0 [ staticupdate "capstatvaldr " stop ]~ [ staticupdate "capstatvaldr ifelse :dr > 180 [list "|ga | 360 - :dr][list "|dr | :dr]] end to testcapfin setheading :c + round ( (scrollbarget "capboxbarre2) /10) - 5 staticupdate "capstatval heading end to testdist [:dist gprop "capbox "dist] (local "delta "p2) make "delta (scrollbarget "capboxdistbarre) - :dist ic setpos gprop "capbox "pos lc av :dist make "p2 pos re :dist ic setpos :p2 eventcheck pprop "capbox "dist :delta + :dist pprop "capbox "dist scrollbarget "capboxdistbarre staticupdate "capdistval form gprop "capbox "dist 5 2 staticupdate "capstatvalav form :delta + :dist 5 2 end to testsi :d :f si :d > :f[stop] ec :d testsi :d + 1 :f end TO tortue.active [:act !o "action][:&t 1 + !o "tortue] [:&v !o "attente] !o[donne "actif "vrai] settimer :&t :&v `[attrape "error [ftortue ,[quoted :objet] ,@[ :act ] ] donne "&error error si non vide? :&error~ [cleartimer :&t execute sp sp sp :erract]] END TO tortue.av :n soit "&pc pc setpen !o "crayon si non :&pc = !o "couleur [setpc :&pc !o [donne "couleur pc]!o [donne "crayon pen]] fd :N END TO tortue.bc penpaint fixe :objet "crayon pen END TO tortue.bg penerase fixe :objet "crayon pen END TO tortue.bi setturtle !o "tortue pd fixe :objet "crayon pen END TO tortue.crayon.fcoouleur END TO tortue.crayon.fcouleur :& setpc :& ! :objet [donne "couleur :&] ! :objet [donne "crayon pen] END TO tortue.cree END TO tortue.crée :&nom [:n []] !s :objet ! "tortue "parent [cree :&nom] si non vide? :n [! :&nom [donne "tortue :n]] definis word :&nom ", (liste [[x]]`[ sisinon vide? :x [ftortue ,[quoted :&nom]] [demande ,[quoted :&nom]premier :x] ]) enterre (liste (liste word :&nom ", ) [](liste :&nom)) stop END TO tortue.crée2 :&nom [:n []] montre :objet montre :&nom montre :n !s :objet ! "tortue "parent [cree :&nom] si non vide? :n [! :&nom [donne "tortue :n]] definis word :&nom ", (liste [[x]](liste "ftortue quoted :&nom )) enterre (liste [] (liste word :&id ", ) (liste :&nom)) stop END TO tortue.definie? :& si nombre? :&[si :& < 0[ ra "vrai] donne "& (tortue.id :& "false)] si vide? :&[ra "false] ra non vide? ! :& "parent END TO tortue.desactive[:obj :objet] !o [donne "actif "faux] si nombre? :obj[donne "obj mot "t :obj] cleartimer 1 + ! :obj "tortue END to tortue.dessin [:p pen] bi ga 90 av 16 dr 135 av 16 * sqrt 2 dr 90 av 16 * sqrt 2 dr 135 av 16 dr 90 setpen :p end TO tortue.detruit END TO tortue.dr :& rt :& END TO tortue.ef [:&mess "true] ! qui.nom [sisinon :&mess [si boiteouinon [Supprimer]ph [Supprimer la tortue ] ? [tortue.supprime]] ~ [tortue.supprime]] END to tortue.efactive ! qui "desactive end TO tortue.efnom :& efprop :& "nom END TO tortue.factive ! qui "active END TO tortue.fattente :&a [:&timer 1 + !o "tortue] !o [donne "attente :&a] si !o "actif [cleartimer :&timer !o "active] END TO tortue.fcap :& setturtle !o "tortue setheading :& END TO tortue.fnom :&t :&nom ! tortue.nom :&t [nomme :&nom] END TO tortue.fpos :& soit "&pc pc setpen !o "crayon si non :&pc = !o "couleur [setpc :&pc !o [donne "couleur pc]!o [donne "crayon pen]] setpos :& END TO tortue.fposxyz :&pos soit "&pc pc setpen !o "crayon si non :&pc = !o "couleur [setpc :&pc !o [donne "couleur pc]!o [donne "crayon pen]] setposxyz :&pos END to tortue.genereid localmake "&tortues ! "tortue "enfants donne "tortue 1 ~ until[not membre? mot "t :tortue :&tortues ] [donne "tortue :tortue + 1] ra mot "t :tortue end TO tortue.id :&qui [:&mess "true] si liste? :&qui[ra pourtous.ra[tortue.id ?]:&qui] si nombre? :&qui [sisinon :&qui > -1 [donne "&qui mot "t :&qui][donne "&qui mot "t_ abs :&qui]] localmake "tortue ! :&qui "tortue sisinon vide? :tortue[si :&mess ~ [ boitemessage "Erreur ph :&qui[n'est pas une tortue ]stoptout]ra [] ]~ [ra sisinon :tortue < 0 [mot "t_ abs :tortue][mot "t :tortue]] END to tortue.id, [:x] ftortue "tortue.id end TO tortue.li setturtle !o "tortue pu fixe :objet "crayon pen END TO tortue.nom :& si liste? :&[ra pourtous.ra [tortue.nom ?] :&] localmake "&tnom ! tortue.id :& "nom si nombre? :&[donne "& mot "t :&] ra sisinon vide? :&tnom [ :&][:&tnom] END TO tortue.nomme :&nouvnom si liste? qui [boitemessage "Erreur [On ne peut renommer qu'une tortue à la fois] stop] localmake "&nom ! qui "nom si non tortue.definie? :&nom [boitemessage "erreur `[La tortue ,[:&nom] n'existe pas]] si :&nom = :&nouvnom [boitemessage "erreur [la tortue porte déjà ce nom]] ! qui.id [donne "nom :&nouvnom] ! qui.id [crée :&nouvnom ] si non vide? :&nom [! :&nom "supprime] ftortue :&nouvnom END to tortue.nouvelle :&tnouv [:mess "true] localmake "&nom sisinon nombre? af "tnouv :&tnouv[mot "t :&tnouv][:&tnouv] si :mess [si tortue.definie? :&tnouv ~ [messagebox "Erreur `[ La tortue ,[:&tnouv] existe déjà]stoptout]] si nombre? :&tnouv [donne "&tort mot "t :&tnouv] sisinon et "t = premier :&nom nombre? sp :&nom~ [localmake "&id :&tnouv donne "tortue sp :&id ! "tortue[crée :&id :tortue]]~ [localmake "&id tortue.genereid ~ ! "tortue[crée :&id :tortue] ! :&id [crée :&nom]~ ! :&id [donne "nom :&nom] ] end TO tortue.numero :& si nombre? :&[sisinon :& >-1 [donne "& mot "t :&][donne "& mot "t_ abs :&]] localmake "&n ! :& "tortue ra :&n end TO tortue.supprime er mot :objet ", !s :objet ! "tortue "parent [detruit] END POUR tortuelente pr[biblio] END POUR TOURNER :r :y [:&tort tortue] [:&pos ask -1 [posxyz]] FTORTUE -1 REPETE 360 [DONNE "X :R*COS COMPTEUR ~ DONNE "Z :R*SIN COMPTEUR FPOSXYZ (LISTE :X :Y :Z) POLY.AF] ftortue :tortue END TO toutes ra ! "tortue "enfants END TO toutes, [:x] sisinon vide? :x [ftortue toutes] [.maybeoutput demande toutes premier :x] END to traceabs :l pourtous [fpos ?]:l end to tracer :x lc repete compte :x [fpos item repcount :x bc ] end to trait.lig [:&mot " ] [:& []] catch "trait [until[ :&lig = " ][ verif ]] &add op :& end to traiterr :& (local "mess "proc) ifelse emptyp :& [make "& :&error][make "&error :&] if emptyp :&[messagebox "Erreur [Pas d'erreur ] stop] make "mess rprop "&err first :& make "proc list "Dans: ifelse (item 3 :&) = [] ["Commande] [item 3 :&] if emptyp :mess [dprop "erreur first :& :& messagebox "Erreur :& stop ] catch "error [messagebox "Erreur (se :proc char 13 mess :& char 13 item 4 :& )] if not emptyp error [throw "toplevel] end to traitprog windowfileedit "c:edit.tmp[chargeprog] end TO tri :& if emptyp :& [op :&] if emptyp bf :& [op :&] localmake "part &part :& op( se tri first :part first :& tri last :part) END pour triangle repete 3[av 100 dr 120] end to unburyall unbury buried end to unicon :window windowset :window 9 end .macro until :until.cond :until.instr if run :until.cond [op []] op se :until.instr (list "until :until.cond :until.instr) end pour URL :&url ignore shell se :&navigateur :&url end to valacc :& op ifelse numberp :&[:&][run :&] end TO valeurs :&obj [:lp lprop :&obj] si vide? :lp [stop] si non "# = premier premier sp :lp ~ [(montre premier :lp premier sp :lp )] (valeurs :&obj sp sp :lp) END to valide :x :max [:v :x + :max / 2 ] if :v > 400[op 400] if :v < 0 [op 0] op round :v end to vaselection [:pen pen] pu fpos rectpos selection setpen :pen end to verif if (char 124) = first :&lig [ delim stop] if (char 126) = first :&lig [ &add make "&lig bf bf :&lig stop] if ( first :&lig) = "|[| [&add make "&lig bf :&lig make "& lput trait.lig :& stop ] if "|]| = first :&lig [make "&lig bf :&lig throw "trait stop ] if separ first :&lig [&add make "&mot " skip.bl stop] make "&mot word :&mot first :&lig make "&lig bf :&lig end TO verifprocs [:%lprocs[]][:%CONFLIT []][:err ERROR]~ [:%fichsave ifelse emptyp page[[]][word bl bl bl page "ltp]][:%wr writer][:%read reader] local [%lig %nomproc] if :&nonverif [make "&procedures first contents op []] noyield setcursorwait enterre [[][ %lprocs %fichsave %wr %read %lig ][enregistre]] openread :&fichtemp setread :&fichtemp until [eofp][make "%lig rw IF NOT EMPTYP :%LIG~ [catch "error [donne "%lig parse :%lig ]make "err error ~ if not emptyp :err [closeall setread [] make "&error ~ md :%lig md "Edition sd sd :err op [!erreur!] ] ] ~ if not emptyp :%lig [ if membre? first :%lig [to pour] ~ [ if (compte :%lig) > 1[make "%nomproc item 2 :%lig~ queue "%lprocs :%nomproc ~ if :&verif [ IF SYSTEME? :%nomproc [queue "%CONFLIT :%nomproc ]] ]]]] donne "&procedures :%lprocs setread :%read setwrite :%wr close :&fichtemp op :%conflit END to version op (se car 59 "Version :version) end to verso [:wr writer][:fich "c:\\temp\\verso.] openwrite :fich setwrite :fich po filter [definedp ?] :&procedures PO FILTER [NOT MEMBERP ? :&PROCEDURES]first contents close :fich setwrite :wr make "&fichtemp :fich windowfileedit :fich [noyield setcursorwait interpreter ] end TO vg make "&selvis "false ftortue 0 cs bc END TO vghg fpos [-191 264] END to video :a [:imp "false] (pr "video.ouvre quoted (word char 124 nomfichec :a char 124)) video.ouvre :a ( pr "videobox quoted (word char 124 nomfichec :a char 124)) (videobox :a) end to video.av :& fen.factive :&videoact ifelse( video.pos ) + :& < video.longueur ~ [ run list "mci (se "step "video "by :& ) ] ~ [video.fin] vidstatupdate end to video.debut fen.factive :&videoact mci [seek video to start] vidstatupdate end to video.Ferme if (activep "videobox "false)~ [desactive "videobox windowdelete "videobox] SI (ACTIVEP "PLAY "FALSE ) [VIDEO.STOP] (mci [close video]) end to video.fin fen.factive :&videoact mci [seek video to end] vidstatupdate end TO video.fpos :n mci (se "seek "video "to :n) vidstatupdate END to video.joue [:deb []][ :fin []] fen.factive :&videoact if (activep "play "false) [stop] active "play mci [break video on 32] settimer 1 50 [vidstatupdate] if not emptyp :deb[make "deb se "from :deb] if not emptyp :fin[make "fin se "to :fin ] fen.factive :&videoact (mci (se "play "video :deb :fin "notify )~ [cleartimer 1 vidstatupdate desactive "play]) end to video.longueur local "res make "res runresult[ mci[status video length]] ifelse emptyp :res [op 0][op first first :res] end to video.ouvre :& make "&videoact :& until [not memberp "\\ :&videoact] [make "&videoact sp member "\\ :&videoact ] make "&video word "* member ". :& local "drv make "drv ifelse ".avi = bf :&video["avivideo]["qtwvideo] make "&canal mci (sentence [open] (word "" :& "") "type :drv [ alias video]) end to video.pos op first mci [status video position] end to video.re :& fen.factive :&videoact ifelse video.pos > :& ~ [ run list "mci (se "step "video "by -:& ) ]~ [video.debut] vidstatupdate end to video.stop fen.factive :&videoact mci [ stop video ] vidstatupdate end TO videobox [:&nom " ] 1 if (activep "videobox "false)[stop] local "max make "max video.longueur active "videobox if not namep "&pasvid [make "&pasvid 1] windowcreate "main "videobox word "Video:\ nomfich :&nom 139 35 173 35 [] staticcreate "videobox "statvidpostitre "Position: 20 0 30 10 staticcreate "videobox "statvidpos video.pos 50 0 40 10 buttoncreate "videobox "vidquit "X 0 0 10 10 [pr "video.ferme video.ferme ] buttoncreate "videobox "viddeb "\<\< 15 10 20 10 ~ [ pr "video.debut video.debut ] buttoncreate "videobox "vidar "\< 40 10 20 10 ~ [ video.re :&pasvid ] buttoncreate "videobox "vidstop "stop 65 10 20 10 ~ [pr "video.stop video.stop ] buttoncreate "videobox "vidplay "play 90 10 20 10 ~ [&videoboxjoue] buttoncreate "videobox "vidav "\> 115 10 20 10 ~ [ video.av :&pasvid] buttoncreate "videobox "vidfin "\>\> 140 10 20 10 ~ [pr "video.fin video.fin ] END to vidstatupdate if (activep "videobox "false)[staticupdate "statvidpos video.pos] end TO virguleverspoint :& ra pourtous.ra [ra sisinon ? = ", [ra ". ][?]] :& END to vise ct if (activep "vise "false) [stop] setpos gprop "capbox "pos make "&tr "true active "vise fsouris[efsouris desactive "vise mt scrollbarset "capboxbarre 0 360 round heading ][][][]~ [ if :&tr [setheading towards mousepos ic make "&pos1 mousepos fpos :&pos1 make "&tr "false ] li ~ if not mousepos = :&pos1 [bi fpos gprop "capbox "pos make "&tr "true] staticupdate "capstatval heading ] end TO vitesse :nom [:pen pen][:vis shownp] fen.factive list :nom rprop :nom "tortue dynamique.init :nom ftortue rprop :nom "tortue locale [pos.v x.v y.v vi vd :&cb1 :&cb2 :&pol] donne "&pol rprop :nom "coorpol donne "pos.v rprop :nom "pos0 donne "vi rprop :nom "vi donne "vd rprop :nom "vd donne "x.v coorx donne "y.v coory donne "fini "false ct setpensize [2 2] ic donne "&nom :nom DONNE "&MAJ "FAUX DONNE "&CTRL "FAUX fxy :x.v + rprop :nom "vx0 :y.v + rprop :nom "vy0 fen.factive[ mswlogo screen] FCLAVIER [SI CLAVIER = 16 [DONNE "&MAJ "VRAI]~ SI CLAVIER = 17 [DONNE "&CTRL "VRAI ]]~ [SI CLAVIER = 16 [DONNE "&MAJ "FAUX]~ SI CLAVIER = 17 [DONNE "&CTRL "FAUX]] fsouris []~ [mt efsouris donne "fini "true ]~ [][ comboboxsettext word "comb.vx0Val rprop :&nom "fen :&cb1~ comboboxsettext word "comb.vy0Val rprop :&nom "fen :&cb2 ~ mt efsouris donne "fini "true ]~ [ajourvitesse] until [:fini][] efclavier fpos :pos.v if :vis[mt] setpen :pen dynamique.init :nom fen.factive liste :nom rprop :nom "tortue END TO vrai op "true END pour vx [:n :nom] ra ( rprop :n "vx) end pour vy[:n :nom] ra rprop :n "vy end to w make "x enchaine "|icole| pr enmot :x end .macro while :while.cond :while.instr if not run :while.cond [op []] op se :while.instr (list "while :while.cond :while.instr) end to wriggle.back :list :speed if emptyp :list [stop] arc last :list :speed wriggle.back bl :list :speed end to wriggle.there :list :speed if emptyp :list [stop] arc first :list :speed wriggle.there bf :list :speed end TO x ra coorx / :&resol END to xcor output first pos end TO y ra coory / :&resol END to ycor output first butfirst pos end to écranp pr [Non disponible en MSWLOGO] end to écrans pr [Non disponible en MSWLOGO] end Make "%cont [essai] Make "%tort 1 Make "& "t2 Make "&&anim [] Make "&3d "FALSE Make "&3dsouris "vrai Make "&3dtort "t0 Make "&act [] Make "&aff "false Make "&affmode "true Make "&afmode "false Make "&ajim "false Make "&anim "faux Make "&animations [] Make "&anime "faux Make "&animnom "mvt1 Make "&animnon "mvt1 Make "&arret "vrai Make "&avert "true Make "&avpile [] Make "&bi "faux Make "&bit.vis "true Make "&bitm.pen [penup paint [1 1] 0 [1]] Make "&bitm.pos [-249 81] Make "&bitm.pos2 [-238 120] Make "&bitm.tortue 0 Make "&bouge "false Make "&boxpile [[-260 37]] Make "&cachees "crayondepiledeterrenomsdeterretoutecnomsecrisnomsedpropedpropsedtoutefnomefnomseftoutempileenleveenleveduplenterrenomsenterretouterproperpropsfaire.jusquefaire.tantquefcrayonfiltreimtimtsinverseinvoquejusquelistenomlistepropslisteverstableaulistpropmdfitemmditemmdtableaunommenomsnondisppourtous.rapourtous.ra.phreduistableauverslistetantquetiretransferetrouve Make "&canal [1] Make "&cap 69 Make "&cappile [[0 0]] Make "&cb1 45 Make "&cb2 78.39 Make "&click "true Make "&commander [2 546 1000 172] Make "&configpers "false Make "&cont [[ajour ajval alire aller autbox auteur choix delier destinations enlever enterretout fdepart infos jeter jouebox joueur laisser lieu lire munir objets placer possede prendre relier sauter] [fich joueur l1 l2 l3 l4] [autbox foret jouebox]] Make "&ctrl "true Make "&deb 1 Make "&dec "true Make "&dess "false Make "&dist 38 Make "&distobs 600 Make "&drpile [] Make "&dt 100 Make "&dynades [] Make "&dynam [] Make "&dynamdes [] Make "&dynnum [] Make "&dynum [] Make "&ecran.plein "true Make "&efprim "false Make "&en [] Make "&err [5 [dr didn't output to av] [] []] Make "&err1 [make "&error error pr (se "|;| "erreur first :&error) messagebox "Erreur (se gprop "&err first :&error char 13 :&error ) throw "toplevel] Make "&erract [make "&error error pr (se "Erreur char 59 first :&error ) messagebox "Erreur (se "|Une erreur s'est produite.| char 13 "|- Utilisez le bouton Erreur ou| char 13 "|- Double clic sur la dernière ligne avec 'Erreur' dans la fenêtre Commander| ) throw "toplevel] Make "&errmess& [Une erreur s'est produite. - Utilisez le bouton Erreur ou - Double clic sur la dernière ligne avec 'Erreur' dans la fenêtre Commander] Make "&errmessage [|Une erreur s'est produite.| |- Utilisez le bouton Erreur ou| |- Double clic sur la dernière ligne avec 'Erreur' dans la fenêtre Commander |] Make "&error [] Make "&etiq "balle Make "&fenoutils [0 42 620 70] Make "&fichtemp "c\:\\temp\\verso. Make "&film "Oiseau1 Make "&film.debut 20 Make "&film.début 1 Make "&film.n 2 Make "&film.pos 1 Make "&film.sprite "faux Make "&film.stop "vrai Make "&film.vis [pacman1 pcman5] Make "&films [] Make "&id "t1 Make "&imsuff "*.bmp Make "&joue "faux Make "&l [] Make "&lanime [] Make "&lanimeact [[389 -75]] Make "&lastedit "C:\TEMP\verso Make "&lcap [] Make "&lig " Make "&limmodes [[Mem] [Mem OU Ecran] [Mem ET Ecran] [Mem OUEX Ecran] [Mem ET INV Ecran] [INV Mem] [|INV(Mem| OU |Ecran)|] [|(INV| |Mem)OU| Ecran] [INV Ecran] [Masque]] Make "&lpos [[-294 92]] Make "&lrel [] Make "&maj "FALSE Make "&majnon "true Make "&mci "true Make "&messer [Une erreur s'est produite. Utilisez le bouton erreur pour en savoir plus | Ou| double clic sur dernière ligne commençant par Erreur] Make "&messerr [Une erreur s'est produite. Utilisez le bouton erreur pour en savoir plus Ou double clic sur dernière ligne commençant par Erreur] Make "&meth [# objet.methode] Make "&midi "true Make "&mode 1 Make "&mswlogoscreen [0 0 1024 746] Make "&nanigateur "C:Program Make "&navigateur "|C:\Program Files\Netscape\Communicator\Program\netscape.exe| Make "&nom "xxx Make "&nomanim "mvt1 Make "&noms [] Make "&nonverif "false Make "&nouveau "true Make "&nsprite 3 Make "&obj3d [] Make "&observe "faux Make "&oldcap 0 Make "&oldpos [-270 -34] Make "&opim "false Make "&pas 1 Make "&pasvid 1 Make "&pavid 1 Make "&pile [] Make "&pileev [] Make "&pileevclavier [] Make "&pileevsouris [] Make "&pilemem [[0 Presse papier] [01022 Image Ajustee] [01023 Ancien Ecran]] Make "&pol "true Make "&pos [0 0] Make "&pos1 [64 42] Make "&pos2 [-148 80] Make "&pos3d [-192 -144] Make "&posabs "false Make "&posbut "true Make "&poscap "false Make "&poscrel "true Make "&pospile [] Make "&posrel "false Make "&posrien "true Make "&posxyz [0 0 0] Make "&pr "true Make "&prim [éc écnoms écranp écrans écris écrisnoms égal? étiquette |*| |+| |-| .FITEM .FPREMIER .FSP .MACRO .STOP.RA |/| 2D 3D |<| |=| |>| AIDEWIN ANTISLASH? APPLIQUE ARC arctan ASCENCEUR.FVAL ASCENSEUR.CRéE ASCENSEUR.CREE ASCENSEUR.EF ASCENSEUR.VAL ascii attends ATTRAPE avance AVANT? BARRIERE bc bg BI BI? BIDON.COULEUR BITAJUSTE BITCHARGE BITDECALEA BITDECALEG BITDECALEL BITDECALSIGNE BITET BITINDEX BITMODE BITNON BITOU BITOUEX BITPAVE BITSAUVE BOITECOMB.CRéE BOITECOMB.CREE BOITECOMB.EF BOITECOMB.EFLIGNE BOITECOMB.FTEXTE BOITECOMB.INSLIGNE BOITECOMB.TEXTE BOITELISTE.CHOIX BOITELISTE.CRéE BOITELISTE.CREE BOITELISTE.EF BOITELISTE.EFLIGNE BOITELISTE.INSLIGNE BOITEMESSAGE BOITEOUINON BOITEQUESTION BOUTON.AJOUR bouton.crée BOUTON.CREE BOUTON.EF boutonradio.crée BOUTONRADIO.CREE BOUTONRADIO.EF BOUTONRADIO.FVAL BOUTONRADIO.VAL CABRE CABREMENT CACHETORTUE cap car CASCADE CASCADE2 CERCLE CERCLE2 chose clavier clavier.val COCHE.CRéE COCHE.CREE COCHE.EF COCHE.FVAL COCHE.VAL COMBINE compte COMPTEUR contenu CONTENUE? CONTINUE COORX coorx coory coory coorz cos CRAYON CRAYON.FTAILLE CRAYON.TAILLE CROSSMAP ct DECALEX DECALEY DEFINIE? DEFINIS DEPILE DEQUEUE dernier DETERRE DETERRENOMS DETERRETOUT DIALOGUE.CRéE DIALOGUE.CREE DIALOGUE.EF DIFFERENCE distance donne dos DPROP dr droite EC ecnoms ECRAN.COULEUR ECRAN.fCOULEUR ecris ecrisnoms EDITE EDN EDNS EDPROP EDPROPS EDPROPS EDTOUT ef EFBITMAP EFFACE eficône eficone EFN efnom efnoms EFNS EFPALETTE EFPROP EFTIMER EFTOUT egal? ELLIPSE ELLIPSE.ARC ELLIPSE.ARC2 EMPILE enlève ENLEVE ENLEVEDUPL ENROULE ENTERRE ENTERREES ENTERRENOMS ENTERRETOUT ENTIER ERPROP ERPROPS ERPROPS ET ETATTORTUE EXECRESULTAT execute EXP FAIRE.DE_A FAIRE.JUSQUE FAIRE.TANTQUE FBITINDEX FBITMAP FBITMODE FCABREMENT fcap FCRAYON FCURSEURATTENTE FENêTRE.éDITION FENêTRE.CRéE FENêTRE.EF FEN.ACTIVE FEN.ARBRE FEN.FACTIVE FENETRE FENETRE.CREE FENETRE.EDITION FENETRE.EF FFONT FHASARD ficône FICHHIER.FERME FICHIER.EC FICHIER.FEC FICHIER.FLECT FICHIER.FPOSEC FICHIER.FPOSLECT FICHIER.LECT FICHIER.OUVREAJ FICHIER.OUVREEC FICHIER.OUVRELECT FICHIER.POSLECT ficone FILTRE FINCLINAISON FINDEX FITEM FMOTIF FORIENTATION FTIMER FZONEACTIVE ga gauche gc GENSYM groupe.crée GROUPE.CREE GROUPE.EF HALT hasard ic ID identique? IF IFELSE IG IGNORE IMPROP IMT IMTS INCLINAISON INDEX.CRéE INDEX.CREE INDEX.EF INDEX.FVAL INDEX.PARENT insere INVERSE INVOQUE item JOUESON JUSQUE lc LI lisliste lislistecc LISMOT liste liste? LISTENOM LISTEPROPS LISTEVERSTABLEAU LISTPROP LM LN LOCALE LOG10 LPROP MAJUSCULE MCI md MDFITEM MDITEM MDTABLEAU MEMBRE membre? metsdernier metspremier MIDIFERME MIDIOUVRE MINUSCULE MODECRAYON moins montre MONTRETORTUE mot mot? mp mt NC nom? nombre? nomme NOMS NONETATTORTUE NONPAS.A.PAS NONTRACE NOT NOT2 NOYIELD or2 origine ou PAS.A.PAS PAUSE ph phrase PIQUE PIXEL PLUSGRAND? PLUSPETIT? poly.af poly.def poly.fin POS POSXYZ pour POURTOUS POURTOUS.RA POURTOUS.RA.PH premier PREMIERS PRIMITIVE? PROCEDURE? PROCEDURES PROCS.PAS.A.PAS PRODUIT PUISSANCE QUEUE QUOTED QUOTIENT répète ra rac RADARCTAN RADCOS radiobuttonset.old RADSIN ramène ramene rameneimage rapporte RAWASCII rcarrée rcarree recule REDUIS RENVOIE repete RESACCEPTEARRET RESACCEPTEMARCHE RESACCEPTERECEPTVAL RESACCEPTEVENVAL RESCONNARRET RESCONNENVVAL RESCONNMARCHE RESCONNRECEPTVAL RESDEBUT RESETEINT reste rg RPROP saufdernier saufpremier sd SETTEXTFONT SIFAUX sin SIVRAI SOMME SONS sp STAT.AJOUR STAT.CRéE STAT.CREE STAT.EF stop SYNTAXE SYNTAXE.EXECUTE TABLEAU TABLEAU? TABLEAUVERSLISTE TANTQUE tap TEMPS TEST2 TESTEV TEXTE TIRE TORTUE TRACE TRACEES TRANSFERE TROUVE vc vers versxyz vide? VIDEGRAPHIQUE VISIBLE? vt YIELD ZONEACTIVE ZOOM] Make "&primen [|*| |+| |-| .EQ .MACRO .MAYBEOUTPUT .SETBF .SETFIRST .SETITEM |/| |<| |=| |>| ACTIVEAREA AND APPLY ARC ARCTAN ARRAY ARRAYP ARRAYTOLIST ASCII ASHIFT ASHIFT BACK BACKSLASHEDP BEFOREP BF BF BITAND BITBLOCK BITFIT BITINDEX BITLOAD BITLOAD BITMAPTURTLE BITMODE BITNOT BITOR BITSAVE BITXOR bl BL BURIED BURY BURYALL BURYNAME BUTTONCREATE BUTTONCREATE BUTTONDELETE BUTTONUPDATE BYE CASCADE CASCADE2 CATCH CHAR CHDIR CHDIR CHECKBOXCREATE CHECKBOXCREATE CHECKBOXDELETE CHECKBOXGET CHECKBOXSET CIRCLE CIRCLE2 CLEARPALETTE CLEARSCREEN Cleartext CLEARTEXT CLEARTIMER CLOSE COMBINE COMBOBOXADDSTRING COMBOBOXCREATE COMBOBOXCREATE COMBOBOXDELETE COMBOBOXDELETESTRING COMBOBOXGETTEXT COMBOBOXSETTEXT CONTENTS CONTINUE COS COUNT CROSSMAP DEBUGWINDOWS DEFINE DEFINEDP DEQUEUE DIALOGCREATE DIALOGCREATE DIALOGDELETE DIFFERENCE distance DO.UNTIL DO.WHILE downpitch EDALL EDIT EDN EDNS EDPL EDPS EDPS ELLIPSA2 ELLIPSE ELLIPSEARC emptyp equalp EQUALP er ERALL ERASE ERN ERN ERNS ERNS ERPL ERPS ERPS EVENTCHECK EXP FENCE FILTER FIND FIRST FIRSTS FLOODCOLOR FOR FOREACH FORWARD FPUT FPUT GENSYM GETFOCUS GPROP GREATERP GROUPBOXCREATE GROUPBOXCREATE GROUPBOXDELETE HALT HEADING HIDETURTLE HOME HT ICON icon IFFALSE IFTRUE IGNORE INT INVOKE ITEM KEYBOARDVALUE KEYBOARDVALUE label LAST LEFT leftroll LESSP LIST LISTBOXADDSTRING LISTBOXCREATE LISTBOXCREATE LISTBOXDELETE LISTBOXDELETESTRING LISTBOXGETSELECT LISTP LISTTOARRAY LN load LOAD LOCAL LOG10 LOWERCASE LPUT LPUT LSHIFT LSHIFT LT MAKE MAP MAP.SE MCI MDARRAY MDITEM MDSETITEM MEMBER MEMBERP MESSAGEBOX MIDICLOSE MIDIOPEN MINUS MKDIR MKDIR name NAMELIST NAMEP NAMES NETACCEPTOFF NETACCEPTON NETACCEPTRECEIVEVALUE NETACCEPTSENDVALUE NETCONNECTOFF NETCONNECTON NETCONNECTRECEIVEVALUE NETCONNECTSENDVALUE NETSHUTDOWN NETSTARTUP NOBITMAPTURTLE NON NONDISP NONDISP NOSTATUS NOT NOYIELD NUMBERP OP OPENREAD OPENUPDATE OPENWRITE OR OR OUTPUT PARSE PAUSE PEN PENDOWN PENDOWNP PENERASE PENERASE PENMODE PENPAINT PENPAINT PENREVERSE PENSIZE PERSPECTIVE PICK pitch PIXEL PLAYWAVE PLIST PLISTS PLLIST polyend polystart polyview pons pons PONS PONS POP POPDIR POPL pos posxyz POT POTS POWER PPROP pr pr PR PR PRIMITIVEP PROCEDUREP PROCEDURES PRODUCT PU PU PUSH QUESTIONBOX QUEUE QUOTED QUOTIENT RADARCTAN RADCOS RADIOBUTTONCREATE RADIOBUTTONCREATE RADIOBUTTONDELETE RADIOBUTTONGET RADIOBUTTONSET RADIOBUTTONSET RADSIN RANDOM RAWASCII READER READPOS REDUCE REMAINDER REMDUP REMOVE remove REMPROP REPCOUNT repeat REPEAT RERANDOM REVERSE RIGHT rightroll RL RL RMDIR roll RT RUN RUNPARSE RUNRESULT rw rw SCREENCOLOR SCROLLBARCREATE SCROLLBARCREATE SCROLLBARDELETE SCROLLBARGET SCROLLBARSET SCROLLX SCROLLY SE SENTENCE SETACTIVEAREA SETBITINDEX SETBITMODE SETCURSORWAIT SETFOCUS SETHEADING SETITEM SETLABELFONT setorientation SETPEN SETPENPATTERN SETPENSIZE setpitch SETREAD SETREADPOS setroll SETSCREENCOLOR SETTEXTFONT SETTIMER SETWRITE SETWRITEPOS SHOW SHOWNP SHOWTURTLE SI SIN SISINON SOUND sqrt SQRT sqrt ST STATICCREATE STATICCREATE STATICDELETE STATICUPDATE STATUS STEP STEPPED stop SUBSTRINGP SUM TEST TEXT THING THROW TIME TO TOWARDS towardsxyz TRACE TRACED TRANSFER TURTLE TYPE TYPE UNBURY UNBURYALL UNBURYNAME UNICON unicon UNSTEP UNTIL UNTRACE UPPERCASE uppitch vg WAIT WHILE WINDOW WINDOWCREATE WINDOWCREATE WINDOWDELETE WINDOWDELETE WINDOWFILEEDIT WINDOWFILEEDIT WINHELP WORD WORDP WRAP WRAP WRITER XCOR XCOR YCOR YCOR YESNOBOX YIELD zcor ZOOM] Make "&procedures [] Make "&procs [] Make "&prop "false Make "&props [] Make "&qui "t0 Make "&r [] Make "&res [[5] [5] [5] [5] [5]] Make "&resol 1 Make "&save [G:\Tous\MSWLOGO\frlogo.lgo] Make "&selection "true Make "&selvis "false Make "&son "*.mid Make "&sprite "vrai Make "&suff ".bmp Make "&sufftxt "* Make "&system [! # $ &acc &acc2 &accel &add &corps &init &llig &parse &supp: &videoboxjoue .aurevoir .version ?rest ` abs active activep adbase af afvies aidelogo aj ajbuff ajourcoul ajourdynval ajourimage ajourlistimages ajourvitesse ajoutedernier ajoutepremier ajprop ajusteimage anime anime.active anime.desactive anime.init anime.joue anime.stop annulcap annulpos arrondis ascii2 attendsque avannul avbox bidule bitcolle bitcopie bitcoupe bitindex.modif bitmap.cache bitmap.montre bouge bougecap bouton? buryall cachecapbox cacheoutils cacherect capbox capboxquitte capvers caract case centre changeindex changesignex chargeimage chargeprog chercheitem chim choixbuff closeall colle.fmode colleimage colleimagesel combine combinel cond conv convcoul convm coorx coory copiedef copieimage copieimagesel couleur couleurbox couleurboxquitte couleurs couleursous coulmodif coulorig coulrgb coupeimage coupeimagesel crayon creebase d.anime delim demande depile dequeue desactive deslab dessiner deterrenoms deterretout dialogueouvrefichier dialsauve dialsauve0 direction dirlab dist distance donnepage drawface drbox drboxangle dyamique.desactive dyn.cree.invalide dynabox dynambox dynamique.active dynamique.anime dynamique.cree dynamique.deplace dynamique.desactive dynamique.ef dynamique.init dynamique.stop ecc ecnoms ecrisnoms ed edf edfich editer edprop edprops edtout efanime efcapbox efclavier effichier efmem efnom efnoms efoutils efprops efrectvisible? efsouris eftout empile enchaine enleve enlevedupl enleveimage enlprop enmot enregistre enterrenoms enterretout entiers erall ern erprop erprops erreur estampe etire existp faire.de_a faire.jusque faire.tantque fanime faux fbidon fcapdist fchaine fclavier fcouleur fcrayon fen.ferme fen.frect fen.init fen.restaure ffond fgroupe filter filtre fimagerect fimagesel find for for.done foreach foreach.done foreach1 forloop forstep fpapiercentre fpapiersupgauche frotdist frsetup fselection fsouris fversion gensym groupe groupe.deterre groupe.enterre hello iconeoutils ignore im image.colle image.copie image.coupe image.enregistre image.findex image.fmode image.h image.index image.l image.mode image.nom image.ouvre image.ouvre$ image.rect imagerectici images imchrect imnom imnoms improc improcs improp improps imt imts initdynval ins ins.num interprete interpreter inverse invoke invoque item2 jeu jeu0 jouesons jusque laby lac lect.logo.ini lib lisbase liscar listboxdeletestring2 listenom listeprops listeverstableau listprop ll logo.init map map1 marquerect mcisonbox mcisons mcisonstatupdate mdfitem mditem mdtableau membox mess modifav modifcap modifcouleur modifpos montrer montrer1 montrer2 mvtrel namelist nomfich nomfichec nomimage nomme nommepage noms non nondisp nouvellepage np obj.im obj.im2 objet.ajoute objet.cree objet.enleve objet.fval objet.methode oo outils ouvre page pen pilote poly.dessin pop pos2 posbg posbox posint possouris posverscapdist posversrotdist pourous.ra.ph pourtous pourtous.ra proportion proportionrect proppos prsonjoue push queue qui quittepage radiobuttonset ramenetexte rang rect recth rectici rectl rectpos rectposbg recttaille redefinis reduis restaure restaureimage restauremagesel retire rot rotation roundpos rprop.num rproph rvbverscoul rw2 sa sauvecran sauveimage sauvepage sauvesous sauvetout savecontents scrollav scrolldrga scrollpos scrollposx scrollposy scrollset scrx scry sel selection selection.ici selectionh selectionl selectionne selectionpos selectiontaille separ setpen setscrollpos si sisinon skip.bl son son.av son.debut son.ferme son.fin son.fpos son.joue son.longueur son.midi son.ouvre son.pos son.re son.stop son.wave son.wavemci sonbox sonstatupdate souris sourisstop stoptout supgauche suppimage supprime t tab tableauversliste tailleimage taillerect tailleversrect tantque testcap testcapfin testdist testsi tire tortuelente tourne traceabs tracer trait.lig traiterr traitprog transfere trouve tutor unburyall until valacc valide vaselection verif verifprocs version verso vg vghg video video.av video.debut video.ferme video.fin video.fpos video.joue video.longueur video.ouvre video.pos video.re video.stop videobox vidstatupdate vise vitesse vrai vx vy w xcor y ycor] Make "&t 7200 Make "&timer 1 Make "&timer1 "false Make "&tort -1 Make "&tortue 0 Make "&tr "false Make "&verif "true Make "&video "\*.avi Make "&videoactive "video Make "act [5] Make "aide.mess [primitives] Make "b 0 Make "b1 0 Make "balle.pos [413 284] Make "bidon 5 Make "cap 0 Make "caps [] Make "caseignoredp "true Make "cible.pos [300 -76] Make "commander=0,294,624,172 [0 294 624 172] Make "correspondant [|cayla-13|] Make "couleur 0 Make "deb 13220369 Make "defprocs [.version arrondis bouton? couleur couleursous distance fcouleur ffond fond liscar ll nommepage non nouvellepage np quittepage ramenetexte restaure sauveimage sauvepage si sisinon stoptout tab tortuelente] Make "dt 1 Make "ecran.secu [-500 500 1000 1000] Make "ecran.taille [0 -11 25 12] Make "er [] Make "erract [make "&error error pr (se "Erreur char 59 first :&error ) messagebox "Erreur (se "|Une erreur s'est produite.| char 13 "|- Utilisez le bouton Erreur ou| char 13 "|- Double clic sur la dernière ligne avec 'Erreur' dans la fenêtre Commander| ) throw "toplevel] Make "film.origine [-500 500] Make "film.pos 5 Make "film.sprite "vrai Make "fini "true Make "foyer [50 0] Make "gensym.number 11 Make "hwnd [1835388] Make "ind 1 Make "lib [crayon de.a depile deterrenoms deterretout ecnoms ecrisnoms edprop edprops edtout efnom efnoms eftout empile enleve enlevedupl enterrenoms enterretout erprop erprops faire.jusque faire.tantque fcrayon filtre imt imts inverse invoque jusque listenom listeprops listeverstableau listprop mdfitem mditem mdtableau montrenoms nomme noms pourtous.ra pourtous.ra.ph reduis tableauversliste tantque tire transfere trouve] Make "lig " Make "ligne [Screen=0,0,800,600] Make "lprocs [] Make "lwnondisp [ac babillard barre colle nondisp sinterligne] Make "lwprocs [ac babillard barre carsous carsouscur chacune cherche colle copie copiefichier couleurtexte] Make "mess [Procédures déjà |définies:|] Make "meth "methode Make "mode 1 Make "mouse.savepen [penup paint [1 1] 0 [1]] Make "mouse.savepensize [1 1] Make "mouse.savescrunch [1 1] Make "mousecopy.p1 [-57 151] Make "mousecopy.p2 [-29 125] Make "mvt "av Make "n 100 Make "names [] Make "nom "lampe Make "objet "bbb Make "oldindex 0 Make "outils.rect [0 40 620 70] Make "pbjet "cheval Make "pierre [pierre] Make "plists [] Make "pos [175 -32] Make "post1 [336.819491 155.069991] Make "post2 [300 120.476972] Make "prim [eficône ficone eficone ficône] Make "procedures [] Make "procs [] Make "r 0 Make "r1 0 Make "rang 3 Make "rect [-388 251 786 507] Make "redefp "TRUE Make "rep "true Make "reste [5 6] Make "selpos1 [-190 140] Make "size [50 50] Make "speed 10 Make "startup [&init] Make "status [1] Make "stop "false Make "t 14.4 Make "tortue " Make "trajet [[171 169] [163 169] [135 170] [104 179] [59 191] [18 187] [-27 161] [-28 135] [-12 117] [24 110] [128 113] [155 113] [174 72] [160 33] [171 -6] [206 -20] [241 -3] [272 47] [282 103] [287 118] [-125 183] [-125 183] [-130 183] [-152 181] [-175 172] [-189 154] [-194 124] [-185 100] [-155 76] [-54 63] [69 70] [86 131] [84 174] [52 205] [3 204] [-70 189] [-123 175] [-135 172] [-137 172] [171 169]] Make "type "waveaudio Make "undefined [] Make "v 0 Make "v1 0 Make "version [Thu Apr 25 11:24:21 2002] Make "vx 20 Make "vy 18 Make "wn "dyn.1 Make "workdir "g\:\\mswlogo\\ Make "x "donnees Make "y 500 Make "z -7.35089072945172e-14 Pprop " "pixel [0 0 0] Pprop " "parent "couleur.nom Pprop "&err 31 [[Stop seulement dans une procedure] []] Pprop "&err 33 [[END |-| manquant ou pas a la bonne place] []] Pprop "&err 30 [[Que faire de |?|] [2]] Pprop "&err 26 [[|']'| inattendu] []] Pprop "&err 24 [[Je ne sais pas comment faire pour ?] [2]] Pprop "&err 23 [[On ne peut pas utiliser POUR dans une procedure] []] Pprop "&err 22 [[|?| , est une primitive] [1]] Pprop "&err 18 [[erreur de fichier] []] Pprop "&err 16 [[Stop seulement dans une procedure] []] Pprop "&err 15 [[|?| est definie] [1]] Pprop "&err 13 [[Je ne sais pas comment faire pour |?|] [2]] Pprop "&err 12 [[|')'| inattendu] []] Pprop "&err 11 [[|?| n'a pas de valeur] [1]] Pprop "&err 10 [[Trop de choses entre les crochets] []] Pprop "&err 9 [[Que faire de |?|] [2]] Pprop "&err 8 [[Trop de choses entre les parentheses] []] Pprop "&err 7 [[|?| n'aime pas |?| comme donnees] [1 3]] Pprop "&err 6 [[Pas assez de donnees pour |?|] [2]] Pprop "&err 5 [[|?| n'a pas rendu de valeur pour |?|] [1 3]] Pprop "&err 4 [[|?| n'aime pas |?| comme donnee] [1 3]] Pprop "&film "rect [-500 500 1000 1000] Pprop "capbox "val 57 Pprop "capbox "oldcap 57 Pprop "capbox "dist 0 Pprop "capbox "pen [pendown paint [1 1] [0 0 0] [1]] Pprop "capbox "pos [0 0] Pprop "capbox "dr 57 Pprop "charge "fich "G\:\\\\Tous\\\\MSWLOGO\\\\DIDAC\\\\Oiseau3.bmp Pprop "charge "rect [0 0 181 159] Pprop "chef2 "parent "t16 Pprop "classe "rubr [nom sexe all fr math] Pprop "couleur "parent "objet Pprop "couleur "enfants [couleur.nom pixel 2 7 134_134_134 51_204_255 40_40_40 0_102_153 0_153_153 153_102_153 255_255_255 0_51_0 107_107_107 0_153_204 0_204_204 0 0_204_153 153_204_153 0_153_102 241_241_241 0_204_255 120_120_120 4 255_204_51 187_187_187 51_255_255 0_102_102 147_147_147 0_51_102 3 102_204_204] Pprop "couleur "efaction [# couleur.efaction] Pprop "couleur.nom "parent "couleur Pprop "couleur.nom "action [# couleur.nom.action] Pprop "couleur.nom "faction [# couleur.nom.faction] Pprop "couleur.nom "efaction [# couleur.nom.efaction] Pprop "couleurbox "pen [penup paint [1 1] [224 0 0] [1]] Pprop "couleurbox "screencolorval 7 Pprop "couleurbox "floodcolorval 0 Pprop "couleurbox "pencolorval 0 Pprop "couleurbox "screencolor 7 Pprop "couleurbox "floodcolor 0 Pprop "couleurbox "pencolor 0 Pprop "couleurbox "vis "true Pprop "couleurbox "pos [0 0] Pprop "couleurbox "bitmode 1 Pprop "decale "active "true Pprop "erreur 25 [25 [iftrue without TEST] [] []] Pprop "erreur 32 [32 [APPLY doesn't like upprime as input] !s [if emptyp :&v [apply first :&p bf :&p]]] Pprop "erreur 29 [29 [Macro returned ct instead of a list] si [ifelse2 memberp :c [true vrai] [op :act1] [op :act2]]] Pprop "erreur 7 [7 [- doesn't like [-320 -240 320 240] as input] [] []] Pprop "erreur 13 [13 [I don't know how to end] anime.active [si clavier =73 [ifelse "penup = first pen [ic pu pr [ic pu]] [pr "ic ic] end]]] Pprop "facette "crayon [pendown paint [1 1] 4 [1]] Pprop "facette "tortue 0 Pprop "facette "av [# facette.av] Pprop "facette "hauteur 30 Pprop "facette "parent "tortue Pprop "facette "couleur 4 Pprop "facette "bidon 4 Pprop "facette "enfants [mur] Pprop "fen "Status "0,0,176,392 Pprop "fen "About_62 11 Pprop "fen "About_64 8 Pprop "fen "Commander "0,400,800,172 Pprop "fen "Screen "0,0,800,400 Pprop "fen "Editor "0,0,800,350 Pprop "fen "About 7 Pprop "fen "About_63 6 Pprop "film "parent "tortue Pprop "film "enfants [Oiseau10 Oiseau1] Pprop "g:tousmswlogodidacoiseau "pos "oiseau Pprop "g:tousmswlogodidacoiseau "debut "oiseau Pprop "g:tousmswlogodidacoiseau "n 3 Pprop "globe_1 "tortue 1 Pprop "globe_1 "n 8 Pprop "globe_1 "debut 1 Pprop "globe_1 "pos 5 Pprop "globe_1 "visible "vrai Pprop "globe_1 "couleursous 7 Pprop "globe_1 "action [film.anime] Pprop "globe_1 "parent "film Pprop "globe_1 "trajet [[-33 -103] [6 -105] [45 -104] [73 -96] [97 -85] [115 -69] [125 -53] [135 -37] [142 -15] [144 13] [141 34] [133 53] [124 67] [108 81] [77 97] [34 107] [-9 110] [-57 110] [-113 107] [-151 102] [-174 93] [-203 79] [-228 64] [-248 46] [-255 31] [-258 15] [-254 -1] [-242 -20] [-230 -33] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -40] [-219 -41] [-213 -47] [-209 -53] [-195 -65] [-173 -78] [-147 -89] [-115 -98] [-75 -102]] Pprop "image1 "rect [-57 151 28 26] Pprop "image1022 "rect [-500 500 1000 1000] Pprop "image1023 "rect [-500 500 1000 1000] Pprop "lampe "parent "t_3 Pprop "montrer "cap 0 Pprop "montrer "pen [penup paint [1 1] 0 [1]] Pprop "mur "parent "facette Pprop "mur "tortue 2 Pprop "mur "couleur 5 Pprop "mur "bidon 5 Pprop "mur "hauteur 100 Pprop "objet "methodeh [# objet.methodeh] Pprop "objet "fval [# objet.fval] Pprop "objet "methode [# objet.methode] Pprop "objet "ajoute [# objet.ajoute] Pprop "objet "cree [# objet.cree] Pprop "objet "detruis [# objet.detruis] Pprop "objet "detruit [# objet.detruit] Pprop "objet "donne [# objet.donne] Pprop "oeil "bidon 6 Pprop "oeil "couleur 6 Pprop "oeil "crayon [pendown paint [1 1] 6 [1]] Pprop "oeil "parent "t_1 Pprop "pixel "parent "couleur Pprop "posbox "rel [91 164.61] Pprop "posbox "cap [262 164.61] Pprop "posbox "scroll "false Pprop "posbox "oldpen [pendown paint [1 1] 0 [1]] Pprop "posbox "val [0 0] Pprop "posbox "oldpos [0 0] Pprop "posbox "noscroll "false Pprop "posbox "rot 76 Pprop "posbox "dist 84.4037913840367 Pprop "position "parent "objet Pprop "regard "parent "t_2 Pprop "selection "rect [-57 151 28 26] Pprop "t-1 "tortue -1 Pprop "t-1 "parent "tortue Pprop "t-3 "tortue -3 Pprop "t-3 "parent "tortue Pprop "t0 "couleur 0 Pprop "t0 "bidon 4 Pprop "t0 "tortue 0 Pprop "t0 "parent "tortue Pprop "t0 "action [av 5 ga 5] Pprop "t0 "crayon [pendown paint [1 1] 0 [1]] Pprop "t2 "bidon 7 Pprop "t2 "couleur 1 Pprop "t2 "crayon [penup paint [1 1] 1 [1]] Pprop "t2 "tortue 2 Pprop "t2 "parent "tortue Pprop "t_1 "couleur 6 Pprop "t_1 "nom "oeil Pprop "t_1 "enfants [oeil] Pprop "t_1 "tortue -1 Pprop "t_1 "parent "tortue Pprop "t_1 "crayon [pendown paint [1 1] 6 [1]] Pprop "t_2 "nom "regard Pprop "t_2 "enfants [regard] Pprop "t_2 "tortue -2 Pprop "t_2 "parent "tortue Pprop "t_3 "nom "lampe Pprop "t_3 "enfants [lampe] Pprop "t_3 "parent "tortue Pprop "t_3 "tortue -3 Pprop "tortue "enfants [t0 film t_1 t_2 t_3 facette] Pprop "tortue "supprime [# tortue.supprime] Pprop "tortue "av [# tortue.av] Pprop "tortue "fpos [# tortue.fpos] Pprop "tortue "crayon.fcoouleur [# tortue.crayon.fcoouleur] Pprop "tortue "crayon,fcoouleur [# tortue.crayon,fcoouleur] Pprop "tortue "nomme [# tortue.nomme] Pprop "tortue "cree [# tortue.crée] Pprop "tortue "crayon.fcouleur [# tortue.crayon.fcouleur] Pprop "tortue "dr [# tortue.dr] Pprop "tortue "bi [# tortue.bi] Pprop "tortue "li [# tortue.li] Pprop "tortue "fcap [# tortue.fcap] Pprop "tortue "desactive [# tortue.DESactive] Pprop "tortue "active [# tortue.active] Pprop "tortue "tortueactive "t1 Pprop "tortue "parent "objet Pprop "tortue "action [av 5] Pprop "tortue "bidon 0 Pprop "tortue "crée [# tortue.crée] Pprop "tortue "&qui 1 Pprop "tortue "attente 100 Pprop "tortue "fattente [# tortue.fattente] Pprop "tortue "actif "faux Pprop "tortue "couleur 0 Pprop "tortue "crayon [penup paint [1 1] 0 [1]] Pprop "tortue "bg [# tortue.bg] Pprop "tortue "bc [# tortue.bc] Pprop "tortue "fposxyz [# tortue.fposxyz]