I can get this much of the code to display, it just one for noxt loop thats causing the problem
' Water Effect for Zach Harvest [ Sephiron / Youth Uprising ]
' Done way to early in the morning and finished when I was finally awake :P
' Uses TinyPTC_ext by Gaffer and Rbraz.
' Click and drag to make ripples; space bar makes rain.
' [c] 2009 Jake Taylor [ Ferris / Youth Uprising ]
' this version converted to FB by Merick
#define scrw 640 ' Screen width in pixels.
#define scrh 480 ' Screen height in pixels.
#define scrs scrw * scrh
#Include Once "fbgfx.bi"
Dim Shared As Single damp = .987 ' Dampening (KEEP AT < 1.0!!!)
Dim Shared As Single ref = 12.0 ' Refractivity
Dim Shared As Single depth = 200.0 ' Ripple depth
Dim Shared As Single ptr water
water = New Single[scrs * 2]
Dim As Integer lmx,lmy
ScreenRes scrw, scrh, 32
Dim Shared As fb.image ptr img
img = ImageCreate(scrw,scrh)
Dim Shared As UInteger Ptr buffer
Dim Shared As Integer pitch
ImageInfo img, ,,, pitch, buffer
Dim Shared As fb.image ptr bgimage
bgimage = ImageCreate(scrw,scrh)
Sub runwater()
Dim As Integer bi, yi
' Water physics and 1st buffer copy pass
For y As Integer = 1 To scrh - 1
yi = y * scrw
For x As Integer = 1 To scrw - 1
bi = yi + x
water[bi + scrs] = ((water[bi - 1] + water[bi + 1] + water[bi - scrw] + water[bi + scrw]) * .5 - water[bi + scrs]) * damp
Next
Next
'!!!!!! SOME TEXT MISSING !!!!!
' 2nd buffer copy pass
For y As Integer = 1 To scrh - 1
yi = y * scrw
For x As Integer = 1 To scrw - 1
bi = yi + x
Dim As Single w = water[bi + scrs]
water[bi + scrs] = water[bi]
water[bi] = w
Next
Next
' Blur pass..amazing how much of a difference this makes!!
For y As Integer = 1 To scrh - 1
yi = y * scrw
For x As Integer = 1 To scrw - 1
bi = yi + x
water[bi] = (water[bi] + water[bi - 1] + water[bi + 1] + water[bi - scrw] + water[bi + scrw]) * .2
Next
Next
End Sub
Sub wline(ByVal x1 As Integer,ByVal y1 As Integer,ByVal x2 As Integer,ByVal y2 As Integer)
Dim As Single x = x1
Dim As Single y = y1
Dim As Single xv = x2 - x
Dim As Single yv = y2 - y
Dim As Single d = Sqr(xv * xv + yv * yv)
If (d <= 0.0) Then
Return
EndIf
xv /= d
yv /= d
For i As Integer = 0 To d-1
Dim As Integer ix = x
Dim As Integer iy = y
x += xv
y += yv
Next
End Sub
Randomize Timer
Dim As Integer mx,my,mb
For y As integer = 0 To scrh-1
For x As integer = 0 To scrw-1
PSet bgimage, (x,y), RGB((x xOr y), (x xOr y), (x xor y))
Next
Next
' Main loop
While Not MultiKey(FB.SC_ESCAPE)
' Get user events
GetMouse mx,my,,mb
If mb And 1 Then
lmx = mx
lmy = my
wline(lmx,lmy,mx,my)
EndIf
If MultiKey(FB.SC_SPACE) Then
Dim As integer ix = Rnd * scrw
Dim As integer iy = Rnd * scrh
EndIf
' Effect
runwater()
Put (0,0),img
Wend
Delete[] water
ImageDestroy img
ImageDestroy bgimage