Permalink
Browse files

Fix MSVC compile errors

  • Loading branch information...
UnknownShadow200 committed Feb 1, 2019
1 parent 767eb71 commit 89f6321a5c8d049c7124e31802c9dfaec5cff9a5
Showing with 6 additions and 3 deletions.
  1. +3 −3 src/MapGenerator.c
  2. +3 −0 src/MapGenerator.h
@@ -76,7 +76,7 @@ static void ImprovedNoise_Init(uint8_t* p, RNGState* rnd) {
}
}

static float ImprovedNoise_Calc(uint8_t* p, float x, float y) {
static float ImprovedNoise_Calc(const uint8_t* p, float x, float y) {
int xFloor, yFloor, X, Y;
float u, v;
int A, B, hash;
@@ -124,7 +124,7 @@ static void OctaveNoise_Init(struct OctaveNoise* n, RNGState* rnd, int octaves)
}
}

static float OctaveNoise_Calc(struct OctaveNoise* n, float x, float y) {
static float OctaveNoise_Calc(const struct OctaveNoise* n, float x, float y) {
float amplitude = 1, freq = 1;
float sum = 0;
int i;
@@ -144,7 +144,7 @@ static void CombinedNoise_Init(struct CombinedNoise* n, RNGState* rnd, int octav
OctaveNoise_Init(&n->noise2, rnd, octaves2);
}

static float CombinedNoise_Calc(struct CombinedNoise* n, float x, float y) {
static float CombinedNoise_Calc(const struct CombinedNoise* n, float x, float y) {
float offset = OctaveNoise_Calc(&n->noise2, x, y);
return OctaveNoise_Calc(&n->noise1, x + offset, y);
}
@@ -16,6 +16,9 @@ extern int Gen_Seed;
extern bool Gen_Vanilla;
extern BlockRaw* Gen_Blocks;

void FlatgrassGen_Generate(void);
void NotchyGen_Generate(void);

extern BlockRaw* Tree_Blocks;
extern RNGState* Tree_Rnd;
/* Appropriate buffer size to hold positions and blocks generated by the tree generator. */

0 comments on commit 89f6321

Please sign in to comment.