diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-16 11:15:58 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-16 11:15:58 +0200 |
| commit | 9e14d5cd569e912c6a77222719a4d4a8be4b7c72 (patch) | |
| tree | 7b0868798c85f61a749e2e17113b8d5ced79933e | |
| parent | fa7b6b01b68ad3934734e67b65d31d0d4ccfa0a6 (diff) | |
painting and new tiles
| -rw-r--r-- | data/imgs/objects/bowling_machine.png | bin | 0 -> 20047 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting1.png | bin | 0 -> 149374 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting10.png | bin | 0 -> 119495 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting2.png | bin | 0 -> 121593 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting3.png | bin | 0 -> 126960 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting4.png | bin | 0 -> 164895 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting5.png | bin | 0 -> 154164 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting6.png | bin | 0 -> 139278 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting7.png | bin | 0 -> 133189 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting8.png | bin | 0 -> 94964 bytes | |||
| -rw-r--r-- | data/imgs/objects/painting9.png | bin | 0 -> 124488 bytes | |||
| -rw-r--r-- | data/imgs/tiles/tile_concrete.png | bin | 0 -> 3026 bytes | |||
| -rw-r--r-- | data/imgs/tiles/tile_gym.png | bin | 11741 -> 5999 bytes | |||
| -rw-r--r-- | data/imgs/tiles/tile_laminate.png | bin | 0 -> 9167 bytes | |||
| -rw-r--r-- | data/maps/map1.dat | bin | 8384008 -> 8384008 bytes | |||
| -rw-r--r-- | data/psd/bowling_machine.psd | bin | 0 -> 157403 bytes | |||
| -rw-r--r-- | data/psd/painting1.psd | bin | 0 -> 826896 bytes | |||
| -rw-r--r-- | data/psd/painting2.psd | bin | 0 -> 919559 bytes | |||
| -rw-r--r-- | data/psd/painting7.psd | bin | 0 -> 1782281 bytes | |||
| -rw-r--r-- | data/psd/tile_concrete.psd | bin | 0 -> 324727 bytes | |||
| -rw-r--r-- | data/psd/tile_gym.psd | bin | 60710 -> 751648 bytes | |||
| -rw-r--r-- | include/asset_defs.h | 13 | ||||
| -rw-r--r-- | include/map.h | 2 | ||||
| -rw-r--r-- | include/objects.h | 22 | ||||
| -rw-r--r-- | src/asset_defs.c | 13 | ||||
| -rw-r--r-- | src/map.c | 5 | ||||
| -rw-r--r-- | src/objects.c | 29 |
27 files changed, 78 insertions, 6 deletions
diff --git a/data/imgs/objects/bowling_machine.png b/data/imgs/objects/bowling_machine.png Binary files differnew file mode 100644 index 0000000..524c088 --- /dev/null +++ b/data/imgs/objects/bowling_machine.png diff --git a/data/imgs/objects/painting1.png b/data/imgs/objects/painting1.png Binary files differnew file mode 100644 index 0000000..6d95191 --- /dev/null +++ b/data/imgs/objects/painting1.png diff --git a/data/imgs/objects/painting10.png b/data/imgs/objects/painting10.png Binary files differnew file mode 100644 index 0000000..396a84e --- /dev/null +++ b/data/imgs/objects/painting10.png diff --git a/data/imgs/objects/painting2.png b/data/imgs/objects/painting2.png Binary files differnew file mode 100644 index 0000000..13e17ce --- /dev/null +++ b/data/imgs/objects/painting2.png diff --git a/data/imgs/objects/painting3.png b/data/imgs/objects/painting3.png Binary files differnew file mode 100644 index 0000000..aed1f4a --- /dev/null +++ b/data/imgs/objects/painting3.png diff --git a/data/imgs/objects/painting4.png b/data/imgs/objects/painting4.png Binary files differnew file mode 100644 index 0000000..a55e43b --- /dev/null +++ b/data/imgs/objects/painting4.png diff --git a/data/imgs/objects/painting5.png b/data/imgs/objects/painting5.png Binary files differnew file mode 100644 index 0000000..c3595e5 --- /dev/null +++ b/data/imgs/objects/painting5.png diff --git a/data/imgs/objects/painting6.png b/data/imgs/objects/painting6.png Binary files differnew file mode 100644 index 0000000..5b5ccdd --- /dev/null +++ b/data/imgs/objects/painting6.png diff --git a/data/imgs/objects/painting7.png b/data/imgs/objects/painting7.png Binary files differnew file mode 100644 index 0000000..d8e0403 --- /dev/null +++ b/data/imgs/objects/painting7.png diff --git a/data/imgs/objects/painting8.png b/data/imgs/objects/painting8.png Binary files differnew file mode 100644 index 0000000..0de385e --- /dev/null +++ b/data/imgs/objects/painting8.png diff --git a/data/imgs/objects/painting9.png b/data/imgs/objects/painting9.png Binary files differnew file mode 100644 index 0000000..e8030bd --- /dev/null +++ b/data/imgs/objects/painting9.png diff --git a/data/imgs/tiles/tile_concrete.png b/data/imgs/tiles/tile_concrete.png Binary files differnew file mode 100644 index 0000000..3e5a9af --- /dev/null +++ b/data/imgs/tiles/tile_concrete.png diff --git a/data/imgs/tiles/tile_gym.png b/data/imgs/tiles/tile_gym.png Binary files differindex 63cad35..70cbabe 100644 --- a/data/imgs/tiles/tile_gym.png +++ b/data/imgs/tiles/tile_gym.png diff --git a/data/imgs/tiles/tile_laminate.png b/data/imgs/tiles/tile_laminate.png Binary files differnew file mode 100644 index 0000000..2fb98b3 --- /dev/null +++ b/data/imgs/tiles/tile_laminate.png diff --git a/data/maps/map1.dat b/data/maps/map1.dat Binary files differindex f56e3c5..fd020cf 100644 --- a/data/maps/map1.dat +++ b/data/maps/map1.dat diff --git a/data/psd/bowling_machine.psd b/data/psd/bowling_machine.psd Binary files differnew file mode 100644 index 0000000..1a2dc94 --- /dev/null +++ b/data/psd/bowling_machine.psd diff --git a/data/psd/painting1.psd b/data/psd/painting1.psd Binary files differnew file mode 100644 index 0000000..6311907 --- /dev/null +++ b/data/psd/painting1.psd diff --git a/data/psd/painting2.psd b/data/psd/painting2.psd Binary files differnew file mode 100644 index 0000000..dd8d927 --- /dev/null +++ b/data/psd/painting2.psd diff --git a/data/psd/painting7.psd b/data/psd/painting7.psd Binary files differnew file mode 100644 index 0000000..7d42b7a --- /dev/null +++ b/data/psd/painting7.psd diff --git a/data/psd/tile_concrete.psd b/data/psd/tile_concrete.psd Binary files differnew file mode 100644 index 0000000..210a578 --- /dev/null +++ b/data/psd/tile_concrete.psd diff --git a/data/psd/tile_gym.psd b/data/psd/tile_gym.psd Binary files differindex 93e75f0..b306bc5 100644 --- a/data/psd/tile_gym.psd +++ b/data/psd/tile_gym.psd diff --git a/include/asset_defs.h b/include/asset_defs.h index 3c09f44..5b26329 100644 --- a/include/asset_defs.h +++ b/include/asset_defs.h @@ -87,6 +87,17 @@ image* img_club_wall2; image* img_club_wall3; image* img_bowling_lane; image* img_bowling_lane_end; +image* img_bowling_machine; +image* img_painting1; +image* img_painting2; +image* img_painting3; +image* img_painting4; +image* img_painting5; +image* img_painting6; +image* img_painting7; +image* img_painting8; +image* img_painting9; +image* img_painting10; // Throwables image* img_grenade; @@ -159,6 +170,8 @@ image* img_tile_club_stairs10; image* img_tile_club_stairs11; image* img_tile_club_stairs12; image* img_tile_club_stairs13; +image* img_tile_laminate; +image* img_tile_concrete; // Sounds Mix_Chunk* wav_throwable_bounce; diff --git a/include/map.h b/include/map.h index da70c39..517f758 100644 --- a/include/map.h +++ b/include/map.h @@ -39,6 +39,8 @@ typedef enum t_tile_type { TILE_CLUB_STAIRS11 = 28, TILE_CLUB_STAIRS12 = 29, TILE_CLUB_STAIRS13 = 30, + TILE_CONCRETE = 31, + TILE_LAMINATE = 32, TILE_END, } tile_type; diff --git a/include/objects.h b/include/objects.h index 4850a90..9d22942 100644 --- a/include/objects.h +++ b/include/objects.h @@ -58,6 +58,17 @@ typedef enum t_object_type { OBJECT_BOWLING_LANE = 34, OBJECT_BOWLING_LANE_END = 35, OBJECT_GLASS_DOOR_V = 36, // Substitute. + OBJECT_BOWLING_MACHINE = 37, + OBJECT_PAINTING1 = 38, + OBJECT_PAINTING2 = 39, + OBJECT_PAINTING3 = 40, + OBJECT_PAINTING4 = 41, + OBJECT_PAINTING5 = 42, + OBJECT_PAINTING6 = 43, + OBJECT_PAINTING7 = 44, + OBJECT_PAINTING8 = 45, + OBJECT_PAINTING9 = 46, + OBJECT_PAINTING10 = 47, OBJECT_END, } object_type; @@ -129,6 +140,17 @@ object object_dict[OBJECT_END] = { {0,(vec3f){0, 0, 0},{13,3,0},OBJECT_BOWLING_LANE, 0}, {0,(vec3f){0, 0, 0},{2,3,1},OBJECT_BOWLING_LANE_END, 1}, {0,(vec3f){0, 0, 0},{1,2,1},OBJECT_GLASS_DOOR_V, 0}, + {0,(vec3f){0, 0, 0},{3,1,0.5f},OBJECT_BOWLING_MACHINE, 1}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING1, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING2, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING3, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING4, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING5, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING6, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING7, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING8, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING9, 0}, + {0,(vec3f){0, 0, 0},{2,1,1},OBJECT_PAINTING10, 0}, }; // decoration objects laying on floor. diff --git a/src/asset_defs.c b/src/asset_defs.c index 5e8b440..45a248f 100644 --- a/src/asset_defs.c +++ b/src/asset_defs.c @@ -93,6 +93,17 @@ void load_assets() { // Assets loaded at match start. img_club_seat7 = assets_load_image_from_file("data/imgs/objects/club_seat7.png"); img_bowling_lane = assets_load_image_from_file("data/imgs/objects/bowling_lane.png"); img_bowling_lane_end = assets_load_image_from_file("data/imgs/objects/bowling_lane_end.png"); + img_bowling_machine = assets_load_image_from_file("data/imgs/objects/bowling_machine.png"); + img_painting1 = assets_load_image_from_file("data/imgs/objects/painting1.png"); + img_painting2 = assets_load_image_from_file("data/imgs/objects/painting2.png"); + img_painting3 = assets_load_image_from_file("data/imgs/objects/painting3.png"); + img_painting4 = assets_load_image_from_file("data/imgs/objects/painting4.png"); + img_painting5 = assets_load_image_from_file("data/imgs/objects/painting5.png"); + img_painting6 = assets_load_image_from_file("data/imgs/objects/painting6.png"); + img_painting7 = assets_load_image_from_file("data/imgs/objects/painting7.png"); + img_painting8 = assets_load_image_from_file("data/imgs/objects/painting8.png"); + img_painting9 = assets_load_image_from_file("data/imgs/objects/painting9.png"); + img_painting10 = assets_load_image_from_file("data/imgs/objects/painting10.png"); // Players img_gunner_black_run = assets_load_image_from_file("data/imgs/players/Black/Gunner_Black_Run.png"); @@ -160,6 +171,8 @@ void load_assets() { // Assets loaded at match start. img_tile_club_stairs11 = assets_load_image_from_file("data/imgs/tiles/club_stairs11.png"); img_tile_club_stairs12 = assets_load_image_from_file("data/imgs/tiles/club_stairs12.png"); img_tile_club_stairs13 = assets_load_image_from_file("data/imgs/tiles/club_stairs13.png"); + img_tile_concrete = assets_load_image_from_file("data/imgs/tiles/tile_concrete.png"); + img_tile_laminate = assets_load_image_from_file("data/imgs/tiles/tile_laminate.png"); // sounds wav_throwable_bounce = Mix_LoadWAV("data/sounds/throwable_bounce.wav"); @@ -275,18 +275,15 @@ void load_mapdata_into_world() { if (o.type == OBJECT_ZOMBIE_SPAWNER) { create_spawner((vec2){.x = o.position.x, .y = o.position.y}); - loaded_map.objects[i].active = 0; } if (o.type == OBJECT_GLASS_DOOR_H || o.type == OBJECT_GLASS_DOOR_V) { create_glass_door(o); - loaded_map.objects[i].active = 0; } if (o.type == OBJECT_BOWLING_LANE) { add_decoration_object(o); - loaded_map.objects[i].active = 0; } } } @@ -424,6 +421,8 @@ image* get_image_from_tiletype(tile_type tile) { case TILE_CLUB_STAIRS11: return img_tile_club_stairs11; case TILE_CLUB_STAIRS12: return img_tile_club_stairs12; case TILE_CLUB_STAIRS13: return img_tile_club_stairs13; + case TILE_LAMINATE: return img_tile_laminate; + case TILE_CONCRETE: return img_tile_concrete; default: return 0; } } diff --git a/src/objects.c b/src/objects.c index 9342eb0..2574ed7 100644 --- a/src/objects.c +++ b/src/objects.c @@ -169,6 +169,28 @@ image* get_image_from_objecttype(object_type tile) { return img_bowling_lane_end; case OBJECT_GLASS_DOOR_V: return img_glass_door_v_closed; + case OBJECT_BOWLING_MACHINE: + return img_bowling_machine; + case OBJECT_PAINTING1: + return img_painting1; + case OBJECT_PAINTING2: + return img_painting2; + case OBJECT_PAINTING3: + return img_painting3; + case OBJECT_PAINTING4: + return img_painting4; + case OBJECT_PAINTING5: + return img_painting5; + case OBJECT_PAINTING6: + return img_painting6; + case OBJECT_PAINTING7: + return img_painting7; + case OBJECT_PAINTING8: + return img_painting8; + case OBJECT_PAINTING9: + return img_painting9; + case OBJECT_PAINTING10: + return img_painting10; default: return 0; } @@ -180,6 +202,7 @@ void add_decoration_object(object o) { if (decoration_objects[i].active) continue; decoration_objects[i] = o; + return; } } @@ -203,9 +226,9 @@ void draw_objects(platform_window* window) { if (!loaded_map.objects[i].active) continue; object o = loaded_map.objects[i]; - //if (o.type == OBJECT_GLASS_DOOR_H) continue; - //if (o.type == OBJECT_GLASS_DOOR_V) continue; - //if (o.type == OBJECT_BOWLING_LANE) continue; + if (o.type == OBJECT_GLASS_DOOR_H) continue; + if (o.type == OBJECT_GLASS_DOOR_V) continue; + if (o.type == OBJECT_BOWLING_LANE) continue; box box = get_box_of_object(window, o); |
