ID:2205563
 
(See the best response by Lummox JR.)
I know that the pixel version of get_step is bounds and obounds.

But none of those allow me to choose the dir. So how do I set a direction for obounds?

My game is almost ready and this is one of the only things left.
Best response
To do that, you just need a proc to get the offsets for you.

proc/obounds_dir(Ref, dir, size)
var/dx,dy
dx = (dir & EAST) ? size : ((dir & WEST) ? -size : 0)
dy = (dir & NORTH) ? size : ((dir & SOUTH) ? -size : 0)
return obounds(Ref, dx, dy)
I didn't get it at first, but I studied your code, adapted it to my project and it worked perfectly. Thanks Lummox.