mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
style: remove cub3d header from central includes folder
This commit is contained in:
parent
4ffc52b462
commit
8ec3f2e11c
11 changed files with 90 additions and 34 deletions
2
Makefile
2
Makefile
|
|
@ -9,7 +9,7 @@ SOURCEFILES=src/main.c \
|
|||
src/map/forbidden_characters.c \
|
||||
src/utils/hooks.c \
|
||||
src/draw/drawutils.c \
|
||||
src/draw/map.c
|
||||
src/draw/draw_map.c
|
||||
OBJECTS=$(patsubst src/%.c,objects/%.o,$(SOURCEFILES))
|
||||
OBJDIR=objects
|
||||
NAME=cub3d
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* map.c :+: :+: :+: */
|
||||
/* draw_map.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/15 10:28:39 by tchampio #+# #+# */
|
||||
/* Updated: 2025/07/15 10:29:06 by tchampio ### ########.fr */
|
||||
/* Created: 2025/07/17 14:20:00 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:30:59 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../includes/cub3d.h"
|
||||
#include "../../includes/structs.h"
|
||||
#include "drawutils.h"
|
||||
|
||||
void draw_2d_wall(unsigned int color, t_mlx_data *data,
|
||||
int x, int y)
|
||||
|
|
@ -1,28 +1,20 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* cub3d.h :+: :+: :+: */
|
||||
/* draw_map.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/15 10:18:44 by tchampio #+# #+# */
|
||||
/* Updated: 2025/07/15 10:32:42 by tchampio ### ########.fr */
|
||||
/* Created: 2025/07/17 14:20:13 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:35:31 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef CUB3D_H
|
||||
# define CUB3D_H
|
||||
#ifndef DRAW_MAP_H
|
||||
# define DRAW_MAP_H
|
||||
|
||||
# include "structs.h"
|
||||
# include "cub3d_consts.h"
|
||||
# include "maputils.h"
|
||||
# include "../../includes/structs.h"
|
||||
|
||||
int destroy(t_cub3d_data *data);
|
||||
int keypress_handler(int keycode, t_cub3d_data *data);
|
||||
int keyrelease_handler(int keycode, t_cub3d_data *data);
|
||||
void my_mlx_pixel_put(t_mlx_data *data, int x, int y, int color);
|
||||
void draw_2d_wall(unsigned int color, t_mlx_data *data, int x, int y);
|
||||
void draw_map(t_mapdata *map, t_player *player, t_mlx_data *data);
|
||||
void gnl_exhaust(int fd);
|
||||
|
||||
#endif
|
||||
|
|
@ -3,14 +3,14 @@
|
|||
/* ::: :::::::: */
|
||||
/* drawutils.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/15 10:27:46 by tchampio #+# #+# */
|
||||
/* Updated: 2025/07/15 10:28:10 by tchampio ### ########.fr */
|
||||
/* Created: 2025/07/17 14:28:56 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:29:08 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../includes/cub3d.h"
|
||||
#include "../../includes/structs.h"
|
||||
|
||||
void my_mlx_pixel_put(t_mlx_data *data, int x, int y, int color)
|
||||
{
|
||||
|
|
|
|||
20
src/draw/drawutils.h
Normal file
20
src/draw/drawutils.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* drawutils.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:30:04 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:30:38 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef DRAWUTILS_H
|
||||
# define DRAWUTILS_H
|
||||
|
||||
# include "../../includes/structs.h"
|
||||
|
||||
void my_mlx_pixel_put(t_mlx_data *data, int x, int y, int color);
|
||||
|
||||
#endif // DRAWUTILS_H
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:15:04 by kcolin ### ########.fr */
|
||||
/* Updated: 2025/07/17 14:24:45 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -15,7 +15,8 @@
|
|||
#include "../mlx/mlx.h"
|
||||
#include "../includes/maputils.h"
|
||||
#include "../includes/cub3d_consts.h"
|
||||
#include "../includes/cub3d.h"
|
||||
#include "draw/draw_map.h"
|
||||
#include "utils/hooks.h"
|
||||
#include <stdbool.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/X.h>
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/21 19:35:43 by tchampio #+# #+# */
|
||||
/* Updated: 2025/07/17 14:17:39 by kcolin ### ########.fr */
|
||||
/* Updated: 2025/07/17 14:27:56 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../includes/maputils.h"
|
||||
#include "../../libft/includes/libft.h"
|
||||
#include "../../includes/cub3d.h"
|
||||
#include "../utils/frees.h"
|
||||
|
||||
unsigned long set_color(const char *s, t_mapdata *map)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 13:59:27 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:18:05 by kcolin ### ########.fr */
|
||||
/* Updated: 2025/07/17 14:27:07 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
21
src/utils/frees.h
Normal file
21
src/utils/frees.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* frees.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:27:11 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:28:47 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef FREES_H
|
||||
# define FREES_H
|
||||
|
||||
# include "../../includes/structs.h"
|
||||
|
||||
void gnl_exhaust(int fd);
|
||||
int destroy(t_cub3d_data *data);
|
||||
|
||||
#endif // FREES_H
|
||||
|
|
@ -3,16 +3,16 @@
|
|||
/* ::: :::::::: */
|
||||
/* hooks.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/15 10:13:47 by tchampio #+# #+# */
|
||||
/* Updated: 2025/07/15 10:27:03 by tchampio ### ########.fr */
|
||||
/* Created: 2025/07/17 14:22:57 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:28:18 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../includes/cub3d_consts.h"
|
||||
#include "../../includes/cub3d.h"
|
||||
#include "../../includes/structs.h"
|
||||
#include "frees.h"
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/X.h>
|
||||
|
||||
|
|
|
|||
21
src/utils/hooks.h
Normal file
21
src/utils/hooks.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* hooks.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:23:06 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 14:24:58 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef HOOKS_H
|
||||
# define HOOKS_H
|
||||
|
||||
# include "../../includes/structs.h"
|
||||
|
||||
int keypress_handler(int keycode, t_cub3d_data *data);
|
||||
int keyrelease_handler(int keycode, t_cub3d_data *data);
|
||||
|
||||
#endif // HOOKS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue