42_cub3d/include/const.h
2024-11-22 12:13:16 +01:00

47 lines
2.2 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* const.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/31 17:00:59 by mcolonna #+# #+# */
/* Updated: 2024/11/22 12:11:11 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CONST_H
# define CONST_H
# include "include.h"
# define PI 3.1415926535 // it's just pi
# define FPS 30 // Number of frames per second (bonus only)
# define NOBONUS_SPEED 500 // Number of calls to timedloop for one frame
// (mandatory only)
# define MOVE_SPEED 0.1 // Player oves by N cases by tick
# define ROT_SPEED_DIVIDE_PI 32 // Player turns by pi/N rad by tick
# define MOUSE_ROTATION_SPEED 0.0005 // Rotation speed from mouse: rad/px
# define HITBOX 0.25 // Hitbox of N cases around player.
# ifdef BONUS
# define WINDOW_NAME "cub3d (bonus)"
# else
# define WINDOW_NAME "cub3d (mandatory)"
# endif
# define SCREEN_WIDTH 1280 // Width of the window
# define SCREEN_HEIGHT 960 // Height of the window
# define FOV 0.66 // Width of the view plane (unit: cases)
# define MINIMAP_SIZE_INVERT 4 // The minimap takes 1/N of the window.
# define MINIMAP_COLOR_WALL 0xFFAF33 // Color of the walls on the minimap
# define MINIMAP_COLOR_EMPTY 0xFFFC33 // Color of the empty cases on the minimap
# define MINIMAP_COLOR_PLAYER 0x0000FF // Color of the player on the minimap
// Distance from the player until where the FOV is drawn (unit: cases).
# define MINIMAP_DISTANCE_FOV 3 // Size of the FOV on the minimap
# define MINIMAP_OPACITY_FOV 0.8 // Opacity of the FOV on the minimap
#endif