52 maybe, but maybe not, considering I'm not exactly using a low level api here and that code like that may make it easier to only draw the parts of the screen that actually changed......
On another note: I now have a simple grid class that I can use to "snap" things onto it and a way to draw lines that follow said grid. They don't go diagonal but instead first go horizontal from where you clicked to where your mouse is and then go vertically, which seems the most logical for what I'm going to use it for.
Also, this class makes it easy to get the size of a cell in various formats, because apparently someone decided that some things need a 64 bit float, while others work with a signed 32 bit integer and yet another thing work with an unsigned integer of "native" size. And this means that I actually need to store my cell size as a signed 8 bit integer, because that is one of the few things that can be casted to all of them.
Hooray!
I guess the next part is create the internal structure of the map and get it to render that.