====== consts ====== dimensions:array[0..6] of string[3] = ('1x1','2x1','1x2','2x2','2x3','3x2','3x3'); dimframes:array[0..6] of byte = {1,2,2,4,6,6,9} for taking dimensions value from exe and changing it to number of tiles NrOfTilesets:byte = 27 check to see if the index start is valid. Should also check that the next entry is 28. After all, since no actual buildings can be added, this can stay hardcoded. labels:array[1..26] = { "Rock craters","Sand craters","Air crashes""Dead infantry","Vehicle tracks", "Walls","shroud","Concrete slab","Landscape","Spice bloom","House Palace", "Light Factory","Heavy Factory","Hi-Tech","House of IX","WOR", "Construction Yard","Barracks","Windtrap","Starport","Spice Refinery", "Repair Facility","Turret","Rocket Turret","Spice Silo","Radar Outpost" } Strings. Will probably only use the structure ones. FirstBuilding=11 LastBuilding=26 FirstTiles:array[1..10] = {6,6,6,6,6,75,16,3,81,2} Hardcoded number of tiles in the non-structure tilesets -> to be stored in tiles[] bldframes:array[11..26] = {2,4,6,6,2,2,2,2,2,8,8,8,8,8,2,4} The number of building frames used in each building. Has to be multiplied by the number of frames (taken from the dimframes array) -> to be stored in tiles[] WARNING - these are just the actual building animation frames, without buildup and rubble frames. So either adapt this array or make the program add two to this value to get the real number of frames. ==== vars ==== exeframes:array[11..26] of byte To store the building dimensions read from the exe file length:array[1..26] of byte For storing the number of tiles in each entry, so they can be stored in and retrieved from data[][] correctly as data[i][length[i]]. The range 1 to 10 is hardcoded in FirstTiles, and should simply be copied. The rest should be calculated from frames[i] and the building dimensions. modified:array[11..26] of boolean To store for which buildings the dimframes[exeframes[i]] * bldframes[i] does not equal length[i] data:array[1..26][0..255] of integer the actual array of tilesets and their frames to be written in the new icon.map. ======= program ======= either: -Read dimension values from the exe file -give default values in some sort of editor to modify -read a file to get the values (ICON.FND idea) -Read values #1 to #26, storing the differences in length[i]. Calculate length[26] from file size. -check if the value of #27 is 0 -Read values referenced at #1 to #10 right away, and store them in data[][]. -Read values referenced at #11 to #26, storing them in data[][] and checking which of the tilesets are not correctly sized according to the exe's dimension data. -??? -PROFIT!