//////////////////////////////////////////////////////////////////////////////
//
// Asura_Platform_Project_FMVSubtitles.cpp
//
// Copyright (c) 2006 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

/******************************************************************************/
/* Included Files                                                             */
/******************************************************************************/

#include "Core/Asura.h"

#include "Cutscene/Asura_FMVSubtitles.h"

// Asura platform-independent
#include "Camera/Asura_Camera.h"
#include "Core/Asura_Maths.h"

/******************************************************************************/
/* Constants                                                                  */
/******************************************************************************/

DEBUGVAR float dbg_fPlacenameMaxY            = 0.8f;
DEBUGVAR float dbg_fPlacenameMaxY_Widescreen = 0.925f;
DEBUGVAR float dbg_fSubtitleMinY             = 0.85f;
DEBUGVAR float dbg_fSubtitleFontScale        = 0.5f;

/******************************************************************************/
/* Asura_FMVSubtitles Static Class Functions                                  */
/******************************************************************************/

Asura_Handle Asura_FMVSubtitles::PlatformProject_GetFontHandleForSubtitles()
{
	return ASURA_INVALID_HANDLE;
}

float Asura_FMVSubtitles::PlatformProject_GetFontScale()
{
    return dbg_fSubtitleFontScale;
}

void Asura_FMVSubtitles::PlatformProject_GetBoundingRect( const Asura_UnicodeChar*& wszTitle, Asura_Bounding_Rectangle& xRect, u_int& uAlignFlags )
{
    // At the edges, with some consideration for the 'safe area'.
    xRect.MinX = 0.075f;
    xRect.MaxX = 0.925f;

    // Put the text in the bottom widescreen bar on a 4:3 display or at
    // the bottom of the screen on top of the movie on a 16:9 display.
    xRect.MinY = dbg_fSubtitleMinY;

    // This text is top justified so the max Y isn't very relevant.
    xRect.MaxY = 1.0f;
}
