hrm...not sure why those phantom code tags aren't working...let's try again...
sync on: sync rate 40
open to read 1, "C:\Projects\james\20liner\ocean.dat":read long 1, filecount
for i = 1 to filecount:read long 1, filesize:make memblock i, filesize:read memblock 1, i:next i:close file 1
type point2d x as integer y as integer colournum as integer endtype:global dim colours(7,9) as dword:global dim points(7,200) as point2d:global dim pointnum(7) as integer
for j = 1 to filecount
mbposition = 0:pointnum(j) = memblock dword(j, mbposition):width = memblock dword(j, mbposition+4):height = memblock dword(j, mbposition+8):inc mbposition, 12
for i = 1 to 9:r = memblock dword(j, mbposition):g = memblock dword(j, mbposition+4):b = memblock dword(j, mbposition+8):inc mbposition, 12:colours(j,i) = rgb(r,g,b):next i
for i = 1 to pointnum(j):points(j,i).x = memblock dword(j, mbposition):points(j,i).y = memblock dword(j, mbposition+4):points(j,i).colournum = memblock dword(j, mbposition+8):inc mbposition, 12:next i
next j
wposx = -20:wposy = (screen height()/5)*2:curang=0:yfposx=-200:rfposx=screen width()+10:sunposx=-100
do:cls
curang = wrapvalue(curang + 3):sunposx = sunposx + 2: if sunposx > screen width() then sunposx=-100
yfposx = yfposx + 2: if yfposx > screen width() : yfposx = -100 : endif :rfposx = rfposx - 2: if rfposx < -100 : rfposx = screen width()+50 : endif : fishswimoffset = sin(wrapvalue(curang*3))*5
DrawVector(6, 13, 9, wposx+sin(curang)*15, wposy):DrawVector(7, 13, 9, wposx+cos(curang)*11, wposy+7):DrawVector(1, 3, 3, 120, screen height()-57):DrawVector(1, 2, 2, screen width()-70, screen height()-38):DrawVector(1, 4, 4, screen width()-130, screen height()-(75))
DrawVector(2, 5, 5, sunposx, 10):DrawVector(4, 5, 5, yfposx - fishswimoffset, (screen height()/5)*2.5 - fishswimoffset):DrawVector(5, 4, 4, rfposx + fishswimoffset, (screen height()/5)*3.5 + fishswimoffset):DrawVector(3, 3, 3, 20, screen height()-62):DrawVector(3, 4, 4, 320, screen height()-82)
sync
loop
function DrawVector(VectorNumber, XScale, YScale, XOffset, YOffset):for i = 1 to pointnum(VectorNumber) - 1:mycolour = points(VectorNumber,i).colournum:ink colours(VectorNumber,mycolour),0:line (points(VectorNumber,i).x*XScale)+XOffset, (points(VectorNumber,i).y*YScale)+YOffset, (points(VectorNumber,i+1).x*XScale)+XOffset, (points(VectorNumber,i+1).y*YScale)+YOffset:next i:endfunction
oh, btw, please let me know if it works in your version of DBPro. I'm testing patch 2.2 (one of thost DBDN benefits) and didn't try a compile under the demo or the original release.
-= i only do what my rice krispies tell me to do =-