Nevermind, I found the answer. Someone at Geosphere had already posted the answer for DBC. The formats are different. I'll paste the code here for anyone else interested.
sync on
sync rate 60
hide mouse
autocam off
randomize timer()
color light 0, rgb(255, 255, 255)
`overall position of last matrix
dim posX#( 1 )
posX#( 0 ) = 0
dim posZ#( 1 )
posZ#( 0 ) = 0
`-----------------------------------------------------------
`ALTER THE FOLLOWING VARIABLE TO LOAD YOUR EXPORTED FILE
`-----------------------------------------------------------
filename$ = "filename.gdb"
`open the main file to find the files to load
open to read 2 , filename$
`number of db units wide the overall heightmap is
dim pixelsX#( 1 )
pixelsX#( 0 ) = 0
dim pixelsZ#( 1 )
pixelsZ#( 0 ) = 0
`read the total size in db units of x and z
read float 2 , pixelsZ#
read float 2 , pixelsX#
`number in the X by Z grid of matrices
ZMatrices = 0
XMatrices = 0
read long 2 , ZMatrices
read long 2 , XMatrices
`store a count so we can assign a unique matrix number
count = 1
`load all the matrices in the exported grid
for z = 0 to ZMatrices-1
lastZ# = 0
for x = 0 to XMatrices-1
read string 2, dbmName$
read string 2, bmpName$
lastZ# = LoadMatrix( count, dbmName$, bmpName$ )
count = count + 1
next x
posX#( 0 ) = 0
posZ#( 0 ) = posZ#( 0 ) - lastZ#
next z
close file 2
`setup camera
set camera range 1, 8000
position camera 0, 400, 0
`main loop
repeat
if upkey()=1 then move camera 10.0
if downkey()=1 then move camera -10.0
if leftkey()=1 then angley#=wrapvalue(angley#-2.0)
if rightkey()=1 then angley#=wrapvalue(angley#+2.0)
rem Update camera
xrotate camera 0.0
yrotate camera angley#
zrotate camera 0.0
`show FPS and message
text 10, 10, "FPS : " + str$(screen fps())
text 10, 20, "ESC to exit"
sync
until escapekey()
show mouse
function LoadMatrix( matrixNumber, fileName$, textureName$ )
`read the matrix file
open to read 1 , fileName$
`get the x and z tile values
dimx = 0
dimz = 0
read long 1 , dimx
read long 1 , dimz
`get the db units x and z values
sizeX# = 0
sizeZ# = 0
read float 1 , sizeX#
read float 1 , sizeZ#
`create matrix
make matrix matrixNumber, sizeX#, sizeZ#, dimx , dimz
position matrix matrixNumber, posX#( 0 ) , 0 , posZ#( 0 )
posX#( 0 ) = posX#( 0 ) + sizeX#
`read in the height data
for z = dimz to 0 step -1
for x = 0 to dimx
read float 1 , ht#
set matrix height matrixNumber ,x , z, ht#
next x
next z
close file 1
`sort out the texture
load image textureName$,matrixNumber
prepare matrix texture matrixNumber,matrixNumber, dimx, dimz
in=1
for z=dimz-1 to 0 step -1
for x=0 to dimx-1
set matrix tile matrixNumber,x,z,in
in = in + 1
next x
next z
update matrix matrixNumber
endfunction sizeZ#
Just replace the file name with the one you created.
Steele
-- I straddle the line between genius and insanity. Guess which side I am on now? --