2026-03-01 12:16:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ArrayWithLength.h"
|
|
|
|
|
|
|
|
|
|
class LevelType;
|
|
|
|
|
|
|
|
|
|
#ifndef _CONTENT_PACAKGE
|
|
|
|
|
#define _BIOME_OVERRIDE
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
class Layer
|
|
|
|
|
{
|
|
|
|
|
private:
|
2026-03-02 17:39:35 +07:00
|
|
|
__int64 seed;
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
protected:
|
2026-03-02 17:37:16 +07:00
|
|
|
shared_ptr<Layer>parent;
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
private:
|
2026-03-02 17:39:35 +07:00
|
|
|
__int64 rval;
|
|
|
|
|
__int64 seedMixup;
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
public:
|
2026-03-02 17:39:35 +07:00
|
|
|
static LayerArray getDefaultLayers(__int64 seed, LevelType *levelType);
|
2026-03-01 12:16:08 +08:00
|
|
|
|
2026-03-02 17:39:35 +07:00
|
|
|
Layer(__int64 seedMixup);
|
2026-03-01 12:16:08 +08:00
|
|
|
|
2026-03-02 17:39:35 +07:00
|
|
|
virtual void init(__int64 seed);
|
|
|
|
|
virtual void initRandom(__int64 x, __int64 y);
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
int nextRandom(int max);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual intArray getArea(int xo, int yo, int w, int h) = 0;
|
|
|
|
|
};
|