/* date = August 14th 2023 5:00 pm */

#ifndef VN_SCENE_VIEW_H
#define VN_SCENE_VIEW_H

struct textbox
{
    string String;
    s64 Capacity;
    r32 CharsRevealed;
};

struct scene_view_character_data
{
    string Name;
    b32 Active;
    b32 Talking;
    
    render_handle Texture;
    r32 TextureScale;
    
    r32 ActiveT;
    r32 TalkingT;
    r32 PctP;
};

struct scene_view
{
    memory_arena *SceneArena;
    
    // sixten: input
    platform_event_list *EventList;
    r32 dtForFrame;
    
    scene_runtime Runtime;
    textbox Textbox;
    render_handle BackgroundTexture;
    
    s32 TargetCharacter;
    
    render_handle TestHappy;
    render_handle TestNormal;
    
    s32 CharacterCount;
    scene_view_character_data OnscreenCharacters[16];
};

static void SV_SetState(scene_view *View);
static scene_view *SV_GetState();
static void SV_NewFrame(scene_view *View, platform_event_list *EventList, r32 dtForFrame);
static void SV_SetCurrentSource(compiled_scene *Compiled);
static void SV_Init(scene_view *View, memory_arena *TextboxArena);
static void SV_BuildSceneView(vn_input *Input);
static void SV_Update(memory_arena *FrameArena);

#endif //VN_SCENE_VIEW_H
