diff options
author | untir_l <87096069+untir-l@users.noreply.github.com> | 2022-02-24 14:57:35 +0000 |
---|---|---|
committer | untir-l <87096069+untir-l@users.noreply.github.com> | 2022-02-25 09:56:49 +0000 |
commit | c23118e8e48d043e4bb9b4d813a498af8d454d73 (patch) | |
tree | 265947d2a848e8a3fb27106be38c8ae95b2fffe0 /lib/hitomezashi.h | |
parent | 8a7dde79de6edee01571d2eb4a333d8256f4c342 (diff) | |
download | hitomezashi-c23118e8e48d043e4bb9b4d813a498af8d454d73.tar hitomezashi-c23118e8e48d043e4bb9b4d813a498af8d454d73.tar.gz hitomezashi-c23118e8e48d043e4bb9b4d813a498af8d454d73.zip |
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
Diffstat (limited to 'lib/hitomezashi.h')
-rw-r--r-- | lib/hitomezashi.h | 9 |
1 files changed, 2 insertions, 7 deletions
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 |