Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Issue?] Two tilesets, one palette?
#16
(10-31-2022, 04:35 AM)megamarc Wrote: Hi!
You have to use the TLN_SetTilemapTile() function and set the corresponding tileset bits in Tile structure.
I assume that tilemap here has already been loaded and contains two tilesets, and that now you want to set tile at row 5, column 3 to index 100 of the second tileset. You'll do this:

Code:
Tile tile = {0};
tile.tileset = 1; /* use second tileset, first tileset has index 0 */
tile.index = 100; /* tile index 100 */
TLN_SetTilemapTile(tilemap, 5, 3, &tile);

Let me know!

This is pretty straightforward!
Also, with the multiple tilesets per tilemap support, I can emulate a slotted palette behavior. What I did is I made multiple copies of the TSX file, all TSXes uses the same and unique picture.
Then, on the Tilemap, I put tiles from tilesets depending on the palette I want to use. Finally, on the Tilengine side, I can modify the colors of each tileset's palette to get some kind of slotted palettes! Here is a demonstration as an attachment. It uses the same tileset picture.


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
[Issue?] Two tilesets, one palette? - by System64 - 10-28-2022, 04:07 AM
RE: [Issue?] Two tilesets, one palette? - by System64 - 10-31-2022, 11:22 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)