Jolly Sunday, good men,
what about some refactoring? I know metan is already taking look at it. Some thoughts:
* 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) * The same for Events. Does it make sense to put it together with backends (is it backend dependent)? * Take all the drawing stuff from core/. Perhaps combine it with algo/ to drawing/ or something similar * Take fonts from core/, perhaps separately from draw/
While there should be a single library as a result, I would propose completely separate Makefiles and output libraries for the "modules" -- this should speed up development (currently, I spend most of the time patching the broken/irrelevant code out of my branch while maintaining the ability to pull from master, "compilability" and reasonable prospect of merging back to master in the future. Loser me. How do you manage that?)
Tomas
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).