68 lines
918 B
C
68 lines
918 B
C
// C/C++ File
|
|
// AUTHOR: fotonmootn
|
|
// FILE: inc/fdf.h
|
|
// ROLE: to rule them all
|
|
// CREATED: 2017-02-13 20:07:04
|
|
// MODIFIED: 2017-02-18 01:11:28
|
|
|
|
|
|
#ifndef FDF_H
|
|
# define FDF_H
|
|
|
|
#include "libft.h"
|
|
#include "mlx.h"
|
|
#include <math.h>
|
|
#include <fcntl.h>
|
|
#include <stdio.h>
|
|
|
|
typedef struct s_map
|
|
{
|
|
t_list *lst_map;
|
|
t_list *lst_pnt;
|
|
int width;
|
|
int height;
|
|
} t_map;
|
|
|
|
typedef struct s_vec
|
|
{
|
|
double x;
|
|
double y;
|
|
double z;
|
|
int color;
|
|
} t_vec;
|
|
|
|
typedef struct s_pnt
|
|
{
|
|
int x;
|
|
int y;
|
|
} t_pnt;
|
|
|
|
typedef struct s_edg
|
|
{
|
|
int p1;
|
|
int p2;
|
|
} t_edg;
|
|
|
|
typedef struct s_mat4
|
|
{
|
|
double mx[4][4];
|
|
} t_mat4;
|
|
|
|
typedef struct s_mlx
|
|
{
|
|
void *mlx;
|
|
void *win;
|
|
} t_mlx;
|
|
|
|
typedef struct s_swap
|
|
{
|
|
int swap_x;
|
|
int swap_coord;
|
|
} t_swap;
|
|
|
|
void line(t_vec p1, t_vec p2, t_mlx *m);
|
|
t_map *map_init(char *path);
|
|
t_list *pnt_init(t_list *lst_map);
|
|
void free_tab(char **tab);
|
|
|
|
#endif
|