diff options
| -rw-r--r-- | data/imgs/objects/locker.png | bin | 0 -> 1866 bytes | |||
| -rw-r--r-- | data/imgs/objects/school_bench.png | bin | 0 -> 15305 bytes | |||
| -rw-r--r-- | data/imgs/objects/school_table.png | bin | 0 -> 3863 bytes | |||
| -rw-r--r-- | data/imgs/tiles/bathroom.png | bin | 0 -> 154 bytes | |||
| -rw-r--r-- | data/imgs/tiles/tile_funk.png | bin | 0 -> 428 bytes | |||
| -rw-r--r-- | data/imgs/tiles/tile_gym.png | bin | 0 -> 11741 bytes | |||
| -rw-r--r-- | data/imgs/tiles/tile_wood1.png | bin | 0 -> 154 bytes | |||
| -rw-r--r-- | data/maps/map1.dat | bin | 8384008 -> 8384008 bytes | |||
| -rw-r--r-- | data/psd/bathroom.psd | bin | 0 -> 19614 bytes | |||
| -rw-r--r-- | data/psd/locker.psd | bin | 0 -> 93240 bytes | |||
| -rw-r--r-- | data/psd/school_table.psd | bin | 0 -> 68476 bytes | |||
| -rw-r--r-- | data/psd/schoolbench.psd | bin | 0 -> 90291 bytes | |||
| -rw-r--r-- | data/psd/tile_funk.psd | bin | 0 -> 54801 bytes | |||
| -rw-r--r-- | data/psd/tile_gym.psd | bin | 0 -> 60710 bytes | |||
| -rw-r--r-- | data/psd/tile_wood1.psd | bin | 0 -> 32524 bytes | |||
| -rw-r--r-- | include/asset_defs.h | 7 | ||||
| -rw-r--r-- | include/map.h | 5 | ||||
| -rw-r--r-- | include/objects.h | 6 | ||||
| -rw-r--r-- | src/asset_defs.c | 9 | ||||
| -rw-r--r-- | src/editor.c | 3 | ||||
| -rw-r--r-- | src/map.c | 4 | ||||
| -rw-r--r-- | src/objects.c | 6 |
22 files changed, 38 insertions, 2 deletions
diff --git a/data/imgs/objects/locker.png b/data/imgs/objects/locker.png Binary files differnew file mode 100644 index 0000000..7836841 --- /dev/null +++ b/data/imgs/objects/locker.png diff --git a/data/imgs/objects/school_bench.png b/data/imgs/objects/school_bench.png Binary files differnew file mode 100644 index 0000000..c702a42 --- /dev/null +++ b/data/imgs/objects/school_bench.png diff --git a/data/imgs/objects/school_table.png b/data/imgs/objects/school_table.png Binary files differnew file mode 100644 index 0000000..6314d69 --- /dev/null +++ b/data/imgs/objects/school_table.png diff --git a/data/imgs/tiles/bathroom.png b/data/imgs/tiles/bathroom.png Binary files differnew file mode 100644 index 0000000..70f563d --- /dev/null +++ b/data/imgs/tiles/bathroom.png diff --git a/data/imgs/tiles/tile_funk.png b/data/imgs/tiles/tile_funk.png Binary files differnew file mode 100644 index 0000000..44d322e --- /dev/null +++ b/data/imgs/tiles/tile_funk.png diff --git a/data/imgs/tiles/tile_gym.png b/data/imgs/tiles/tile_gym.png Binary files differnew file mode 100644 index 0000000..63cad35 --- /dev/null +++ b/data/imgs/tiles/tile_gym.png diff --git a/data/imgs/tiles/tile_wood1.png b/data/imgs/tiles/tile_wood1.png Binary files differnew file mode 100644 index 0000000..fd48a2b --- /dev/null +++ b/data/imgs/tiles/tile_wood1.png diff --git a/data/maps/map1.dat b/data/maps/map1.dat Binary files differindex 737210d..8dfd7c3 100644 --- a/data/maps/map1.dat +++ b/data/maps/map1.dat diff --git a/data/psd/bathroom.psd b/data/psd/bathroom.psd Binary files differnew file mode 100644 index 0000000..99199a6 --- /dev/null +++ b/data/psd/bathroom.psd diff --git a/data/psd/locker.psd b/data/psd/locker.psd Binary files differnew file mode 100644 index 0000000..4a4ab9c --- /dev/null +++ b/data/psd/locker.psd diff --git a/data/psd/school_table.psd b/data/psd/school_table.psd Binary files differnew file mode 100644 index 0000000..74637c8 --- /dev/null +++ b/data/psd/school_table.psd diff --git a/data/psd/schoolbench.psd b/data/psd/schoolbench.psd Binary files differnew file mode 100644 index 0000000..19f9579 --- /dev/null +++ b/data/psd/schoolbench.psd diff --git a/data/psd/tile_funk.psd b/data/psd/tile_funk.psd Binary files differnew file mode 100644 index 0000000..924680c --- /dev/null +++ b/data/psd/tile_funk.psd diff --git a/data/psd/tile_gym.psd b/data/psd/tile_gym.psd Binary files differnew file mode 100644 index 0000000..93e75f0 --- /dev/null +++ b/data/psd/tile_gym.psd diff --git a/data/psd/tile_wood1.psd b/data/psd/tile_wood1.psd Binary files differnew file mode 100644 index 0000000..65f0854 --- /dev/null +++ b/data/psd/tile_wood1.psd diff --git a/include/asset_defs.h b/include/asset_defs.h index 0e7e5b4..5a239ae 100644 --- a/include/asset_defs.h +++ b/include/asset_defs.h @@ -54,6 +54,9 @@ image* img_big_control_panel; image* img_chair_down; image* img_computer_rack; image* img_generator; +image* img_school_table; +image* img_school_bench; +image* img_locker; // Throwables image* img_grenade; @@ -98,6 +101,10 @@ image* img_mars_surface; image* img_space_parallax; image* img_tile_floor1; image* img_tile_floor2; +image* img_tile_bathroom; +image* img_tile_funk; +image* img_tile_wood1; +image* img_tile_gym; // Sounds Mix_Chunk* wav_throwable_bounce; diff --git a/include/map.h b/include/map.h index 8b57d84..960e9e6 100644 --- a/include/map.h +++ b/include/map.h @@ -6,10 +6,15 @@ #include "players.h" #include "objects.h" +// @NEWTILE typedef enum t_tile_type { TILE_NONE = 0, TILE_FLOOR1 = 1, TILE_FLOOR2 = 2, + TILE_BATHROOM = 3, + TILE_FUNK = 4, + TILE_WOOD1 = 5, + TILE_GYM = 6, TILE_END, } tile_type; diff --git a/include/objects.h b/include/objects.h index dd9760b..a98f7a7 100644 --- a/include/objects.h +++ b/include/objects.h @@ -38,6 +38,9 @@ typedef enum t_object_type { OBJECT_CHAIR_DOWN = 15, OBJECT_COMPUTER_RACK = 16, OBJECT_GENERATOR = 17, + OBJECT_SCHOOL_TABLE = 18, + OBJECT_SCHOOL_BENCH = 19, + OBJECT_LOCKER = 20, OBJECT_END, } object_type; @@ -90,6 +93,9 @@ object object_dict[OBJECT_END] = { {0,(vec3f){0, 0, 0},{1,1,0.5f},OBJECT_CHAIR_DOWN, 1}, {0,(vec3f){0, 0, 0},{2,1,1.0f},OBJECT_COMPUTER_RACK, 1}, {0,(vec3f){0, 0, 0},{8,2,1.0f},OBJECT_GENERATOR, 1}, + {0,(vec3f){0, 0, 0},{1,4,0.5f},OBJECT_SCHOOL_TABLE, 1}, + {0,(vec3f){0, 0, 0},{2,1,0.5f},OBJECT_SCHOOL_BENCH, 1}, + {0,(vec3f){0, 0, 0},{1,1,1.0f},OBJECT_LOCKER, 1}, }; object get_object_at_tile(float x, float y); diff --git a/src/asset_defs.c b/src/asset_defs.c index 390bf94..7fff980 100644 --- a/src/asset_defs.c +++ b/src/asset_defs.c @@ -62,6 +62,9 @@ void load_assets() { img_big_control_panel = assets_load_image_from_file("data/imgs/objects/big_control_panel.png"); img_computer_rack = assets_load_image_from_file("data/imgs/objects/computer_rack.png"); img_generator = assets_load_image_from_file("data/imgs/objects/generator.png"); + img_school_bench = assets_load_image_from_file("data/imgs/objects/school_bench.png"); + img_school_table = assets_load_image_from_file("data/imgs/objects/school_table.png"); + img_locker = assets_load_image_from_file("data/imgs/objects/locker.png"); // Players img_gunner_black_run = assets_load_image_from_file("data/imgs/players/Black/Gunner_Black_Run.png"); @@ -96,11 +99,15 @@ void load_assets() { img_zombie_chunk_foot = assets_load_image_from_file("data/imgs/zombie_chunk_foot.png"); img_zombie_chunk_blood = assets_load_image_from_file("data/imgs/zombie_chunk_blood.png"); - // Tiles + // Tiles // @NEWTILE img_mars_surface = assets_load_image_from_file("data/imgs/tiles/mars_surface.png"); img_tile_floor1 = assets_load_image_from_file("data/imgs/tiles/floor1.png"); img_tile_floor2 = assets_load_image_from_file("data/imgs/tiles/floor2.png"); img_space_parallax = assets_load_image_from_file("data/imgs/tiles/space_parallax.png"); + img_tile_bathroom = assets_load_image_from_file("data/imgs/tiles/bathroom.png"); + img_tile_funk = assets_load_image_from_file("data/imgs/tiles/tile_funk.png"); + img_tile_wood1 = assets_load_image_from_file("data/imgs/tiles/tile_wood1.png"); + img_tile_gym = assets_load_image_from_file("data/imgs/tiles/tile_gym.png"); // sounds wav_throwable_bounce = Mix_LoadWAV("data/sounds/throwable_bounce.wav"); diff --git a/src/editor.c b/src/editor.c index 050d762..9295d14 100644 --- a/src/editor.c +++ b/src/editor.c @@ -40,7 +40,8 @@ static void update_tile_editor(platform_window* window) { case PLACING_TILE: if (is_left_down()) { map_to_load.tiles[pos.y][pos.x] = tile_to_place; - load_mapdata_into_world(); + loaded_map.heightmap[pos.y][pos.x].type = tile_to_place; + //load_mapdata_into_world(); printf("%d %d\n", pos.x, pos.y); } break; @@ -388,6 +388,10 @@ image* get_image_from_tiletype(tile_type tile) { { case TILE_FLOOR1: return img_tile_floor1; case TILE_FLOOR2: return img_tile_floor2; + case TILE_BATHROOM: return img_tile_bathroom; + case TILE_FUNK: return img_tile_funk; + case TILE_WOOD1: return img_tile_wood1; + case TILE_GYM: return img_tile_gym; default: return 0; } } diff --git a/src/objects.c b/src/objects.c index db0295d..14d10d8 100644 --- a/src/objects.c +++ b/src/objects.c @@ -131,6 +131,12 @@ image* get_image_from_objecttype(object_type tile) { return img_computer_rack; case OBJECT_GENERATOR: return img_generator; + case OBJECT_SCHOOL_BENCH: + return img_school_bench; + case OBJECT_SCHOOL_TABLE: + return img_school_table; + case OBJECT_LOCKER: + return img_locker; default: return 0; } |
