#pragma once #include #include #include #include #include #include #include struct Sprite { QString name; std::vector pixmaps; struct { int x{}; int y{}; } origin; bool preciseCollisionChecking{true}; bool separateCollisionMasks{true}; }; struct Sound { QString name; enum class Type { Sound, Music }; Type type{Type::Sound}; QString path; struct { bool chorus{}; bool flanger{}; bool gargle{}; bool echo{}; bool reverb{}; } effects; int volume{100}; int pan{}; bool preload{true}; }; struct Background { QString name; QPixmap pixmap; bool tileset{}; }; struct Path { QString name; struct Point { QPoint point; int sp{100}; }; std::vector points; enum class Type { Straight, Smooth }; Type type{Type::Straight}; bool closed{true}; int precision{4}; }; struct Script { QString name; QString script; }; struct Font { QString name; QFont font; struct { int from{32}; int to{127}; } range; }; struct Action { enum class AppliesTo { Self, Other, Object }; QString script; AppliesTo appliesTo{AppliesTo::Self}; }; using ActionsContainer = std::array; struct TimeLine { using moment_key_t = int; using moments_container_t = std::map; QString name; moments_container_t moments; }; struct Object { enum class EventType { Create, Destroy, Step, Draw, }; using events_container_t = std::map; QString name; QString spriteName; bool visible{true}; bool solid{}; int depth{}; bool persistent{}; events_container_t events; }; struct Room { QString name; }; struct ProjectContainer { std::list sprites; std::list sounds; std::list backgrounds; std::list paths; std::list