From 3e52e2507d2868733763d08cb5db89f2098a77d6 Mon Sep 17 00:00:00 2001 From: Thomas Touhey Date: Mon, 18 Jul 2016 14:17:23 +0200 Subject: [PATCH] Using a2x for manpages now, still adjustments to come --- .gitignore | 1 + Makefile | 49 +++++++++--- Makefile.vars | 33 ++++---- doc/ML_VRAM.3.txt | 44 +++++++++++ doc/ML_bmp.3.txt | 70 +++++++++++++++++ doc/ML_circle.3.txt | 33 ++++++++ man/man3/ml_color.3 => doc/ML_color.3.txt | 38 ++++++---- doc/ML_contrast.3.txt | 33 ++++++++ doc/ML_ellipse.3.txt | 37 +++++++++ doc/ML_line.3.txt | 38 ++++++++++ doc/ML_pixel.3.txt | 34 +++++++++ doc/ML_point.3.txt | 30 ++++++++ doc/ML_polygon.3.txt | 36 +++++++++ doc/ML_rectangle.3.txt | 32 ++++++++ doc/ML_scroll.3.txt | 35 +++++++++ doc/libmonochrome.3.txt | 43 +++++++++++ man/man3/ML_VRAM.3 | 59 +++++++++++++++ man/man3/ML_bmp.3 | 91 +++++++++++++++++++++++ man/man3/ML_circle.3 | 53 +++++++++++++ man/man3/ML_color.3 | 60 +++++++++++++++ man/man3/ML_contrast.3 | 54 ++++++++++++++ man/man3/ML_ellipse.3 | 57 ++++++++++++++ man/man3/ML_line.3 | 57 ++++++++++++++ man/man3/ML_pixel.3 | 53 +++++++++++++ man/man3/ML_point.3 | 50 +++++++++++++ man/man3/ML_polygon.3 | 53 +++++++++++++ man/man3/ML_rectangle.3 | 52 +++++++++++++ man/man3/ML_scroll.3 | 53 +++++++++++++ man/man3/libmonochrome.3 | 85 +++++++++++++-------- man/man3/ml_bmp.3 | 58 --------------- man/man3/ml_bmp_16_and.3 | 1 - man/man3/ml_bmp_16_and_cl.3 | 1 - man/man3/ml_bmp_16_or.3 | 1 - man/man3/ml_bmp_16_or_cl.3 | 1 - man/man3/ml_bmp_16_xor.3 | 1 - man/man3/ml_bmp_16_xor_cl.3 | 1 - man/man3/ml_bmp_8_and.3 | 1 - man/man3/ml_bmp_8_and_cl.3 | 1 - man/man3/ml_bmp_8_or.3 | 1 - man/man3/ml_bmp_8_or_cl.3 | 1 - man/man3/ml_bmp_8_xor.3 | 1 - man/man3/ml_bmp_8_xor_cl.3 | 1 - man/man3/ml_bmp_and.3 | 1 - man/man3/ml_bmp_and_cl.3 | 1 - man/man3/ml_bmp_or.3 | 1 - man/man3/ml_bmp_or_cl.3 | 1 - man/man3/ml_bmp_xor.3 | 1 - man/man3/ml_bmp_xor_cl.3 | 1 - man/man3/ml_circle.3 | 21 ------ man/man3/ml_clear_screen.3 | 1 - man/man3/ml_clear_vram.3 | 1 - man/man3/ml_contrast.3 | 25 ------- man/man3/ml_display_vram.3 | 1 - man/man3/ml_ellipse.3 | 25 ------- man/man3/ml_ellipse_in_rect.3 | 1 - man/man3/ml_filled_circle.3 | 1 - man/man3/ml_filled_ellipse.3 | 1 - man/man3/ml_filled_ellipse_in_rect.3 | 1 - man/man3/ml_filled_polygon.3 | 1 - man/man3/ml_get_contrast.3 | 1 - man/man3/ml_horizontal_line.3 | 1 - man/man3/ml_horizontal_scroll.3 | 1 - man/man3/ml_line.3 | 25 ------- man/man3/ml_pixel.3 | 23 ------ man/man3/ml_pixel_test.3 | 1 - man/man3/ml_point.3 | 19 ----- man/man3/ml_polygon.3 | 21 ------ man/man3/ml_rectangle.3 | 19 ----- man/man3/ml_screen.3 | 1 - man/man3/ml_scroll.3 | 23 ------ man/man3/ml_set_contrast.3 | 1 - man/man3/ml_vertical_line.3 | 1 - man/man3/ml_vertical_scroll.3 | 1 - man/man3/ml_vram.3 | 29 -------- man/man3/ml_vram_adress.3 | 1 - src/ML_bmp.c | 4 +- 76 files changed, 1292 insertions(+), 398 deletions(-) create mode 100644 doc/ML_VRAM.3.txt create mode 100644 doc/ML_bmp.3.txt create mode 100644 doc/ML_circle.3.txt rename man/man3/ml_color.3 => doc/ML_color.3.txt (57%) create mode 100644 doc/ML_contrast.3.txt create mode 100644 doc/ML_ellipse.3.txt create mode 100644 doc/ML_line.3.txt create mode 100644 doc/ML_pixel.3.txt create mode 100644 doc/ML_point.3.txt create mode 100644 doc/ML_polygon.3.txt create mode 100644 doc/ML_rectangle.3.txt create mode 100644 doc/ML_scroll.3.txt create mode 100644 doc/libmonochrome.3.txt create mode 100644 man/man3/ML_VRAM.3 create mode 100644 man/man3/ML_bmp.3 create mode 100644 man/man3/ML_circle.3 create mode 100644 man/man3/ML_color.3 create mode 100644 man/man3/ML_contrast.3 create mode 100644 man/man3/ML_ellipse.3 create mode 100644 man/man3/ML_line.3 create mode 100644 man/man3/ML_pixel.3 create mode 100644 man/man3/ML_point.3 create mode 100644 man/man3/ML_polygon.3 create mode 100644 man/man3/ML_rectangle.3 create mode 100644 man/man3/ML_scroll.3 delete mode 100644 man/man3/ml_bmp.3 delete mode 120000 man/man3/ml_bmp_16_and.3 delete mode 120000 man/man3/ml_bmp_16_and_cl.3 delete mode 120000 man/man3/ml_bmp_16_or.3 delete mode 120000 man/man3/ml_bmp_16_or_cl.3 delete mode 120000 man/man3/ml_bmp_16_xor.3 delete mode 120000 man/man3/ml_bmp_16_xor_cl.3 delete mode 120000 man/man3/ml_bmp_8_and.3 delete mode 120000 man/man3/ml_bmp_8_and_cl.3 delete mode 120000 man/man3/ml_bmp_8_or.3 delete mode 120000 man/man3/ml_bmp_8_or_cl.3 delete mode 120000 man/man3/ml_bmp_8_xor.3 delete mode 120000 man/man3/ml_bmp_8_xor_cl.3 delete mode 120000 man/man3/ml_bmp_and.3 delete mode 120000 man/man3/ml_bmp_and_cl.3 delete mode 120000 man/man3/ml_bmp_or.3 delete mode 120000 man/man3/ml_bmp_or_cl.3 delete mode 120000 man/man3/ml_bmp_xor.3 delete mode 120000 man/man3/ml_bmp_xor_cl.3 delete mode 100644 man/man3/ml_circle.3 delete mode 120000 man/man3/ml_clear_screen.3 delete mode 120000 man/man3/ml_clear_vram.3 delete mode 100644 man/man3/ml_contrast.3 delete mode 120000 man/man3/ml_display_vram.3 delete mode 100644 man/man3/ml_ellipse.3 delete mode 120000 man/man3/ml_ellipse_in_rect.3 delete mode 120000 man/man3/ml_filled_circle.3 delete mode 120000 man/man3/ml_filled_ellipse.3 delete mode 120000 man/man3/ml_filled_ellipse_in_rect.3 delete mode 120000 man/man3/ml_filled_polygon.3 delete mode 120000 man/man3/ml_get_contrast.3 delete mode 120000 man/man3/ml_horizontal_line.3 delete mode 120000 man/man3/ml_horizontal_scroll.3 delete mode 100644 man/man3/ml_line.3 delete mode 100644 man/man3/ml_pixel.3 delete mode 120000 man/man3/ml_pixel_test.3 delete mode 100644 man/man3/ml_point.3 delete mode 100644 man/man3/ml_polygon.3 delete mode 100644 man/man3/ml_rectangle.3 delete mode 120000 man/man3/ml_screen.3 delete mode 100644 man/man3/ml_scroll.3 delete mode 120000 man/man3/ml_set_contrast.3 delete mode 120000 man/man3/ml_vertical_line.3 delete mode 120000 man/man3/ml_vertical_scroll.3 delete mode 100644 man/man3/ml_vram.3 delete mode 120000 man/man3/ml_vram_adress.3 diff --git a/.gitignore b/.gitignore index e1345ef..73aac0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /Makefile.cfg /obj /libmonochrome.a +/man diff --git a/Makefile b/Makefile index d203b8e..83237bb 100644 --- a/Makefile +++ b/Makefile @@ -22,43 +22,74 @@ define \n endef # RULES -## Make everything (default) +## General +## - Make everything (default) all: lib$(NAME).a -## Make the object directory +## Library related +## - Make the object directory $(OBJDIR): - $(MKDIR) $@ + $(MD) $@ -## Make an object file out of a C source file +## - Make an object file out of a C source file $(OBJDIR)/%.o: $(SRCDIR)/%.c $(ALLINC) $(CC) -c -o $@ $< $(CFLAGS) -## Make the library +## - Make the library lib$(NAME).a: $(OBJDIR) $(ALLOBJ) $(AR) rc $@ $(ALLOBJ) $(RANLIB) $@ -## Clean the object files +## - Clean the object files clean: $(RM) $(ALLOBJ) -## Clean the object files and the binary +## - Clean the object files and the binary fclean: clean $(RM) lib$(NAME).a -## Remake the project +## - Remake the library re: fclean all -## Install project +## - Install library and includes install: $(INST) -D -m 644 lib$(NAME).a $(ILIBDIR)/lib$(NAME).a $(foreach inc, $(INCPUB), \ $(INST) -D -m 644 $(INCDIR)/$(inc).h $(IINCDIR)/$(inc).h$(\n)) + +## Documentation related +## - Make man directories +define make-mandir-rule +$(MANDIR)/man$1: + $(MD) $$@ +endef +$(foreach section,$(MAN_SECTS), \ +$(eval $(call make-mandir-rule,$(section)))) + +## - Make-A-Manpage +define make-manpage-rule +$(MANDIR)/man$1/$2.$1: $(DOCDIR)/$2.$1.txt | $(MANDIR)/man$1 + $(A2X) -f manpage -D $$| $$< +endef +$(foreach section,$(MAN_SECTS), \ +$(foreach page,$(MAN_$(section)), \ +$(eval $(call make-manpage-rule,$(section),$(page))))) + +## - Make all manpages +all-doc: $(foreach section,$(MAN_SECTS),$(MAN_$(section):%=$(MANDIR)/man$(section)/%.$(section))) + +## - Clean all manpages +clean-doc: + $(RM) $(foreach section,$(MAN_SECTS),$(MAN_$(section):%=$(MANDIR)/man$(section)/%.$(section))) + +## Install doc +install-doc: $(foreach man, $(MAN), \ $(INST) -D -m 644 $(MANDIR)/$(man) $(IMANDIR)/$(man)$(\n)) $(GZIP) $(MAN:%=$(IMANDIR)/%) ## Doz rulz are phunny .PHONY: all clean fclean re install +.PHONY: all-doc install-doc # END OF FILE diff --git a/Makefile.vars b/Makefile.vars index 6d501af..8ee9a1d 100644 --- a/Makefile.vars +++ b/Makefile.vars @@ -13,9 +13,15 @@ NAME = monochrome VERSION = 1.1 # PROJECT DIRECTORIES +# - Includes directory INCDIR = ./include +# - Sources directory SRCDIR = ./src +# - Objects directory OBJDIR = ./obj +# - Documentation directory +DOCDIR = ./doc +# - Manpages directory MANDIR = ./man # SOURCE FILES @@ -39,21 +45,14 @@ INCPUB = monochrome INCINT = monochrome/internals # MANPAGES -MAN3 = ml_bmp ml_bmp_8_and ml_bmp_8_or ml_bmp_8_xor \ - ml_bmp_8_and_cl ml_bmp_8_or_cl ml_bmp_8_xor_cl \ - ml_bmp_16_and ml_bmp_16_or ml_bmp_16_xor \ - ml_bmp_16_and_cl ml_bmp_16_or_cl ml_bmp_16_xor_cl \ - ml_bmp_and ml_bmp_or ml_bmp_xor \ - ml_bmp_and_cl ml_bmp_or_cl ml_bmp_xor_cl \ - ml_line ml_horizontal_line ml_vertical_line \ - ml_circle ml_filled_circle \ - ml_ellipse ml_filled_ellipse \ - ml_ellipse_in_rect ml_filled_ellipse_in_rect \ - ml_polygon ml_filled_polygon \ - ml_scroll ml_vertical_scroll ml_horizontal_scroll \ - ml_vram ml_vram_adress ml_clear_screen ml_clear_vram \ - ml_display_vram ml_contrast ml_get_contrast ml_set_contrast -MAN = $(MAN3:%=man3/%.3) +## SECTIONS +MAN_SECTS = 3 +## SECTIONS CONTENT +## - Third +MAN_3 = libmonochrome ML_bmp ML_circle ML_color \ + ML_contrast ML_ellipse ML_line ML_pixel \ + ML_point ML_polygon ML_rectangle ML_scroll \ + ML_VRAM # BIN UTILITIES ## Platform @@ -67,11 +66,13 @@ AR = $(PLATFORM)ar ## Ranlib RANLIB = $(PLATFORM)ranlib ## Directory creator -MKDIR = mkdir -p +MD = mkdir -p ## File remover RM = rm -f ## Compressor GZIP = gzip -f +## Documentation maker +A2X = a2x ## Installer INST = /usr/bin/install diff --git a/doc/ML_VRAM.3.txt b/doc/ML_VRAM.3.txt new file mode 100644 index 0000000..9f0664d --- /dev/null +++ b/doc/ML_VRAM.3.txt @@ -0,0 +1,44 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_VRAM(3) +========== + +NAME +---- +ML_VRAM - Video RAM and Display Driver management functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +char* ML_vram_address(); +void ML_clear_vram(); +void ML_clear_screen(); +void ML_display_vram(); +---- + +DESCRIPTION +----------- +libmonochrome uses natively a double-buffering technique : the user program +draws on a working space, the VRAM, and when he finished drawing the frame, +this frame is sent to the Display Driver so it can appear on the screen. + +ML_vram_adress is a system call that returns the address of the VRAM allocated +by the system. It is mainly meant for internal purposes, but if you want to use +the VRAM directly, you can use it. + +ML_clear_screen sends a bunch of zeros to the Display Driver so the screen +content gets erased, but the VRAM stays as it is. ML_clear_vram does the +opposite : it clears the VRAM content while leaving the screen's one. + +ML_display_vram sends the VRAM content to the Display Driver, so it can appear +on the screen. + +SEE ALSO +-------- +libmonochrome(3) diff --git a/doc/ML_bmp.3.txt b/doc/ML_bmp.3.txt new file mode 100644 index 0000000..75df672 --- /dev/null +++ b/doc/ML_bmp.3.txt @@ -0,0 +1,70 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_BMP(3) +========= + +NAME +---- +ML_bmp - BMP drawing functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_bmp_or(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_and(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_xor(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_or_cl(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_and_cl(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_xor_cl(const unsigned char *bmp, + int x, int y, int width, int height); + +void ML_bmp_8_or(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_and(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_xor(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_or_cl(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_and_cl(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_xor_cl(const unsigned char *bmp, + int x, int y); + +void ML_bmp_16_or(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_and(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_xor(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_or_cl(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_and_cl(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_xor_cl(const unsigned short *bmp, + int x, int y); +---- + +DESCRIPTION +----------- +Those functions are meant to draw monochrome with fill bits bitmaps -- like game sprites -- on the VRAM. + +Functions starting with the ML_bmp_8 draw 8*8 bitmaps. Functions starting with ML_bmp_16 draw 16*16 bitmaps. All other images must be drawn with the the other functions. + +Function with the _cl suffix are functions using clipping, which means they are able to draw sprites even if they aren't completely on screen. Other functions only draw the bitmap if it is in the screen -- which makes them a little faster. + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3) diff --git a/doc/ML_circle.3.txt b/doc/ML_circle.3.txt new file mode 100644 index 0000000..8e1caec --- /dev/null +++ b/doc/ML_circle.3.txt @@ -0,0 +1,33 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_CIRCLE(3) +============ + +NAME +---- +ML_circle - Circles drawing functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_circle(int x, int y, int radius, + ML_Color color); +void ML_filled_circle(int x, int y, + int radius, ML_Color color); +---- + +DESCRIPTION +----------- +Those functions draw a circle on the VRAM. + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3), +ML_Color(3) diff --git a/man/man3/ml_color.3 b/doc/ML_color.3.txt similarity index 57% rename from man/man3/ml_color.3 rename to doc/ML_color.3.txt index 6c331bb..8014428 100644 --- a/man/man3/ml_color.3 +++ b/doc/ML_color.3.txt @@ -1,11 +1,20 @@ -.TH ML_Color 3 -.SH NAME -ML_Color - Colors from libmonochrome +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome -.SH SYNOPSIS -.B #include -.in n -.nf +ML_COLOR(3) +=========== + +NAME +---- +ML_color - Colors from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include typedef enum { ML_TRANSPARENT = -1, @@ -14,18 +23,17 @@ typedef enum { ML_XOR, ML_CHECKER } ML_Color; -.fi +---- -.SH DESCRIPTION +DESCRIPTION +----------- ML_Color is an enumeration of the different colors used by libmonochrome. ML_XOR reverses the color of drawn-on pixels in the VRAM. ML_CHECKER is a "checker" color. It renders a pixel white or black according to the following rule : if (x and y are even) or (x and y are odd), then the pixel becomes black, otherwise it becomes white. -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3) diff --git a/doc/ML_contrast.3.txt b/doc/ML_contrast.3.txt new file mode 100644 index 0000000..1202645 --- /dev/null +++ b/doc/ML_contrast.3.txt @@ -0,0 +1,33 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_CONTRAST(3) +============== + +NAME +---- +ML_contrast - Screen contrast setting functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include +#define ML_CONTRAST_MIN 130 +#define ML_CONTRAST_NORMAL 168 +#define ML_CONTRAST_MAX 190 + +void ML_set_contrast(unsigned char contrast); +unsigned char ML_get_contrast(); +---- + +DESCRIPTION +----------- +Those functions set the contrast of the screen. This contrast must be greater +than ML_CONTRAST_MIN and lesser then ML_CONTRAST_MAX. + +SEE ALSO +-------- +libmonochrome(3) diff --git a/doc/ML_ellipse.3.txt b/doc/ML_ellipse.3.txt new file mode 100644 index 0000000..f35f1ea --- /dev/null +++ b/doc/ML_ellipse.3.txt @@ -0,0 +1,37 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_ELLIPSE(3) +============= + +NAME +---- +ML_ellipse - Ellipses drawing functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_ellipse(int x, int y, int radius1, + int radius2, ML_Color color); +void ML_filled_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_in_rect(int x, int y, + int radius1, int radius2, ML_Color color); +---- + +DESCRIPTION +----------- +These functions draw an ellipse in the VRAM. + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3), +ML_Color(3) diff --git a/doc/ML_line.3.txt b/doc/ML_line.3.txt new file mode 100644 index 0000000..a50cebd --- /dev/null +++ b/doc/ML_line.3.txt @@ -0,0 +1,38 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_LINE(3) +========== + +NAME +---- +ML_line - Line drawing functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_line(int x1, int y1, int x2, + int y2, ML_Color color); +void ML_horizontal_line(int y, int x1, + int x2, ML_Color color); +void ML_vertical_line(int x, int y1, + int y2, ML_Color color); +---- + +DESCRIPTION +----------- +These functions draw lines on the VRAM. + +For horizontal line drawing, the ML_horizontal_line function is faster than +ML_line, which has a general algorithm (the Bresenham algorithm). + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3), +ML_Color(3) diff --git a/doc/ML_pixel.3.txt b/doc/ML_pixel.3.txt new file mode 100644 index 0000000..5f4cc19 --- /dev/null +++ b/doc/ML_pixel.3.txt @@ -0,0 +1,34 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_PIXEL(3) +=========== + +NAME +---- +ML_pixel - Pixel setting and testing functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_pixel(int x, int y, ML_Color color); +ML_Color ML_pixel_test(int x, int y); +---- + +DESCRIPTION +----------- +Sets or test (get) a pixel's state/color. + +For ML_pixel_test, if the asked pixel is out of the screen, the returned color +will be ML_TRANSPARENT. + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3), +ML_Color(3) diff --git a/doc/ML_point.3.txt b/doc/ML_point.3.txt new file mode 100644 index 0000000..561157c --- /dev/null +++ b/doc/ML_point.3.txt @@ -0,0 +1,30 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_POINT(3) +=========== + +NAME +---- +ML_point - Point drawing function from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_point(int x, int y, int width, ML_Color color); +---- + +DESCRIPTION +----------- +Draws a (square) point on the VRAM. + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3), +ML_Color(3) diff --git a/doc/ML_polygon.3.txt b/doc/ML_polygon.3.txt new file mode 100644 index 0000000..eb8cad9 --- /dev/null +++ b/doc/ML_polygon.3.txt @@ -0,0 +1,36 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_POLYGON(3) +============= + +NAME +---- +ML_polygon - Polygon drawing functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_polygon(const int *x, const int *y, + int nb_vertices, ML_Color color); +void ML_filled_polygon(const int *x, const int *y, + int nb_vertices, ML_Color color); +---- + +DESCRIPTION +----------- +Draws a polygon on the VRAM. This function needs as parameter 2 arrays, +containing abscissa and ordinates of the polygon vertices. Parameter nb_vertices +should be the number of data to read in arrays. This function draws a line +between each vertices in the polygon. + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3), +ML_Color(3) diff --git a/doc/ML_rectangle.3.txt b/doc/ML_rectangle.3.txt new file mode 100644 index 0000000..b6f86eb --- /dev/null +++ b/doc/ML_rectangle.3.txt @@ -0,0 +1,32 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_RECTANGLE(3) +=============== + +NAME +---- +ML_rectangle - Rectangle drawing function from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_rectangle(int x1, int y1, int x2, int y2, + int border_width, ML_Color border_color, + ML_Color fill_color); +---- + +DESCRIPTION +----------- +Draws a rectangle with or without border on the VRAM. + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3), +ML_Color(3) diff --git a/doc/ML_scroll.3.txt b/doc/ML_scroll.3.txt new file mode 100644 index 0000000..aa1b207 --- /dev/null +++ b/doc/ML_scroll.3.txt @@ -0,0 +1,35 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +ML_SCROLL(3) +============ + +NAME +---- +ML_scroll - VRAM scrolling functions from libmonochrome + +SYNOPSIS +-------- +[source,c] +---- +#include + +void ML_horizontal_scroll(int scroll); +void ML_vertical_scroll(int scroll); +---- + +DESCRIPTION +----------- +Shifts all the pixels of the VRAM from left to right or from top to bottom. +If scroll's value is negative, the pixels will be shifted from right to left +or from bottom to top. + +When pixels reach screen boundaries, they are moved to the other side. + +SEE ALSO +-------- +libmonochrome(3), +ML_VRAM(3), +ML_Color(3) diff --git a/doc/libmonochrome.3.txt b/doc/libmonochrome.3.txt new file mode 100644 index 0000000..378cdba --- /dev/null +++ b/doc/libmonochrome.3.txt @@ -0,0 +1,43 @@ +:Author: Thomas "Cakeisalie5" Touhey +:Email: thomas@touhey.fr +:man source: libmonochrome +:man manual: libmonochrome + +LIBMONOCHROME(3) +================ + +NAME +---- +libmonochrome - fast and efficient drawing library for CASIO monochrome calculators + +SYNOPSIS +-------- +[source,c] +---- +#include + +ML_clear_vram(); +ML_line(0, 0, 127, 63); +ML_line(127, 0, 0, 63); +ML_display_vram(); +---- + +DESCRIPTION +----------- +libmonochrome provides tools to work with the VRAM and the Display Driver. + + +SEE ALSO +-------- +ML_vram(3), +ML_contrast(3), +ML_Color(3), +ML_pixel(3), +ML_point(3), +ML_line(3), +ML_rectangle(3), +ML_polygon(3), +ML_circle(3), +ML_ellipse(3), +ML_scroll(3), +ML_bmp(3) diff --git a/man/man3/ML_VRAM.3 b/man/man3/ML_VRAM.3 new file mode 100644 index 0000000..1d523a1 --- /dev/null +++ b/man/man3/ML_VRAM.3 @@ -0,0 +1,59 @@ +'\" t +.\" Title: ml_vram +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_VRAM" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_VRAM \- Video RAM and Display Driver management functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +char* ML_vram_address(); +void ML_clear_vram(); +void ML_clear_screen(); +void ML_display_vram(); +.fi +.SH "DESCRIPTION" +.sp +libmonochrome uses natively a double\-buffering technique : the user program draws on a working space, the VRAM, and when he finished drawing the frame, this frame is sent to the Display Driver so it can appear on the screen\&. +.sp +ML_vram_adress is a system call that returns the address of the VRAM allocated by the system\&. It is mainly meant for internal purposes, but if you want to use the VRAM directly, you can use it\&. +.sp +ML_clear_screen sends a bunch of zeros to the Display Driver so the screen content gets erased, but the VRAM stays as it is\&. ML_clear_vram does the opposite : it clears the VRAM content while leaving the screen\(cqs one\&. +.sp +ML_display_vram sends the VRAM content to the Display Driver, so it can appear on the screen\&. +.SH "SEE ALSO" +.sp +libmonochrome(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_bmp.3 b/man/man3/ML_bmp.3 new file mode 100644 index 0000000..d615784 --- /dev/null +++ b/man/man3/ML_bmp.3 @@ -0,0 +1,91 @@ +'\" t +.\" Title: ml_bmp +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_BMP" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_bmp \- BMP drawing functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_bmp_or(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_and(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_xor(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_or_cl(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_and_cl(const unsigned char *bmp, + int x, int y, int width, int height); +void ML_bmp_xor_cl(const unsigned char *bmp, + int x, int y, int width, int height); + +void ML_bmp_8_or(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_and(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_xor(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_or_cl(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_and_cl(const unsigned char *bmp, + int x, int y); +void ML_bmp_8_xor_cl(const unsigned char *bmp, + int x, int y); + +void ML_bmp_16_or(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_and(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_xor(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_or_cl(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_and_cl(const unsigned short *bmp, + int x, int y); +void ML_bmp_16_xor_cl(const unsigned short *bmp, + int x, int y); +.fi +.SH "DESCRIPTION" +.sp +Those functions are meant to draw monochrome with fill bits bitmaps \(em like game sprites \(em on the VRAM\&. +.sp +Functions starting with the ML_bmp_8 draw 8*8 bitmaps\&. Functions starting with ML_bmp_16 draw 16*16 bitmaps\&. All other images must be drawn with the the other functions\&. +.sp +Function with the _cl suffix are functions using clipping, which means they are able to draw sprites even if they aren\(cqt completely on screen\&. Other functions only draw the bitmap if it is in the screen \(em which makes them a little faster\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_circle.3 b/man/man3/ML_circle.3 new file mode 100644 index 0000000..af307ac --- /dev/null +++ b/man/man3/ML_circle.3 @@ -0,0 +1,53 @@ +'\" t +.\" Title: ml_circle +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_CIRCLE" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_circle \- Circles drawing functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_circle(int x, int y, int radius, + ML_Color color); +void ML_filled_circle(int x, int y, + int radius, ML_Color color); +.fi +.SH "DESCRIPTION" +.sp +Those functions draw a circle on the VRAM\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3), ML_Color(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_color.3 b/man/man3/ML_color.3 new file mode 100644 index 0000000..e965dce --- /dev/null +++ b/man/man3/ML_color.3 @@ -0,0 +1,60 @@ +'\" t +.\" Title: ml_color +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_COLOR" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_color \- Colors from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +typedef enum { + ML_TRANSPARENT = \-1, + ML_WHITE, + ML_BLACK, + ML_XOR, + ML_CHECKER +} ML_Color; +.fi +.SH "DESCRIPTION" +.sp +ML_Color is an enumeration of the different colors used by libmonochrome\&. +.sp +ML_XOR reverses the color of drawn\-on pixels in the VRAM\&. +.sp +ML_CHECKER is a "checker" color\&. It renders a pixel white or black according to the following rule : if (x and y are even) or (x and y are odd), then the pixel becomes black, otherwise it becomes white\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_contrast.3 b/man/man3/ML_contrast.3 new file mode 100644 index 0000000..46de936 --- /dev/null +++ b/man/man3/ML_contrast.3 @@ -0,0 +1,54 @@ +'\" t +.\" Title: ml_contrast +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_CONTRAST" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_contrast \- Screen contrast setting functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include +#define ML_CONTRAST_MIN 130 +#define ML_CONTRAST_NORMAL 168 +#define ML_CONTRAST_MAX 190 + +void ML_set_contrast(unsigned char contrast); +unsigned char ML_get_contrast(); +.fi +.SH "DESCRIPTION" +.sp +Those functions set the contrast of the screen\&. This contrast must be greater than ML_CONTRAST_MIN and lesser then ML_CONTRAST_MAX\&. +.SH "SEE ALSO" +.sp +libmonochrome(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_ellipse.3 b/man/man3/ML_ellipse.3 new file mode 100644 index 0000000..a1fc355 --- /dev/null +++ b/man/man3/ML_ellipse.3 @@ -0,0 +1,57 @@ +'\" t +.\" Title: ml_ellipse +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_ELLIPSE" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_ellipse \- Ellipses drawing functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_ellipse(int x, int y, int radius1, + int radius2, ML_Color color); +void ML_filled_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_in_rect(int x, int y, + int radius1, int radius2, ML_Color color); +.fi +.SH "DESCRIPTION" +.sp +These functions draw an ellipse in the VRAM\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3), ML_Color(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_line.3 b/man/man3/ML_line.3 new file mode 100644 index 0000000..fe5cf0a --- /dev/null +++ b/man/man3/ML_line.3 @@ -0,0 +1,57 @@ +'\" t +.\" Title: ml_line +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_LINE" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_line \- Line drawing functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_line(int x1, int y1, int x2, + int y2, ML_Color color); +void ML_horizontal_line(int y, int x1, + int x2, ML_Color color); +void ML_vertical_line(int x, int y1, + int y2, ML_Color color); +.fi +.SH "DESCRIPTION" +.sp +These functions draw lines on the VRAM\&. +.sp +For horizontal line drawing, the ML_horizontal_line function is faster than ML_line, which has a general algorithm (the Bresenham algorithm)\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3), ML_Color(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_pixel.3 b/man/man3/ML_pixel.3 new file mode 100644 index 0000000..362a97a --- /dev/null +++ b/man/man3/ML_pixel.3 @@ -0,0 +1,53 @@ +'\" t +.\" Title: ml_pixel +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_PIXEL" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_pixel \- Pixel setting and testing functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_pixel(int x, int y, ML_Color color); +ML_Color ML_pixel_test(int x, int y); +.fi +.SH "DESCRIPTION" +.sp +Sets or test (get) a pixel\(cqs state/color\&. +.sp +For ML_pixel_test, if the asked pixel is out of the screen, the returned color will be ML_TRANSPARENT\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3), ML_Color(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_point.3 b/man/man3/ML_point.3 new file mode 100644 index 0000000..4d38281 --- /dev/null +++ b/man/man3/ML_point.3 @@ -0,0 +1,50 @@ +'\" t +.\" Title: ml_point +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_POINT" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_point \- Point drawing function from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_point(int x, int y, int width, ML_Color color); +.fi +.SH "DESCRIPTION" +.sp +Draws a (square) point on the VRAM\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3), ML_Color(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_polygon.3 b/man/man3/ML_polygon.3 new file mode 100644 index 0000000..06be72e --- /dev/null +++ b/man/man3/ML_polygon.3 @@ -0,0 +1,53 @@ +'\" t +.\" Title: ml_polygon +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_POLYGON" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_polygon \- Polygon drawing functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_polygon(const int *x, const int *y, + int nb_vertices, ML_Color color); +void ML_filled_polygon(const int *x, const int *y, + int nb_vertices, ML_Color color); +.fi +.SH "DESCRIPTION" +.sp +Draws a polygon on the VRAM\&. This function needs as parameter 2 arrays, containing abscissa and ordinates of the polygon vertices\&. Parameter nb_vertices should be the number of data to read in arrays\&. This function draws a line between each vertices in the polygon\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3), ML_Color(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_rectangle.3 b/man/man3/ML_rectangle.3 new file mode 100644 index 0000000..c3cd45d --- /dev/null +++ b/man/man3/ML_rectangle.3 @@ -0,0 +1,52 @@ +'\" t +.\" Title: ml_rectangle +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_RECTANGLE" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_rectangle \- Rectangle drawing function from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_rectangle(int x1, int y1, int x2, int y2, + int border_width, ML_Color border_color, + ML_Color fill_color); +.fi +.SH "DESCRIPTION" +.sp +Draws a rectangle with or without border on the VRAM\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3), ML_Color(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ML_scroll.3 b/man/man3/ML_scroll.3 new file mode 100644 index 0000000..2867baa --- /dev/null +++ b/man/man3/ML_scroll.3 @@ -0,0 +1,53 @@ +'\" t +.\" Title: ml_scroll +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome +.\" Language: English +.\" +.TH "ML_SCROLL" "3" "07/18/2016" "libmonochrome" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ML_scroll \- VRAM scrolling functions from libmonochrome +.SH "SYNOPSIS" +.sp +.nf +#include + +void ML_horizontal_scroll(int scroll); +void ML_vertical_scroll(int scroll); +.fi +.SH "DESCRIPTION" +.sp +Shifts all the pixels of the VRAM from left to right or from top to bottom\&. If scroll\(cqs value is negative, the pixels will be shifted from right to left or from bottom to top\&. +.sp +When pixels reach screen boundaries, they are moved to the other side\&. +.SH "SEE ALSO" +.sp +libmonochrome(3), ML_VRAM(3), ML_Color(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/libmonochrome.3 b/man/man3/libmonochrome.3 index 26f000f..1539ca6 100644 --- a/man/man3/libmonochrome.3 +++ b/man/man3/libmonochrome.3 @@ -1,34 +1,53 @@ -.TH libmonochrome 3 -.SH NAME -libmonochrome - fast and efficient drawing library for CASIO monochrome calculators +'\" t +.\" Title: libmonochrome +.\" Author: Thomas "Cakeisalie5" Touhey +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/18/2016 +.\" Manual: libmonochrome +.\" Source: libmonochrome 1.0 +.\" Language: English +.\" +.TH "LIBMONOCHROME" "3" "07/18/2016" "libmonochrome 1\&.0" "libmonochrome" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libmonochrome \- fast and efficient drawing library for CASIO monochrome calculators +.SH "SYNOPSIS" +.sp +.nf +#include -.SH SYNOPSIS -.B #include - -.B ML_clear_vram(); - -.B ML_line(0, 0, 127, 63); - -.B ML_line(127, 0, 0, 63); - -.B ML_display_vram(); - -.SH DESCRIPTION -libmonochrome provides tools to work with the VRAM and the Display Driver. - -.SH SEE ALSO -.BR ML_vram(3), -.BR ML_contrast(3), -.BR ML_Color(3), -.BR ML_pixel(3), -.BR ML_point(3), -.BR ML_line(3), -.BR ML_rectangle(3), -.BR ML_polygon(3), -.BR ML_circle(3), -.BR ML_ellipse(3), -.BR ML_scroll(3), -.BR ML_bmp(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. +ML_clear_vram(); +ML_line(0, 0, 127, 63); +ML_line(127, 0, 0, 63); +ML_display_vram(); +.fi +.SH "DESCRIPTION" +.sp +libmonochrome provides tools to work with the VRAM and the Display Driver\&. +.SH "SEE ALSO" +.sp +ML_vram(3), ML_contrast(3), ML_Color(3), ML_pixel(3), ML_point(3), ML_line(3), ML_rectangle(3), ML_polygon(3), ML_circle(3), ML_ellipse(3), ML_scroll(3), ML_bmp(3) +.SH "AUTHOR" +.PP +\fBThomas "Cakeisalie5" Touhey\fR <\&thomas@touhey\&.fr\&> +.RS 4 +Author. +.RE diff --git a/man/man3/ml_bmp.3 b/man/man3/ml_bmp.3 deleted file mode 100644 index 007a574..0000000 --- a/man/man3/ml_bmp.3 +++ /dev/null @@ -1,58 +0,0 @@ -.TH ML_bmp 3 -.SH NAME -ML_bmp - BMP drawing functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_bmp_or(const unsigned char *bmp, int x, int y, int width, int height); - -.B void ML_bmp_and(const unsigned char *bmp, int x, int y, int width, int height); - -.B void ML_bmp_xor(const unsigned char *bmp, int x, int y, int width, int height); - -.B void ML_bmp_or_cl(const unsigned char *bmp, int x, int y, int width, int height); - -.B void ML_bmp_and_cl(const unsigned char *bmp, int x, int y, int width, int height); - -.B void ML_bmp_xor_cl(const unsigned char *bmp, int x, int y, int width, int height); - - -.B void ML_bmp_8_or(const unsigned char *bmp, int x, int y); - -.B void ML_bmp_8_and(const unsigned char *bmp, int x, int y); - -.B void ML_bmp_8_xor(const unsigned char *bmp, int x, int y); - -.B void ML_bmp_8_or_cl(const unsigned char *bmp, int x, int y); - -.B void ML_bmp_8_and_cl(const unsigned char *bmp, int x, int y); - -.B void ML_bmp_8_xor_cl(const unsigned char *bmp, int x, int y); - - -.B void ML_bmp_16_or(const unsigned short *bmp, int x, int y); - -.B void ML_bmp_16_and(const unsigned short *bmp, int x, int y); - -.B void ML_bmp_16_xor(const unsigned short *bmp, int x, int y); - -.B void ML_bmp_16_or_cl(const unsigned short *bmp, int x, int y); - -.B void ML_bmp_16_and_cl(const unsigned short *bmp, int x, int y); - -.B void ML_bmp_16_xor_cl(const unsigned short *bmp, int x, int y); - -.SH DESCRIPTION -Those functions are meant to draw monochrome with fill bits bitmaps -- like game sprites -- on the VRAM. - -Functions starting with the ML_bmp_8 draw 8*8 bitmaps. Functions starting with ML_bmp_16 draw 16*16 bitmaps. All other images must be drawn with the the other functions. - -Function with the _cl suffix are functions using clipping, which means they are able to draw sprites even if they aren't completely on screen. Other functions only draw the bitmap if it is in the screen -- which makes them a little faster. - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_bmp_16_and.3 b/man/man3/ml_bmp_16_and.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_16_and.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_16_and_cl.3 b/man/man3/ml_bmp_16_and_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_16_and_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_16_or.3 b/man/man3/ml_bmp_16_or.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_16_or.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_16_or_cl.3 b/man/man3/ml_bmp_16_or_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_16_or_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_16_xor.3 b/man/man3/ml_bmp_16_xor.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_16_xor.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_16_xor_cl.3 b/man/man3/ml_bmp_16_xor_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_16_xor_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_8_and.3 b/man/man3/ml_bmp_8_and.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_8_and.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_8_and_cl.3 b/man/man3/ml_bmp_8_and_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_8_and_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_8_or.3 b/man/man3/ml_bmp_8_or.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_8_or.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_8_or_cl.3 b/man/man3/ml_bmp_8_or_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_8_or_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_8_xor.3 b/man/man3/ml_bmp_8_xor.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_8_xor.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_8_xor_cl.3 b/man/man3/ml_bmp_8_xor_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_8_xor_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_and.3 b/man/man3/ml_bmp_and.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_and.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_and_cl.3 b/man/man3/ml_bmp_and_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_and_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_or.3 b/man/man3/ml_bmp_or.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_or.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_or_cl.3 b/man/man3/ml_bmp_or_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_or_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_xor.3 b/man/man3/ml_bmp_xor.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_xor.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_bmp_xor_cl.3 b/man/man3/ml_bmp_xor_cl.3 deleted file mode 120000 index 7aeb7ad..0000000 --- a/man/man3/ml_bmp_xor_cl.3 +++ /dev/null @@ -1 +0,0 @@ -ml_bmp.3 \ No newline at end of file diff --git a/man/man3/ml_circle.3 b/man/man3/ml_circle.3 deleted file mode 100644 index 6b09d64..0000000 --- a/man/man3/ml_circle.3 +++ /dev/null @@ -1,21 +0,0 @@ -.TH ML_circle 3 -.SH NAME -ML_circle - Circles drawing functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_circle(int x, int y, int radius, ML_Color color); - -.B void ML_filled_circle(int x, int y, int radius, ML_Color color); - -.SH DESCRIPTION -Those functions draw a circle on the VRAM. - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3), -.BR ML_Color(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_clear_screen.3 b/man/man3/ml_clear_screen.3 deleted file mode 120000 index 2ba6d59..0000000 --- a/man/man3/ml_clear_screen.3 +++ /dev/null @@ -1 +0,0 @@ -ml_vram.3 \ No newline at end of file diff --git a/man/man3/ml_clear_vram.3 b/man/man3/ml_clear_vram.3 deleted file mode 120000 index 2ba6d59..0000000 --- a/man/man3/ml_clear_vram.3 +++ /dev/null @@ -1 +0,0 @@ -ml_vram.3 \ No newline at end of file diff --git a/man/man3/ml_contrast.3 b/man/man3/ml_contrast.3 deleted file mode 100644 index 0afc262..0000000 --- a/man/man3/ml_contrast.3 +++ /dev/null @@ -1,25 +0,0 @@ -.TH ML_Contrast 3 -.SH NAME -ML_Contrast - Screen contrast setting functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B #define ML_CONTRAST_MIN 130 - -.B #define ML_CONTRAST_NORMAL 168 - -.B #define ML_CONTRAST_MAX 190 - -.B void ML_set_contrast(unsigned char contrast); - -.B unsigned char ML_get_contrast(); - -.SH DESCRIPTION -Those functions set the contrast of the screen. This contrast must be greater than ML_CONTRAST_MIN and lesser then ML_CONTRAST_MAX. - -.SH SEE ALSO -.BR libmonochrome(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_display_vram.3 b/man/man3/ml_display_vram.3 deleted file mode 120000 index 2ba6d59..0000000 --- a/man/man3/ml_display_vram.3 +++ /dev/null @@ -1 +0,0 @@ -ml_vram.3 \ No newline at end of file diff --git a/man/man3/ml_ellipse.3 b/man/man3/ml_ellipse.3 deleted file mode 100644 index 8c59f79..0000000 --- a/man/man3/ml_ellipse.3 +++ /dev/null @@ -1,25 +0,0 @@ -.TH ML_ellipse 3 -.SH NAME -ML_ellipse - Ellipses drawing functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_ellipse(int x, int y, int radius1, int radius2, ML_Color color); - -.B void ML_filled_ellipse(int x, int y, int radius1, int radius2, ML_Color color); - -.B void ML_ellipse_in_rect(int x1, int y1, int x2, int y2, ML_Color color); - -.B void ML_filled_ellipse_in_rect(int x, int y, int radius1, int radius2, ML_Color color); - -.SH DESCRIPTION -These functions draw an ellipse in the VRAM. - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3), -.BR ML_Color(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_ellipse_in_rect.3 b/man/man3/ml_ellipse_in_rect.3 deleted file mode 120000 index ca9d2a6..0000000 --- a/man/man3/ml_ellipse_in_rect.3 +++ /dev/null @@ -1 +0,0 @@ -ml_ellipse.3 \ No newline at end of file diff --git a/man/man3/ml_filled_circle.3 b/man/man3/ml_filled_circle.3 deleted file mode 120000 index b9bb5f9..0000000 --- a/man/man3/ml_filled_circle.3 +++ /dev/null @@ -1 +0,0 @@ -ml_circle.3 \ No newline at end of file diff --git a/man/man3/ml_filled_ellipse.3 b/man/man3/ml_filled_ellipse.3 deleted file mode 120000 index ca9d2a6..0000000 --- a/man/man3/ml_filled_ellipse.3 +++ /dev/null @@ -1 +0,0 @@ -ml_ellipse.3 \ No newline at end of file diff --git a/man/man3/ml_filled_ellipse_in_rect.3 b/man/man3/ml_filled_ellipse_in_rect.3 deleted file mode 120000 index ca9d2a6..0000000 --- a/man/man3/ml_filled_ellipse_in_rect.3 +++ /dev/null @@ -1 +0,0 @@ -ml_ellipse.3 \ No newline at end of file diff --git a/man/man3/ml_filled_polygon.3 b/man/man3/ml_filled_polygon.3 deleted file mode 120000 index d304e15..0000000 --- a/man/man3/ml_filled_polygon.3 +++ /dev/null @@ -1 +0,0 @@ -ml_polygon.3 \ No newline at end of file diff --git a/man/man3/ml_get_contrast.3 b/man/man3/ml_get_contrast.3 deleted file mode 120000 index 449f1af..0000000 --- a/man/man3/ml_get_contrast.3 +++ /dev/null @@ -1 +0,0 @@ -ml_contrast.3 \ No newline at end of file diff --git a/man/man3/ml_horizontal_line.3 b/man/man3/ml_horizontal_line.3 deleted file mode 120000 index 6f69312..0000000 --- a/man/man3/ml_horizontal_line.3 +++ /dev/null @@ -1 +0,0 @@ -ml_line.3 \ No newline at end of file diff --git a/man/man3/ml_horizontal_scroll.3 b/man/man3/ml_horizontal_scroll.3 deleted file mode 120000 index 9d7ac07..0000000 --- a/man/man3/ml_horizontal_scroll.3 +++ /dev/null @@ -1 +0,0 @@ -ml_scroll.3 \ No newline at end of file diff --git a/man/man3/ml_line.3 b/man/man3/ml_line.3 deleted file mode 100644 index 75cc5d3..0000000 --- a/man/man3/ml_line.3 +++ /dev/null @@ -1,25 +0,0 @@ -.TH ML_line 3 -.SH NAME -ML_line - Line drawing functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_line(int x1, int y1, int x2, int y2, ML_Color color); - -.B void ML_horizontal_line(int y, int x1, int x2, ML_Color color); - -.B void ML_vertical_line(int x, int y1, int y2, ML_Color color); - -.SH DESCRIPTION -These functions draw lines on the VRAM. - -For horizontal line drawing, the ML_horizontal_line function is faster than ML_line, which has a general algorithm (the Bresenham algorithm). - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3), -.BR ML_Color(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_pixel.3 b/man/man3/ml_pixel.3 deleted file mode 100644 index c58e170..0000000 --- a/man/man3/ml_pixel.3 +++ /dev/null @@ -1,23 +0,0 @@ -.TH ML_pixel 3 -.SH NAME -ML_pixel - Pixel setting and testing functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_pixel(int x, int y, ML_Color color); - -.B ML_Color ML_pixel_test(int x, int y); - -.SH DESCRIPTION -Sets or test (get) a pixel's state/color. - -For ML_pixel_test, if the asked pixel is out of the screen, the returned color will be ML_TRANSPARENT. - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3), -.BR ML_Color(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_pixel_test.3 b/man/man3/ml_pixel_test.3 deleted file mode 120000 index 666c695..0000000 --- a/man/man3/ml_pixel_test.3 +++ /dev/null @@ -1 +0,0 @@ -ml_pixel.3 \ No newline at end of file diff --git a/man/man3/ml_point.3 b/man/man3/ml_point.3 deleted file mode 100644 index da15810..0000000 --- a/man/man3/ml_point.3 +++ /dev/null @@ -1,19 +0,0 @@ -.TH ML_point 3 -.SH NAME -ML_point - Point drawing function from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_point(int x, int y, int width, ML_Color color); - -.SH DESCRIPTION -Draws a (square) point on the VRAM. - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3), -.BR ML_Color(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_polygon.3 b/man/man3/ml_polygon.3 deleted file mode 100644 index edbf094..0000000 --- a/man/man3/ml_polygon.3 +++ /dev/null @@ -1,21 +0,0 @@ -.TH ML_polygon 3 -.SH NAME -ML_polygon - Polygon drawing functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_polygon(const int *x, const int *y, int nb_vertices, ML_Color color); - -.B void ML_filled_polygon(const int *x, const int *y, int nb_vertices, ML_Color color); - -.SH DESCRIPTION -Draws a polygon on the VRAM. This function needs as parameter 2 arrays, containing abscissa and ordinates of the polygon vertices. Parameter nb_vertices should be the number of data to read in arrays. This function draws a line between each vertices in the polygon. - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3), -.BR ML_Color(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_rectangle.3 b/man/man3/ml_rectangle.3 deleted file mode 100644 index 665330d..0000000 --- a/man/man3/ml_rectangle.3 +++ /dev/null @@ -1,19 +0,0 @@ -.TH ML_rectangle 3 -.SH NAME -ML_rectangle - Rectangle drawing function from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_rectangle(int x1, int y1, int x2, int y2, int border_width, ML_Color border_color, ML_Color fill_color); - -.SH DESCRIPTION -Draws a rectangle with or without border on the VRAM. - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3), -.BR ML_Color(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_screen.3 b/man/man3/ml_screen.3 deleted file mode 120000 index 2ba6d59..0000000 --- a/man/man3/ml_screen.3 +++ /dev/null @@ -1 +0,0 @@ -ml_vram.3 \ No newline at end of file diff --git a/man/man3/ml_scroll.3 b/man/man3/ml_scroll.3 deleted file mode 100644 index f32fbbf..0000000 --- a/man/man3/ml_scroll.3 +++ /dev/null @@ -1,23 +0,0 @@ -.TH ML_scroll 3 -.SH NAME -ML_scroll - VRAM scrolling functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B void ML_horizontal_scroll(int scroll); - -.B void ML_vertical_scroll(int scroll); - -.SH DESCRIPTION -Shifts all the pixels of the VRAM from left to right or from top to bottom. If scroll's value is negative, the pixels will be shifted from right to left or from bottom to top. - -When pixels reach screen boundaries, they are moved to the other side. - -.SH SEE ALSO -.BR libmonochrome(3), -.BR ML_VRAM(3), -.BR ML_Color(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_set_contrast.3 b/man/man3/ml_set_contrast.3 deleted file mode 120000 index 449f1af..0000000 --- a/man/man3/ml_set_contrast.3 +++ /dev/null @@ -1 +0,0 @@ -ml_contrast.3 \ No newline at end of file diff --git a/man/man3/ml_vertical_line.3 b/man/man3/ml_vertical_line.3 deleted file mode 120000 index 6f69312..0000000 --- a/man/man3/ml_vertical_line.3 +++ /dev/null @@ -1 +0,0 @@ -ml_line.3 \ No newline at end of file diff --git a/man/man3/ml_vertical_scroll.3 b/man/man3/ml_vertical_scroll.3 deleted file mode 120000 index 9d7ac07..0000000 --- a/man/man3/ml_vertical_scroll.3 +++ /dev/null @@ -1 +0,0 @@ -ml_scroll.3 \ No newline at end of file diff --git a/man/man3/ml_vram.3 b/man/man3/ml_vram.3 deleted file mode 100644 index 8c0bce0..0000000 --- a/man/man3/ml_vram.3 +++ /dev/null @@ -1,29 +0,0 @@ -.TH ML_VRAM 3 -.SH NAME -ML_VRAM - Video RAM and Display Driver management functions from libmonochrome - -.SH SYNOPSIS -.B #include - -.B char* ML_vram_adress(); - -.B void ML_clear_vram(); - -.B void ML_clear_screen(); - -.B void ML_display_vram(); - -.SH DESCRIPTION -libmonochrome uses natively a double-buffering technique : the user program draws on a working space, the VRAM, and when he finished drawing the frame, this frame is sent to the Display Driver so it can appear on the screen. - -ML_vram_adress is a system call that returns the address of the VRAM allocated by the system. It is mainly meant for internal purposes, but if you want to use the VRAM directly, you can use it. - -ML_clear_screen sends a bunch of zeros to the Display Driver so the screen content gets erased, but the VRAM stays as it is. ML_clear_vram does the opposite : it clears the VRAM content while leaving the screen's one. - -ML_display_vram sends the VRAM content to the Display Driver, so it can appear on the screen. - -.SH SEE ALSO -.BR libmonochrome(3) - -.SH AUTHOR -Copyright (C) 2016 by Thomas "CakeIsALie5" Touhey. diff --git a/man/man3/ml_vram_adress.3 b/man/man3/ml_vram_adress.3 deleted file mode 120000 index 2ba6d59..0000000 --- a/man/man3/ml_vram_adress.3 +++ /dev/null @@ -1 +0,0 @@ -ml_vram.3 \ No newline at end of file diff --git a/src/ML_bmp.c b/src/ML_bmp.c index 8a2bca6..92a8d9d 100644 --- a/src/ML_bmp.c +++ b/src/ML_bmp.c @@ -10,7 +10,7 @@ #include -static void ML_bmp_line(unsigned char *vram, const unsigned char *b, +static inline void ML_bmp_line(unsigned char *vram, const unsigned char *b, int width, int offset, ML_Mode mode); static inline void ML_bmp_byte(unsigned char *v, int b, int offset, int width, ML_Mode mode); @@ -58,7 +58,7 @@ void ML_bmp(const void *bmp, int x, int y, int width, int height, ML_Mode mode) } } -static void ML_bmp_line(unsigned char *vram, const unsigned char *b, +static inline void ML_bmp_line(unsigned char *vram, const unsigned char *b, int width, int offset, ML_Mode mode) { while (1) {