world
map_format = ISOMETRIC_MAP
icon_size = 64
proc/Tile2Isometric(icon/i)
var/icon/isoTile = icon('Isometric.dmi',"Tile") // a 64x64 isometric tile
for(var/x = 1 to 32)for(var/y = 1 to 32)
var/dist = dist(16, 16, x, y)
if(dist)
isoTile.DrawBox(i.GetPixel(x,y), 32 + cos(arccos(16/dist) + 45), 16 + sin(arcsin(16/dist) + 45)) // Trying to rotate the icon by 45 degrees.
world<<"[32 + cos(arccos(16/dist) + 45)], [16 + sin(arcsin(16/dist) + 45)]" // Checking to see where it's placing the pixels
return isoTile
proc/dist(x1, y1, x2, y2)return sqrt((x2 - x1)^2 + (y2 - y1)^2)
mob/verb/test()
var x = 1, y = 1
for(var/r in icon_states('Tiles.dmi')) // 32x32 non-isometric tiles
var/icon/i = icon('Tiles.dmi', r)
var/obj/o = new
o.icon = Tile2Isometric(i)
o.loc = locate(x,y,1)
x++
return // This is here so I test it on one icon until I get it working so I can work quickly on making this work.
if(x > 10)
x = 1
y++
if(y > 10)
break
Problem description:
I can't get the pixels to place in the right place they all place in the same places. They all place at approximately 32,16
The only two outputs that display is "31.3385, 16.7499" and "0, 0" multiple times
Once I get this working I'm going to work on Seam Carving to shrink images while keeping the quality of the image.