Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion includes/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: stakada <stakada@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/08/22 21:44:50 by stakada #+# #+# */
/* Updated: 2026/02/20 20:25:07 by stakada ### ########.fr */
/* Updated: 2026/02/23 10:48:44 by stakada ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -40,6 +40,8 @@
# define KEY_RIGHT 124
# define KEY_PLUS 24
# define KEY_MINUS 27
# define KEY_P 35
# define KEY_M 46
# define KEY_H 4
# define KEY_J 38
# else
Expand All @@ -61,6 +63,8 @@
# define KEY_RIGHT XK_Right
# define KEY_PLUS XK_plus
# define KEY_MINUS XK_minus
# define KEY_P XK_p
# define KEY_M XK_m
# define KEY_H XK_h
# define KEY_J XK_j
# endif
Expand Down
6 changes: 3 additions & 3 deletions srcs/key_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: stakada <stakada@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/01/10 20:00:00 by kinamura #+# #+# */
/* Updated: 2026/02/15 03:13:07 by stakada ### ########.fr */
/* Updated: 2026/02/23 10:43:59 by stakada ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -77,12 +77,12 @@ static int get_rotate_params(int keycode, t_vec3 *axis, double *angle)

static int get_adjust_params(int keycode, int *sign, int *height_mode)
{
if (keycode == KEY_PLUS)
if (keycode == KEY_P)
{
*sign = 1;
*height_mode = 0;
}
else if (keycode == KEY_MINUS)
else if (keycode == KEY_M)
{
*sign = -1;
*height_mode = 0;
Expand Down
8 changes: 4 additions & 4 deletions srcs/put_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: stakada <stakada@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/15 00:30:30 by stakada #+# #+# */
/* Updated: 2026/02/15 02:18:32 by stakada ### ########.fr */
/* Updated: 2026/02/23 10:44:25 by stakada ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -34,7 +34,7 @@ static void put_camera_info(t_ctx *ctx)
mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * 6, TEXT_COLOR,
" Rotate: Arrow keys");
mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * 7, TEXT_COLOR,
" FOV: + (Increase), - (Decrease)");
" FOV: P (Increase), M (Decrease)");
}

static void put_light_info(t_ctx *ctx)
Expand All @@ -46,7 +46,7 @@ static void put_light_info(t_ctx *ctx)
mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * 5, TEXT_COLOR,
" Move: W, A, S, D, Q, E");
mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * 6, TEXT_COLOR,
" Brightness: + (Increase), - (Decrease)");
" Brightness: P (Increase), M (Decrease)");
}

static void put_object_info(t_ctx *ctx)
Expand All @@ -72,7 +72,7 @@ static void put_object_info(t_ctx *ctx)
if (ctx->selected_object->type == SPHERE
|| ctx->selected_object->type == CYLINDER)
mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * line++,
TEXT_COLOR, " Diameter: + (Increase), - (Decrease)");
TEXT_COLOR, " Diameter: P (Increase), M (Decrease)");
if (ctx->selected_object->type == CYLINDER)
mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * line++,
TEXT_COLOR, " Height: H (Increase), J (Decrease)");
Expand Down