cub3d/src/consts.h

67 lines
2.3 KiB
C
Raw Normal View History

2025-06-06 18:38:21 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* consts.h :+: :+: :+: */
2025-06-06 18:38:21 +02:00
/* +:+ +:+ +:+ */
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
2025-06-06 18:38:21 +02:00
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:54:36 by kcolin #+# #+# */
/* Updated: 2025/08/19 20:07:29 by tchampio ### ########.fr */
2025-06-06 18:38:21 +02:00
/* */
/* ************************************************************************** */
#ifndef CONSTS_H
2025-08-06 14:47:29 +02:00
# define CONSTS_H
2025-06-06 18:38:21 +02:00
// Window
2025-08-06 14:47:29 +02:00
# define WIDTH 800
# define HEIGHT 600
// Texture size
2025-08-06 14:47:29 +02:00
# define SIZE 64
# define TEXTURE_SIZE 64
// minimap handling
2025-08-06 14:47:29 +02:00
# define MAP_SIZE 10
# define PLAYER_SIZE 6
# define RESSOURCE_DIR "ressources"
// movement handling
2025-08-06 14:47:29 +02:00
# define MOVEMENT_SPEED 0.000005
# define MOVEMENT_STEP 0.1
2025-08-06 14:47:29 +02:00
# define ROTATION_SPEED 0.000002
# define PLANE_VALUE 0.6
// Sprite consts
2025-08-06 14:47:29 +02:00
# define SPRITE_TRANPARENCY_COLOR 0xff00dc
# define MAX_SPRITES 30
# define JUGG_TEX "ressources/juggernog.xpm"
# define REV_TEX "ressources/revive.xpm"
# define DBLTAP_TEX "ressources/dbltap.xpm"
# define MYSTERY_TEX "ressources/box.xpm"
2025-08-18 13:21:52 +02:00
# define ZOMBIE_TEX "ressources/zombie.xpm"
2025-08-19 19:13:58 +02:00
// Approximated, value is actually MOVEMENT_SPEED / 1.5
# define ZOMBIE_SPEED 0.0000033333
2025-08-06 14:47:29 +02:00
# ifdef BONUS
# define COMPILED_TEXT "Compiled with bonuses"
# else
# define COMPILED_TEXT " "
# endif
2025-06-06 18:38:21 +02:00
// Error messages
# define ENOCUB "Not a .cub file"
# define EOPEN "Can't open file"
# define EMALMAP "Map is malformed (invalid chars or missing walls)"
# define ENOPLAYER "No player"
# define EHOLES "Holes in map"
# define ETRAILING "Trailing chars after map"
# define EBADCHARCOLOR "invalid characters in color definition"
# define EBADVALCOLOR "invalid value for colors"
# define ETOOMANYCOLORS "too many colors"
# define ENOTENOUGHCOLORS "Not enough colors"
# define EDUPTEX "Duplicated texture directive"
# define EMAPBFTEX "Map started before all the textures"
2025-06-06 18:38:21 +02:00
#endif