Tiles from a larger image?

BlitzMax Forums/MaxGUI Module/Tiles from a larger image?

Jayjay(Posted 2009) [#1]
Once again, many thanks in advance for any help!

I am writing a map editor (who is not!) for 2d maps. The program uses MaxGUI. I have a main window open with a file menu. I want the user to choose an image to load (512 x 512). I then want to split this into 255 seperate 'tiles'. It seems that I will have to draw the total image onto a buffer and grab images from it. However, I do not want the user to see this...any ideas?


Htbaa(Posted 2009) [#2]
Can't you use LoadAnimImage() for this?


Brucey(Posted 2009) [#3]
Can't you use PixmapWindow() to specify a part of a loaded pixmap?


tonyg(Posted 2009) [#4]
Can you use some of the drawimagearea (or drawimagerect) examples from the code archives?


Yan(Posted 2009) [#5]
LOL.

LoadAnimImage() is by far the easiest method.


tonyg(Posted 2009) [#6]
... that is true although a single texture can be quicker and less of a resource hog. Depends what's best in this case.


thalamus(Posted 2009) [#7]
Can't you use FishEd? :)


SebHoll(Posted 2009) [#8]
The PixmapFromIconStrip() function is designed to return individual icon pixmaps from an icon-strip which has been previously loaded using LoadIconStrip(). All the icons would have to be on the same row though.