From 80ff7b315a6b5a9f9c62de5c6b03f52ddf099837 Mon Sep 17 00:00:00 2001 From: Oxore Date: Thu, 6 Dec 2018 05:24:30 +0300 Subject: Add simple documentation in comments, refactor. Change all `unsigned int` and `unsigned long` types to `size_t`. Fix names alignment in headers. Add documentation and simple description: Painter - painter.h Main - tetris.c Unicode - unicode.h IDList - idlist.h Engine - engine.c Minor changes: tetris.c - fix indentation and code blocks separation with newlines, remove unused includes. idlist.h - fix structure field name alignment. field.h, engine.c - define aliases for ghost and active shapes indexes in the field. engine.c - rename menuTick to snake case, fix curly braces style of functions. Makefile - switch SFML deprecated warnings off. --- include/unicode.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'include/unicode.h') diff --git a/include/unicode.h b/include/unicode.h index 0a34ce3..4e5910a 100644 --- a/include/unicode.h +++ b/include/unicode.h @@ -1,2 +1,12 @@ -unsigned long utf8_strlen(char *string); -void utf8to32_strcpy(wchar_t *dest, char *src); +/* + * unicode.h + * + * Unicode - module with some helper unicode functions. + * + * SFML uses UTF32 encoding for texts and there is no need to use any full + * featured library just for a couple of encoding conversion functions. + * + * */ + +size_t utf8_strlen(char *string); +void utf8to32_strcpy(wchar_t *dest, char *src); -- cgit v1.2.3