3d model reading

Blitz3D Forums/Blitz3D Programming/3d model reading

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

ok, i have made a start on reding the tga file but have got stuck, i'm currently reading the header of the file which the specs show as followed:
Size
byte - Id Length (offset=0)
byte - Color Map Type (ofset=1)
byte - Image type (offset=2)
5 bytes - Color Map Specification (offset=3)
10 bytes - Image Specification (offset=8)

I have read the 3 byte parts and am stuck at the last 2, how do you read bytes, and you please help me here is my code so far...

Graphics 640,480,32,2
SetBuffer BackBuffer()

filein=ReadFile("test.tga")
Idlength=ReadByte( Filein )
ColorMapType=ReadByte( Filein )
imagetype=ReadByte( Filein )


Color 255,255,255
Print Idlength
Print ColorMapType
Print Imagetype


WaitKey()