Not much else to say, here is the terrain file...
Rem ***** Included Source File *****
Type Map
ID as integer
Name as string
hmid as integer
txid as integer
dtid as integer
ObjID as integer
EndType
Function LoadTerrain(terrainId)
HMPath$ = "\Media\Maps\" + maps(terrainId).Name + "\heightmap.bmp"
TXPath$ = "\Media\Maps\" + maps(terrainId).Name + "\texture.bmp"
maps(terrainId).hmid = GetImgID()
maps(terrainId).txid = GetImgID()
Load Image HMPath$, maps(terrainId).hmid
Load Image TXPath$, maps(terrainId).txid
maps(terrainId).ID = Bt Maketerrain()
Bt Setterrainheightmap maps(terrainId).ID, maps(terrainId).hmid
Bt Setterraintexture maps(terrainId).ID, maps(terrainId).txid
Bt Setterrainscale maps(terrainId).ID, 10.0
Bt Setterrainyscale maps(terrainId).ID, 10.0
Bt Setterrainsplit maps(terrainId).ID, 8
maps(terrainId).ObjID = GetOBJID()
Bt Buildterrain maps(terrainId).ID, maps(terrainId).ObjID, 1
Endfunction
This is almost all the BT Code in my project, what is wrong with the load?
The BMP is 512 X 512 and I tried 8 bit and 24 bit, same thing.
**UPDATE**
This has to be an error in my code, as I replaced the heightmap with the included projects with mine, and it works, but they look identical to me, so I am going to look closer...
Sync On : Sync Rate 60 : Sync
Center Text Screen Width()/2, Screen Height()/2, "Please Wait, loading assets..." : Sync : Cls
SetDefaults()
mapCount = 0
Open To Read 1, "Maps.dat"
Read String 1, Count$
dim maps(val(Count$)) as Map
Read String 1, maps(0).Name
Close File 1
LoadTerrain(0)
Bt Enableautorender 1
Do
Control Camera Using Arrowkeys 0, 1, 1
Sync
Loop
That is the Main data file.
Rem ***** Included Source File *****
Global ImgID
Global ObjID
Function SetDefaults()
ImgID = 1
ObjID = 1
Endfunction
Function GetImgID()
ImgIDSend = ImgID
ImgID = ImgID + 1
Endfunction ImgIDSend
Function GetObjID()
ObjIDSend = ObjID
ObjID = ObjID + 1
Endfunction ObjIDSend
That is the data file.
UPDATE 2
Ok, I copied and pasted the entire file, and it still has the same error. Seems the only ones that compile and run properly are the codes files provided.... Checking to see if I can fix that...
So I replaced my DBPro file with the other DBPro file, still nothing...