Start work on saving state of the manager
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace sys
|
||||
{
|
||||
const char *transformFilePath(const char *filename);
|
||||
size_t saveDataToFile(const char *filename, const char *data, size_t size);
|
||||
size_t loadDataFromFile(const char *filename, char *data, size_t size);
|
||||
bool fileExists(const char *filename);
|
||||
|
@@ -4,18 +4,12 @@
|
||||
#include <cinttypes>
|
||||
#include <array>
|
||||
|
||||
#include "values/mrand.hpp"
|
||||
|
||||
#define MAX_DEPTH 8
|
||||
#define MAX_POSIBLE_DEPTH 11
|
||||
static_assert(MAX_DEPTH <= MAX_POSIBLE_DEPTH);
|
||||
|
||||
struct uint128
|
||||
{
|
||||
uint32_t a;
|
||||
uint32_t b;
|
||||
uint32_t c;
|
||||
uint32_t d;
|
||||
};
|
||||
|
||||
struct Branch
|
||||
{
|
||||
uint8_t colorR;
|
||||
|
@@ -28,6 +28,7 @@ public:
|
||||
|
||||
private:
|
||||
uint128 randSeed;
|
||||
uint128 id;
|
||||
std::vector<Dna> vector;
|
||||
std::list<Dna *> queued;
|
||||
std::list<Dna *> showed;
|
||||
|
@@ -1,11 +1,16 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
struct uint128;
|
||||
struct uint128
|
||||
{
|
||||
uint32_t a;
|
||||
uint32_t b;
|
||||
uint32_t c;
|
||||
uint32_t d;
|
||||
};
|
||||
|
||||
namespace mrand
|
||||
{
|
||||
void setSeed(unsigned long long seed);
|
||||
uint128 getState(unsigned long long seed);
|
||||
float getFloat(uint128 *state);
|
||||
int getValue(int min, int max, uint128 *state);
|
||||
uint32_t getInt();
|
||||
}
|
Reference in New Issue
Block a user