Date: 02-16-2022
Return to Index
created by gbSnippets
http://freespace.virgin.net/hugo.elias/graphics/x_water.htm
http://js1k.com/2010-first/demo/131
http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/the-water-effect-explained-r915
http://www.neilwallis.com/projects/java/water/index.php
http://29a.ch/2010/10/23/html5-water-ripples-demo
http://www.script-tutorials.com/demos/97/index.html
http://jsfiddle.net/nsN57/17/
http://www.falstad.com/ripple/
http://gamedev.tutsplus.com/tutorials/implementation/make-a-splash-with-2d-water-effects/
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile Exe
#Dim All
%Unicode=1
#Include "win32api.inc"
Global hDlg As Dword, bmp1$, bmp2$, clr1(), clr2() As Long
%IDC_Graphic1 = 500
%IDC_Graphic2 = 501
%IDC_Button = 502
%ID_Timer = 503
Function PBMain() As Long
Dialog New Pixels, 0, "Show Image",500,400,250,130, %WS_OverlappedWindow To hDlg
'load from file
Control Add Graphic, hDlg, %IDC_Graphic1, "Ripple Demo", 10,10,104,117
Graphic Attach hDlg, %IDC_Graphic1
Graphic Render "face.bmp", (0,0)-(103,116)
Graphic Get Bits To bmp1$
ReDim clr1(103,116) At StrPtr(bmp1$)+8
Control Add Graphic, hDlg, %IDC_Graphic2, "", 135,10,104,117
Graphic Attach hDlg, %IDC_Graphic2
Graphic Render "face.bmp", (0,0)-(103,116)
Graphic Get Bits To bmp2$
ReDim clr2(103,116) At StrPtr(bmp2$)+8
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_InitDialog
SetTimer hDlg, %ID_Timer, 250, 0 'uses callback messages
Case %WM_Command
Select Case Cb.Ctl
Case %IDC_Button
? "Don't push me!"
End Select
Case %WM_Timer
Dialog Set Text hDlg, "Ripple Demo " + Time$
Case %WM_Destroy
KillTimer hDlg, %ID_Timer
End Select
End Function
'gbs_01143
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm