SiegeLord / DAllegro5

D binding to the Allegro5 game development library
Other
42 stars 15 forks source link

ColorWrapper is binding where able, not wrapper #49

Closed SimonN closed 5 years ago

SimonN commented 5 years ago

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.

SiegeLord commented 5 years ago

Thanks and sorry for the delay!