#pragma once

#include <SDL3/SDL_stdinc.h>

enum class ERefOrientation : uint8_t
{
    LANDSCAPE,
    PORTRAIT,
};

// the screen this build is authored for — a per-game file, edited like Game.h.
// ASPECT and HEIGHT are the only free values; the rest derives from them
struct crScreenRef
{
    static constexpr float   ASPECT = 16.0f / 9.0f;
    static constexpr int32_t HEIGHT = 720;            // one UI virtual unit == 1/HEIGHT of the screen height
    static constexpr int32_t WIDTH  = static_cast< int32_t >( ( static_cast< float >( HEIGHT ) * ASPECT ) + 0.5f );

    // SDL_HINT_ORIENTATIONS, mobile only. Space delimited, chosen from LandscapeLeft,
    // LandscapeRight, Portrait, PortraitUpsideDown — a name outside that set is silently ignored.
    static constexpr const char* ORIENTATIONS = "LandscapeLeft";

    static constexpr ERefOrientation Orientation()
    {
        return ( ASPECT < 1.0f ) ? ERefOrientation::PORTRAIT : ERefOrientation::LANDSCAPE;
    }
    static constexpr const char* OrientationName()
    {
        return ( Orientation() == ERefOrientation::PORTRAIT ) ? "portrait" : "landscape";
    }
};
