53 lines
784 B
C
53 lines
784 B
C
#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
|
|
void *mlx_ptr;
|
|
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
|
|
int k_hook[MAX_NB_KEY];
|
|
// image
|
|
void *img_ptr;
|
|
char *img_data;
|
|
int bpp;
|
|
int sizel;
|
|
int endian;
|
|
} t_game;
|
|
|
|
#endif
|