mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
66 lines
2.3 KiB
C
66 lines
2.3 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* consts.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/07/17 14:54:36 by kcolin #+# #+# */
|
|
/* Updated: 2025/08/19 20:07:29 by tchampio ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef CONSTS_H
|
|
# define CONSTS_H
|
|
|
|
// Window
|
|
# define WIDTH 800
|
|
# define HEIGHT 600
|
|
|
|
// Texture size
|
|
# define SIZE 64
|
|
# define TEXTURE_SIZE 64
|
|
|
|
// minimap handling
|
|
# define MAP_SIZE 10
|
|
# define PLAYER_SIZE 6
|
|
# define RESSOURCE_DIR "ressources"
|
|
|
|
// movement handling
|
|
# define MOVEMENT_SPEED 0.000005
|
|
# define MOVEMENT_STEP 0.1
|
|
# define ROTATION_SPEED 0.000002
|
|
# define PLANE_VALUE 0.6
|
|
|
|
// Sprite consts
|
|
# 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"
|
|
# define ZOMBIE_TEX "ressources/zombie.xpm"
|
|
// Approximated, value is actually MOVEMENT_SPEED / 1.5
|
|
# define ZOMBIE_SPEED 0.0000033333
|
|
|
|
# ifdef BONUS
|
|
# define COMPILED_TEXT "Compiled with bonuses"
|
|
# else
|
|
# define COMPILED_TEXT " "
|
|
# endif
|
|
|
|
// 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"
|
|
|
|
#endif
|