makapuf / bitbox

The bitbox console (example, firmwares, doc)
http://bitboxconsole.blogspot.com
88 stars 13 forks source link

refactor libraries #71

Closed makapuf closed 7 years ago

makapuf commented 7 years ago

libraries should go in their own directories and maybe not in kernel. including libs in projects would imply adding them in makefile and not declaring any makefile magick. Also remove old chiptune code. would then allow more libs to be distributed in main project and simplify kernel directory

makapuf commented 7 years ago

also maybe let events be a simple library

lowagner commented 7 years ago

just make sure to put out a metastable release before we do anything crazy...

makapuf commented 7 years ago

sure, (well the idea is just to change a few paths and adapt slightly APIs, but the 0.1 branch will be "properly" maintained - as in, not completely forgotten)

I just now refrain from integrating interesting libs because of the current big lib directory mess (ahem tile16 ahem). splitting into useful libs + base kernel can be useful.

Also, versioning APIs and simplifying build process can be useful. not all needs to be automated by example.

Milestone 0.2 ideas welcomed ! just add issues.

makapuf commented 7 years ago

the smaller kernel could allow inclusion in projects, optionally allowing it to be released as part of the game for easier compatibility breaking changes (by example using submodules).

makapuf commented 7 years ago

namely, move :

lowagner commented 7 years ago

sounds good! what were you thinking of integrating from tile 16?

so you're thinking of having separate directories for each "category" of the current libs?

makapuf commented 7 years ago

well tile16 as a general tile/sprite engine could be useful ! I propose having one big lib dir for now, with preferably one .c and one .h per lib (with dc in .h and - maybe even one .h only) + maybe a script in /scripts (renamed /bin ?)

makapuf commented 7 years ago

also planning to integrate misc other libs from myself : .bmp / .tar loader, ..

makapuf commented 7 years ago

almost done for the refactoring in branch 0.2 , also modified a few libs (not much for now but work is still ongoing).

makapuf commented 7 years ago

going further, I guess it would be nice to have a subdir of /lib for each library with

by example : /lib/blitter/blitter.h and lib/blitter/example.c, /lib/blitter/tmx.py /lib/textmode/font2c.py /lib/textmode/font8x8.png, /lib/textmode/textmode.h /lib/chip/chip.h, /lib/chip/song2c.py

using them with

include "textmode/textmode.h"

...

any thoughts ?

lowagner commented 7 years ago

it might help to organize things. and when a new person comes in, they can understand what different scripts are for (at least within a category) -- which would be helpful.

makapuf commented 7 years ago

mostly done in branch 0.2