Add help to the project
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 25 Apr 2024 12:45:21 +0000 (14:45 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 25 Apr 2024 12:46:59 +0000 (14:46 +0200)
src/main.c

index b0e25ebfe1c246965b8371ba13016409980e5b31..e258329936f8a87eeb6d5d085490f08d4ff21a5c 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/10/27 14:29:26 by ljiriste          #+#    #+#             */
-/*   Updated: 2024/04/25 11:44:39 by ljiriste         ###   ########.fr       */
+/*   Updated: 2024/04/25 14:46:40 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -275,9 +275,30 @@ int        parse_args(int argc, char **argv, t_session *s)
        return (0);
 }
 
+static const char      *help_str =
+       "This is the help for fractol by Lukáš Jiřiště\n"
+       "You can call the program as follows:\n\n"
+       "fractol [option value]\n"
+       "\nOptions:\n"
+       "\t-w\n\t\tWidth of window in pixels\n"
+       "\t-h\n\t\tHeight of window in pixels\n"
+       "\t-u\n\t\tMaximum undersample in pixels\n"
+       "\t-d\n\t\tDetail in maximum iterations\n"
+       "\t-f\n\t\tOne of these fractals:\n"
+       "\t\t\tman[delbrot]\n"
+       "\t\t\ttri[corn]\n"
+       "\t-s\n\t\tSpeed of color change (negative values reverse the direction)\n"
+       "\t-c\n\t\tColorfulness\n"
+       "\nControls:\n"
+       "\tArrow keys and wasd can be used for movement.\n"
+       "\tOne can zoom in with + and zoom out with - keypad."
+       "Zoom can also be controlled with scrollwheel on the mouse.\n"
+       "\tThe detail is controlled by * (increase) and / (decrease) keys.\n"
+       "\tThe color change can be sped up and down with 8 and 2 keys.\n";
+
 void   print_help(void)
 {
-       ft_printf("Help to be implemented.\n");
+       ft_printf(help_str);
        return ;
 }