inkcpp
Loading...
Searching...
No Matches
config.h
1/* Copyright (c) 2024 Julian Benda
2 *
3 * This file is part of inkCPP which is released under MIT license.
4 * See file LICENSE.txt or go to
5 * https://github.com/JBenda/inkcpp for full license details.
6 */
7#pragma once
8
9// The UE build process will define INKCPP_API
10#ifdef INKCPP_API
11# define INK_ENABLE_UNREAL
12# define INKCPP_NO_RTTI
13# define INKCPP_NO_EXCEPTIONS
14#elif defined(INKCPP_BUILD_CLIB)
15# ifndef INKCPP_NO_STD
16# define INK_ENABLE_CSTD
17# endif
18#else
19# ifndef INKCPP_NO_STD
20# define INK_ENABLE_STL
21# define INK_ENABLE_CSTD
22# endif
23#endif
24
25#ifndef INKCPP_NO_RTTI
26# define INK_ENABLE_RTTI
27#endif
28
29#ifndef INKCPP_NO_EXCEPTIONS
30# define INK_ENABLE_EXCEPTIONS
31#endif
32
33// Only turn on if you have json.hpp and you want to use it with the compiler
34// #define INK_EXPOSE_JSON
40namespace ink::config
41{
43constexpr int limitGlobalVariables = -50;
45constexpr int limitGlobalVariableObservers = -10;
47constexpr int limitThreadDepth = -10;
52constexpr int limitEvalStackDepth = -20;
56constexpr int limitContainerDepth = -20;
61constexpr int limitEditableLists = -5;
63constexpr int limitActiveTags = -10;
65constexpr int limitRuntimeStack = -20;
67constexpr int limitReferenceStack = -20;
69constexpr int limitOutputSize = -100;
71constexpr int limitStringTable = -100;
73constexpr int maxChoices = -10;
75constexpr int maxListTypes = -20;
77constexpr int maxFlags = -200;
79constexpr int maxLists = -50;
81constexpr int maxArrayCallArity = 10;
82
128} // namespace ink::config
Staistiac data for different game elements.
Definition config.h:87
set limitations which are required to minimize heap allocations.
Definition config.h:41
constexpr int maxLists
number of max initialized lists.
Definition config.h:79
constexpr int maxFlags
maximum number of defined list flags.
Definition config.h:77
constexpr int limitReferenceStack
references and call stack.
Definition config.h:67
constexpr int limitActiveTags
number of simultaneous active tags.
Definition config.h:63
constexpr int limitOutputSize
max number of elements in one output (a string is one element).
Definition config.h:69
constexpr int maxArrayCallArity
max number of arguments for external functions (dynamic not possible).
Definition config.h:81
constexpr int limitGlobalVariables
amount of global variables in the script.
Definition config.h:43
constexpr int limitEvalStackDepth
maximum size of the evaluation stack.
Definition config.h:52
constexpr int maxListTypes
max number of list types, and there total amount of flags.
Definition config.h:75
constexpr int limitGlobalVariableObservers
amount of simustanly registerd variable observers.
Definition config.h:45
constexpr int limitContainerDepth
maximum number of cascaded nodes.
Definition config.h:56
constexpr int maxChoices
max number of choices per choice.
Definition config.h:73
constexpr int limitStringTable
maximum number of text fragments between choices.
Definition config.h:71
constexpr int limitEditableLists
number of lists which can be accessed with get_var before the story must continue
Definition config.h:61
constexpr int limitRuntimeStack
temporary variables and call stack.
Definition config.h:65
constexpr int limitThreadDepth
maximum amount of tunnel/choice inception.
Definition config.h:47
Statistic data for an container data type.
Definition config.h:89
int size
current size aka activly used elements inside the container.
Definition config.h:92
int capacity
current capacity of the container.
Definition config.h:90
Stastics for state managed for one runtime.
Definition config.h:109
container variables
based on ink::config::limitGlobalVariables
Definition config.h:110
list_table lists
Staistics for all lists associated with this runtime.
Definition config.h:112
container variables_observers
based on ink::config::limitGlobalVariableObservers
Definition config.h:111
string_table strings
Staistics for all strings associtade with this runtime.
Definition config.h:113
Statistics for managed lists, including static and dynamic enties.
Definition config.h:96
container editable_lists
based on ink::config::limitEditableLists
Definition config.h:97
container flags
based on ink::config::maxFlags
Definition config.h:99
container list_types
based on ink::config::maxListTypes
Definition config.h:98
container lists
based on ink::config::maxLists
Definition config.h:100
Stastics for state managed for one thread inside a runtime.
Definition config.h:117
container evaluation_stack
based on ink::config::limitEvalStackDepth
Definition config.h:119
container runtime_ref_stack
based on ink::config::limitReferenceStack
Definition config.h:123
container threads
based on ink::config::limitThreadDepth
Definition config.h:118
container active_tags
based on ink::config::limitActiveTags
Definition config.h:121
container runtime_stack
based on ink::config::limitContainerDepth
Definition config.h:122
container choices
based on ink::config::limitContainerDepth
Definition config.h:125
container output
based on ink::config::limitOutputSize
Definition config.h:124
container container_stack
based on ink::config::limitContainerDepth
Definition config.h:120
Statistiacs to managed strings, which are build at runtime.
Definition config.h:104
container string_refs
based on limitStringTable
Definition config.h:105