annotate src/dmperlin.h @ 2634:f3c7115cbf85 default tip

Fix verbose build echos.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 29 Feb 2024 21:47:31 +0200
parents e716a2f18da0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
888
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * DMLib
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * -- Perlin noise functionality
2577
04c035342960 Attribute code in dmperlin.[ch] to be heavily based on Ken Perlin's original C
Matti Hamalainen <ccr@tnsp.org>
parents: 888
diff changeset
4 * Based heavily on original code (C) Copyright Ken Perlin
04c035342960 Attribute code in dmperlin.[ch] to be heavily based on Ken Perlin's original C
Matti Hamalainen <ccr@tnsp.org>
parents: 888
diff changeset
5 * Adapted and enhanced by Matti 'ccr' Hamalainen
888
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 */
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 #ifndef DMPERLIN_H
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 #define DMPERLIN_H
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #include "dmlib.h"
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 #ifdef __cplusplus
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 extern "C" {
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 #endif
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 #define DM_PLNS_B (0x100)
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 #define DM_PLNS_BM (0x0ff)
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 #define DM_PLNS_N (0x1000)
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 typedef struct
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 {
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 int p[DM_PLNS_B + DM_PLNS_B + 2];
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 DMFloat g2[DM_PLNS_B + DM_PLNS_B + 2][2];
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 DMFloat g1[DM_PLNS_B + DM_PLNS_B + 2];
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 } DMPerlinContext;
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 int dmPerlinInit(DMPerlinContext *ctx, const int seed);
2579
e716a2f18da0 Constify.
Matti Hamalainen <ccr@tnsp.org>
parents: 2577
diff changeset
30 DMFloat dmPerlinNoise2D(const DMPerlinContext *ctx, const DMFloat x, const DMFloat y, const DMFloat alpha, const DMFloat beta, const int n);
888
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 #ifdef __cplusplus
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 }
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 #endif
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
85fab9d640ec Add new header file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 #endif // DMPERLIN_H