diff options
| author | Steven Fuller <relnev@icculus.org> | 2008-05-04 20:47:08 -0700 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:37 +0200 |
| commit | 5d3725f9d972cde917ab9b076cb0b89b33557c7a (patch) | |
| tree | 7378f5fac1dc90fd3d8f52f02db25714010f8912 /src/win95/chnktype.cpp | |
| parent | 9b449609fac7b23f2f9655ce2d766f1f56679ba4 (diff) | |
Removed a lot of tool code.
Diffstat (limited to 'src/win95/chnktype.cpp')
| -rw-r--r-- | src/win95/chnktype.cpp | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/win95/chnktype.cpp b/src/win95/chnktype.cpp index 6bef4de..4612cdf 100644 --- a/src/win95/chnktype.cpp +++ b/src/win95/chnktype.cpp @@ -2,26 +2,10 @@ #include <math.h> #include "chnktype.hpp" -#if engine - #define UseLocalAssert No #include "ourasert.h" #define assert(x) GLOBALASSERT(x) -#else - -#if cencon -#include "ccassert.h" -#else -#include <assert.h> -#endif - -#endif - -#ifdef cencon -#define new my_new -#endif - // misc data structures functions BOOL operator==(const obinfile &o1, const obinfile &o2) { @@ -175,7 +159,6 @@ ChunkVector& ChunkVector::operator-=(const ChunkVector& a) -#if engine ChunkVector::operator VECTORCH () const { VECTORCH v; @@ -185,7 +168,7 @@ ChunkVector::operator VECTORCH () const return(v); } -#endif + ChunkVector::operator ChunkVectorInt () const { ChunkVectorInt v; @@ -267,7 +250,6 @@ ChunkVectorInt operator+(const ChunkVectorInt& a, const ChunkVectorInt& b) return v; } - ChunkVectorInt operator-(const ChunkVectorInt& a, const ChunkVectorInt& b) { ChunkVectorInt v; @@ -286,8 +268,6 @@ ChunkVectorInt& ChunkVectorInt::operator+=(const ChunkVectorInt& a) return *this; } - - ChunkVectorInt& ChunkVectorInt::operator-=(const ChunkVectorInt& a) { x -= a.x; @@ -297,9 +277,6 @@ ChunkVectorInt& ChunkVectorInt::operator-=(const ChunkVectorInt& a) return *this; } - - -#if engine ChunkVectorInt::operator VECTORCH () const { VECTORCH v; @@ -309,7 +286,6 @@ ChunkVectorInt::operator VECTORCH () const return(v); } -#endif ChunkVectorInt operator*(const ChunkVectorInt & a, const double s) { @@ -407,7 +383,6 @@ ChunkVectorFloat operator/(const ChunkVectorFloat & a, const double s) return(v); } -#if engine ChunkVectorFloat::operator VECTORCH () const { VECTORCH v; @@ -417,7 +392,7 @@ ChunkVectorFloat::operator VECTORCH () const return(v); } -#endif + int ChunkVectorFloat::norm() { float modulos =(float) mod(*this); @@ -430,6 +405,7 @@ int ChunkVectorFloat::norm() return(1); } + double mod(const ChunkVectorFloat& a) { return(sqrt((double)a.x*(double)a.x+(double)a.y*(double)a.y+(double)a.z*(double)a.z)); |
