From 1cb756cbf2611693ec21eec9fd98e4367bb7d918 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 22 Feb 2012 17:04:04 +0000 Subject: Noise function optimization (chunk generation now about 1.5x faster :) git-svn-id: http://mc-server.googlecode.com/svn/trunk@317 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cNoise.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'source/cNoise.h') diff --git a/source/cNoise.h b/source/cNoise.h index d4da677f3..a0283fc8d 100644 --- a/source/cNoise.h +++ b/source/cNoise.h @@ -6,15 +6,23 @@ // Do not touch #if NOISE_USE_INLINE -# define __NOISE_INLINE__ inline + #ifdef _MSC_VER + #define __NOISE_INLINE__ __forceinline + #else + #define __NOISE_INLINE__ inline + #endif // _MSC_VER #else -# define __NOISE_INLINE__ + #define __NOISE_INLINE__ #endif #if NOISE_USE_SSE # include #endif + + + + class cNoise { public: @@ -55,6 +63,14 @@ private: unsigned int m_Seed; }; + + + + #if NOISE_USE_INLINE # include "cNoise.inc" #endif + + + + -- cgit v1.2.3