Hi Folks,
I am trying to recreate a basic function of Mosaic - in C - that doesn't choke on large files - due to being a 32-bit program.
I noticed the MAP FILES used by TSRE are very convenient - as they color different aspects of the map in unique colors. Primary Roads, Secondary Roads, Water, Crop Fields, Buildings, Forests are all clearly defined. This makes it extremely easy to [SELECT] these items via any graphics program and apply textures to them.
I want 1024 Terrtex so I resized the maps to 16,384 x 16,384 pixels (a tile has 256 patches - 16x16) - a pretty large graphic image by any standards - then textured same. Since the shapes on the map have no antialias and have large "jaggies" - you need to be familiar with editing your selection in your paint program (smooth, expand, contract, antialias, feather).


I have my C program dicing up my saved image into 256 (1024x1024) patches via ImageMagick - works great.
My issue - is converting the map image name to the hex needed for the patch names. Everything I've tried fails. TSRE clearly knows how to associate the map image on the left with the hex name on the right. I realize the map name is - kind of - the coordinates of the tile.
I can easily create the required ACE files from patches using AceIt.
Then I need to edit the Tiles.
I think I can uncompress the Tiles (*.t) via zlib.
Regards,
Scott
I am trying to recreate a basic function of Mosaic - in C - that doesn't choke on large files - due to being a 32-bit program.
I noticed the MAP FILES used by TSRE are very convenient - as they color different aspects of the map in unique colors. Primary Roads, Secondary Roads, Water, Crop Fields, Buildings, Forests are all clearly defined. This makes it extremely easy to [SELECT] these items via any graphics program and apply textures to them.
I want 1024 Terrtex so I resized the maps to 16,384 x 16,384 pixels (a tile has 256 patches - 16x16) - a pretty large graphic image by any standards - then textured same. Since the shapes on the map have no antialias and have large "jaggies" - you need to be familiar with editing your selection in your paint program (smooth, expand, contract, antialias, feather).


I have my C program dicing up my saved image into 256 (1024x1024) patches via ImageMagick - works great.
My issue - is converting the map image name to the hex needed for the patch names. Everything I've tried fails. TSRE clearly knows how to associate the map image on the left with the hex name on the right. I realize the map name is - kind of - the coordinates of the tile.
- -110214358.png → expected: 04bea74c
- -110214363.png → expected: 04bea480
- -110174365.png → expected: 04bea530
- -109954388.png → expected: 04bbc26c
- -109894401.png → expected: 04bb3bb0
I can easily create the required ACE files from patches using AceIt.
Then I need to edit the Tiles.
I think I can uncompress the Tiles (*.t) via zlib.
Regards,
Scott











Comment