I'm working on a game with lots of same-sized images.
In the BltizMaz 1.09 Demo, I referenced them as INTs and INT Arrays (as per the help-file). Here an example of this sort of thing:
Const NumTiles=254
Global gfxTile:Int[NumTiles]
BgndImage=LoadImage("Background.bmp")
DrawImage BgndImage,0,0
for g=1 to 10
gfxTile[g]=CreateImage(32,32)
GrabImage gfxTile[g],(g*40),10
DrawImage gfxTile[g],(g*40),200
next
It all works fine in the BlitzMax 1.09 Demo.
Will not compile in Retail version I just purchased!!! (BlitzMax version 1.14). I get errors about being unable to convert from INT to TIMAGE.
I tried the obivous thing -- to create an array of TIMAGEs instead of INTs, but it won't let me do that.
(ie: Global gfxTile:TImage[NumTiles] )
How can I make an Array to hold these images?
Is there some other type I should be using instead of INT (ie: LONG, FLOAT, or maybe Pointer?). In the past when I wrote similar games using C++ I would use an array of Pointers (or an array of Handles) to do this sort of thing...
Any help would be greatly appreciated.
In the BltizMaz 1.09 Demo, I referenced them as INTs and INT Arrays (as per the help-file). Here an example of this sort of thing:
Const NumTiles=254
Global gfxTile:Int[NumTiles]
BgndImage=LoadImage("Background.bmp")
DrawImage BgndImage,0,0
for g=1 to 10
gfxTile[g]=CreateImage(32,32)
GrabImage gfxTile[g],(g*40),10
DrawImage gfxTile[g],(g*40),200
next
It all works fine in the BlitzMax 1.09 Demo.
Will not compile in Retail version I just purchased!!! (BlitzMax version 1.14). I get errors about being unable to convert from INT to TIMAGE.
I tried the obivous thing -- to create an array of TIMAGEs instead of INTs, but it won't let me do that.
(ie: Global gfxTile:TImage[NumTiles] )
How can I make an Array to hold these images?
Is there some other type I should be using instead of INT (ie: LONG, FLOAT, or maybe Pointer?). In the past when I wrote similar games using C++ I would use an array of Pointers (or an array of Handles) to do this sort of thing...
Any help would be greatly appreciated.