MACRO-ize a bunch of redundant code blocks; fix 16-bit RGB modes (it's