`display
set display mode 1152,864,32
hide mouse
sync on
sync rate 0
`fog
fog on
fog color rgb(0,0,0)
fog distance 2000
set ambient light 100
`backdrop
backdrop on
color backdrop rgb(0,0,0)
position camera 250,500,250
`===========================================================================
` M E D I A
`===========================================================================
load image "test.bmp",1
`===========================================================================
` M A T R I X
`===========================================================================
TILE_SIZE = 50
MATRIX_SIZE_X = 500
MATRIX_SIZE_Z = 500
make matrix 1,MATRIX_SIZE_X,MATRIX_SIZE_Z,TILE_SIZE,TILE_SIZE
position matrix 1,0,0,0
prepare matrix texture 1,1,TILE_SIZE,TILE_SIZE
tile=0
for z=TILE_SIZE-1 to 0 step -1
for x=0 to TILE_SIZE-1
set matrix tile 1,x,z,tile+1
inc tile,1
next x
next z
update matrix 1
`===========================================================================
` M A I N
`===========================================================================
do
gosub _debug
x#=wrapvalue(x#+mousemovey()/4)
y#=wrapvalue(y#+mousemovex()/4)
z#=wrapvalue(z#+mousemovez()/4)
rotate camera x#,y#,z#
if upkey()=1 then move camera 2.0
if downkey()=1 then move camera -2.0
sync
loop
`============================================================================
` F U N C T I O N S
`============================================================================
`============================================================================
` S U B R O U T I N E S
`============================================================================
_debug:
if scancode()=15
text 0,0,"Frames Per Second: "+str$(fps)
text 0,10,GET DIR$()
else
fps=screen fps()
endif
return
This code works completely fine in DB v1.13 BUT does not work in DB Pro! Basically its taking 1 texture file and splitting it up using 'prepare matrix texture' to texture each individual matrix tile with a little bit of the original texture to give a full and complete image across the whole matrix. The 'prepare matrix texture' command in DBpro is
NOT splitting the image correctly resulting in cropped images.
What the flame does not consume, consumes the flame.
----------------------------------------------------------------
AMD XP2100+, Geforce4Ti 4400, 512Mb DDR, Abit KX7.