Generalized the handlebars code.

This commit is contained in:
2021-08-05 10:03:47 -07:00
parent b62beee3e4
commit 351a9e3260
7 changed files with 151 additions and 97 deletions

View File

@ -66,6 +66,7 @@
#include "util/list.h"
#include "util/math.h"
#include "util/rand.h"
#include "util/string.h"
// Visual Novel Objects
#include "vn/vncharacter.h"

View File

@ -10,11 +10,6 @@
#define LANGUAGE_STRING_MAX 512
typedef struct {
char *name;
char *value;
} languagevariable_t;
typedef struct {
char *key;
char *text;

View File

@ -0,0 +1,19 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../libs.h"
#define STRING_HANDLEBAR_KEY_MAXLENGTH 32
/** Representation of a String Handlebar Variable */
typedef struct {
/** The key to use to replace in the source */
char *key;
/** The value to replace it with */
char *value;
} stringhandlebarvariable_t;