Reasons why I did this instead of using the ones already posted here
1. This saves multi-sized image. The converters posted here only works with fixed sized images. PP256 supports variable sized images
2. This also saves an index of the frames for each tileset in support for multi-sized images and ease of loading for any API you choose.
3. Interface in using the tilesets (in FBGFX mode) is the same as when using pp256.
4. Loading tilesets and indexing them is easy. After loading you could just put the frames according to index. No messy calculations of offsets. Loader does that for you.
Download whole package here:
Code: Select all
'' relsoft 2006
'' loads the converted files and blits them using standard fbgfx commands
'' option explicit
'' Note: If you want me to make a loader for both OpenGL and SDL just shout!
#include once "fbgfx.bi"
#include once "pp256_image.bi"
dim as string bmp_file
dim as string pal_file
''Change this to whatever you'd want to load
bmp_file = "organic.bmp"
pal_file = "si.pal"
'' image data initializer see pp256_image.bi"
dim image as ImageType
image.init = @image_init
image.init( image )
'' load the tileset
image.m_filename = bmp_file
dim i as integer
i = int(rnd * (image.m_maxindex +1))