did some reorganization and added a map
4
Makefile
@ -6,7 +6,7 @@
|
||||
# By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2024/10/15 11:48:46 by whaffman #+# #+# #
|
||||
# Updated: 2025/06/04 18:59:44 by qmennen ### ########.fr #
|
||||
# Updated: 2025/06/04 20:10:47 by qmennen ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
@ -47,7 +47,7 @@ SOURCES = $(shell basename -a $(shell find $(SRC_PATH) -type f -name "*.c"))
|
||||
# Build configurations
|
||||
BUILD_CONFIGS = release debug asan tsan
|
||||
|
||||
release_CFLAGS = -Wall -Werror -Werror -flto -Ofast -march=native -mtune=native -ffast-math -DFULLSCREEN=0
|
||||
release_CFLAGS = -Wall -Werror -Werror -flto -Ofast -march=native -mtune=native -ffast-math -DFULLSCREEN=1
|
||||
unity_CFLAGS = -Wall -Werror -Werror -Ofast -march=native -mtune=native -ffast-math
|
||||
debug_CFLAGS = -Wall -Werror -Werror -g3 -DDEBUG -DDBG='fprintf(stderr, RED "DEBUG: " RESET "%s:%d (%s)\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);'
|
||||
asan_CFLAGS = -Wall -Werror -Werror -flto -fsanitize=address,leak,undefined -g3 -DFULLSCREEN=0
|
||||
|
||||
BIN
assets/Run.png
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 528 KiB After Width: | Height: | Size: 528 KiB |
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 952 KiB After Width: | Height: | Size: 952 KiB |
|
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
BIN
assets/pixel-art-pack/box.png
Normal file
|
After Width: | Height: | Size: 958 B |
BIN
assets/pixel-art-pack/broken_wall.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
assets/pixel-art-pack/chain.png
Normal file
|
After Width: | Height: | Size: 758 B |
BIN
assets/pixel-art-pack/dungeon_ceil.png
Normal file
|
After Width: | Height: | Size: 721 B |
BIN
assets/pixel-art-pack/dungeon_floor.png
Normal file
|
After Width: | Height: | Size: 661 B |
BIN
assets/pixel-art-pack/dungeon_wall.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/pixel-art-pack/dungeon_wall_2.png
Normal file
|
After Width: | Height: | Size: 916 B |
BIN
assets/pixel-art-pack/fantasma.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
assets/pixel-art-pack/flying_eye.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
assets/pixel-art-pack/pixel_floor.png
Normal file
|
After Width: | Height: | Size: 572 B |
BIN
assets/pixel-art-pack/plant.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
assets/pixel-art-pack/small_plant.png
Normal file
|
After Width: | Height: | Size: 904 B |
40
maps/pixel.cub
Normal file
@ -0,0 +1,40 @@
|
||||
NO ./assets/pixel-art-pack/dungeon_wall.png
|
||||
WE ./assets/pixel-art-pack/dungeon_wall_2.png
|
||||
SO ./assets/pixel-art-pack/dungeon_wall.png
|
||||
EA ./assets/pixel-art-pack/dungeon_wall_2.png
|
||||
|
||||
D ./assets/pixel-art-pack/broken_wall.png
|
||||
|
||||
F 90,30,30
|
||||
C 100,100,200
|
||||
|
||||
FT ./assets/pixel-art-pack/dungeon_ceil.png
|
||||
CT ./assets/pixel-art-pack/dungeon_floor.png
|
||||
|
||||
-s a ./assets/pixel-art-pack/chain.png
|
||||
-c b ./assets/pixel-art-pack/box.png
|
||||
-s p ./assets/pixel-art-pack/small_plant.png
|
||||
-s m ./assets/broken_mirror.png
|
||||
-s t ./assets/test.png
|
||||
|
||||
-e e ./assets/pixel-art-pack/flying_eye.png
|
||||
-e f ./assets/pixel-art-pack/fantasma.png
|
||||
|
||||
1111111 111 1111 111111 1111111111 111111
|
||||
1a00001110111a01 10a001 1000000001 10001
|
||||
10010a00000b0e01 100001 10a00011011110a011
|
||||
10b0001110000001110011111111 1100b0001000000f01
|
||||
100a001 1000100a00001000a001 1000a0e0100b000001
|
||||
100m00111000100000b00000b00111110p00000100p00m0a1
|
||||
10b0e0bb000011111111111000000a0000111111000a00001
|
||||
1000t0bW00001 10a0011111111 1000001001
|
||||
10p0011111DD1 111111100001 1111111111110001
|
||||
100a01 1001 1pa0000000011111111000010111 10b01
|
||||
111111 1001 100000100a00000a0010b0000101 10a001
|
||||
1b01 10000p1111111111111000a10001 10bf0m1
|
||||
1001 100a000000000a00f0a00111b001 100001
|
||||
1001 1b000000b0a00p00000011 11111 100001
|
||||
10a11111111100111111111111111111001110001
|
||||
1000000000000000000000b00000a0f0000a00001
|
||||
111111b0111111101100111100011101011111111
|
||||
1111 1111111 11111 11111
|
||||
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* :::::::: */
|
||||
/* end_screen.c :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* ::: :::::::: */
|
||||
/* end_screen.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/03 16:20:35 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/04 15:48:54 by whaffman ######## odam.nl */
|
||||
/* Updated: 2025/06/04 19:53:34 by qmennen ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -112,7 +112,7 @@ t_menu *create_end_screen(t_game_manager *manager)
|
||||
};
|
||||
t_menu *menu;
|
||||
|
||||
menu = menu_create(manager, "assets/end_screen.png", menu_items);
|
||||
menu = menu_create(manager, "assets/menu/end_screen.png", menu_items);
|
||||
menu->items[0]->image->instances[0].x = 100;
|
||||
menu->items[0]->image->instances[0].y = manager->game->screen->height / 2;
|
||||
if (!menu)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/28 14:14:11 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/03 20:15:01 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/04 19:53:06 by qmennen ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -42,7 +42,7 @@ t_menu *create_main_menu(t_game_manager *manager)
|
||||
};
|
||||
t_menu *menu;
|
||||
|
||||
menu = menu_create(manager, "./assets/surveillor_background.png", menu_items);
|
||||
menu = menu_create(manager, "./assets/menu/surveillor_background.png", menu_items);
|
||||
if (!menu)
|
||||
return (NULL);
|
||||
return (menu);
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* :::::::: */
|
||||
/* render_floor.c :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: whaffman <whaffman@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* ::: :::::::: */
|
||||
/* render_floor.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/14 13:06:39 by whaffman #+# #+# */
|
||||
/* Updated: 2025/06/03 13:38:31 by whaffman ######## odam.nl */
|
||||
/* Updated: 2025/06/04 20:07:21 by qmennen ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -26,7 +26,7 @@ static t_vec2 calc_floor_step(t_game *game,
|
||||
static void draw_floor_ceiling_pixel(t_game *game,
|
||||
t_vec2_int coord, double row_dist, t_vec2 floor_pos)
|
||||
{
|
||||
const t_vec2_int tex = vec2_to_int(mul(get_fraction(floor_pos), 64));
|
||||
const t_vec2_int tex = vec2_to_int(mul(get_fraction(floor_pos), game->map->texture_floor->width));
|
||||
int color;
|
||||
|
||||
if (game->map->texture_floor == NULL)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/22 17:08:26 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/03 19:31:25 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/04 19:51:13 by qmennen ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -30,7 +30,7 @@ static int init_temp(t_game **game)
|
||||
{
|
||||
mlx_texture_t *hud_texture;
|
||||
|
||||
hud_texture = mlx_load_png("./assets/overlay2.png");
|
||||
hud_texture = mlx_load_png("./assets/hud/cam_overlay.png");
|
||||
(*game)->screen->hud = mlx_texture_to_image((*game)->screen->mlx,
|
||||
hud_texture);
|
||||
mlx_delete_texture(hud_texture);
|
||||
|
||||