Skip to content

Commit 090557b

Browse files
author
Karim DHRIF
committed
added some texture
1 parent f5d2999 commit 090557b

File tree

132 files changed

+15526
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+15526
-11
lines changed
1.09 KB
Binary file not shown.
876 Bytes
Binary file not shown.
1.73 KB
Binary file not shown.
1.43 KB
Binary file not shown.
976 Bytes
Binary file not shown.
1.59 KB
Binary file not shown.
4.79 KB
Binary file not shown.
2.49 KB
Binary file not shown.
2.96 KB
Binary file not shown.
684 Bytes
Binary file not shown.
3.31 KB
Binary file not shown.
748 Bytes
Binary file not shown.
800 Bytes
Binary file not shown.
Binary file not shown.
1.46 KB
Binary file not shown.
682 Bytes
Binary file not shown.
576 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
796 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
974 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.84 KB
Binary file not shown.
2.66 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
980 Bytes
Binary file not shown.
2.45 KB
Binary file not shown.
1.53 KB
Binary file not shown.
1.99 KB
Binary file not shown.
1.65 KB
Binary file not shown.
6.32 KB
Binary file not shown.
696 Bytes
Binary file not shown.
Binary file not shown.
2.68 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
872 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
380 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.11 KB
Binary file not shown.
856 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
670 Bytes
Binary file not shown.
1.44 KB
Binary file not shown.
650 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
952 Bytes
Binary file not shown.
1.23 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.26 KB
Binary file not shown.
2.47 KB
Binary file not shown.
1.67 KB
Binary file not shown.
774 Bytes
Binary file not shown.
610 Bytes
Binary file not shown.
1.1 KB
Binary file not shown.

data.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: yboudoui <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2023/05/06 19:04:20 by yboudoui #+# #+# */
9-
/* Updated: 2023/05/07 18:58:24 by yboudoui ### ########.fr */
9+
/* Updated: 2023/05/07 20:18:29 by kdhrif ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -18,8 +18,8 @@ bool data_init(t_screen *screen, t_config config)
1818
static t_data data;
1919

2020
data.map = (t_map){config.map, config.map_size};
21-
data.texture[NORTH] = texture_init(screen->mlx, config.north_texture);
22-
data.texture[SOUHT] = texture_init(screen->mlx, config.south_texture);
21+
data.texture[SOUHT] = texture_init(screen->mlx, config.north_texture);
22+
data.texture[NORTH] = texture_init(screen->mlx, config.south_texture);
2323
data.texture[EAST] = texture_init(screen->mlx, config.east_texture);
2424
data.texture[WEST] = texture_init(screen->mlx, config.west_texture);
2525
data.floor_ceilling = image_env(screen,
@@ -55,11 +55,11 @@ bool player_init(t_data *data, t_vec2f pos, float view)
5555
{
5656
if (data == NULL)
5757
return (false);
58-
data->player.pos = pos;
58+
data->player.pos = vec2f_add(pos, (t_vec2f){0.5, 0.5});
5959
data->player.fov = 60.0;
6060
precompute_init(data->player.fov, WIDTH);
6161
data->player.hfov = c(60.0 / 2);
62-
data->player.view = c(view + 90);
62+
data->player.view = c(view);
6363
data->player.mouse_speed = c(1);
6464
return (true);
6565
}

main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: yboudoui <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2022/06/19 14:51:33 by yboudoui #+# #+# */
9-
/* Updated: 2023/05/07 18:58:58 by yboudoui ### ########.fr */
9+
/* Updated: 2023/05/07 20:09:05 by kdhrif ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -26,7 +26,7 @@ bool init(t_screen *screen, t_config config)
2626
{
2727
if (data_init(screen, config) == false)
2828
return (false);
29-
return (player_init(screen->data, config.player_pos, EAST));
29+
return (player_init(screen->data, config.player_pos, config.player_angle));
3030
}
3131

3232
void stop(t_screen *screen)

maps/normal_map_fullHD.cub

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ SO ./texture/south.xpm
33
EA ./texture/east.xpm
44
WE ./texture/weast.xpm
55

6-
C 255,20 ,30
7-
F 000, 000, 00
6+
C 0, 255, 255
7+
F 11, 11, 11
88

99

1010

1111
111111111111111111111111111111
1212
111111111000100000000000011111
13-
100000000000000000111000100001
13+
10000000000000000E111000100001
1414
110000100000000000000000001111
1515
100001111111000000010000111111
16-
1111111000000000W0000000000001
16+
111111100000000000000000000001
1717
111100000000001100000001000011
1818
100000000000000000000000000001
1919
110000000000011110000000000011
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
NO ./texture/acaciaplanks2.xpm
2+
SO ./texture/bricks.xpm
3+
EA ./texture/cobblestone.xpm
4+
WE ./texture/oxidizedcopper.xpm
5+
6+
C 0, 255, 255
7+
F 11, 11, 11
8+
9+
10+
11+
111111111111111111111111111111
12+
111111111000100000000000011111
13+
10000000000000000E111000100001
14+
110000100000000000000000001111
15+
100001111111000000010000111111
16+
111111100000000000000000000001
17+
111100000000001100000001000011
18+
100000000000000000000000000001
19+
110000000000011110000000000011
20+
100000000000111000000000000011
21+
11000000000011100000000000111
22+
110000000001111000000000000111
23+
111111111111111111111111111111111

0 commit comments

Comments
 (0)