It is currently Fri Apr 10, 2020 8:01 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Particle Flame Effect
PostPosted: Tue Sep 14, 2010 5:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Apr 04, 2006 6:27 am
Posts: 311
Ugh, thats what I get for assuming code runs on both! I'll have to try it when I get home, thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Particle Flame Effect
PostPosted: Tue Sep 14, 2010 5:33 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Feb 14, 2006 9:27 pm
Posts: 372
Location: London, UK
X wrote:
Ugh, thats what I get for assuming code runs on both! I'll have to try it when I get home, thanks!


I did say there may be bugs :D

Try this to see if the color comes out right

Code:
Structure Timer
   currentTick.l
   lastTick.l
   elapsedTicks.l
EndStructure

Procedure.a initTimer(*sTimer.Timer)
   If *sTimer.Timer
      *sTimer.Timer\currentTick=timeGetTime_()
      *sTimer.Timer\lastTick=*sTimer.Timer\currentTick
      ProcedureReturn 1
   Else
      ProcedureReturn 0
   EndIf
EndProcedure

Procedure.l updateTimer(*sTimer.Timer)
   *sTimer.Timer\currentTick=timeGetTime_()
   *sTimer.Timer\elapsedTicks=*sTimer.Timer\currentTick-*sTimer.Timer\lastTick
   *sTimer.Timer\lastTick=*sTimer.Timer\currentTick
   ProcedureReturn *sTimer.Timer\elapsedTicks
EndProcedure

Procedure.l checkTimer(*sTimer.Timer)
   *sTimer.Timer\currentTick=timeGetTime_()
   *sTimer.Timer\elapsedTicks=*sTimer.Timer\currentTick-*sTimer.Timer\lastTick
   ProcedureReturn *sTimer.Timer\elapsedTicks
EndProcedure

Procedure.l getTimer(*sTimer.Timer)
   ProcedureReturn *sTimer.Timer\elapsedTicks
EndProcedure

Macro RandomFloat()
   Random(2147483647)/2147483647.0
EndMacro

Macro DrawTextShadow(x, y, z, Text, FColor, BColor)
   DrawText(x  , y  , Text, BColor)
   DrawText(x-z, y-z, Text, FColor)
EndMacro

;-DirectX Constants
#D3DBLEND_ZERO            = 1
#D3DBLEND_ONE             = 2
#D3DBLEND_SRCCOLOR        = 3
#D3DBLEND_INVSRCCOLOR     = 4
#D3DBLEND_SRCALPHA        = 5
#D3DBLEND_INVSRCALPHA     = 6
#D3DBLEND_DESTALPHA       = 7
#D3DBLEND_INVDESTALPHA    = 8
#D3DBLEND_DESTCOLOR       = 9
#D3DBLEND_INVDESTCOLOR    = 10
#D3DBLEND_SRCALPHASAT     = 11
#D3DBLEND_BOTHSRCALPHA    = 12
#D3DBLEND_BOTHINVSRCALPHA = 13

; DirectX9
Structure D3DTLVERTEX
   x.f:y.f:z.f
   rhw.f:Color.l
   tu.f:tv.f
EndStructure

Structure PB_DX9Sprite3D
   TexRes.i                    ; TexRes
   Vertice.D3DTLVERTEX[4]      ; The 4 vertices for the rectangle sprite
   TmpVertice.D3DTLVERTEX[4]   ; The 4 vertices for the rectangle sprite
   Width.l                     ; width set with ZoomSprite3D()
   Height.l                    ; height set with ZoomSprite3D()
   RealWidth.l
   RealHeight.l
   Angle.f
   Transformed.l
EndStructure

Structure SFlame
   x.f
   y.f
   r.a
   g.a
   b.a
   xv.f
   yv.f
   life.l
   alife.b
EndStructure

NewList flameList.SFlame()
Global pWnd
Global RGBFormat.b

Procedure CFade(sColor.l, eColor.l, cStep.f)
   Define.f fR, fG, fB
   Static run.l
   b1=sColor >> 16
   g1=sColor >> 8 - (b1 << 8)
   r1=sColor - (b1 << 16 + g1 << 8)
   
   b2=eColor >> 16
   g2=eColor >> 8 - (b2 << 8)
   r2=eColor - (b2 << 16 + g2 << 8)
   
   d1=r2-r1
   If d1
   s1=d1/d1
   d1*Sign(d1)
   EndIf

   d2=g2-g1
   If d2
   s2=d2/d2
   d2*Sign(d2)
   EndIf

   d3=b2-b1
   If d3
   s3=d3/d3
   d3*Sign(d3)
   EndIf
   

   d1*s1
   d2*s2
   d3*s3
   
   percent.f=cStep*run
   fR.f=d1*percent
   fG.f=d2*percent
   fB.f=d3*percent
   
   tr1.f=r1-fR
   tg1.f=g1-fG
   tb1.f=b1-fB
   r1=Int(tr1)
   b1=Int(tg1)
   g1=Int(tb1)
   
   If r1 > 255 : r1 = 255 : EndIf
   If g1 > 255 : g1 = 255 : EndIf
   If b1 > 255 : b1 = 255 : EndIf
   
   If r1 < 0 : r1 = 0 : EndIf
   If g1 < 0 : g1 = 0 : EndIf
   If b1 < 0 : b1 = 0 : EndIf
   
   color=RGB(r1,g1,b1)
   run+1
   If r1=r2 And g1=g2 And b1=b2
      run=0
   EndIf
   ProcedureReturn color
EndProcedure

Procedure SetColor(Sprite3D, Color.l)
   Protected *Sprite3D.PB_DX9Sprite3D = IsSprite3D(Sprite3D)
   With *Sprite3D
      \Vertice[0]\Color = Color.l
      \Vertice[1]\Color = Color.l
      \Vertice[2]\Color = Color.l
      \Vertice[3]\Color = Color.l
   EndWith
 EndProcedure
 
Procedure.l RGBFormat(r.a, g.a, b.a)
     Protected color.l
    Select RGBFormat
        Case 0
            color = RGB(r,g,b)
        Case 1
            color = RGB(b,g,r)
    EndSelect
    ProcedureReturn color
EndProcedure

Procedure CreateFlame(x.f, y.f, xv.f, yv.f,   life)
   Shared flameList()
   AddElement(flameList())
   flameList()\x=x-(32*1.2)
   flameList()\y=y-(32*1.2)
   flameList()\r=255
   flameList()\g=255
   flameList()\b=255
   flameList()\xv=xv
   flameList()\yv=yv
   flameList()\life=life
   flameList()\alife=-1
EndProcedure

Procedure UpdateFlame()
   Shared flameList()
   Start3D()
   ForEach flameList()
      flameList()\yv+RandomFloat()
      flameList()\x+flameList()\xv
      flameList()\y+flameList()\yv
      flameList()\r=255
      flameList()\g=105
      flameList()\b=65
      SetColor(0, RGBFormat(flameList()\r, flameList()\g, flameList()\b)) ; B,G,R
      flameList()\life+flameList()\alife
     
      If (flameList()\x > -(64*1.2) And flameList()\x < 640+(64*1.2)) And (flameList()\y > -(64*1.2) And flameList()\y < 480+(64*1.2))
         DisplaySprite3D(0, flameList()\x, flameList()\y)
      EndIf
      flameList()\life+flameList()\alife
     
      If flameList()\life <= 0 Or flameList()\y > 480
         DeleteElement(flameList())
      EndIf
   Next
   Stop3D()
EndProcedure

If InitSprite()
   If InitSprite3D() = 0
      MessageRequester("Error", "Can't open DirectX", 0)
      End
   EndIf
Else
   MessageRequester("Error", "Can't open DirectX", 0)
   End
EndIf

pWnd=OpenWindow(#PB_Any, 0, 0, 640, 480, "Flame Test", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered | #PB_Window_BorderLess)
If pWnd
   ;SetWindowColor(pWnd, #Black) <--- Doesn't seem to work
   If Not OpenWindowedScreen(WindowID(pWnd), 0, 0, 640, 480, 1, 0, 0, #PB_Screen_SmartSynchronization)
      MessageRequester("Error", "Can't open windowed screen!", 0)
      End
   EndIf
Else
   MessageRequester("Error", "Can't open window!", 0)
EndIf

UsePNGImageDecoder()
CatchSprite(0, ?Spark, #PB_Sprite_Texture)
CreateSprite3D(0, 0)
LoadFont(0, "Verdana", 8, #PB_Font_Bold)
Start3D()
Sprite3DBlendingMode(#D3DBLEND_SRCALPHA, #D3DBLEND_ONE)
; Comment the Next line if it runs slow
Sprite3DQuality(#PB_Sprite3D_BilinearFiltering)
ZoomSprite3D(0, 1.2*SpriteWidth(0), 1.2*SpriteHeight(0))
Stop3D()

StartDrawing(ScreenOutput())
DrawingBuffer()
Select DrawingBufferPixelFormat()
    Case #PB_PixelFormat_24Bits_RGB  ; 3 bytes per pixel (RRGGBB)
        RGBFormat = 0
    Case #PB_PixelFormat_24Bits_BGR  ; 3 bytes per pixel (BBGGRR)
        RGBFormat = 1   
  Case #PB_PixelFormat_32Bits_RGB  ; 4 bytes per pixel (RRGGBB)
      RGBFormat = 0   
  Case #PB_PixelFormat_32Bits_BGR 
        RGBFormat = 1
EndSelect
StopDrawing()

ExamineDesktops()
f = DesktopFrequency(0)
If f = 0
  targetFps.a=50
Else
  targetFps.a=f
EndIf
frameTime=1000/targetFps
SetFrameRate(targetFps)

clsColor=#White
fps.Timer
flip.Timer

initTimer(fps):initTimer(flip)

Define.f fpsAccurate
Repeat
   Event = WindowEvent()
   Select Event
      Case #PB_Event_CloseWindow
         Quit = 1
   EndSelect
   If GetActiveWindow() = pWnd
            updateTimer(flip)
            If clsColor <> #Black
               clsColor=CFade(#White, #Black, 0.0225)
            EndIf
            ClearScreen(clsColor)
            If (GetKeyState_(#VK_LBUTTON)&%10000000 And GetActiveWindow() = pWnd)
               yv.f=-10
               For lx = 1 To 10 Step 2
                  yv-RandomFloat()
                  CreateFlame(DesktopMouseX()-WindowX(pWnd), DesktopMouseY()-WindowY(pWnd)-5,  lx/10, 1.1*yv, 240)
                  CreateFlame(DesktopMouseX()-WindowX(pWnd), DesktopMouseY()-WindowY(pWnd)-5, -lx/10, 1.1*yv, 240)
               Next
            EndIf
            UpdateFlame()
            StartDrawing(ScreenOutput())
            DrawingMode(#PB_2DDrawing_Transparent)
            DrawingFont(FontID(0))
            DrawTextShadow(10, 10    , 1, Str(ListSize(flameList()) )+" Particles", RGB(255,255,255), RGB(0,0,0))
            DrawTextShadow(10, 480-20, 1, StrF(fpsAccurate,1)+" FPS"              , RGB(255,255,255), RGB(0,0,0))
            StopDrawing()
           
            FlipBuffers()
           
            fpsFrameCount+1
            fpsTimer=checkTimer(fps)
            If fpsTimer >= 1000
               fpsAccurate=(fpsFrameCount/fpsTimer)*1000
               fpsFrameCount=0
               updateTimer(fps)
            EndIf
           
            ;Delay Until near the Next flip
            dTime=frameTime-checkTimer(flip)
            If dTime >= 1
               Delay(dTime)
            EndIf
         Else
            Delay(50)
         EndIf
Until  Quit Or (GetKeyState_(#VK_ESCAPE)&%10000000 And GetActiveWindow() = pWnd)
CloseScreen()
End

DataSection
   Spark:
   Data.q $A1A0A0D474E5089, $524448490D000000, $4000000040000000, $7169AA0000000608, $59487009000000DE, $B0000130B000073, $189C9A000113, $414D41670400
   Data.q $9351FB7C8EB1, $4D5248632000, $83800000257A, $E9800000FFF9, $60EA00003075, $5F926F170000983A, $44494E15000046C5, $60606462DA785441
   Data.q $B10040018230CFF8, $C4C110464612C3D0, $8408CD181CC0A600, $890FFEC8006291FF, $FFFFC581FFFFFF92, $C95A00400FC6DA7, $3FECA8104180006E, $F10F0DA0DD803633
   Data.q $5021808009BE1779, $6C7636EE821E8BB8, $7818482B1DEEFEEC, $F60F9E722A9FA089, $830000DC192AC008, $8D4171BFEE9AB020, $BB8E3DF0907C09C5, $FE1FE32DD81ADA6B
   Data.q $921AEA775B817774, $1E0B81213D4E31CF, $19ED60E350F18CC0, $279071E5A8588021, $A86C41F624233131, $21480ACA47CC1C7, $FC0B3834C70070B0, $EFF7FE901FF67887
   Data.q $6040241FE99C582F, $64E9002002034A7C, $FFA540C20800038C, $89C5718A02C1327F, $80C8027F28EED94, $7100251984302450, $FEA02911A33114F9, $761E074D58029FF
   Data.q $816CCEC558408BD4, $587AE8CAEEE114BA, $2080003905527002, $CDA22EB1FFFF4648, $5BF100E2E549DAEA, $B6693720C997680, $115E33DC4D06C20, $FD76FF3BFC4E0BFD
   Data.q $A9F269B26955FD3E, $97D418D89112C29D, $1949C00A6150FAF0, $FFCCD030C10000ED, $69223C23574571FF, $49A012F9D6EEDE22, $9D84A7C05AE13807, $BF05D5252729E010
   Data.q $8701FD742B2C1D6, $A54C1FD678100490, $1BE7401A01240704, $19CBC36CC14A66EF, $3083002946565002, $3032F0BFF7A6AD0C, $8AD487DCBEDB0AA9, $8B3B0037E6917908
   Data.q $CEB322B3616E129E, $685CD78030BE3D53, $B428AC203FA21D3B, $A25AEEEFEFC4B1E3, $D50419697F6B3EED, $5F7536F5AA1CC637, $B28010C5A71F7830, $946861040001C772
   Data.q $E09F8A44D6C2FFDE, $F8A56D7B618903A6, $B03614171D36743A, $47F0DEF4BB5803C3, $11A96AFD116F3908, $75A1D0D7F15FFF52, $494D815F5D70C9F9, $725D2CB155D64060
   Data.q $F030A622B9A5A086, $394656300218349, $3FF701850C20830, $62DAFB2488B5B24B, $89FFD428FB1A5F8C, $EC11E16C8966A997, $BD00BC0031E118F5, $C60F745BA45F02DB
   Data.q $41CC76B7A8798003, $F4FF69E54C21163C, $85934EC330807B6D, $34192F7C5AF2093, $E77520B9CA52DDF1, $14972D18011E252B, $DFFBD45288106180, $C85DD34E38ED0AB7
   Data.q $7EA33F3C86164242, $3E8D82D413514F02, $20262004C7B86643, $7FC711F33F1B0CAC, $52452D7B980F482A, $9E4B0FF0D7B19FF, $F095A01D3E64301E, $5E6937E97550EA2F
   Data.q $4FAB9FBBD9F837DC, $20057876FB26D155, $3A18418400760CB4, $307380AF7FFFDD83, $FA481D92278C5E60, $9CFD122800BF0B58, $63AD1D1221CA6A22, $F170087565BE4041
   Data.q $17504DD5000C1B3B, $6F85F6FFD200D8E1, $4FDF4D00B3100385, $5DB1C46E7D3642F1, $CAF1CC05725EF60E, $8F8C1DFAA2CD8D6, $638166679E821620, $6CC7093C42B36C70
   Data.q $50F3D804048798A0, $C214F0CCF3D82B3E, $E211812960072B04, $A3523056F0FFC679, $16283AF281E05107, $DFEFF7FA7881FF7F, $26136B417F183310, $965A90532F025944
   Data.q $1000362664059AD0, $C564C0F2DBB82C40, $99383D2541DBA902, $A3C81B28F2043D43, $110F890D9A406CAC, $9015204B2C040703, $21D6007B78250DC8, $5FDFFF12E002CA42
   Data.q $F81CB0333083EC78, $A602FE4070798A03, $A23164EE0FC94802, $7DAC3FFEF9C127B6, $D029F707CE0FF1, $10000520ABBA0040, $39116FFFFF891184, $4DC0A089074461A7
   Data.q $496E1A8F167E536B, $83A8072A50490807, $19E40402201EAE57, $473405D98483BB51, $23492B40418B21, $603A07C0601257C, $C2736ADBF4446FAA, $173BE928E5B28EAC
   Data.q $E7AE62FE1EA93C55, $39465DB002D837, $D7FEEE88250C20C2, $84B896322D650F95, $1402DF816BC025DF, $136D468651FEE8AA, $A31646311E27ABFB, $8DF741F2817CB151
   Data.q $114C3F875F7550E3, $68EE2467FA27F339, $D167F8A529DF8B82, $E6C47D28FBA26523, $BA0A16DE5534615E, $720AC3A0057BFA, $DDFFFE4EA2584106, $A4EC3B82A5A36625
   Data.q $C67F1D69482C4307, $97106FD663DDCC86, $6E0758381B667FFA, $E7960ED8D58FB4D3, $990EA909C1E8099, $CD49FC624BCBE7A8, $604BF540FEAC0121, $C474B514B5ECBBB5
   Data.q $4925030EB3889376, $1F9F3D7269CDD88D, $71DCBB6005788, $581FFBD162A18410, $838860E2623E188D, $71EF8CFFC2CF2D0B, $335F025980F14A16, $BB5109A5DFAA9BB5
   Data.q $40449C9379E280D6, $D47A7003A185011A, $51E3EA61FD62C395, $975B14763268273E, $C2CEB801C9E985D7, $2005B0AFCFAF72AA, $3A20410400928CC3, $22C6466E3FF7A185
   Data.q $EC31FE8E1F4D90, $52E29DE78FCB3CB, $7CB99B7B33880748, $673DF9A010D6A15A, $D97A2597D82101C2, $2CC807E209C5F61, $71CC4F831BAE02B5, $DA35F37A7597D9FA
   Data.q $19B68D2682211B85, $3F02270496F0531A, $3101F8C81F814C18, $1C82B0B8011E0AA2, $FFFB6EB466104180, $B81D91095D1CC77B, $6717FFC56814D0DA, $CA7EBC27012DAC44
   Data.q $9CA33808D8E3CD99, $3ECB321200A4B88, $4D18807E43A10D7C, $FCDCBD8ABF315E52, $5EA21E91E671824E, $E5B663A38E27968E, $260BC3FA5DBAC706, $3D50306F8C024907
   Data.q $CC2A005782A15EC2, $624AA1841060076D, $E528C94DDCFFFFB2, $5FE2D39402FBBDB2, $80294806C393F101, $BD0824073DC92393, $170783C9F2E284C0, $2F88C00718468014
   Data.q $AEB6C227505910, $DB8CFB78DEFEF860, $39969E92746797C0, $3AB15D5664645AE2, $4E453EC11AF7856A, $C7B2B39C82E2B5AD, $84003625615002B, $CC15D7FDB92144C2
   Data.q $5A5B169813086F1, $EC9F5F720024F827, $22995E53A6E558F8, $7E19B900F87F3B52, $41B2A0274837052A, $D5CF5BB0066F28CA, $C797B9E868033DFF, $14D3779EC60BDFD7
   Data.q $837B66067448A3C9, $EB7028372DE4D917, $FA75F6A89F62960E, $2FFA468C53E3025B, $C208300490661500, $9D56F7FFFB185AC0, $9B21005EEF14240A, $E9AD02C625680DFC
   Data.q $EDFC16A01D01AE7D, $8BE283FB12558A3C, $200D040B7823803A, $7A7871F035FDA407, $B02F32B6261A2D53, $F1786286638A41B7, $3A474CD303BDBFBA, $239128F461EC84
   Data.q $9854009F05BDAFC5, $33A3430820C00EDB, $D917AEA70EFFFFFE, $8FDA7B60928189DE, $26B232ABF57A16E2, $4BE8C81797EE51E5, $FBC35D10A5BD7B7, $E45A8B431F1457E3
   Data.q $5776427C43D5B0E2, $6C47CD930A60A8FD, $C072D8D0E0E45F00, $9C30F64E3F78DEA9, $877959DCC5783321, $118CC26004B00B29, $FFF2AD5818410600, $59C9D824356D2AFF
   Data.q $31C2FECCB477304, $EE5510277A2D959C, $13D21D8663D95400, $4DF5A2DD4429607C, $1FE81B9131C0E9, $FE08CEBE80053308, $84FE2FB4A29BDE45, $73C981E9F17AE1D
   Data.q $6CDA418645DD5BF5, $855BA6B079271AF0, $EB298013EB3A2BF5, $FE8AB46184000148, $C79395D31415BDFF, $7108B8FECE59894A, $4955F6505132F2A1, $7706A1D4032B8615
   Data.q $1163B9FE0F915A50, $FE76F731D99821E9, $3209A5EC39969037, $4EA53F70044F0D65, $70B36D34E4AA1F75, $8013D45C29E1451B, $6841040001D83309, $D22243AE0FFFFAD9
   Data.q $E3C6CCA26D7838, $1F8E25542CF59086, $59FD8955F19C1776, $D06CC09C88A0DB13, $3D46FC92E02B80C3, $F8968D8C18E8D14, $7C1480F0017244A6, $C32411014FB5F769
   Data.q $A74EBBF53C9C1BCF, $F6A725A71C68B6BF, $830038256530027, $659783FFFB6328C2, $2597B41301F22D0A, $F50B5ED06B6C6CCC, $5BA240947E7B3F8, $6A0EEA1E0FA8CF26
   Data.q $41CF88E6D950B4F8, $EE4ADB1CB8B3CD41, $F7F7AE8C8787F3AF, $CD19BF3612EBF610, $619FC75D25A49353, $DCBAA17BC5F2F1AF, $655002FC044E6924, $F4CC082080004906
   Data.q $F4786848D0EE2FFF, $B3F50189B45A4314, $2AC8AA3C10493AC3, $4A60347FEB3A980B, $FD1E943C273A98B4, $7BB81D7BC6E14931, $2E03C8EED5F3379F, $F4331BA29DFBC13C
   Data.q $C0DB177563213A90, $55002BEB3BF18BF1, $4050C20830039466, $CC2D01B896627FEE, $73A952CF0C4C3F4F, $AB42B620800D0D38, $627474CF7CC8A9FD, $1C463A0106778523
   Data.q $48FD057651D227E9, $78FF4EA8BF3AF881, $34BB744C4D22E2FD, $680A34ADAA679692, $B0A30B9918033ECF, $657002BADF10E6B2, $E5351010C000392E, $8AE9D30CDA6E67FE
   Data.q $29BCE8CA782FC495, $DE0EF67C21A647A, $B6A46E5D36D7C58, $4F9CB17266848BC2, $3F986583DCD69AA0, $51280C9A246C276D, $6209E40B879C49D, $C8016CA8B942F4BC
   Data.q $2606204200149332, $BC16760CAB3FFFF3, $6CFAAD06E84280B9, $EFEB01D12150D8E5, $ACB745D093F916A9, $A83863CD68062510, $84FEB7E3B21C4521, $C2AF6CAA9601075B
   Data.q $6856F2EBE7DA81E4, $2926657002DD33F8, $9FFFE8540C20C000, $11422C7216EB4A6C, $32FF64E54733A0F5, $255F5EC03CABCD74, $64F4004E6E442D31, $79FD246CAB453C
   Data.q $D796109D12AAA3F7, $B0B9F78A09E5A390, $5DD4C9D36377741D, $32B8015D9C859BC7, $E262061040001C63, $49C6852A482C7FFF, $25FFDBB94BA34C5D, $A6E2284FDC1C0C6
   Data.q $5EB864E18E90ED86, $BB883A2DD8D2DDD9, $E5F7DF6591B2F7E0, $3B2001E51F100170, $FD13AA1377E74C4F, $2884DEFCCA288480, $CB90576A7963E4F9, $61001CA334A8015
   Data.q $8A5D607FEF50E861, $3F4196580781D2B2, $D508A7377576F79A, $8DE09987EAB65E1, $8F901670D38B6CC, $D1D13CB0CDC11B96, $6DBB4CC87C3AF8F, $3E3499EC385EC64E
   Data.q $AC5903941B4C122, $13EBF740EE910BE8, $B54BC35069C5B785, $2A0057C8315A84EF, $42A18410000560CD, $3A539B869717FFFD, $7D6DD3E644D40A79, $B569497FF0395094
   Data.q $BD03AECC3220E1A9, $B5857D0561CA4EDE, $AD21433356D601F7, $292104A109374740, $FDE2D1ED4102936D, $3512D540AEE402A1, $F9AC0521D00F0F06, $FFD0F041C04F8254
   Data.q $80071DCD32004FE, $82AC0FFDE16A2041, $1124B0B135CF20EB, $916FB5CB58F9921C, $E27A57DB01081FC9, $2F3CDFFAA2874DB5, $C1E2EB2912E66618, $201A177D314893C5
   Data.q $8B7CD48421B31A3D, $446FACC8C2400D7A, $2BF9D81B93936D8C, $B2126964C9E57AC0, $9F916571105282, $6A0821400E515A54, $9226F7AC981FFBAB, $AA384991080787D9
   Data.q $F5A4AD9DF7D765AA, $7D75F4525CB626F7, $CB30F8FD1739CBC2, $A35C774989C70320, $B1E81219AFDE8CC8, $480802F068783BE7, $C3F898D141046154, $22457AE4D3310E4D
   Data.q $5E842084DAE5DA2D, $83003946695002FC, $BB3A647FEECD0830, $689FE31344BA280D, $EA92C6B013AAF2B5, $EFA88DEB8FF5E7E3, $604C0D96BC67D658, $E6A4A6F88449F263
   Data.q $8C097D4A62F8B9A7, $44407CF9D0E7F64E, $2B814C6839A18900, $E3D34926886404D0, $17C48AB373093708, $4B8011EDBF46F2E9, $FEB541040001C82B, $75D432A5AB2E0FF
   Data.q $B4641A5316A5D0E, $A48C4EF64BAA96DC, $B870CAE8AB88C6E4, $486BE5F08770B7A5, $4461BA8724CA1199, $DBD7248E52F661D1, $1151215398AB2FC0, $E6C4EA6BA0520DAE
   Data.q $3D7C88A8A027FA37, $14B6B488013C1EAA, $6BEFFDD506104000, $7C88BFA0CE9AD585, $34E241002FD5362D, $3A8B504C1AF78ED6, $8B8F5405DF74C71E, $521F128D6EFD4EAF
   Data.q $4DA21078C37466F6, $707619C51442DB1A, $BA88DDC2528DB55C, $E6CDB786CC6E184D, $338022B104664C77, $474CA02E11E2695B, $57002BAC1BD1AF1C, $41D0C2083004AC66
   Data.q $23CD9EAE5B7FFFFE, $3012102E2E2EAF16, $68E6152C142C0274, $80F4F5B62C736E7F, $2EBEF0DC89185C90, $128B3BBC17FA737E, $F615C585F519181A, $4074CBB57AFBA39F
   Data.q $282E12ABC85DFC94, $798A9B8EF246A691, $7AF3804D4270B181, $4B3A11CC70FA1E7D, $410600B60AD2A00, $16AD9D7FFFFECF6D, $4795048ADD8EDA4A, $CC596625E2F2532B
   Data.q $D722052461145023, $B910D4A5B3437CC, $AEE9AB730B7241F3, $1B5361BD3A6E73B1, $B87327A448A7043D, $C69F800234FB471A, $F27D040281557583, $14E8C1C12B06A06C
   Data.q $E9F894DCC0300747, $AD2A004FC3391D9, $1FFF22D84106006C, $2601D945A138093C, $7DA30A4FCA94A05A, $CC5A31C1DCE243EC, $D9CD68F9F2E2AE81, $4A441B7A36BCC87C
   Data.q $9AD14ECC2403AE76, $79669F67D71609E3, $1FD92734440F43B9, $3327BC39402C8824, $C30284C894411022, $34E5DB8397A15FF2, $C9334C8013E03A6F, $FFFFC46061040001
   Data.q $4F55E30685298898, $469718517940CB22, $2A0C13823ECE595, $894BB7B66569605E, $62EA5812CD3E74AE, $DEB52EA598C2192, $84A204AC821432BF, $AFBF81433892EA2
   Data.q $3C4F2578A7A73C89, $6705261BDE251B1E, $2A0057E4C87165D1, $CCC5841060072DAD, $152D6E253AEBFF78, $CD2168F293F3FC5, $3FB73F7165FF2EC0, $149A14B6E9D84A60
   Data.q $D645FEF24B7AB670, $C10D0320845B7745, $8DA3D0BF72BE73D4, $9D6A2E5A25CC6B8F, $25A3D05540DB101E, $871E90C08404EFF0, $133190149A21E9CB, $56990027DE3F972C
   Data.q $FFD6E68208000390, $1FAB74054A879C1F, $D3C551C2FC414C90, $582E112A244A4CF, $90B5EFE9D5D1F7D, $E71A31B5B91202EC, $F7A3332982D30B6D, $6DD1AC5D3ED4112
   Data.q $C0344816DC601260, $15A9F526C47F7EAC, $123F814A74BA11B2, $1C82B4D8015DF348, $C3FFFD5B54104000, $24BBA1D5B854A966, $15AB1F800B9E330C, $BC54012C0702CE8
   Data.q $60E810B72A9CAE16, $B80DF74210F3D6F2, $10CC372376F76F7F, $F675E3496704A657, $2DF943BFB0824E75, $908C16023B032B85, $12F5909FA08EBC1, $8610400014A334D8
   Data.q $6CE6293C2FFDD042, $BC7D36902747D1FA, $EA197DA430A120AF, $2CC87C2710FA7074, $1D1C5C3FAE69C379, $347D39BD8447C849, $861C945A54035C3B, $7008D7B10ACE3798
   Data.q $A817BD0C3A157620, $8EEA20DF511F980D, $5ADB600573228F89, $1FFFF8E040800074, $8B00F8F294EA5636, $39B1916FE76BB95C, $448F0949BA85917D, $30D4262C18F107A8
   Data.q $A318C8BBB822713B, $D4B8F44F7FD44332, $61ED6E8122603BF8, $A02357104017504E, $FDB625838DE8340E, $D209A93E5E2D0062, $9A7400A751CFF5D2, $EA09430820000A51
   Data.q $8FD4CC9525B5F7FE, $42FBC9CD8D14100E, $70128FD1D71BF652, $6B3BE0A7AB113A2F, $3DB76B0930E16087, $8F29DFDD97E678FE, $154440E59E594196, $277110E3F80B78F8
   Data.q $5C28C10625993E34, $802DB1297E8BFAF, $88BF9A7AC83932EF, $3C360D9C75018E2A, $A159393581FD1B05, $CC79B82FF9859FF9, $6A750989945AB482, $1063C858C3A019C
   Data.q $A05B40278F8318B, $FFBFDFDF4DA1DBAE, $2B08E7BC37F879A0, $B8A893A1FF9C03B, $D6909285C1100400, $66FC15302A92C19, $D212131744171194, $9EBE183901009A0
   Data.q $DACF8263F3D2058, $490D5C3602B27C23, $76802A581D11D099, $5FF1ACE80F7D20C6, $2F1A409E2F06DE48, $E52C39EED022C940, $4401000209245BE0, $7FE485028E400030
   Data.q $1F62C12B391AD2A4, $341980292158CC9C, $AF98C0D49902CF3F, $B9A36045A9446463, $AE823678747DA1FF, $D0FCDB4289ED41F1, $D48154B0B3D81246, $982E097F7D544604
   Data.q $9D834B16A2200806, $6681D11FF524A06, $B4058FF0C2CF9D78, $D0EFCA0D7536070E, $9D0CC3E3A2332FA6, $562033F98D806776, $41428F8716ACA277, $FE5F06217D0E84ED
   Data.q $50543DA07F7154A2, $AD2D80171D07FF9E, $BD11004004FF6627, $FF27901FD8641E5C, $E87FC32FE8C41FC, $ACBBC900FFA813D, $A900985E03FDF11E, $2396B03F1BC0FFF3
   Data.q $FEB0F9B214D4D213, $FF6D43119546C08, $F9017808A5203B29, $47FFF6D60654BA07, $C36D22008007FEF4, $190E1C3102D07404, $6B741FF99A39003B, $B417F6740675780B
   Data.q $B1BE199E4CBE0150, $C28D4A3FEE7DB101, $B60DCCBE0A61B480, $1D45FDFE0A9A0A08, $2927D6D0C141A0, $581E0332DAC88020, $E0FFD70178DA8FF8, $E8661E9EF0660331
   Data.q $3B94F238756C1E7C, $8FFC12DC0D3A7403, $D60FF970348F7234, $F008F23FEC790777, $62258C1E40AA445F, $948C40100036006F, $8D04C413DE4444EE, $7B82666792582669
   Data.q $3E099C7A83FADE1E, $C24736C2A55A85E5, $585FDBC6A014FA, $6517FE04348BFBFF, $8A200800DEB91917, $8F897041BEEF0003, $6FB9845A3E003FB4, $C27D562030C35E10
   Data.q $47F97C9B61FFF8C7, $95440100940D95, $99056C5B025DDD40, $A94D8027AF0067B7, $D118CC86C3775623, $C3FF86FBE1FF623A, $D0BFB6A9A43FC453, $8051CED2A060A79
   Data.q $A4639AEA0006AA20, $19EF23A54C426718, $8A39DA44669E6C44, $6CE1B0F4C3480814, $600059A20080036A, $33484C7D558641AC, $BB69A47FC5BEF0CF, $25A440AC25DEF0FF
   Data.q $CE7FB29A00300800, $EDA0A4A4, $826042AE444E4549
EndDataSection

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Particle Flame Effect
PostPosted: Thu Sep 16, 2010 6:34 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 1001
Location: Germany
Amazing! :shock: Great work!

_________________
"Daddy, I'll run faster, then it is not so far..."


Top
 Profile  
Reply with quote  
 Post subject: Re: Particle Flame Effect
PostPosted: Fri Sep 17, 2010 1:20 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Oct 22, 2003 2:51 am
Posts: 743
Location: Canada
Hello,

After the study of the original code, this is a loop Frame Rate Control system. I have created it for my game project and I release here my vision of the moogle original code to control the frame rate. Sorry for the French comment !

Have fun !

Best regards.
Guimauve

Code:
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; CODE GÉNÉRÉ AUTOMATIQUEMENT, NE PAS MODIFIER À
; MOINS D'AVOIR UNE RAISON TRÈS TRÈS VALABLE !!!
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Code généré par : Dev-Type V2.0.1
; Nom du projet : Controle fréquentielle de boucle
; Nom du fichier : FrameRateControl.pb
; Version du fichier : 1.0.0
; Programmation : OK
; Programmé par : Guimauve
; Date : 15-09-2010
; Mise à jour : 15-09-2010
; Codé pour PureBasic V4.51
; Plateforme : Windows, Linux, MacOS X
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Constantes de dimensionnement <<<<<

Enumeration
 
  #FRAMERATECONTROL_TIMER_FPS
  #FRAMERATECONTROL_TIMER_FLIP
  #FRAMERATECONTROL_TIMER_MAX
 
EndEnumeration

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure <<<<<

Structure FrameRateControl
 
  FpsCounter.l
  FpsActual.d
  Frequency.l
  FrameTime.l
  DelayTime.l
  CurrentTick.l[#FRAMERATECONTROL_TIMER_MAX]
  LastTick.l[#FRAMERATECONTROL_TIMER_MAX]
  ElapsedTick.l[#FRAMERATECONTROL_TIMER_MAX]
 
EndStructure

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les observateurs <<<<<

Macro GetFrameRateControlFpsCounter(FrameRateControlA)
 
  FrameRateControlA\FpsCounter
 
EndMacro

Macro GetFrameRateControlFpsActual(FrameRateControlA)
 
  FrameRateControlA\FpsActual
 
EndMacro

Macro GetFrameRateControlFrequency(FrameRateControlA)
 
  FrameRateControlA\Frequency
 
EndMacro

Macro GetFrameRateControlFrameTime(FrameRateControlA)
 
  FrameRateControlA\FrameTime
 
EndMacro

Macro GetFrameRateControlDelayTime(FrameRateControlA)
 
  FrameRateControlA\DelayTime
 
EndMacro

Macro GetFrameRateControlCurrentTick(FrameRateControlA, TimerID)
 
  FrameRateControlA\CurrentTick[TimerID]
 
EndMacro

Macro GetFrameRateControlLastTick(FrameRateControlA, TimerID)
 
  FrameRateControlA\LastTick[TimerID]
 
EndMacro

Macro GetFrameRateControlElapsedTick(FrameRateControlA, TimerID)
 
  FrameRateControlA\ElapsedTick[TimerID]
 
EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs <<<<<

Macro SetFrameRateControlFpsCounter(FrameRateControlA, P_FpsCounter)
 
  GetFrameRateControlFpsCounter(FrameRateControlA) = P_FpsCounter
 
EndMacro

Macro SetFrameRateControlFpsActual(FrameRateControlA, P_FpsActual)
 
  GetFrameRateControlFpsActual(FrameRateControlA) = P_FpsActual
 
EndMacro

Macro SetFrameRateControlFrequency(FrameRateControlA, P_Frequency)
 
  GetFrameRateControlFrequency(FrameRateControlA) = P_Frequency
 
EndMacro

Macro SetFrameRateControlFrameTime(FrameRateControlA, P_FrameTime)
 
  GetFrameRateControlFrameTime(FrameRateControlA) = P_FrameTime
 
EndMacro

Macro SetFrameRateControlDelayTime(FrameRateControlA, P_DelayTime)
 
  GetFrameRateControlDelayTime(FrameRateControlA) = P_DelayTime
 
EndMacro

Macro SetFrameRateControlCurrentTick(FrameRateControlA, TimerID, P_CurrentTick)
 
  GetFrameRateControlCurrentTick(FrameRateControlA, TimerID) = P_CurrentTick
 
EndMacro

Macro SetFrameRateControlLastTick(FrameRateControlA, TimerID, P_LastTick)
 
  GetFrameRateControlLastTick(FrameRateControlA, TimerID) = P_LastTick
 
EndMacro

Macro SetFrameRateControlElapsedTick(FrameRateControlA, TimerID, P_ElapsedTick)
 
  GetFrameRateControlElapsedTick(FrameRateControlA, TimerID) = P_ElapsedTick
 
EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'opérateur Reset <<<<<

Macro ResetFrameRateControl(FrameRateControlA)
 
  SetFrameRateControlFpsCounter(FrameRateControlA, 0)
  SetFrameRateControlFpsActual(FrameRateControlA, 0)
  SetFrameRateControlFrequency(FrameRateControlA, 0)
  SetFrameRateControlFrameTime(FrameRateControlA, 0)
  SetFrameRateControlDelayTime(FrameRateControlA, 0)
 
  For TimerID = 0 To #FRAMERATECONTROL_TIMER_MAX - 1
    SetFrameRateControlCurrentTick(FrameRateControlA, TimerID, 0)
    SetFrameRateControlLastTick(FrameRateControlA, TimerID, 0)
    SetFrameRateControlElapsedTick(FrameRateControlA, TimerID, 0)
  Next
 
  ; ClearStructure(FrameRateControlA, FrameRateControl)
 
EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'opérateur Initialize <<<<<

Procedure InitializeFrameRateControl(*FrameRateControlA.FrameRateControl, P_Frequency.l)
 
  SetFrameRateControlFpsCounter(*FrameRateControlA, 0)
  SetFrameRateControlFpsActual(*FrameRateControlA, 0)
 
  SetFrameRateControlFrequency(*FrameRateControlA, P_Frequency)
  SetFrameRateControlFrameTime(*FrameRateControlA, 1000/P_Frequency)
  SetFrameRateControlDelayTime(*FrameRateControlA, 0)
 
  For TimerID = 0 To #FRAMERATECONTROL_TIMER_MAX - 1
    SetFrameRateControlCurrentTick(*FrameRateControlA, TimerID, 0)
    SetFrameRateControlLastTick(*FrameRateControlA, TimerID, 0)
    SetFrameRateControlElapsedTick(*FrameRateControlA, TimerID, 0)
  Next
 
EndProcedure

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code généré en : 00.010 secondes (21000.00 lignes/seconde) <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Procedure StartFrameRateControlTimers(*FrameRateControlA.FrameRateControl)
 
  For TimerID = 0 To #FRAMERATECONTROL_TIMER_MAX - 1
    SetFrameRateControlCurrentTick(*FrameRateControlA, TimerID, ElapsedMilliseconds())
    SetFrameRateControlLastTick(*FrameRateControlA, TimerID, GetFrameRateControlCurrentTick(*FrameRateControlA, TimerID))
    SetFrameRateControlElapsedTick(*FrameRateControlA, TimerID, 0)
  Next
 
EndProcedure

Procedure UpdateFrameRateControlTimerFlip(*FrameRateControlA.FrameRateControl)
 
  SetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP, ElapsedMilliseconds())
  SetFrameRateControlElapsedTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP, GetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP) - GetFrameRateControlLastTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP))
  SetFrameRateControlLastTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP, GetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP))
  SetFrameRateControlFpsCounter(*FrameRateControlA, GetFrameRateControlFpsCounter(*FrameRateControlA) + 1)
 
EndProcedure

Procedure FrameRateControl_SlowDownIfNeeded(*FrameRateControlA.FrameRateControl)
 
  SetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS, ElapsedMilliseconds())
  SetFrameRateControlElapsedTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS, GetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS) - GetFrameRateControlLastTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS))
 
  If GetFrameRateControlElapsedTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS) >= 1000
   
    SetFrameRateControlFpsActual(*FrameRateControlA, (GetFrameRateControlFpsCounter(*FrameRateControlA) / GetFrameRateControlElapsedTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS)) * 1000)
    SetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS, ElapsedMilliseconds())
    SetFrameRateControlElapsedTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS, GetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS) - GetFrameRateControlLastTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS))
    SetFrameRateControlLastTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS, GetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FPS))
    SetFrameRateControlFpsCounter(*FrameRateControlA, 0)
   
  EndIf
 
  SetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP, ElapsedMilliseconds())
  SetFrameRateControlElapsedTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP, GetFrameRateControlCurrentTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP) - GetFrameRateControlLastTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP))
  SetFrameRateControlDelayTime(*FrameRateControlA, GetFrameRateControlFrameTime(*FrameRateControlA) - GetFrameRateControlElapsedTick(*FrameRateControlA, #FRAMERATECONTROL_TIMER_FLIP))
 
  If GetFrameRateControlDelayTime(*FrameRateControlA) >= 1
    Delay(GetFrameRateControlDelayTime(*FrameRateControlA))
  EndIf
 
EndProcedure

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< !!! WARNING - YOU ARE NOW IN A TESTING ZONE - WARNING !!! <<<<<
; <<<<< !!! WARNING - THIS CODE SHOULD BE COMMENTED - WARNING !!! <<<<<
; <<<<< !!! WARNING - BEFORE THE FINAL COMPILATION. - WARNING !!! <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

InitializeFrameRateControl(FrameRateControl.FrameRateControl, 50)

StartFrameRateControlTimers(FrameRateControl)

Repeat
 
  UpdateFrameRateControlTimerFlip(FrameRateControl)
 
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Début de la section des instructions <<<<<
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; 1. Gestion Évenèments + Clavier, Souris, Joystick
 
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; 2. Mise à jour de l'espace 3D (Position, Collision)
 
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; 3. Affichage de l'espace 3D vue par la(les) caméra(s)
 
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; 4. Affichage des éléments 2D (Messages, menus, etc.)
 
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Fin de la section des instructions <<<<<
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
  FrameRateControl_SlowDownIfNeeded(FrameRateControl)
 
  Debug StrD(GetFrameRateControlFpsActual(FrameRateControl),1) + " FPS"
 
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; Les instructions suivantes servent uniquement pour terminer la boucle.
  ; En temps normal, la sortie de la boucle de dépend pas d'un nombre de
  ; tours de boucle. Elle dépend plutôt d'un évènement particulier.
 
  If LoopCount >= 250
    Quit = #True
  Else
    LoopCount + 1
    Debug LoopCount
  EndIf
 
Until Quit = #True

ResetFrameRateControl(FrameRateControl)

; <<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< FIN DU FICHIER <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<


Top
 Profile  
Reply with quote  
 Post subject: Re: Particle Flame Effect
PostPosted: Fri Sep 24, 2010 2:39 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 16, 2003 8:30 pm
Posts: 1998
Location: North Florida
Awesome!

- np


Top
 Profile  
Reply with quote  
 Post subject: Re: Particle Flame Effect
PostPosted: Sun Sep 26, 2010 7:56 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1771
Ooooh, this is fun. I took one of the versions on the first page, slowed gravity a bit, and added a spiraling effect. Press Left and Right to spin it faster and slower.

Code:
Structure Timer
   currentTick.l
   lastTick.l
   elapsedTicks.l
EndStructure

Procedure.a initTimer(*sTimer.Timer)
   If *sTimer.Timer
      *sTimer.Timer\currentTick=timeGetTime_()
      *sTimer.Timer\lastTick=*sTimer.Timer\currentTick
      ProcedureReturn 1
   Else
      ProcedureReturn 0
   EndIf
EndProcedure

Procedure.l updateTimer(*sTimer.Timer)
   *sTimer.Timer\currentTick=timeGetTime_()
   *sTimer.Timer\elapsedTicks=*sTimer.Timer\currentTick-*sTimer.Timer\lastTick
   *sTimer.Timer\lastTick=*sTimer.Timer\currentTick
   ProcedureReturn *sTimer.Timer\elapsedTicks
EndProcedure

Procedure.l checkTimer(*sTimer.Timer)
   *sTimer.Timer\currentTick=timeGetTime_()
   *sTimer.Timer\elapsedTicks=*sTimer.Timer\currentTick-*sTimer.Timer\lastTick
   ProcedureReturn *sTimer.Timer\elapsedTicks
EndProcedure

Procedure.l getTimer(*sTimer.Timer)
   ProcedureReturn *sTimer.Timer\elapsedTicks
EndProcedure

Macro RandomFloat()
   Random(2147483647)/2147483647.0
EndMacro

Macro DrawTextShadow(x, y, z, Text, FColor, BColor)
   DrawText(x  , y  , Text, BColor)
   DrawText(x-z, y-z, Text, FColor)
EndMacro

;-DirectX Constants
#D3DBLEND_ZERO            = 1
#D3DBLEND_ONE             = 2
#D3DBLEND_SRCCOLOR        = 3
#D3DBLEND_INVSRCCOLOR     = 4
#D3DBLEND_SRCALPHA        = 5
#D3DBLEND_INVSRCALPHA     = 6
#D3DBLEND_DESTALPHA       = 7
#D3DBLEND_INVDESTALPHA    = 8
#D3DBLEND_DESTCOLOR       = 9
#D3DBLEND_INVDESTCOLOR    = 10
#D3DBLEND_SRCALPHASAT     = 11
#D3DBLEND_BOTHSRCALPHA    = 12
#D3DBLEND_BOTHINVSRCALPHA = 13

; DirectX9
Structure D3DTLVERTEX
   x.f:y.f:z.f
   rhw.f:Color.l
   tu.f:tv.f
EndStructure

Structure PB_DX9Sprite3D
   TexRes.i                    ; TexRes
   Vertice.D3DTLVERTEX[4]      ; The 4 vertices for the rectangle sprite
   TmpVertice.D3DTLVERTEX[4]   ; The 4 vertices for the rectangle sprite
   Width.l                     ; width set with ZoomSprite3D()
   Height.l                    ; height set with ZoomSprite3D()
   RealWidth.l
   RealHeight.l
   Angle.f
   Transformed.l
EndStructure

Structure SFlame
   x.f
   y.f
   r.a
   g.a
   b.a
   xv.f
   yv.f
   life.l
   alife.b
EndStructure

NewList flameList.SFlame()
Global pWnd

Procedure CFade(sColor.l, eColor.l, cStep.f)
   Define.f fR, fG, fB
   Static run.l
   b1=sColor >> 16
   g1=sColor >> 8 - (b1 << 8)
   r1=sColor - (b1 << 16 + g1 << 8)
   
   b2=eColor >> 16
   g2=eColor >> 8 - (b2 << 8)
   r2=eColor - (b2 << 16 + g2 << 8)
   
   d1=r2-r1
   If d1
   s1=d1/d1
   d1*Sign(d1)
   EndIf

   d2=g2-g1
   If d2
   s2=d2/d2
   d2*Sign(d2)
   EndIf

   d3=b2-b1
   If d3
   s3=d3/d3
   d3*Sign(d3)
   EndIf
   

   d1*s1
   d2*s2
   d3*s3
   
   percent.f=cStep*run
   fR.f=d1*percent
   fG.f=d2*percent
   fB.f=d3*percent
   
   tr1.f=r1-fR
   tg1.f=g1-fG
   tb1.f=b1-fB
   r1=Int(tr1)
   b1=Int(tg1)
   g1=Int(tb1)
   
   If r1 > 255 : r1 = 255 : EndIf
   If g1 > 255 : g1 = 255 : EndIf
   If b1 > 255 : b1 = 255 : EndIf
   
   If r1 < 0 : r1 = 0 : EndIf
   If g1 < 0 : g1 = 0 : EndIf
   If b1 < 0 : b1 = 0 : EndIf
   
   color=RGB(r1,g1,b1)
   run+1
   If r1=r2 And g1=g2 And b1=b2
      run=0
   EndIf
   ProcedureReturn color
EndProcedure

Procedure SetColor(Sprite3D, Color.l)
   Protected *Sprite3D.PB_DX9Sprite3D = IsSprite3D(Sprite3D)
   With *Sprite3D
      \Vertice[0]\Color = Color.l
      \Vertice[1]\Color = Color.l
      \Vertice[2]\Color = Color.l
      \Vertice[3]\Color = Color.l
   EndWith
EndProcedure

Procedure CreateFlame(x.f, y.f, xv.f, yv.f,   life)
   Shared flameList()
   AddElement(flameList())
   flameList()\x=x-(32*1.2)
   flameList()\y=y-(32*1.2)
   flameList()\r=255
   flameList()\g=255
   flameList()\b=255
   flameList()\xv=xv
   flameList()\yv=yv
   flameList()\life=life
   flameList()\alife=-1
EndProcedure

Procedure UpdateFlame()
   Shared flameList()
   Start3D()
   ForEach flameList()
      flameList()\yv+RandomFloat()/2.0
      flameList()\x+flameList()\xv
      flameList()\y+flameList()\yv
      flameList()\r=255
      flameList()\g=105
      flameList()\b=65
      SetColor(0, RGB(flameList()\b, flameList()\g, flameList()\r)) ; B,G,R
      flameList()\life+flameList()\alife
     
      If (flameList()\x > -(64*1.2) And flameList()\x < 640+(64*1.2)) And (flameList()\y > -(64*1.2) And flameList()\y < 480+(64*1.2))
         DisplaySprite3D(0, flameList()\x, flameList()\y)
      EndIf
      flameList()\life+flameList()\alife
     
      If flameList()\life <= 0 Or flameList()\y > 480
         DeleteElement(flameList())
      EndIf
   Next
   Stop3D()
EndProcedure

If InitSprite()
   If InitSprite3D() = 0
      MessageRequester("Error", "Can't open DirectX", 0)
      End
   EndIf
Else
   MessageRequester("Error", "Can't open DirectX", 0)
   End
EndIf

pWnd=OpenWindow(#PB_Any, 0, 0, 640, 480, "Flame Test", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered | #PB_Window_BorderLess)
If pWnd
   ;SetWindowColor(pWnd, #Black) <--- Doesn't seem to work
   If Not OpenWindowedScreen(WindowID(pWnd), 0, 0, 640, 480, 1, 0, 0, #PB_Screen_SmartSynchronization)
      MessageRequester("Error", "Can't open windowed screen!", 0)
      End
   EndIf
Else
   MessageRequester("Error", "Can't open window!", 0)
EndIf

UsePNGImageDecoder()
CatchSprite(0, ?Spark, #PB_Sprite_Texture)
CreateSprite3D(0, 0)
LoadFont(0, "Verdana", 8, #PB_Font_Bold)
Start3D()
Sprite3DBlendingMode(#D3DBLEND_SRCALPHA, #D3DBLEND_ONE)
; Comment the Next line if it runs slow
Sprite3DQuality(#PB_Sprite3D_BilinearFiltering)
ZoomSprite3D(0, 1.2*SpriteWidth(0), 1.2*SpriteHeight(0))
Stop3D()


ExamineDesktops()
f = DesktopFrequency(0)
If f = 0
  targetFps.a=50
Else
  targetFps.a=f
EndIf
frameTime=1000/targetFps
SetFrameRate(targetFps)

clsColor=#White
fps.Timer
flip.Timer
ang.f = 0.0
angspeed.f = 0.08

initTimer(fps):initTimer(flip)

Define.f fpsAccurate
Repeat
  ang - angspeed
   Event = WindowEvent()
   Select Event
      Case #PB_Event_CloseWindow
         Quit = 1
      Case #WM_KEYDOWN
        If EventwParam() = #VK_RIGHT
          angspeed + 0.01
        ElseIf EventwParam() = #VK_LEFT
          angspeed - 0.01
        EndIf
   EndSelect
   If GetActiveWindow() = pWnd
            updateTimer(flip)
            If clsColor <> #Black
               clsColor=CFade(#White, #Black, 0.0225)
            EndIf
            ClearScreen(clsColor)
            If (GetKeyState_(#VK_LBUTTON)&%10000000 And GetActiveWindow() = pWnd)
               yv.f=-10
               For lx = 1 To 10 Step 2
                  yv-RandomFloat()
                  CreateFlame(DesktopMouseX()-WindowX(pWnd), DesktopMouseY()-WindowY(pWnd)-5, 10*Cos(ang + lx * 0.2 * #PI), yv*Sin(ang + lx * 0.2 * #PI), 240)
                  CreateFlame(DesktopMouseX()-WindowX(pWnd), DesktopMouseY()-WindowY(pWnd)-5, 8*Cos(ang + lx * 0.2 * #PI), 1.1*yv*Sin(ang + lx * 0.2 * #PI), 240)
               Next
            EndIf
            UpdateFlame()
            StartDrawing(ScreenOutput())
            DrawingMode(#PB_2DDrawing_Transparent)
            DrawingFont(FontID(0))
            DrawTextShadow(10, 10    , 1, Str(ListSize(flameList()) )+" Particles", RGB(255,255,255), RGB(0,0,0))
            DrawTextShadow(10, 480-20, 1, StrF(fpsAccurate,1)+" FPS"              , RGB(255,255,255), RGB(0,0,0))
            StopDrawing()
           
            FlipBuffers()
           
            fpsFrameCount+1
            fpsTimer=checkTimer(fps)
            If fpsTimer >= 1000
               fpsAccurate=(fpsFrameCount/fpsTimer)*1000
               fpsFrameCount=0
               updateTimer(fps)
            EndIf
           
            ;Delay Until near the Next flip
            dTime=frameTime-checkTimer(flip)
            If dTime >= 1
               Delay(dTime)
            EndIf
         Else
            Delay(50)
         EndIf
Until  Quit Or (GetKeyState_(#VK_ESCAPE)&%10000000 And GetActiveWindow() = pWnd)
CloseScreen()
End

DataSection
   Spark:
   Data.q $A1A0A0D474E5089, $524448490D000000, $4000000040000000, $7169AA0000000608, $59487009000000DE, $B0000130B000073, $189C9A000113, $414D41670400
   Data.q $9351FB7C8EB1, $4D5248632000, $83800000257A, $E9800000FFF9, $60EA00003075, $5F926F170000983A, $44494E15000046C5, $60606462DA785441
   Data.q $B10040018230CFF8, $C4C110464612C3D0, $8408CD181CC0A600, $890FFEC8006291FF, $FFFFC581FFFFFF92, $C95A00400FC6DA7, $3FECA8104180006E, $F10F0DA0DD803633
   Data.q $5021808009BE1779, $6C7636EE821E8BB8, $7818482B1DEEFEEC, $F60F9E722A9FA089, $830000DC192AC008, $8D4171BFEE9AB020, $BB8E3DF0907C09C5, $FE1FE32DD81ADA6B
   Data.q $921AEA775B817774, $1E0B81213D4E31CF, $19ED60E350F18CC0, $279071E5A8588021, $A86C41F624233131, $21480ACA47CC1C7, $FC0B3834C70070B0, $EFF7FE901FF67887
   Data.q $6040241FE99C582F, $64E9002002034A7C, $FFA540C20800038C, $89C5718A02C1327F, $80C8027F28EED94, $7100251984302450, $FEA02911A33114F9, $761E074D58029FF
   Data.q $816CCEC558408BD4, $587AE8CAEEE114BA, $2080003905527002, $CDA22EB1FFFF4648, $5BF100E2E549DAEA, $B6693720C997680, $115E33DC4D06C20, $FD76FF3BFC4E0BFD
   Data.q $A9F269B26955FD3E, $97D418D89112C29D, $1949C00A6150FAF0, $FFCCD030C10000ED, $69223C23574571FF, $49A012F9D6EEDE22, $9D84A7C05AE13807, $BF05D5252729E010
   Data.q $8701FD742B2C1D6, $A54C1FD678100490, $1BE7401A01240704, $19CBC36CC14A66EF, $3083002946565002, $3032F0BFF7A6AD0C, $8AD487DCBEDB0AA9, $8B3B0037E6917908
   Data.q $CEB322B3616E129E, $685CD78030BE3D53, $B428AC203FA21D3B, $A25AEEEFEFC4B1E3, $D50419697F6B3EED, $5F7536F5AA1CC637, $B28010C5A71F7830, $946861040001C772
   Data.q $E09F8A44D6C2FFDE, $F8A56D7B618903A6, $B03614171D36743A, $47F0DEF4BB5803C3, $11A96AFD116F3908, $75A1D0D7F15FFF52, $494D815F5D70C9F9, $725D2CB155D64060
   Data.q $F030A622B9A5A086, $394656300218349, $3FF701850C20830, $62DAFB2488B5B24B, $89FFD428FB1A5F8C, $EC11E16C8966A997, $BD00BC0031E118F5, $C60F745BA45F02DB
   Data.q $41CC76B7A8798003, $F4FF69E54C21163C, $85934EC330807B6D, $34192F7C5AF2093, $E77520B9CA52DDF1, $14972D18011E252B, $DFFBD45288106180, $C85DD34E38ED0AB7
   Data.q $7EA33F3C86164242, $3E8D82D413514F02, $20262004C7B86643, $7FC711F33F1B0CAC, $52452D7B980F482A, $9E4B0FF0D7B19FF, $F095A01D3E64301E, $5E6937E97550EA2F
   Data.q $4FAB9FBBD9F837DC, $20057876FB26D155, $3A18418400760CB4, $307380AF7FFFDD83, $FA481D92278C5E60, $9CFD122800BF0B58, $63AD1D1221CA6A22, $F170087565BE4041
   Data.q $17504DD5000C1B3B, $6F85F6FFD200D8E1, $4FDF4D00B3100385, $5DB1C46E7D3642F1, $CAF1CC05725EF60E, $8F8C1DFAA2CD8D6, $638166679E821620, $6CC7093C42B36C70
   Data.q $50F3D804048798A0, $C214F0CCF3D82B3E, $E211812960072B04, $A3523056F0FFC679, $16283AF281E05107, $DFEFF7FA7881FF7F, $26136B417F183310, $965A90532F025944
   Data.q $1000362664059AD0, $C564C0F2DBB82C40, $99383D2541DBA902, $A3C81B28F2043D43, $110F890D9A406CAC, $9015204B2C040703, $21D6007B78250DC8, $5FDFFF12E002CA42
   Data.q $F81CB0333083EC78, $A602FE4070798A03, $A23164EE0FC94802, $7DAC3FFEF9C127B6, $D029F707CE0FF1, $10000520ABBA0040, $39116FFFFF891184, $4DC0A089074461A7
   Data.q $496E1A8F167E536B, $83A8072A50490807, $19E40402201EAE57, $473405D98483BB51, $23492B40418B21, $603A07C0601257C, $C2736ADBF4446FAA, $173BE928E5B28EAC
   Data.q $E7AE62FE1EA93C55, $39465DB002D837, $D7FEEE88250C20C2, $84B896322D650F95, $1402DF816BC025DF, $136D468651FEE8AA, $A31646311E27ABFB, $8DF741F2817CB151
   Data.q $114C3F875F7550E3, $68EE2467FA27F339, $D167F8A529DF8B82, $E6C47D28FBA26523, $BA0A16DE5534615E, $720AC3A0057BFA, $DDFFFE4EA2584106, $A4EC3B82A5A36625
   Data.q $C67F1D69482C4307, $97106FD663DDCC86, $6E0758381B667FFA, $E7960ED8D58FB4D3, $990EA909C1E8099, $CD49FC624BCBE7A8, $604BF540FEAC0121, $C474B514B5ECBBB5
   Data.q $4925030EB3889376, $1F9F3D7269CDD88D, $71DCBB6005788, $581FFBD162A18410, $838860E2623E188D, $71EF8CFFC2CF2D0B, $335F025980F14A16, $BB5109A5DFAA9BB5
   Data.q $40449C9379E280D6, $D47A7003A185011A, $51E3EA61FD62C395, $975B14763268273E, $C2CEB801C9E985D7, $2005B0AFCFAF72AA, $3A20410400928CC3, $22C6466E3FF7A185
   Data.q $EC31FE8E1F4D90, $52E29DE78FCB3CB, $7CB99B7B33880748, $673DF9A010D6A15A, $D97A2597D82101C2, $2CC807E209C5F61, $71CC4F831BAE02B5, $DA35F37A7597D9FA
   Data.q $19B68D2682211B85, $3F02270496F0531A, $3101F8C81F814C18, $1C82B0B8011E0AA2, $FFFB6EB466104180, $B81D91095D1CC77B, $6717FFC56814D0DA, $CA7EBC27012DAC44
   Data.q $9CA33808D8E3CD99, $3ECB321200A4B88, $4D18807E43A10D7C, $FCDCBD8ABF315E52, $5EA21E91E671824E, $E5B663A38E27968E, $260BC3FA5DBAC706, $3D50306F8C024907
   Data.q $CC2A005782A15EC2, $624AA1841060076D, $E528C94DDCFFFFB2, $5FE2D39402FBBDB2, $80294806C393F101, $BD0824073DC92393, $170783C9F2E284C0, $2F88C00718468014
   Data.q $AEB6C227505910, $DB8CFB78DEFEF860, $39969E92746797C0, $3AB15D5664645AE2, $4E453EC11AF7856A, $C7B2B39C82E2B5AD, $84003625615002B, $CC15D7FDB92144C2
   Data.q $5A5B169813086F1, $EC9F5F720024F827, $22995E53A6E558F8, $7E19B900F87F3B52, $41B2A0274837052A, $D5CF5BB0066F28CA, $C797B9E868033DFF, $14D3779EC60BDFD7
   Data.q $837B66067448A3C9, $EB7028372DE4D917, $FA75F6A89F62960E, $2FFA468C53E3025B, $C208300490661500, $9D56F7FFFB185AC0, $9B21005EEF14240A, $E9AD02C625680DFC
   Data.q $EDFC16A01D01AE7D, $8BE283FB12558A3C, $200D040B7823803A, $7A7871F035FDA407, $B02F32B6261A2D53, $F1786286638A41B7, $3A474CD303BDBFBA, $239128F461EC84
   Data.q $9854009F05BDAFC5, $33A3430820C00EDB, $D917AEA70EFFFFFE, $8FDA7B60928189DE, $26B232ABF57A16E2, $4BE8C81797EE51E5, $FBC35D10A5BD7B7, $E45A8B431F1457E3
   Data.q $5776427C43D5B0E2, $6C47CD930A60A8FD, $C072D8D0E0E45F00, $9C30F64E3F78DEA9, $877959DCC5783321, $118CC26004B00B29, $FFF2AD5818410600, $59C9D824356D2AFF
   Data.q $31C2FECCB477304, $EE5510277A2D959C, $13D21D8663D95400, $4DF5A2DD4429607C, $1FE81B9131C0E9, $FE08CEBE80053308, $84FE2FB4A29BDE45, $73C981E9F17AE1D
   Data.q $6CDA418645DD5BF5, $855BA6B079271AF0, $EB298013EB3A2BF5, $FE8AB46184000148, $C79395D31415BDFF, $7108B8FECE59894A, $4955F6505132F2A1, $7706A1D4032B8615
   Data.q $1163B9FE0F915A50, $FE76F731D99821E9, $3209A5EC39969037, $4EA53F70044F0D65, $70B36D34E4AA1F75, $8013D45C29E1451B, $6841040001D83309, $D22243AE0FFFFAD9
   Data.q $E3C6CCA26D7838, $1F8E25542CF59086, $59FD8955F19C1776, $D06CC09C88A0DB13, $3D46FC92E02B80C3, $F8968D8C18E8D14, $7C1480F0017244A6, $C32411014FB5F769
   Data.q $A74EBBF53C9C1BCF, $F6A725A71C68B6BF, $830038256530027, $659783FFFB6328C2, $2597B41301F22D0A, $F50B5ED06B6C6CCC, $5BA240947E7B3F8, $6A0EEA1E0FA8CF26
   Data.q $41CF88E6D950B4F8, $EE4ADB1CB8B3CD41, $F7F7AE8C8787F3AF, $CD19BF3612EBF610, $619FC75D25A49353, $DCBAA17BC5F2F1AF, $655002FC044E6924, $F4CC082080004906
   Data.q $F4786848D0EE2FFF, $B3F50189B45A4314, $2AC8AA3C10493AC3, $4A60347FEB3A980B, $FD1E943C273A98B4, $7BB81D7BC6E14931, $2E03C8EED5F3379F, $F4331BA29DFBC13C
   Data.q $C0DB177563213A90, $55002BEB3BF18BF1, $4050C20830039466, $CC2D01B896627FEE, $73A952CF0C4C3F4F, $AB42B620800D0D38, $627474CF7CC8A9FD, $1C463A0106778523
   Data.q $48FD057651D227E9, $78FF4EA8BF3AF881, $34BB744C4D22E2FD, $680A34ADAA679692, $B0A30B9918033ECF, $657002BADF10E6B2, $E5351010C000392E, $8AE9D30CDA6E67FE
   Data.q $29BCE8CA782FC495, $DE0EF67C21A647A, $B6A46E5D36D7C58, $4F9CB17266848BC2, $3F986583DCD69AA0, $51280C9A246C276D, $6209E40B879C49D, $C8016CA8B942F4BC
   Data.q $2606204200149332, $BC16760CAB3FFFF3, $6CFAAD06E84280B9, $EFEB01D12150D8E5, $ACB745D093F916A9, $A83863CD68062510, $84FEB7E3B21C4521, $C2AF6CAA9601075B
   Data.q $6856F2EBE7DA81E4, $2926657002DD33F8, $9FFFE8540C20C000, $11422C7216EB4A6C, $32FF64E54733A0F5, $255F5EC03CABCD74, $64F4004E6E442D31, $79FD246CAB453C
   Data.q $D796109D12AAA3F7, $B0B9F78A09E5A390, $5DD4C9D36377741D, $32B8015D9C859BC7, $E262061040001C63, $49C6852A482C7FFF, $25FFDBB94BA34C5D, $A6E2284FDC1C0C6
   Data.q $5EB864E18E90ED86, $BB883A2DD8D2DDD9, $E5F7DF6591B2F7E0, $3B2001E51F100170, $FD13AA1377E74C4F, $2884DEFCCA288480, $CB90576A7963E4F9, $61001CA334A8015
   Data.q $8A5D607FEF50E861, $3F4196580781D2B2, $D508A7377576F79A, $8DE09987EAB65E1, $8F901670D38B6CC, $D1D13CB0CDC11B96, $6DBB4CC87C3AF8F, $3E3499EC385EC64E
   Data.q $AC5903941B4C122, $13EBF740EE910BE8, $B54BC35069C5B785, $2A0057C8315A84EF, $42A18410000560CD, $3A539B869717FFFD, $7D6DD3E644D40A79, $B569497FF0395094
   Data.q $BD03AECC3220E1A9, $B5857D0561CA4EDE, $AD21433356D601F7, $292104A109374740, $FDE2D1ED4102936D, $3512D540AEE402A1, $F9AC0521D00F0F06, $FFD0F041C04F8254
   Data.q $80071DCD32004FE, $82AC0FFDE16A2041, $1124B0B135CF20EB, $916FB5CB58F9921C, $E27A57DB01081FC9, $2F3CDFFAA2874DB5, $C1E2EB2912E66618, $201A177D314893C5
   Data.q $8B7CD48421B31A3D, $446FACC8C2400D7A, $2BF9D81B93936D8C, $B2126964C9E57AC0, $9F916571105282, $6A0821400E515A54, $9226F7AC981FFBAB, $AA384991080787D9
   Data.q $F5A4AD9DF7D765AA, $7D75F4525CB626F7, $CB30F8FD1739CBC2, $A35C774989C70320, $B1E81219AFDE8CC8, $480802F068783BE7, $C3F898D141046154, $22457AE4D3310E4D
   Data.q $5E842084DAE5DA2D, $83003946695002FC, $BB3A647FEECD0830, $689FE31344BA280D, $EA92C6B013AAF2B5, $EFA88DEB8FF5E7E3, $604C0D96BC67D658, $E6A4A6F88449F263
   Data.q $8C097D4A62F8B9A7, $44407CF9D0E7F64E, $2B814C6839A18900, $E3D34926886404D0, $17C48AB373093708, $4B8011EDBF46F2E9, $FEB541040001C82B, $75D432A5AB2E0FF
   Data.q $B4641A5316A5D0E, $A48C4EF64BAA96DC, $B870CAE8AB88C6E4, $486BE5F08770B7A5, $4461BA8724CA1199, $DBD7248E52F661D1, $1151215398AB2FC0, $E6C4EA6BA0520DAE
   Data.q $3D7C88A8A027FA37, $14B6B488013C1EAA, $6BEFFDD506104000, $7C88BFA0CE9AD585, $34E241002FD5362D, $3A8B504C1AF78ED6, $8B8F5405DF74C71E, $521F128D6EFD4EAF
   Data.q $4DA21078C37466F6, $707619C51442DB1A, $BA88DDC2528DB55C, $E6CDB786CC6E184D, $338022B104664C77, $474CA02E11E2695B, $57002BAC1BD1AF1C, $41D0C2083004AC66
   Data.q $23CD9EAE5B7FFFFE, $3012102E2E2EAF16, $68E6152C142C0274, $80F4F5B62C736E7F, $2EBEF0DC89185C90, $128B3BBC17FA737E, $F615C585F519181A, $4074CBB57AFBA39F
   Data.q $282E12ABC85DFC94, $798A9B8EF246A691, $7AF3804D4270B181, $4B3A11CC70FA1E7D, $410600B60AD2A00, $16AD9D7FFFFECF6D, $4795048ADD8EDA4A, $CC596625E2F2532B
   Data.q $D722052461145023, $B910D4A5B3437CC, $AEE9AB730B7241F3, $1B5361BD3A6E73B1, $B87327A448A7043D, $C69F800234FB471A, $F27D040281557583, $14E8C1C12B06A06C
   Data.q $E9F894DCC0300747, $AD2A004FC3391D9, $1FFF22D84106006C, $2601D945A138093C, $7DA30A4FCA94A05A, $CC5A31C1DCE243EC, $D9CD68F9F2E2AE81, $4A441B7A36BCC87C
   Data.q $9AD14ECC2403AE76, $79669F67D71609E3, $1FD92734440F43B9, $3327BC39402C8824, $C30284C894411022, $34E5DB8397A15FF2, $C9334C8013E03A6F, $FFFFC46061040001
   Data.q $4F55E30685298898, $469718517940CB22, $2A0C13823ECE595, $894BB7B66569605E, $62EA5812CD3E74AE, $DEB52EA598C2192, $84A204AC821432BF, $AFBF81433892EA2
   Data.q $3C4F2578A7A73C89, $6705261BDE251B1E, $2A0057E4C87165D1, $CCC5841060072DAD, $152D6E253AEBFF78, $CD2168F293F3FC5, $3FB73F7165FF2EC0, $149A14B6E9D84A60
   Data.q $D645FEF24B7AB670, $C10D0320845B7745, $8DA3D0BF72BE73D4, $9D6A2E5A25CC6B8F, $25A3D05540DB101E, $871E90C08404EFF0, $133190149A21E9CB, $56990027DE3F972C
   Data.q $FFD6E68208000390, $1FAB74054A879C1F, $D3C551C2FC414C90, $582E112A244A4CF, $90B5EFE9D5D1F7D, $E71A31B5B91202EC, $F7A3332982D30B6D, $6DD1AC5D3ED4112
   Data.q $C0344816DC601260, $15A9F526C47F7EAC, $123F814A74BA11B2, $1C82B4D8015DF348, $C3FFFD5B54104000, $24BBA1D5B854A966, $15AB1F800B9E330C, $BC54012C0702CE8
   Data.q $60E810B72A9CAE16, $B80DF74210F3D6F2, $10CC372376F76F7F, $F675E3496704A657, $2DF943BFB0824E75, $908C16023B032B85, $12F5909FA08EBC1, $8610400014A334D8
   Data.q $6CE6293C2FFDD042, $BC7D36902747D1FA, $EA197DA430A120AF, $2CC87C2710FA7074, $1D1C5C3FAE69C379, $347D39BD8447C849, $861C945A54035C3B, $7008D7B10ACE3798
   Data.q $A817BD0C3A157620, $8EEA20DF511F980D, $5ADB600573228F89, $1FFFF8E040800074, $8B00F8F294EA5636, $39B1916FE76BB95C, $448F0949BA85917D, $30D4262C18F107A8
   Data.q $A318C8BBB822713B, $D4B8F44F7FD44332, $61ED6E8122603BF8, $A02357104017504E, $FDB625838DE8340E, $D209A93E5E2D0062, $9A7400A751CFF5D2, $EA09430820000A51
   Data.q $8FD4CC9525B5F7FE, $42FBC9CD8D14100E, $70128FD1D71BF652, $6B3BE0A7AB113A2F, $3DB76B0930E16087, $8F29DFDD97E678FE, $154440E59E594196, $277110E3F80B78F8
   Data.q $5C28C10625993E34, $802DB1297E8BFAF, $88BF9A7AC83932EF, $3C360D9C75018E2A, $A159393581FD1B05, $CC79B82FF9859FF9, $6A750989945AB482, $1063C858C3A019C
   Data.q $A05B40278F8318B, $FFBFDFDF4DA1DBAE, $2B08E7BC37F879A0, $B8A893A1FF9C03B, $D6909285C1100400, $66FC15302A92C19, $D212131744171194, $9EBE183901009A0
   Data.q $DACF8263F3D2058, $490D5C3602B27C23, $76802A581D11D099, $5FF1ACE80F7D20C6, $2F1A409E2F06DE48, $E52C39EED022C940, $4401000209245BE0, $7FE485028E400030
   Data.q $1F62C12B391AD2A4, $341980292158CC9C, $AF98C0D49902CF3F, $B9A36045A9446463, $AE823678747DA1FF, $D0FCDB4289ED41F1, $D48154B0B3D81246, $982E097F7D544604
   Data.q $9D834B16A2200806, $6681D11FF524A06, $B4058FF0C2CF9D78, $D0EFCA0D7536070E, $9D0CC3E3A2332FA6, $562033F98D806776, $41428F8716ACA277, $FE5F06217D0E84ED
   Data.q $50543DA07F7154A2, $AD2D80171D07FF9E, $BD11004004FF6627, $FF27901FD8641E5C, $E87FC32FE8C41FC, $ACBBC900FFA813D, $A900985E03FDF11E, $2396B03F1BC0FFF3
   Data.q $FEB0F9B214D4D213, $FF6D43119546C08, $F9017808A5203B29, $47FFF6D60654BA07, $C36D22008007FEF4, $190E1C3102D07404, $6B741FF99A39003B, $B417F6740675780B
   Data.q $B1BE199E4CBE0150, $C28D4A3FEE7DB101, $B60DCCBE0A61B480, $1D45FDFE0A9A0A08, $2927D6D0C141A0, $581E0332DAC88020, $E0FFD70178DA8FF8, $E8661E9EF0660331
   Data.q $3B94F238756C1E7C, $8FFC12DC0D3A7403, $D60FF970348F7234, $F008F23FEC790777, $62258C1E40AA445F, $948C40100036006F, $8D04C413DE4444EE, $7B82666792582669
   Data.q $3E099C7A83FADE1E, $C24736C2A55A85E5, $585FDBC6A014FA, $6517FE04348BFBFF, $8A200800DEB91917, $8F897041BEEF0003, $6FB9845A3E003FB4, $C27D562030C35E10
   Data.q $47F97C9B61FFF8C7, $95440100940D95, $99056C5B025DDD40, $A94D8027AF0067B7, $D118CC86C3775623, $C3FF86FBE1FF623A, $D0BFB6A9A43FC453, $8051CED2A060A79
   Data.q $A4639AEA0006AA20, $19EF23A54C426718, $8A39DA44669E6C44, $6CE1B0F4C3480814, $600059A20080036A, $33484C7D558641AC, $BB69A47FC5BEF0CF, $25A440AC25DEF0FF
   Data.q $CE7FB29A00300800, $EDA0A4A4, $826042AE444E4549
EndDataSection

_________________
On GitHub: PB Includes - IDE Tools - Color Themes


Top
 Profile  
Reply with quote  
 Post subject: Re: Particle Flame Effect
PostPosted: Mon Sep 27, 2010 8:18 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 16, 2003 8:30 pm
Posts: 1998
Location: North Florida
Awesome again. Can you make the keyboard input work at the same time the mouse is depressed?

- np


Top
 Profile  
Reply with quote  
 Post subject: Re: Particle Flame Effect
PostPosted: Tue Sep 28, 2010 12:51 am 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1771
Hmmm, what do you mean NoahPhense? The left/right keys? They work whether or not the mousebutton is held.........

_________________
On GitHub: PB Includes - IDE Tools - Color Themes


Top
 Profile  
Reply with quote  
 Post subject: Re: Particle Flame Effect
PostPosted: Tue Sep 28, 2010 12:49 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Oct 16, 2003 8:30 pm
Posts: 1998
Location: North Florida
kenmo wrote:
Hmmm, what do you mean NoahPhense? The left/right keys? They work whether or not the mousebutton is held.........


I stand corrected. ;) Very nice!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye