Page 1 sur 1

Des Worms sur le bureau !

Publié : lun. 18/janv./2021 22:25
par Ar-S
Allez je me suis bien amusé à faire cette connerie :) Image
ECHAPE pour quitter

Code : Tout sélectionner

; by Ar-S / 18-01-2021 WORMS

Enumeration 10
  #LDVM
  #T
  #BG
EndEnumeration

Enumeration 1
  #w1
  #w2
  #w3
  #w4
  #w5
EndEnumeration


If InitSprite() = 0 Or InitMouse() = 0
  MessageRequester("Erreur", "Impossible d'ouvrir l'écran & l'environnement nécessaire aux sprites !", 0)
  End
EndIf

ExamineDesktops() : UsePNGImageDecoder()


Structure SP
  x.i
  y.i
  direction.b
EndStructure

Declare  CaptureScreen()
Declare Owin()
Declare Anim()


Global Frame.b = 1
Global pbImage
Global DW, DH, SH
DW = DesktopWidth(0)
DH = DesktopHeight(0)
pbImage = CaptureScreen()
Global NewList Impact.SP()


Macro addV(xpos,ypos)
  ; Simplification de l'ajout d'élément en liste
  AddElement (Impact())
  Impact()\x = xpos
  Impact()\y = ypos
  Impact()\direction = Random(5,2)
EndMacro


; ------------------------------- PROCEDURE 


Procedure Anim()
  NbrFrame = 6
  Frame + 1
  If Frame = NbrFrame
    Frame = 1
  EndIf
  Debug "Frame : " + Frame
EndProcedure

; 
Procedure CaptureScreen()
; Rashad/netMaestro je sais plus qui a été le 1er ^^
      dcSource = CreateDC_(@"DISPLAY", #Null, #Null, #Null)

      If dcSource  <> #Null
        dcDestination = CreateCompatibleDC_(dcSource)

        If dcDestination <> #Null
          hImage = CreateCompatibleBitmap_(dcSource, DW, DH)

          If hImage <> #Null
            SelectObject_(dcDestination, hImage)
            BitBlt_(dcDestination, 0, 0, DW, DH, dcSource, 0, 0, #SRCCOPY)
            pbImage = CreateImage(#PB_Any, DW, DH)

            If StartDrawing(ImageOutput(pbImage))
              DrawImage(hImage, 0, 0)
              StopDrawing()
            EndIf
            DeleteObject_(hImage)
          EndIf
          DeleteDC_(dcDestination)
        EndIf
        DeleteDC_(dcSource)
      EndIf
    
  ProcedureReturn pbImage
EndProcedure



Procedure Owin()

  If OpenWindow(#LDVM, 0, 0, DW, DH, "Un écran dans une fenêtre...", #PB_Window_ScreenCentered | #PB_Window_BorderLess)

    If OpenWindowedScreen(WindowID(#LDVM), 0, 0, DW, DH)
      CreateSprite(#BG, DW, DH)
      If StartDrawing(SpriteOutput(#BG))
        DrawImage(ImageID(pbImage),0,0)
        StopDrawing()
      EndIf
      
      pbImage = CaptureScreen()
      
      UseLZMAPacker()
      
      *Buffer = AllocateMemory(1254)
      If *Buffer
        UncompressMemory(?w1, 1204, *Buffer, 1254, #PB_PackerPlugin_Lzma)
       CatchSprite(#w1, *Buffer, #PB_Sprite_AlphaBlending)
        FreeMemory(*Buffer)
      EndIf
      *Buffer = AllocateMemory(1203)
      If *Buffer
        UncompressMemory(?w2, 1155, *Buffer, 1203, #PB_PackerPlugin_Lzma)
        CatchSprite(#w2, *Buffer, #PB_Sprite_AlphaBlending)
        FreeMemory(*Buffer)
      EndIf
      *Buffer = AllocateMemory(1664)
      If *Buffer
        UncompressMemory(?w3, 1532, *Buffer, 1664, #PB_PackerPlugin_Lzma)
        CatchSprite(#w3, *Buffer, #PB_Sprite_AlphaBlending)
        FreeMemory(*Buffer)
      EndIf
      *Buffer = AllocateMemory(1682)
      If *Buffer
        UncompressMemory(?w4, 1542, *Buffer, 1682, #PB_PackerPlugin_Lzma)
        CatchSprite(#w4, *Buffer, #PB_Sprite_AlphaBlending)
        FreeMemory(*Buffer)
      EndIf
      *Buffer = AllocateMemory(1842)
      If *Buffer
        UncompressMemory(?w5, 1688, *Buffer, 1842, #PB_PackerPlugin_Lzma)
        CatchSprite(#w5, *Buffer, #PB_Sprite_AlphaBlending)
        FreeMemory(*Buffer)
      EndIf

      SH = SpriteWidth(#w1)
      
       
      
    Else
      MessageRequester("Erreur", "Impossible d'ouvrir un écran dans la fenêtre!", 0)
      End
    EndIf
    
    AddWindowTimer(#LDVM,#T,120)
    
  EndIf

  
EndProcedure

; --------------------------------------------------


Owin()

addV(Random(200,150) , Random(DH)-100 )

  Repeat ; Ze double bloucle :D 
    Repeat
      Event = WindowEvent()
      
      If(GetAsyncKeyState_(#VK_ESCAPE) & 32768) ;key is down
        FreeImage(pbimage)
        End
      EndIf
      
      
      Select Event
          
        Case #PB_Event_Timer  
          Anim()
          
          
        Case #PB_Event_LeftClick
          Debug "clic"
          If ListSize(Impact()) = 15 : FirstElement(impact()) : DeleteElement(Impact(),1) : EndIf ; Limitons le nombre de bestioles à 15
          addV(mx,my)
          
      EndSelect
    Until Event = 0
    
    ; PARTIE 2D
    
    ExamineMouse()
    mx = MouseX()
    my = MouseY()
    
    FlipBuffers() 
    ClearScreen(RGB(0, 0, 0))
    DisplaySprite(#BG, 0, 0)
    
   ForEach Impact()
       spriteNr = (frame + ListIndex(Impact())) % 5 + 1
       DisplayTransparentSprite(spriteNr ,impact()\x,impact()\y )
       
       impact()\x + (impact()\direction / (spriteNr % 5 + 1) )
       
       If impact()\x > DW + SpriteWidth(#w1)
          impact()\x = Random(200,150)
          impact()\x = -impact()\x
          impact()\y = Random(DH-SpriteHeight(#w1))
          impact()\direction = Random (5,2)
          If ListSize(Impact()) < 15 : addV(-150 , Random(DH)-100 ) : EndIf
       EndIf
    Next
    
    DisplayTransparentSprite(#w1,mx,my )   ; worm curseur
    
    Delay(1)
  ForEver
  
  


DataSection
  w1:
  Data.q $944400040000005D,$89EEF7F6277AC405,$50D5AAB38890508E,$0E9E382407889233,$A7FCEA70CD10740A,$263B5162BE29EA5B,
         $3BFA82D9832FC918,$BF22E3BD730C5331,$692BA9DE5AAC4B78,$98CCF72A761D86FB,$407417387F2D8BD7,$CD627BB7F346C88E,
         $A5182032481F6C36,$34E60756180A2899,$5E155C1F2692CD70,$333BF2A1C0FAFE2D,$CB728CD7E8802194,$BBB8582C2DFB9D0E,
         $A88BCFD2E347B1B8,$96294E4CF3AE71F9,$EA04359EF829E914,$2EA72B1AAF2F88CF,$7DA2F18C57418D6F,$AE814D709FF8A6A8,
         $BD9C19F253E49087,$5DE254B7CB3E73D2,$74C62FA266A16203,$72915D895BCF13EE,$9D31AAD33071A3CC,$DFCFAF7D43D5AEEE,
         $F6175DB0AF207A4E,$15768C16C53AE344,$1255D91564A45C19,$28D95B5EB20031F1,$F9EC7E072BAD5B0F,$C508A9CE000E46EA,
         $56E4D890E8250597,$954799069B403FE9,$81A01CF6136F4A33,$05C57A29E854DADA,$461381832ACF0F53,$56A54AADF4793DA8,
         $F6F7DA1F85853DFB,$C7A08F2897090C5E,$B65D5665C8C5E384,$373E66B67A39BB4B,$D03365E14970A958,$D15FD475E377DB79,
         $11AAC785E185D424,$293771FBF1707B01,$14E260D550DB729B,$2DEF2D847D61FE7B,$4D5ECA517B0EA5D1,$C9727D44C8D0E88A,
         $BD1B11B7804BCD79,$F32A4394198B08F0,$C41697BA26F1D296,$8F0E8DFE12A7C6AB,$ADAC860E2D042AC6,$C790385B920BDB89,
         $A3F1947BC509F058,$8F0412125F8636F4,$D2F42EB7F3C58B78,$2942A297DD229831,$5A676E1443A76F26,$C70CD2318602B199,
         $400B8AC7156B23F2,$601B87B86E234E45,$8EED9C1F4C66C7DE,$C78699FE1137AE9C,$629A63C34B1FCEC0,$2C08AAA48F12C56D,
         $2BEFA2FFF6875A19,$EA00F3CEF258E8BC,$EB03A95F735D3C29,$F573FE0C514EDC31,$63BCF68700549604,$6996BD3019FFE78F,
         $89533EC30CA61448,$DDBA3A69090880D9,$DC03980FA25E150A,$9620A220D1314B1A,$68114C01E54716D0,$3F6B6D777232E651,
         $6738A0E71456AE4D,$7315D425AD53590D,$25AC78659B137506,$6EDE9872AFE642F6,$E7A203534A250220,$B91AD62B97A718B3,
         $59837019F3E4E842,$2CF61BF40D15C08A,$09CA9FB1860B280A,$2F012DD3107CE201,$FBD1D321085DD910,$39EF7A3ECCA8AABA,
         $E88F1D1F29C14FA3,$74D4C2AB143FEAB6,$40E874D863340C25,$DDEE284C96141AE3,$0A575DA21177CD78,$2137CBAA53215855,
         $6619E65C52748264,$6BFB0E8EF7F11F27,$D27ED432D65F7762,$E9FF373448FCCE12,$A3BCF94567EA3417,$0633A5B400311501,
         $5D342085AF7476F9,$13325EE75304A60A,$6D604C750953156A,$BF5E1A7293AA27C7,$F48C24A9472DF75F,$EDEFBE15FA302F4D,
         $603DC20292195BBD,$186E614EA5223E42,$7D0157F1D0D3939D,$40BC1B76465675C7,$3F28101848D080A1,$C7DE1D419C747E38,
         $4BA4FA5DBBDDD520,$194FA274AA3BCDE5,$1BC835AD99A2D7E9,$D895A76A2761CC85,$C9C4A625F03E7E3D,$2A0DC8B6E2F27D8A,
         $31C4720D4B191E37,$30C5D2F9D0D50F21,$E79F9695247C24BA,$BAC9444703F9AF65,$11F023A792735353,$CC01671382FA5B43,
         $6521E0687934A14E,$279E3A6D0624704F,$AB834DB70FA546B2,$0A5500D52E9CBC6E,$D0D42513BCD0E028,$EF3383F4C6EEB267,
         $8C8F2E7070B68F36,$5D6B9A2199C0A202,$FCB4845AF08D7E98,$CE761C58A7B7B864,$F14021FCD84DBD28,$CB351EBFDA253FE8,
         $7807B3B9FFBD7E73,$6478586F614881C9,$C562507F090430AF,$71E89AFA57240079,$6FB35B2A9E615E35,$FF1F8F53536FDECD
  Data.b $B0,$BF,$CE,$00
  w2:
  Data.q $944400040000005D,$89EEF7F6277AC405,$50D5AAB38890508E,$0E9E382407889233,$A7FCEA70CD10740A,$263B5162BE29EA5B,
         $3BFA82D9832FC918,$BF22E3BD730C5331,$692BA9DE5AAC4B78,$98CCF72A761D86FB,$407417387F2D8BD7,$CD627BB79FCFF08E,
         $14CF1DD90F9A6C36,$C580E1BA326ABD4C,$C222CDFDE50DC619,$48BBC6D80AC20A6E,$57916704737A9D70,$ACBF77B1E49E1CC6,
         $7D32F2B4E5D64F28,$B74EFCC668084426,$F6932F991BC40F14,$57B5210820527310,$26D3C12DEDDCBA5B,$108136CBDEB3E41E,
         $5060A5597B5A4D59,$6FF97212B83CCCF3,$949E942E51547E34,$84A5D0DD75F9DADB,$65459192CDE381EE,$8F45AADD11DEBE94,
         $409B86A6E81D798B,$21BB89A6785C4A39,$92C74645BA12AA54,$8E58BD39A9E9CFD5,$2CAB0437F77300AB,$E38BCC0F4E7BB737,
         $B3A1199D5819A5FA,$7D07AC7CFB4AF118,$7FA8C7B13E628394,$1D2C847CDD6BE3A4,$959C698A8848332E,$C67A84CBA7144140,
         $C9E0F02E0268CEFD,$7E0278FDA7A4286A,$C7F26D57D77B9F12,$DFFAEAE414A289DE,$C2C8E7579DFBB2A7,$A6CD9B52B0DE04C9,
         $4C2DF0F93E160225,$5A739BA7CF8044C5,$AF4C233542EE8044,$7199A78633C534F3,$217CA5CBA577AF92,$D7FFECD03C85264E,
         $6503AAE413278C73,$0A7BFC01BE4C0D3C,$9DA385E7A9B4DA7B,$2462C746BAFD803C,$3F3A2761B4DEC2C4,$90A46121CB3C11D3,
         $1FAE992658AE343E,$CDE9885306FAD6C5,$3D4958D23319ECBA,$6D5A726E09D37287,$8EE7E0448DD42875,$AC2A9E404D8DBF35,
         $E7505842ED71F46D,$A0BFC961CB7167DE,$E4159E01E44D0E47,$F814CC0FC172824C,$C01969741243B262,$017E3C0B6A8EC737,
         $47563C71CBDFD7FB,$C3D73489B9D8D01D,$EF8C4596C40BA4F3,$533D2D6B55817DD7,$69CD26D18E693F79,$51656341DB962E28,
         $70064A6F42DD1FC7,$7CFE7526F9F385BB,$BA08FE0B4B4CF12D,$C0D61900294E5D95,$059611BB4BE821B3,$C53383C54D06E6FB,
         $B09FC964D9B7FAF7,$A1B2F241204C7108,$CD3AD0CB69B8A842,$3BA0109EDF14D2F6,$31A6A002D4D89641,$37D3123E87CE1A24,
         $394C671E81A4C57C,$BBAD843C7083F3B6,$A8FE57B1D32E547D,$FF244A1E0638F561,$5C74FB850077497B,$019197179E3A6BA9,
         $094196964B303567,$AFA0C778A70F4D4A,$BF6B0FBF89E52066,$7F8151C852057B3B,$95B334B46C7D3966,$38365406BC8886B3,
         $DE0D2C1C6BD89452,$45176870F565E359,$05B9F4C720D20343,$C59E2D08DCE47745,$4D013B0CA3A1EC52,$5538EBE104E80953,
         $6050EA49B18C5B10,$2C37D26E2B886794,$FD2684355D2A8E38,$6968EE81B0B5FD0B,$2C5ADD369DDA249D,$571C1EBD94DF6616,
         $6A6C7053174EBD05,$4BEDFCB0DCBF98EC,$1CCB18C7E4C42A0A,$C366C90373901FD8,$8D0462D78500AB69,$402351044D0A191F,
         $85982E82BAC8843C,$4A419690319474B5,$25836667BF2A874D,$9A1DE2CE312ADEF6,$053C9AA740D64414,$6E36A1E4B6BB3860,
         $ACCC505BD95BF642,$EE7F691103A5709D,$8B4D6801BA095378,$3F6E99A12A2109EB,$184EDB160A0F0C29,$77A890CB4E6DFDBD,
         $69EDD256EB0199A1,$963E72F9F8006115,$6D1A4D453773D5D1,$1F4DD57D47A870DA,$16922F6F3047FF6F,$BB56921E8FADE620,
         $D701CC88CA094397,$82AB69F98DED343B,$1B5EE424C014DD11,$E6D60D6A923BF423,$B8879B158ADAD109,$F5FFD1AB14019F24
  Data.b $F6,$F5,$02
  w3:
  Data.q $944400040000005D,$89EEF7F6277AC405,$50D5AAB38890508E,$0E9E382407889233,$A7FCEA70CD10740A,$263B5162BE29EA5B,
         $3BFA82D9832FC918,$BF22E3BD730C5331,$692BA9DE5AAC4B78,$98CCF72A761D86FB,$7B7617387F2D8BD7,$D6A6949AB9E08826,
         $3F520AE55F324F3D,$812069B4390C9CE1,$FCDA50CC60B1D50F,$F4717DA764384E71,$08037D066AD3682C,$7C8335D8F87CD4EC,
         $1EE424B161E2FC35,$216E5B766E63EFC5,$9B114E9430E88786,$0AD0D8D8CD194947,$8FFAAD88864ED99F,$29FC434A5E9876E7,
         $9402817820360600,$90E5AA544819ABF8,$DB39EDD1D36B0C1F,$6123704751552CB7,$6EA7DD6575C2E31B,$B382CB72C7AC3164,
         $296B353C222B1A43,$C0992D10B8EE8B29,$D47704E47E162DBF,$D78148CBC9E027E9,$2F556067FE2DC0D6,$C0D135F6D21D2A00,
         $038B0BC00F62A33A,$18AC105F14989D80,$94CEE116D96A25DD,$5FA47CF7418C0B3D,$B7614D30C18E9818,$DC308A8EB7439578,
         $C5778C87A7282426,$D56665C9643F11C1,$5D1B4DE8A8E02B73,$F8F6AB1325311337,$68A9102E1E3D7E0A,$DCD5D65B176E4F06,
         $2B6412BCE916476D,$00310F0983DCC463,$CE3CCD596092B908,$62B8D27495E90C35,$B2E941D1DA90BD1A,$F35C33D64DA0E2D5,
         $EEA3BEBEC34E1209,$4F0FE2EF439B8F48,$B0F827CA887FBB7C,$27394EC548E7B106,$D2DEA178DA5C5303,$3D3351CACE31F22B,
         $A703C1EC9F446A40,$10C81F71A0A85FF4,$D21AD5D893F094DB,$048029F120E95889,$FAEE50194F82B463,$5D5748FF72846A01,
         $AF3EA0FCC25CF8FB,$180E4E5403A70C5A,$C495D79A3F012AF9,$D06A7894FFB32D70,$DB4AF11F382169C6,$3EA26156EEFD597C,
         $76553EAF89068D03,$3806DD7F650D457D,$EC943DC2D0167DDA,$5B8DF87D399E2D60,$78CB3B0087384F01,$D365BF6DCD5F8185,
         $C0903DA9B37697E3,$26DFE5C786A28245,$7B784655EE0FEE4F,$7D770FF7ABF581D5,$63744113584A4A79,$F9F34027555F64E8,
         $569F05B67971ECA7,$D1278FB7774AD4CF,$2FD75AFCCE17CAF9,$046F8C769638D636,$431A0677690456E7,$1E6EF77F55379B8D,
         $D46453AFAE286813,$4127AEFE5E1A6F82,$ADEAC8487B150FB7,$B6226B28944C95C1,$2F7ED83EEEAFC616,$D13CC390A06A0BC1,
         $F1115B67D7902E2B,$689ACBC6A86F6A2A,$D6546CBB825086A3,$8066791CEF0AD855,$EA2DE7AE06850F53,$C637371D142BB837,
         $EB7425047512430B,$130F2C315A99EE8A,$D271E9DE9A6EC3FD,$7053166EE1915271,$897DDA1AB3B98D50,$619E0B4A321F2FB0,
         $73816417E9E6C497,$E54A712935A75F2C,$E46377C1D4BB4BFC,$B4D14B54ED2ABD7A,$58689B2091969FA5,$6801F9F5B182E4E0,
         $9F86680DC7D3A4C7,$0A1734124D7D14D6,$1A21109A0C8FB281,$D36DC629FA7A61BA,$48FC587C106C91F1,$70AF024D797FBF37,
         $040CA63FF8C2072D,$CBEB9EE7A895E77D,$9F6A355B24A37BA0,$5AECF86113BAD11A,$3DF5FECEF723DC66,$C3F2E46CE9468C8E,
         $D420D1C6CBBC792A,$2C3511BE33D7ACBC,$D3F189B37F8F1A4A,$7951881665722ACB,$8F0FDD2C4829215B,$B4D0742B7E36AD3F,
         $F26417A5C1A76767,$C28091DC4B014397,$0B0ECD0482429441,$950603A5E42C693D,$403FE2DFB31BBAD0,$63BBD1230BEE2477,
         $FB31C375B5A2A344,$3087F740C21DEF78,$0A11B746FA305B12,$4C9FAC05A85ED091,$6F68878BBCCB9D62,$807F4FE29D5C20EA,
         $65F26433CFE92DBB,$59F4729F572E009B,$DBAA27B7D4ED784F,$6A2B7B7D61BEA85B,$96667928710DF839,$C6FBD20FB36C4D64,
         $2189B443096DAEA6,$8EDC1BE8FC67DA69,$E208A53E64499B7E,$F2FB3995A0F97740,$FD1D041AE198D304,$12DF75F789638AD4,
         $51FC90BA604900AD,$EC0FB8F2B4A69975,$E7A4345C2362FC1C,$029571FDF6AE7814,$24F4CBE1D888D17D,$3648C0955F004B2D,
         $99BDF188D62605E5,$DBF6579EF19EF6D2,$C72E3D93A1864DE0,$8A98A2CF04F7C9A3,$2C95C605829D2178,$6D163049C14C0CE5,
         $2695E73EB91E3C1F,$EBEE6D152E5462BD,$77F499CF015E09DD,$E0C2D9229BBA8CA5,$A0FE73DBD722B5A4,$A4FFEC4ED2213E1F,
         $E3C6C38D50D81BEF,$7F726DE360B06121,$C718D2F243898C7D,$90CFDC7DF74305FF,$2863FA6E4D8904D1,$3B21416DB3551C2F,
         $238429495ECCF44D,$2B6DAB3E3105652A,$EE68E00E364FE91F,$2130852738DA1CA8,$93B1B5DC90B6559C,$2D675F2B7BAD2DB6,
         $4C05DAEDD05886D7,$88326F68F10F8828,$916E059AB0ACBEC6,$F127529429E83072,$236E40A509EADCCE
  Data.b $FC,$51,$75,$33
  w4:
  Data.q $944400040000005D,$89EEF7F6277AC405,$50D5AAB38890508E,$0E9E382407889233,$A7FCEA70CD10740A,$263B5162BE29EA5B,
         $3BFA82D9832FC918,$BF22E3BD730C5331,$692BA9DE5AAC4B78,$98CCF72A761D86FB,$7B7617387F2D8BD7,$0B231756B8C7EB26,
         $B49ED50409366C63,$51F073BF5D26BBBE,$CF81357DF928FFF6,$A8314238D6871F51,$EF74D408558C6F40,$6A4A676CD73202AF,
         $46971D2A13FBFE64,$43FE41FF9A83A3F7,$CC7221A5C5235516,$F601C5475EF5F616,$124244F31194529E,$097ECFB34A6C0183,
         $7C9A3842195630CF,$CF4CFF7708FB91A9,$075C347D0FD9508A,$5C0B1EB274BBD746,$E70D7FD78A0D8C89,$D2E13474130563A0,
         $B99E32F53B8D86B7,$B09F790DED06D149,$6F260821FCC25CBA,$D4CA86BD23BE075B,$F0452F33232323D5,$778C43755BD9BDC7,
         $6820FB4B2BF5F2C2,$265E09BDBC966F8A,$6187BEF3BBEA78F3,$B94410E2FBCF35EB,$9810CD15261C919A,$A21C1C9C3620DEF4,
         $9C638C71F6F81FCF,$3C5A263BE46E80D9,$6DC7EB6FFFDFCC35,$F051103E5A5FCE75,$2C17930550325D26,$AE811611745ADB94,
         $A0185199C5504C28,$5DB2C1ADFD7D1240,$EF05B7623DCBC824,$CA1F5B4DECD68884,$EA6DC4B9DA0567D7,$2911D0310976CCA2,
         $48904D7D77B267F0,$AF32C867494C0399,$DCBB73376F96FF50,$8906D50CFC68E744,$0E350E90BF988B0B,$980F2E198BA2716A,
         $B71347F2B44A5CFD,$CC3140A31E4DD79C,$52737BF4CA3AFEB7,$46D6863C13C2E9FF,$BE0CA59780338EAA,$CBB9D347D50158A1,
         $C83F7D1A9E9404FE,$8A93F05DAF7EA29F,$513EB4AC0D05DBC8,$EBB5C9BEB0B6891B,$E549BEE66D6FDE98,$155941A16ACFE7E0,
         $433F6B5F88125254,$69CE4C77F4E41779,$ADA66220FE0D38E3,$769E7C4A1529A9E8,$55C2702C9FC5347C,$95212B3013D1F776,
         $84D7BDFA43C87F2E,$FF44DEFB805902A9,$17250CAC289F7647,$664B0251A024BF49,$A58A624DE88D1113,$58AEDCA66A2E0426,
         $AD91527C143958EA,$CD30E72B3C2C5440,$29BC7205925DE666,$980BA344BD0E659A,$C690A95383CDCD3A,$3F207C2D7DCD8E92,
         $A9AF3AEE24876FD1,$3DF8D6F8A520F0A8,$366ADEC493B42A22,$299604C2490B2A46,$593F4508C0CFA2FB,$06267688B50476A4,
         $87251647BFF22A34,$30954AF983FB0768,$A5CBEA11DD5A5D16,$F2B01CB025C8D1B2,$9D57BB43A33EFE0A,$466602A45775A602,
         $307168E593090DCF,$0822D043FE324C8D,$348A1C2DD99ECD73,$0C9DD29466BF9FCB,$AFC76E913B22925B,$0DCD12CA4E04E5F6,
         $FC217F778A67D264,$CB01836AAECF40AA,$BCC401027EC1751B,$D919AEB5C05FE57A,$B958A737E8500BC9,$8C5C99FC871098FA,
         $217266FF56C48352,$CED9A4202004FAC3,$3F2D5AEFD61E322A,$DCDC4DCFA1181023,$3BE09B1D85BB106F,$1F1A7BEC2E7D4FB1,
         $D5CEF004FE81F853,$836A30849A304223,$A48607A0857B1AFB,$BBFB012EE24F68A7,$997FE9B834F91AA9,$F38D75EE79171548,
         $1CB7496E8F26E40C,$77B530FD6E952A5D,$8AB90A092C52CDEB,$96C2E258725E2DB6,$E7AA522A15616321,$6B5A9F00A196D4F8,
         $205EF11606386420,$4731F00801DE90F0,$11BDF640E41B9830,$FCE05A417E79FA21,$AD3F76639CF0658F,$E548BC5D212B7E20,
         $123EF7EFC769DB5D,$BD1E61E8F33FCB02,$7998DF67BEE56119,$5B7D0B552B256D7C,$0B592CB47BE397EA,$8EDB1654B2683772,
         $30801BB0DB68560C,$4D5E3AE63B92A8AC,$AE3EDF115FE6CC6E,$C0B4FFA81AEC6D9D,$FEA71DF616F6FE49,$6C4E0C9B04CD8CE2,
         $7CFF273575F13611,$BD3528C2AF5ED34B,$BFE2724423B3E06B,$A685C3B94C436CF2,$EE983B5C6AD6E756,$E0DDCDB5AF282377,
         $5BBBA99C72B8C95C,$63376A0263B999B0,$B63BD3769E9EE96E,$2A8D52E93AA15574,$1802528083EDE3DE,$C54F0E1A1BEB443A,
         $23DE66887D8580D7,$E390E660F6D2A657,$0E6388504DA539EC,$C2DB00403942298D,$9DB7CBC2C953AE92,$6AA514DB91FCFA29,
         $6AD1D34B790D3263,$4948243FF8D47BBF,$CEE1772774AFF723,$6F11CE8EA2D56D39,$FF3F9A6114784D38,$A2D887C1D3746243,
         $8A64E67839F068B1,$C3A1350BB88F10A3,$99AED83BA90FEB5E,$F2A2662139C65094,$4E492B55CC024618,$618F09E9001DC3A1,
         $B35C2C39C9EC2B0D,$EFB3310AC2E47BAD,$44453848D28B6CEF,$80EE11DF6666E6B0,$08A82E450D680AAE,$071ED553612C8E71,
         $91E5C029269BE2F0,$B77658D59F1A8609,$82A75684911C7B8E,$28337D9FC074CA47,$FC8A933EE994BFB0,$8723823C704B84E2
  Data.b $5F,$FF,$F3,$29,$CC,$6E
  w5:
  Data.q $944400040000005D,$89EEF7F6277AC405,$50D5AAB38890508E,$0E9E382407889233,$A7FCEA70CD10740A,$263B5162BE29EA5B,
         $3BFA82D9832FC918,$BF22E3BD730C5331,$692BA9DE5AAC4B78,$98CCF72A761D86FB,$7B7617387F2D8BD7,$101975F20E393128,
         $924A26844180C37F,$37428DA1E00654D0,$7C9AF39E52923199,$4933711E9C51D736,$A255A74E1CA38AD6,$FF26D2DABA028A2F,
         $0A7729E9A57A4F65,$E22A085E3CCBC148,$E5165DC065B15B29,$61C6D1E7F038CBF3,$1277875901850AE4,$796EF9C86221314E,
         $5C09490EDF50D51A,$EA600342C17257D1,$BAC796BD16BEC6E0,$CFF56A6381B02002,$3C63B4ED0046ABA6,$E121C9BA0951EC0E,
         $BF09EA38649933EF,$F52FFF484A3E6F0C,$DA59F43005AB9087,$7B15EB6ADE28AA52,$98FF85F879CBFCB5,$5234004CFC56C97E,
         $643DC233A8A740B9,$9241860DD72BC1B8,$34C49332F8068428,$63124B1CB83138B6,$F97A234FFF02AE38,$3A92141A068C3360,
         $55E6E27FBA090194,$A61A74D666F5DB2D,$1F039D4B457D7DF2,$8E201F7BE81D33EC,$609915EF4E67CA67,$6F355587B4BBE14D,
         $726F81CEEAD62000,$77BDB52261BD028A,$2FE47D2BE0F15EB7,$78E17B96F378FEC2,$8557E01CD7A347E9,$43E4C33E19E2E376,
         $0A0C3D5BD2135D98,$84931C49CF044CD5,$4D64CF38E78ABD90,$CC8CD6C8C7266D35,$955CC98AE80BBB8B,$1BCBB65287908431,
         $C4E6D4B6354E9844,$A3AA8B87C7063862,$F6AEFAD5976D3B24,$9751EBE84F7D495C,$9014985108A772EA,$3837009BA8206EED,
         $DAED49CC3FE736BB,$6359401F6153FC29,$12DE1BA86C124403,$C58D0AB640FEEEBC,$27FC0E50F4743D62,$1167256C8883B77B,
         $E1F7D8E2C59532EA,$1E617C489272C0D6,$67B31405031C8FDE,$A1C2F5EF1B19EEF9,$848DE0860884FEC1,$5D33706E252BBA35,
         $F69E98569B38C5B2,$EEF38BB4A3CB8834,$D6BF549C39CC66D2,$5572A24F52DF1CE4,$8AA8684525BC4F5F,$6A594F8563117296,
         $D5BC116480513292,$DF13FFACFE4538DB,$A87DFF3A10B08033,$AC2019BD7CAB9936,$3EA0540130FE2788,$3109E80B3FA9CDA9,
         $A43DBF25B53EB2D3,$837752AD1F67A9ED,$8FDDA491E1063D22,$82ADF4178BF8F368,$06A1B1787CD6F4F6,$863E2551A4E29650,
         $3B189EDD5701F524,$1CA6DD4BE1CBCA16,$261A5679C919156D,$605852C22D3B0223,$06975566A0BB9723,$5A7E707A021DA3D3,
         $20A55B5B7B149616,$9B9BE7FA3B71BBDF,$E7B98CB9EA291031,$144793BC90572ECD,$69F896E66BF432B3,$A3C3DCDC8414138E,
         $3C7DDF54FD3E5CA9,$239B1F8A73803838,$1168EE3DCCD053BD,$F8CB90CB1AF99AB5,$049CA16892F3AA33,$62DC02E18B0963D5,
         $96E5F9BC8EB154E0,$083DE61A3012D44C,$A121FACA73668C04,$954C6AD4528EBE3D,$C98E37682E63F816,$311D933A7479BD0E,
         $3C49C32CFA1F246B,$8288401E5C4E7E1A,$564E583B462D9744,$763628471388A3BF,$FABB19B59C1C723C,$E3E4A4F1578C0402,
         $A0DC993EB200B47C,$AF1050DA54A30652,$97A6EF8B74D939F8,$B18BB5DE68B36942,$35111E45175F4385,$2837F17E570C3AFE,
         $FB3E49095CFF1F76,$50DA65068D6E28A7,$FD842F1B624B74D0,$15F3CB3D9D816557,$BF4CC49C3A6EDE9A,$4DC16C0397A5D1AE,
         $3688241E3EA2F347,$AA3675CA2008EDDE,$E5A643F305A15FE0,$5FE1CA2F3B11F2A9,$87B89D33488B2811,$00F402987394F82E,
         $3B4DC075E6BD03B3,$937987E705FC0352,$66009A3FA60AEA05,$DB4859C3A0DE5845,$66B598730978C546,$531EDFBB2C50148F,
         $483FE100934AA2D3,$DF026184DA55EB56,$70B834DCB272059B,$3A654BEE8BE7FF69,$4FA1750050AE006F,$EA36101E1BC65C58,
         $186B585C5DEF80CF,$F7557CEB4C29EC1D,$D96A69917536E69C,$20BE6AA1ECFCD5CE,$B9B5D4881279ADA6,$D6AAC17FDA79E4FB,
         $5C9E60F9000D809A,$16AB2E08D9E0F737,$FCD277A020ADED93,$004072AB10AC9922,$FC37B47D14ACA566,$F9A8384CFF84ED15,
         $DA5A90B0C96FF4F3,$DBFC804466222C81,$1E51BA3D25D53CF3,$691DF0DA01B7D787,$108ED5505977FBF6,$AB0D0EB0F2B87A92,
         $EBA21DC41C06489D,$87DED0191C7E2657,$ED321B732ABB4B48,$AFBED90D0B8CA927,$11D860540C8F3886,$F19C50D603D8FD75,
         $755D60A8891D1621,$B7174B8BF6B62BF5,$1ED261A50255AF00,$C6B7A1C235F02E64,$F09C47A0308A9A28,$D4F5FA00F59E3E29,
         $A3072EA8578C550F,$A76347EDBC53513A,$085407C7122DE243,$CD1922ED26B55BF4,$F76C72FA9D1C849C,$550A80FAF2FA4F35,
         $89B080EF1B2A25F6,$7DD4672A622FE917,$F839DDB0F20D78A9,$E075B4264397DB12,$5426A29AC11F8502,$67F552C619891688,
         $458221277B1855D1,$B68D09C3DAA88F50,$79BDE37BDF0F33CD,$9A06B66C7EF4CD94,$BC5465F849A554E7,$FC27471313ADF3A8,
         $A509D0E9F33E1B9E,$C90A6CD2F83026B8,$4A4585CC5D35F8C0,$2A87647057A9E62E,$F00095F93536D029,$8736A63BB87DA2E6,
         $7AB62FE1FF13D795
EndDataSection



Re: Des Worms sur le bureau !

Publié : lun. 18/janv./2021 22:57
par microdevweb
Sympa :lol:

Re: Des Worms sur le bureau !

Publié : mar. 19/janv./2021 8:11
par SPH
Très rigolo :lol:

Re: Des Worms sur le bureau !

Publié : mar. 19/janv./2021 15:33
par Micoute
Quand on n'a pas autre chose à faire, ça fait passer le temps gentiment. Merci pour le partage.

Re: Des Worms sur le bureau !

Publié : mer. 20/janv./2021 21:19
par venom
Sympa.
Merci du partage.







@++

Re: Des Worms sur le bureau !

Publié : jeu. 21/janv./2021 10:05
par MLD
@Ar-s
Sympa ton truc :D
Tu as oublier d'enlever un débug

Re: Des Worms sur le bureau !

Publié : jeu. 21/janv./2021 10:16
par Zorro
ça me rappel fortement un code du Soldat inconnu ;) (enfin, je parle de l'idée )

https://www.purebasic.fr/french/viewtop ... t=chenille

Re: Des Worms sur le bureau !

Publié : jeu. 21/janv./2021 12:52
par venom
@zorro
Je me souviens de cette petite chenille :D






@++

Re: Des Worms sur le bureau !

Publié : dim. 24/janv./2021 12:22
par Ar-S
Zorro a écrit :ça me rappel fortement un code du Soldat inconnu ;) (enfin, je parle de l'idée )
https://www.purebasic.fr/french/viewtop ... t=chenille
Tu crois pas si bien dire. C'est clairement LSI qui m'a inspiré pour le faire. En fait j'avais envie de le faire depuis que je l'avais rencontré chez lui et qu'il m'avait montré le code. :mrgreen: Autant dire que ça date !

--- Add ---
Mise à jour du code
- Compatibilité W7
- Animation plus réaliste des worms

Re: Des Worms sur le bureau !

Publié : lun. 25/janv./2021 11:49
par Zorro
Ar-S a écrit :
Tu crois pas si bien dire. C'est clairement LSI qui m'a inspiré pour le faire. En fait j'avais envie de le faire depuis que je l'avais rencontré chez lui et qu'il m'avait montré le code. :mrgreen: Autant dire que ça date !

--- Add ---
Mise à jour du code
- Compatibilité W7
- Animation plus réaliste des worms

ha cool , on devais aussi se rencontrer, puisqu'il passait pas loin de chez moi pour allez chez Michelin ... mais ça ne c'est jamais fait ... :)

Re: Des Worms sur le bureau !

Publié : lun. 25/janv./2021 18:53
par Ar-S
J'ai pas réussi à adapter les codes des topics en PB5.7x.. Déjà parce que les lib externes sont useless, puis les commandes PB/Api ont changées.
Du coup je suis en train de faire une nouvelle version de mon code qui pour le moment fait chuter un vers sur la barre des taches puis le fait avancer. Il se stop si on place la souris dessus.
Ici plus de screen shot mais une fenêtre skinée transparente. J'avance bien.
J'ai pas réussi à retrouver un code qui analyse les fenêtres visibles et leur coordonnées. ça aurait été cool que mon vers puisse aussi crapahuter sur les fenêtres du desktop :D