Jolly Sunday, to you too,
what about some refactoring? I know metan is already taking look at it.
Nearly done, should be in git asap, please do not commit anything till it's done.
- Separate backends including GP_Backend.h (rationale: both Gfxprim
core, fonts and drawing are backend independent and should work even without one, i.e. drawing to a file)
Yes, that is done in the new layout.
- The same for Events. Does it make sense to put it together with
backends (is it backend dependent)?
Probably yes, it's generally possible to run SDL display and keyboard and use kernel input event api for touchscreen.
- Take all the drawing stuff from core/. Perhaps combine it with algo/
to drawing/ or something similar
Sure that is done too.
- Take fonts from core/, perhaps separately from draw/
Even this one should be satisfied now.
While there should be a single library as a result, I would propose completely separate Makefiles and output libraries for the "modules"
As it is now, the modules are compiled separately, but it links one big library after that. However this could be easily changed if we change our minds. The real advantage is directory structure and build system that are trully modular and easy hackable.
Also I've fixed the dependencies (as it was before every source was including GP.h and that was major point of the pain). Now GP.h includes subheader for each module and each module includes it's headers. Most of the code no just includes:
#include "GP_Core.h" #include "GP_$Self.h
I'll write a wiki page about the build system after it's done.
Expect the commit in a hour or so (after I clean up minor things).