I have a lot of blocks and their position follow a 32*32 grid.
For each block I would like to know if there are other blocks around it : top, top right, right, bottom right, bottom, bottom left and so on.
So I can modify the current block and set the right graphic on it.
For example, if a block has no other block to its top, top right and right, it has a slope (it will be a sprite special frame, nothing more) from top left to bottom right.
The same way, if it doesn't have any blocks to its right, bottom right and under it, it will has a slope frop top right to bottom left :
I don't know how to test each block position regarding other ones. Any (efficient) idea ?