player rotates and moves, rays for raycasting on map
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
#ifndef CUBE3D_STRUCT_H
|
||||
# define CUBE3D_STRUCT_H
|
||||
|
||||
typedef struct s_vec
|
||||
{
|
||||
int start_x;
|
||||
int start_y;
|
||||
int end_x;
|
||||
int end_y;
|
||||
} t_vec;
|
||||
|
||||
typedef struct s_game
|
||||
{
|
||||
// window
|
||||
@@ -8,7 +16,27 @@ typedef struct s_game
|
||||
void *win_ptr;
|
||||
int win_size_x;
|
||||
int win_size_y;
|
||||
// rays
|
||||
t_vec screen_dist;
|
||||
t_vec screen_size;
|
||||
t_vec ray;
|
||||
// tmp
|
||||
int ray_highlight;
|
||||
int ray_activ;
|
||||
// map
|
||||
int map_size_x;
|
||||
int map_size_y;
|
||||
char **map;
|
||||
int cell;
|
||||
// rot
|
||||
int rot;
|
||||
double cosi;
|
||||
double cosj;
|
||||
double sini;
|
||||
double sinj;
|
||||
// player
|
||||
double plr_exact_x;
|
||||
double plr_exact_y;
|
||||
int plr_x;
|
||||
int plr_y;
|
||||
// key hook
|
||||
|
||||
Reference in New Issue
Block a user