
#ifndef mosaic_scene_hh
#define mosaic_scene_hh

#include <filesystem>
#include <vector>
#include <string>

#include "mob_main.hh"
#include "phys.hh"
#include "bkgr.hh"

struct Place {
        std::string type;
        std::string name;
        itty::Box box;
};

// context for the scene being played
struct Scene {

        // Manages and holds mobs
        Mobs mobs;

        // Manages physics, holds collision map.
        Phys phys;

        // Manages and holds background.
        Bkgr bkgr;

        // Box for the room where the player is, and action is happening. For
        // most mobs, exiting this box means death; for the player, it means
        // that a room transition happens.
        itty::Box room;

        // List of all places where a mob can be created. When a room
        // transition happens, those places that are contained in the new room
        // spawn a new mob that will persist until the room is closed.
        std::vector<Place> places;

        // List of all rooms in the scene. When the player exits the current
        // one, the new room becomes whichever one in this list that contains
        // the player position.
        std::vector<itty::Box> rooms;

        // Background music.
        MIX_Track* music{nullptr};

        void load(const std::filesystem::path& path);
};

#endif // mosaic_scene_hh
