
- add constants for each minimap color - rename, reorganize and make static minimap functions - main.c:draw_screen() calls draw_minimap() instead of render(). - clean code and norm
35 lines
1.6 KiB
C
35 lines
1.6 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* const.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/10/31 17:00:59 by mcolonna #+# #+# */
|
|
/* Updated: 2024/11/18 13:40:04 by mcolonna ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef CONST_H
|
|
# define CONST_H
|
|
|
|
# include "include.h"
|
|
|
|
# define PI 3.1415926535 // it's just pi
|
|
|
|
# define MOVE_SPEED 0.05 // Player oves by N cases by tick
|
|
# define ROT_SPEED_DIVIDE_PI 64 // Player turns by pi/N rad by tick
|
|
# define MOUSE_ROTATION_SPEED 0.001 // rad/px
|
|
# define HITBOX 0.25 // Hitbox of N cases around player.
|
|
|
|
# define SCREEN_WIDTH 640 // Width of the window
|
|
# define SCREEN_HEIGHT 480 // Height of the window
|
|
|
|
# define FOV 0.66 // Width of the view plane (unit: cases)
|
|
|
|
# define MINIMAP_SCALE 8 // Size of a case on the minimap.
|
|
# 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 0xFF0000 // Color of the player on the minimap
|
|
|
|
#endif
|