IMG2TILE : Creating unique tiles from bmp

More
2 weeks 5 days ago - 2 weeks 5 days ago #145 by ludojoey
IMG2TILE is a small utility I developed for a game project I am currently working on.

Its purpose is to convert a Micro-8 BMP image (a .BMP file along with its associated .PAL palette file) into a tile set that can be used by the graphics system.

The image is divided into 16×16 pixel tiles.
Whenever an identical tile is already present in the generated tile set, it is not added again.
At the same time, the program automatically generates the map containing the tile references required to reconstruct the original image.

The conversion produces two main files:
  • A .TLS file containing the generated tile set, intended to be loaded into the Micro-8 tile memory using:
    import(tlsFile,0x3000,0,0);
  • A .MAP file containing the tile layout, intended to be loaded into tile buffer A or B using:
    import(mapFile,0x2b00,512,0);
The palette used is the one from the original BMP image.
It must be loaded into the tile palette using:
import(palFile,0x1170,48);

The program also displays the generated tile set on screen, along with the index of each tile, making it easier to identify and use them.

Finally, IMG2TILE can also load and display a previously generated tile set.

For reference, a 400×240, 16-color Windows BMP image can be converted to the Micro-8 format (BMP + PAL) using the small utility BMPCONV.(  francksauer.com/index.php/forum/tips-tri...ading-bmp-in-micro-8 )

Note: Due to a minor bug in OS version 0.7.7, the computer may return to the prompt immediately after the program starts. If this happens, simply run the program again, or launch it from EDIT after recompiling it.
 
Last edit: 2 weeks 5 days ago by ludojoey.
The following user(s) said Thank You: Franck, Lenko

Please Log in or Create an account to join the conversation.

Time to create page: 0.135 seconds
Powered by Kunena Forum