v1.0 - normed texture system, multiple keypress, fixes on parsing, removed trailing maps

This commit is contained in:
B.Goulard 2024-12-16 14:56:22 +01:00
parent e581c72b02
commit 3f43074d05
35 changed files with 474 additions and 438 deletions

View file

@ -6,7 +6,7 @@
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/28 14:10:44 by bgoulard #+# #+# */
/* Updated: 2024/12/01 18:36:26 by rparodi ### ########.fr */
/* Updated: 2024/12/16 08:36:17 by bgoulard ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,12 +14,6 @@
#include "cub3d_struct.h"
#include "cub3d_parsing.h"
void update_pos_i(t_player *player)
{
player->pos_i.x = (int)player->pos.x;
player->pos_i.y = (int)player->pos.y;
}
void move_straight(t_info *data)
{
t_tile *tile_x;
@ -35,7 +29,6 @@ void move_straight(t_info *data)
+ data->player.dir.y * MOVE_SPEED)});
if (tile_y->tile_type == EMPTY)
data->player.pos.y += data->player.dir.y * MOVE_SPEED;
update_pos_i(&data->player);
}
void move_backward(t_info *data)
@ -53,7 +46,6 @@ void move_backward(t_info *data)
- data->player.dir.y * MOVE_SPEED)});
if (tile_y->tile_type == EMPTY)
data->player.pos.y -= data->player.dir.y * MOVE_SPEED;
update_pos_i(&data->player);
}
void move_left(t_info *data)
@ -74,7 +66,6 @@ void move_left(t_info *data)
pplayer.y * MOVE_SPEED)});
if (tile_y->tile_type == EMPTY)
data->player.pos.y += pplayer.y * MOVE_SPEED;
update_pos_i(&data->player);
}
void move_right(t_info *data)
@ -95,5 +86,4 @@ void move_right(t_info *data)
* MOVE_SPEED)});
if (tile_y->tile_type == EMPTY)
data->player.pos.y -= pplayer.y * MOVE_SPEED;
update_pos_i(&data->player);
}