Fixed some code style and MSVC11 compilation.

I had to use a temp var and two c-casts to turn a float into a TileType.