enhanced mapDrawing function

Couldn't test yet, codeblocks is giving compile errors in other .c files
and .h files which are correct, and the curious thing is, those files
were not touched since my last commit and they were compiling fine back
then. (not files under my team's responsibility) Will contact pawel on
this matter