Generalized the handlebars code.
This commit is contained in:
@ -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"
|
||||
|
@ -10,11 +10,6 @@
|
||||
|
||||
#define LANGUAGE_STRING_MAX 512
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
char *value;
|
||||
} languagevariable_t;
|
||||
|
||||
typedef struct {
|
||||
char *key;
|
||||
char *text;
|
||||
|
19
include/dawn/util/string.h
Normal file
19
include/dawn/util/string.h
Normal 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;
|
Reference in New Issue
Block a user