diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 34e94a2..9d64ecf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ # Contributing to libmonochrome -libmonochrome is a finished project by PierrotLL, and has been adapted to be used as a static library. It aims a full compatibility with addins using the 2011 version, so modifying is not a good idea, and adding things to the source code may be inappropriate as it is a finished project. +libmonochrome is a finished project by PierrotLL, and has been adapted to be used as a static library. It aims a full compatibility with addins using the 2011 version, and is to be kept consistent, so keep that in mind if you want to add/modify things. -However, if you want to contribute to everything around it (like building or packaging stuff), your help is welcome :) +Perhaps the best way to start helping is to check the `TODO.md` file to see what needs to be done. diff --git a/Makefile.vars b/Makefile.vars index d757b94..d7d073d 100644 --- a/Makefile.vars +++ b/Makefile.vars @@ -19,7 +19,7 @@ OBJDIR = ./obj MANDIR = ./man # SOURCE FILES -SRC = ML_vram_adress \ +SRC = ML_vram_address \ ML_clear_vram ML_clear_screen ML_display_vram \ ML_set_contrast ML_get_contrast \ \ diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..a139d91 --- /dev/null +++ b/TODO.md @@ -0,0 +1,15 @@ +# libmonochrome - TODO +## Known bugs to correct +- `ML_bmp`: one of the AND functions doesn't work well ; +- `ML_get_contrast`: fix this. + +## To be done +- Integrate a text module ; +- Test other algorithms for full polygons ; +- Add an `ML_horizontal_scroll_area` function ; +- Add a function to draw lines with weight ; +- Integrate a bitmap converter for beginners ; +- Correct and enhance the documentation ; +- Comment the code. + +(most of this list comes from [PierrotLL](http://www.planet-casio.com/Fr/forums/topic9349-12--SDK--MonochromeLib---une-lib-graphique-monochrome.html#110434) himself) diff --git a/include/monochrome.h b/include/monochrome.h index 0b8e3ee..a1df810 100644 --- a/include/monochrome.h +++ b/include/monochrome.h @@ -39,7 +39,8 @@ typedef enum { ** Function prototypes */ -void* ML_vram_adress(); +# define ML_vram_adress() ML_vram_address() // those damn youth mistakes +void* ML_vram_address(); void ML_clear_vram(); void ML_clear_screen(); @@ -67,7 +68,7 @@ void ML_filled_circle(int x, int y, int radius, ML_Color color); void ML_ellipse(int x, int y, int radius1, int radius2, ML_Color color); void ML_ellipse_in_rect(int x1, int y1, int x2, int y2, ML_Color color); void ML_filled_ellipse(int x, int y, int radius1, int radius2, ML_Color color); -void ML_filled_ellipse_in_rect(int x, int y, int radius1, int radius2, ML_Color color); +void ML_filled_ellipse_in_rect(int x1, int y1, int x2, int y2, ML_Color color); void ML_horizontal_scroll(int scroll); void ML_vertical_scroll(int scroll); diff --git a/src/ML_background.c b/src/ML_background.c index 697ce2d..a6f0beb 100644 --- a/src/ML_background.c +++ b/src/ML_background.c @@ -24,18 +24,18 @@ void ML_background(const void *bmp, ML_Mode mode) switch (mode) { case ML_MAND: - for (; w < 256; w++, v++, b++) - *v &= *b; + for (; w < 256; w++) + *v++ &= *b++; break; case ML_MOR: - for (; w < 256; w++, v++, b++) - *v |= *b; + for (; w < 256; w++) + *v++ |= *b++; break; case ML_MXOR: - for (; w < 256; w++, v++, b++) - *v ^= *b; + for (; w < 256; w++) + *v++ ^= *b++; break; } } diff --git a/src/ML_vram_adress.c b/src/ML_vram_address.c similarity index 91% rename from src/ML_vram_adress.c rename to src/ML_vram_address.c index 9b7b245..b14b958 100644 --- a/src/ML_vram_adress.c +++ b/src/ML_vram_address.c @@ -1,6 +1,6 @@ /* ************************************************************************** */ /* */ -/* ML_vram_adress.c */ +/* ML_vram_address.c */ /* | Project : libmonochrome */ /* */ /* By: Pierre "PierrotLL" Le Gall */ @@ -14,7 +14,7 @@ typedef char*(*sc_cpv)(void); const unsigned int sc0135[] = {0xD201D002, 0x422B0009, 0x80010070, 0x0135}; -void* ML_vram_adress() +void* ML_vram_address() { return ((sc_cpv)sc0135)(); }