some cleanup. bugfix for linewise rendering: line_size is computed as
width * (bpp/8) so make sure for 16bpp to divide by 2, and 32bpp to
divide by 4. Fixes DOSBox segfault when asking Windows 95 to use SVGA
256-color modes.