If ColorWrapper is a binding, not a wrapper, then most systems do not
have to link against an unneeded addon allegro_color.
This does not change which versions get the MinGW calling convention.
It merely gives every other version cleaner bindings. Even though
it's not a pure refactoring (usercode will now call C functions
instead of D functions), it should not change any high-level
semantics or break usercode. Tested on DMD 32 Win, LDC 64 Win,
DMD 64 Linux, LDC 64 Linux.
Uses 'static if' instead of declaring version ALLEGRO_SUB.
Refactors all version checks into one file for DRY.
If ColorWrapper is a binding, not a wrapper, then most systems do not have to link against an unneeded addon allegro_color.
This does not change which versions get the MinGW calling convention. It merely gives every other version cleaner bindings. Even though it's not a pure refactoring (usercode will now call C functions instead of D functions), it should not change any high-level semantics or break usercode. Tested on DMD 32 Win, LDC 64 Win, DMD 64 Linux, LDC 64 Linux.
Uses 'static if' instead of declaring version ALLEGRO_SUB. Refactors all version checks into one file for DRY.