layer modes: factor out some fix15 arithmetic
authorAndrew Chadwick <andrewc-git@piffle.org>
Wed, 31 Oct 2012 19:01:45 +0000 (19:01 +0000)
committerAndrew Chadwick <andrewc-git@piffle.org>
Wed, 31 Oct 2012 19:01:45 +0000 (19:01 +0000)
commit978dbb541d01bf128edebf4aa25046c7327c27ce
tree080c04345712018cb56a24ab4869097dc81adad4
parent7fe5c584595a347002fc0700620d3be25d463f2d
layer modes: factor out some fix15 arithmetic

This sort of code is much easier to understand and write without
bitshifts peppering everything. Use inlineable static functions and try
to standardise types and operator names initially; we can get clever
with macros and/or templates later if we need it.
lib/composite_rgbx.hpp
lib/fix15.hpp [new file with mode: 0644]