#pragma once

#include <cstdint>
#include <vectors/vec2.h>
#include <string>

namespace game {

struct notesHeader
{
    int32_t notesCount;
    int32_t notesOffset;
    int32_t regionCount;
    int32_t regionOffset;
    int32_t subtitleCount;
    int32_t subtitleOffset;
};

struct noteInfo
{
    int32_t button;
    int32_t type;
    vec2f position;
    float angle = 0;
    float time;
    float duration = 0;

    inline float getEndTime() const {
        if (type == 1) {
            return time + duration;
        }

        return time;
    }
};

struct regionInfo {
    float time;
    float duration;
    int32_t notesCount;
};

struct subtitleInfo {
    float time;
    float duration;
    std::string text;
};

struct levelInfo
{
    std::string name;
    std::string notesFile;
    std::string musicFile;
    std::string backgroundFile;
    float speed;
};

class NoteManager;
class Note;
class Level;
class Menu;

}
