diff --git a/assets/config.json b/assets/config.json index c8b2b91..7961f8b 100644 --- a/assets/config.json +++ b/assets/config.json @@ -47,8 +47,23 @@ "frame_width": 900, "frame_height": 600 }, - "test_background": - {"path": "assets/scenes/test_background.png", + "death_scene": + {"path": "assets/scenes/death_scene.png", + "frame_width": 1920, + "frame_height": 1080 + }, + "next_level_scene": + {"path": "assets/scenes/next_level_scene.png", + "frame_width": 1920, + "frame_height": 1080 + }, + "starting_scene": + {"path": "assets/scenes/starting_scene.png", + "frame_width": 1920, + "frame_height": 1080 + }, + "win_scene": + {"path": "assets/scenes/win_scene.png", "frame_width": 1920, "frame_height": 1080 } diff --git a/assets/scenes.json b/assets/scenes.json index ba6c03c..d2b726e 100644 --- a/assets/scenes.json +++ b/assets/scenes.json @@ -1,11 +1,53 @@ { + "DEATH": { + "components": [ + {"_type": "AnimatedScene", + "layout": [ + "[=text]" + ], + "background": "death_scene", + "actors": [ + ], + "fixtures": [ + ] + } + ] + }, "NEXT_LEVEL": { "components": [ {"_type": "AnimatedScene", "layout": [ "[=text]" ], - "background": "test_background", + "background": "next_level_scene", + "actors": [ + ], + "fixtures": [ + ] + } + ] + }, + "STARTING": { + "components": [ + {"_type": "AnimatedScene", + "layout": [ + "[=text]" + ], + "background": "starting_scene", + "actors": [ + ], + "fixtures": [ + ] + } + ] + }, + "WIN": { + "components": [ + {"_type": "AnimatedScene", + "layout": [ + "[=text]" + ], + "background": "win_scene", "actors": [ ], "fixtures": [ diff --git a/assets/scenes/death_scene.png b/assets/scenes/death_scene.png new file mode 100644 index 0000000..428ad1c Binary files /dev/null and b/assets/scenes/death_scene.png differ diff --git a/assets/scenes/next_level_scene.png b/assets/scenes/next_level_scene.png new file mode 100644 index 0000000..8cbdbfc Binary files /dev/null and b/assets/scenes/next_level_scene.png differ diff --git a/assets/scenes/starting_scene.png b/assets/scenes/starting_scene.png new file mode 100644 index 0000000..661a945 Binary files /dev/null and b/assets/scenes/starting_scene.png differ diff --git a/assets/scenes/win_scene.png b/assets/scenes/win_scene.png new file mode 100644 index 0000000..f4dafe4 Binary files /dev/null and b/assets/scenes/win_scene.png differ diff --git a/src/constants.hpp b/src/constants.hpp index d2a772c..4b02c73 100644 --- a/src/constants.hpp +++ b/src/constants.hpp @@ -21,10 +21,10 @@ constexpr int PLAYER_SPRITE_DIR_CORRECTION=270; constexpr int RENDER_DISTANCE=500; constexpr int ROOM_SIZE=3; -constexpr int BOSS_VIEW_WIDTH=1080; -constexpr int BOSS_VIEW_HEIGHT=SCREEN_HEIGHT; -constexpr int BOSS_VIEW_X=SCREEN_WIDTH - BOSS_VIEW_WIDTH; -constexpr int BOSS_VIEW_Y=0; +constexpr int SCENE_VIEW_WIDTH=SCREEN_WIDTH; +constexpr int SCENE_VIEW_HEIGHT=SCREEN_HEIGHT; +constexpr int SCENE_VIEW_X=0; +constexpr int SCENE_VIEW_Y=0; constexpr bool VSYNC=true; constexpr int FRAME_LIMIT=60; diff --git a/src/graphics/scene.cpp b/src/graphics/scene.cpp index d0f4bb8..7bb42c8 100644 --- a/src/graphics/scene.cpp +++ b/src/graphics/scene.cpp @@ -55,7 +55,7 @@ namespace scene { } void Engine::init() { - $ui.position(0,0, BOSS_VIEW_WIDTH, BOSS_VIEW_HEIGHT); + $ui.position(SCENE_VIEW_X, SCENE_VIEW_Y, SCENE_VIEW_WIDTH, SCENE_VIEW_HEIGHT); $ui.set($ui.MAIN, {$ui.$parser, guecs::THEME.TRANSPARENT}); auto& background = $ui.get($ui.MAIN); background.set_sprite($scene.background, true); diff --git a/src/graphics/scene.hpp b/src/graphics/scene.hpp index 2db737a..1f9449f 100644 --- a/src/graphics/scene.hpp +++ b/src/graphics/scene.hpp @@ -35,7 +35,7 @@ namespace scene { std::unordered_map $actor_name_ids; std::vector $fixtures; std::vector $actors; - cinematic::Camera $camera{{BOSS_VIEW_WIDTH, BOSS_VIEW_HEIGHT}, "scene"}; + cinematic::Camera $camera{{SCENE_VIEW_WIDTH, SCENE_VIEW_HEIGHT}, "scene"}; Engine(components::AnimatedScene& scene); diff --git a/src/gui/body_ui.cpp b/src/gui/body_ui.cpp index 61771de..43f6f0c 100644 --- a/src/gui/body_ui.cpp +++ b/src/gui/body_ui.cpp @@ -29,7 +29,7 @@ namespace gui { auto gui_id = $gui.entity(name); $gui.set(gui_id, {guecs::to_wstring(name)}); - $gui.set(gui_id, {1, {255, 0, 0, 255}}); + $gui.set(gui_id, {1, THEME.TRANSPARENT}); $gui.set(gui_id, {1.0f, THEME.DARK_MID, {}}); }