#pragma once #include #include #include #include namespace frostbite2D::game { struct AreaConfig { std::string mapPath; std::string mapType; Vec2 generatePos = Vec2(-1.0f, -1.0f); }; struct TownConfig { std::string townName; std::string enteringTitle; std::string enteringCutscene; int needQuestId = -1; int needLevel = -1; std::map areas; }; struct BackgroundAnimationConfig { std::string filename; std::string layer; std::string order; }; struct MapAnimationConfig { std::string filename; std::string layer; int xPos = 0; int yPos = 0; int zPos = 0; }; struct MoveAreaTarget { int town = -2; int area = -2; }; struct TileInfo { std::string spritePath; int spriteIndex = 0; }; struct MapConfig { std::string name; std::string mapPath; std::string mapDir; int backgroundPos = 0; Vec2 tilePos = Vec2::Zero(); int farSightScroll = 100; bool hasCameraLimit = false; int cameraLimitMinX = -1; int cameraLimitMaxX = -1; int cameraLimitMinY = -1; int cameraLimitMaxY = -1; std::vector tilePaths; std::vector extendedTilePaths; std::vector backgroundAnimations; std::vector mapAnimations; std::vector soundIds; std::vector virtualMovableAreas; std::vector townMovableAreas; std::vector townMovableAreaTargets; }; std::map loadTownList(); bool loadTownConfig(const std::string& townPath, TownConfig& outConfig); bool loadMapConfig(const std::string& mapPath, MapConfig& outConfig); bool loadTileInfo(const std::string& path, TileInfo& outInfo); } // namespace frostbite2D::game