Add stage layer asset sources

This commit is contained in:
2026-06-09 15:02:04 +08:00
parent 3e2e25eb93
commit cf7b7dfb5a
12 changed files with 140 additions and 6 deletions
+10
View File
@@ -16,10 +16,20 @@ enum class StageLayerRole {
PropsFront
};
struct StageLayerSource {
std::string texturePath;
frostbite2D::Rect sourceRect;
bool useSourceRect = false;
frostbite2D::Color tint = frostbite2D::Color(1.0f, 1.0f, 1.0f, 1.0f);
bool hasTexture() const { return !texturePath.empty(); }
};
struct StageRect {
frostbite2D::Rect bounds;
frostbite2D::Color color;
StageLayerRole layer = StageLayerRole::PropsBack;
StageLayerSource source;
};
struct SpawnPoint {
+18
View File
@@ -0,0 +1,18 @@
#pragma once
namespace ns_game::stage_assets::stage_01 {
constexpr const char* kBackgroundFar =
"assets/stage/stage_01/background/background_far.png";
constexpr const char* kBackgroundMid =
"assets/stage/stage_01/background/background_mid.png";
constexpr const char* kTileset =
"assets/stage/stage_01/tiles/stage_01_tileset.png";
constexpr const char* kProps =
"assets/stage/stage_01/props/stage_01_props.png";
constexpr const char* kHitSpark =
"assets/stage/stage_01/effects/hit_spark.png";
constexpr const char* kDust =
"assets/stage/stage_01/effects/dust.png";
} // namespace ns_game::stage_assets::stage_01