Example
Settings
{
Name=John
FavMaps=[Intro, "The Final Battle"]
[Video]
Resolution=500x800
Bitdepth=32
#include <map> | |
#include <typeinfo> | |
#include <set> | |
typedef size_t EntityID; | |
struct BaseComponent | |
{ | |
virtual ~BaseComponent(){}; | |
EntityID BelongsTo; | |
}; |
// = Vec3 | |
// T is the Type of the Vec3 | |
template<typename T> | |
struct Vec3 | |
{ | |
//~ == Member accessors | |
union | |
{ | |
struct | |
{ |
Example
Settings
{
Name=John
FavMaps=[Intro, "The Final Battle"]
[Video]
Resolution=500x800
Bitdepth=32
// The basic profile of the language | |
// One could for example add additional operators by modifiying it. | |
Config config = BaseConfiguration(); | |
// The script envionment, e.g. which variables/functions are defined? | |
// This is seperate because so we can link different script fragments together. | |
Environment env; | |
// The parser, it only needs to know about the configuration. | |
Parser parser = Parser(&config); | |
for(string script : scripts) |
ScriptManager modc; | |
// Environment and Configuration can still be modified by accessing the public member variables in modc. | |
modc.compileAndLinkFile("script.modc"); | |
VirtualMachine vm = modc.prepareVM(); | |
vm.callFunction("Main"); |
[ | |
{ | |
Name: Strategist | |
Tags: ["Tactican"] | |
Effects: | |
[{ | |
Attributes:["Tactics", 2] | |
}] | |
}, |
Rule | |
{ | |
Chance = 1 | |
Priority = 1011 | |
PatternCenter = [1, 0] | |
OutputCenter = [0, 1] | |
[->Pattern] | |
ww | |
ww |
A minimal & cheap generator for pseudo-random numbers.
These all set the seed to the specified parameters.
RandomNumberGenerator(unsigned int seed = unsigned(std::time(0))); // Derive the 64-Bit seed from a 32-Bit seed. If no seed is given use the system time as seed.
RandomNumberGenerator(unsigned int lowSeed, unsigned int highSeed);
/* | |
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
* | |
* 0. You just DO WHAT THE FUCK YOU WANT TO. | |
*/ | |
#include "UTF8.h" | |
#include "Unicode.h" |