plr start on middle of a cell, and wall height is well proportionned

This commit is contained in:
hugogogo
2022-04-30 12:09:44 +02:00
parent 58b862ce82
commit 888fa7c116
7 changed files with 26 additions and 111 deletions

View File

@@ -6,23 +6,21 @@
*/
/* nbr pixel player move */
# define PLR_MV 1
# define PLR_MV 2
/* degree of rotation of the player per press */
# define PLR_ROT 2
/* nbr key you can press at the same time */
# define MAX_NB_KEY 3
/* nbr of elements to parse in the .cub file (without the map) */
# define TOTAL_ELEMENTS 6
/* screen width */
# define SCREEN_WIDTH 500
# define SCREEN_WIDTH 600
/* screen height */
# define SCREEN_HEIGHT 300
# define SCREEN_HEIGHT 500
/* screen focal (in degree) */
# define SCREEN_FOCAL 90
# define SCREEN_FOCAL 70
/* size of a cell on the map */
# define CELL 20
/* horizon fr perspectiv */
# define HORIZON 700
/*
* keys macro

View File

@@ -35,7 +35,6 @@ typedef struct s_rcast
t_vec screen_size;
t_vec ray;
t_vec wall;
int hor;
int screen_width;
int screen_height;
int screen_dist;
@@ -121,6 +120,7 @@ typedef struct s_plr
t_coord pos;
// rot
int rot;
int deg;
double cosi;
double cosj;
double sini;