AHHH! I must be going mad, I forgot to include the import code with it
.
Well I'll put it in the RAR file again and upload it, but for you:
FUNCTION loadWorld(filename$)
IF FILE EXIST(filename$)=0 THEN EXITFUNCTION
OPEN TO READ 1,filename$
READ FLOAT 1,versionNum#
READ FLOAT 1,matrixSizeX
READ FLOAT 1,matrixSizeZ
READ FLOAT 1,tileAmountX
READ FLOAT 1,tileAmountZ
MAKE MATRIX 1,1000,1000,50,50
LOAD IMAGE "texture3.jpg",1
PREPARE MATRIX TEXTURE 1,1,50,50 : FOR x=50 TO 1 STEP -1 : FOR z=1 TO 50 : in=in+1 : SET MATRIX TILE 1,z-1,x-1,in : NEXT z : NEXT x : UPDATE MATRIX 1
FOR x=0 TO 50
FOR y=0 to 50
read float 1,valueIn#
SET MATRIX HEIGHT 1,x,y,valueIn#
NEXT y
NEXT x
READ WORD 1,objectAmount
IF objectAmount>0
FOR x=3 TO 3+objectAmount
READ STRING 1,objectFileName$
IF FILE EXIST(objectFileName$)=1
LOAD OBJECT objectFileName$,x
READ FLOAT 1,objectPosX#
READ FLOAT 1,objectPosY#
READ FLOAT 1,objectPosZ#
POSITION OBJECT x,objectPosX#,objectPosY#,objectPosZ#
READ FLOAT 1,objectAngleX#
READ FLOAT 1,objectAngleY#
READ FLOAT 1,objectAngleZ#
ROTATE OBJECT x,objectAngleX#,objectAngleY#,objectAngleZ#
READ FLOAT 1,scale
SCALE OBJECT x,1000+scale,1000+scale,1000+scale
ENDIF
NEXT x
ENDIF
CLOSE FILE 1
UPDATE MATRIX 1
ENDFUNCTION
Projects in progress: Lerioonia, Crescent