From c23118e8e48d043e4bb9b4d813a498af8d454d73 Mon Sep 17 00:00:00 2001 From: untir_l <87096069+untir-l@users.noreply.github.com> Date: Thu, 24 Feb 2022 20:27:35 +0530 Subject: Add web app frontend, restructure almost everything - Add web app frontend code - Add .html, .js, .wasm to .gitignore - Restructure Makefile to work with emmake, add build targets for web app, add .html, .js, .wasm to make clean - Explain the pattern in the README - Add explanation of web frontend to README - Restructure README generally for better clarity - Remove "make web app version" from todos in README - Set Doxygen to EXTRACT_ALL so trivial and useless doc comments are not needed when the naming suffices to be explanatory. - Move ascii_binary_str_to_ints to library code in new file hitomezashi_utils.c (and corresponding header) as web app also needs it. - Fix SDL2 include path so it also works with Emscripten - Remove some cluttering and unnecessary doc comments - Improve some doc comments --- lib/hitomezashi.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/hitomezashi.h') diff --git a/lib/hitomezashi.h b/lib/hitomezashi.h index 4453f70..64b17af 100644 --- a/lib/hitomezashi.h +++ b/lib/hitomezashi.h @@ -3,14 +3,12 @@ #ifndef HITOMEZASHI_HITOMEZASHI_H #define HITOMEZASHI_HITOMEZASHI_H -#include "SDL.h" +#include "SDL2/SDL.h" /** The state of a hitomezashi pattern. */ struct Hitomezashi_State { - /** The length of the x_pattern. */ int x_pattern_len; - /** The length of the y_pattern. */ int y_pattern_len; /** Pattern used to draw the vertical lines conceptually originating from the @@ -25,7 +23,6 @@ struct Hitomezashi_State { /** Gap between parallel lines. */ int gap; - /** Thickness of each line. */ int line_thickness; /** Width in pixels of the SDL_Surface needed to hold the pattern. This is @@ -41,7 +38,6 @@ struct Hitomezashi_State { /** Result of hitomezashi_state_init(). */ enum Hitomezashi_State_Init_Result { - /** The function completed successfully. */ Hitomezashi_State_Init_Result_Success, /** The function failed as it encountered an error initialising the SDL_Surface in state. */ @@ -50,7 +46,6 @@ enum Hitomezashi_State_Init_Result { /** Result of hitomezashi_draw() */ enum Hitomezashi_Draw_Result { - /** The function completed successfully. */ Hitomezashi_Draw_Result_Success, /** The function failed as it encountered an error "locking" the surface to write to it. */ @@ -64,7 +59,7 @@ hitomezashi_state_init(struct Hitomezashi_State *state, int x_pattern_len, int y_pattern_len, char *x_pattern, char *y_pattern, int gap, int line_thickness); -/** Draw the hitomezashi pattern to a Hitomezashi_State's surface. */ +/** Draw the hitomezashi pattern to state->surface. */ enum Hitomezashi_Draw_Result hitomezashi_draw(struct Hitomezashi_State *state); #endif // HITOMEZASHI_HITOMEZASHI_H -- cgit v1.2.3-57-g22cb