Fix half-pixel line widths/heights causing bad texture sampling
Fix half-pixel line widths/heights causing bad texture sampling

The real fix is the `floorf` on lines #L312 and #L329

Also removes unnecessary casts and adds better type declarations.

jhauberg/SHIZEN