var/X,Y // passed to the proc as args
// source coords.
var/tX,tY //used for temporary storage of values
//pulled out of a multi-dimensional list of X & Y coords, representing steps away from source coords
var/cX,cY //used in proc after this section
switch(dir)
if(NORTH)
cX= X+ tX
cY= Y+ tY
if(SOUTH)
cX= X- tX
cY= Y- tY
if(EAST)
cY= Y+ tX //0x,1y dirN = 1 step north, dirE = step east
cX= X+ tY
if(WEST)
cY= Y- tX
cX= X- tY
Problem description:
I haven't yet taken the time to figure out what the diagonals will be, and I don't mind having the switch() here, but is there an easier (efficiency being my only concern) method of doing this?