Dawn/src/vn/vnconversation.h

55 lines
1.6 KiB
C

/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include <dawn/dawn.h>
#include "vntextbox.h"
#include "../util/array.h"
#include "../display/animation/timeline.h"
/**
* Initialize the conversation set. After adding your first conversation element
* then ensure you call vnConversationNext to begin the conversation.
* @param convo Conversation to initialize.
* @param font Font to initialize with.
*/
void vnConversationInit(vnconversation_t *convo, font_t *font);
/**
* Goes to the next conversation element, or start the conversation if this is
* the first element.
* @param convo Conversation to skip to the next text of.
*/
void vnConversationNext(vnconversation_t *convo);
/**
* Add a text element to the conversation.
* @param convo Conversation to add to.
* @return The pointer to the text element.
*/
vnconversationtext_t * vnConversationAdd(vnconversation_t *convo);
/**
* Updates the conversation logic and the wrapped textbox.
* @param convo Conversation to update.
* @param engine Engine used to update.
*/
void vnConversationUpdate(vnconversation_t *convo, engine_t *engine);
/**
* Renders the conversation, mostly just a wrapper for the textbox.
* @param convo Conversation to render.
* @param shader Shader to use while rendering.
*/
void vnConversationRender(vnconversation_t *convo, shader_t *shader);
/**
* Dispose the conversation when finished.
* @param convo Conversation to dispose.
*/
void vnConversationDispose(vnconversation_t *convo);