View Full Version: Arrays->types

Blitz Basement > Code Questions > Arrays->types


Title: Arrays->types
Description: loading blocks


Dalaware - January 31, 2005 05:54 PM (GMT)
Hi, Hope someone can help? I am doing a 2d break out type of game in blitz3d, and I have used an array to load my bricks, all works well.
my problem is, I want to use a type to load the graphic tiles,
I am using, Data 0,0,0,0,0 and so on to load the tiles, I do not want to change this if possible as I have the levels finished.
I have used some Ideas from another forum


;.setup the TypeArray.



Dim MapArray.TTile(ScreenWidth_For_Tiles,ScreenHeight_For_Tiles)
My level data

Type TTile
Field frame[8]
Field x
Field y
End Type


For y = 0 To ScreenWidth_For_Tiles
For x = 0 To ScreenHeight_For_Tiles
MapArray(x,y)=New TTile
Next
Next

in my main loop this

DrawImage TileSet_Level_one,MapArray(x,y)

this does not work at all, could somone help me thanks.





Hosted for free by InvisionFree