Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
51
GameTools/Zallad3D SceneClass/PerlinNoise.h
Normal file
51
GameTools/Zallad3D SceneClass/PerlinNoise.h
Normal file
@@ -0,0 +1,51 @@
|
||||
// PerlinNoise.h: interface for the CPerlinNoise class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_PERLINNOISE_H__DF635499_ADD4_4465_901C_9064E518F452__INCLUDED_)
|
||||
#define AFX_PERLINNOISE_H__DF635499_ADD4_4465_901C_9064E518F452__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
#include <3DMath.h>
|
||||
#include <stdio.h>
|
||||
#include "StateLog.h"
|
||||
const long MAX_OCTAVES=128;
|
||||
|
||||
#define B 0x100
|
||||
#define BM 0xff
|
||||
|
||||
#define NE 0x1000
|
||||
#define NP 12 /* 2^N */
|
||||
#define NM 0xfff
|
||||
|
||||
|
||||
|
||||
class CPerlinNoise
|
||||
{
|
||||
static float m_fH,m_fLacunarity,m_fOctaves,m_fOffset,m_fGain,m_fDepth;
|
||||
static float m_ExponentArray[MAX_OCTAVES];
|
||||
static int m_P[B + B + 2];
|
||||
static vector3 m_G2[B + B + 2];
|
||||
static int m_RandomSeed[B*7];
|
||||
public:
|
||||
static void SetNoiseValue(float H,float Lac,float Oct,float Off,float Gain,float Depth)
|
||||
{
|
||||
m_fH=H;
|
||||
m_fLacunarity=Lac;
|
||||
m_fOctaves=Oct;
|
||||
m_fOffset=Off;
|
||||
m_fGain=Gain;
|
||||
m_fDepth=Depth;
|
||||
}
|
||||
static void LoadSeed(char *strFilename);
|
||||
static float Noise2(vector3 vec);
|
||||
static void Init();
|
||||
static float HybridMultifractal(vector3 point);
|
||||
CPerlinNoise();
|
||||
virtual ~CPerlinNoise();
|
||||
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_PERLINNOISE_H__DF635499_ADD4_4465_901C_9064E518F452__INCLUDED_)
|
||||
Reference in New Issue
Block a user