updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / energytycoon / etl.patch
blob7ac3d01565ad1dcfdbf3ca3bc7889dc72ff5b32e
1 --- a/ETPatch.cpp 2011-02-20 17:36:41.776666670 +0100
2 +++ b/ETPatch.cpp 2011-02-20 17:37:17.886666670 +0100
3 @@ -76,7 +76,7 @@
4 mMaxLOD = 1;
5 mVertexOptions &= (~VO_LODMORPH);
7 - mLODChangeMinDistSqr = vector<Real>(mMaxLOD);
8 + mLODChangeMinDistSqr = std::vector<Real>(mMaxLOD);
10 mLastNextLOD = mMaxLOD+1;
12 @@ -310,7 +310,7 @@
13 unsigned int patchSizeZ = mDescription->getNumVerticesZ();
15 // lock delta buffers, if vertex morphing is enabled
16 - vector<float*> pDeltas (mMaxLOD-1);
17 + std::vector<float*> pDeltas (mMaxLOD-1);
18 if (mVertexOptions & VO_LODMORPH)
20 for (unsigned int l = 0; l < mMaxLOD-1; ++l)
21 @@ -321,7 +321,7 @@
22 unsigned int cacheStep = 1 << (mMaxLOD-1);
23 unsigned int cacheSizeX = patchSizeX / cacheStep;
24 unsigned int cacheSizeZ = patchSizeZ / cacheStep;
25 - vector<RealArray2D> cache (mMaxLOD-1, RealArray2D(cacheStep+1, cacheStep+1, 0));
26 + std::vector<RealArray2D> cache (mMaxLOD-1, RealArray2D(cacheStep+1, cacheStep+1, 0));
27 // update all LOD frames which need updating, each frame is cacheStep x cacheStep
28 for (VertexList::const_iterator it = dirtyLODFrames.begin(); it != dirtyLODFrames.end(); ++it)
30 @@ -663,7 +663,7 @@
31 Technique* Patch::getTechnique() const
33 // based on the current distance to the camera, select the appropriate LOD technique from the material
34 - unsigned short lodIndex = mMaterial->getLodIndexSquaredDepth(mCurCameraDistanceSqr);
35 + unsigned short lodIndex = mMaterial->getLodIndex(mCurCameraDistanceSqr*mCurCameraDistanceSqr);
36 return mMaterial->getBestTechnique(lodIndex);
39 --- a/ETSplattingManager.cpp 2010-01-27 22:52:44.000000000 +0100
40 +++ b/ETSplattingManager.cpp 2011-02-20 17:40:21.563333336 +0100
41 @@ -139,7 +139,7 @@
42 updateMaps = numMaps != mSplattingLayout->getNumSplattingMaps();
44 // inform listeners about texture list change
45 - for (vector<SplattingListener*>::iterator l = mListeners.begin(); l != mListeners.end(); ++l)
46 + for (std::vector<SplattingListener*>::iterator l = mListeners.begin(); l != mListeners.end(); ++l)
48 (*l)->notifySplattingTextures(mTextures);
49 if (updateMaps)
50 @@ -181,7 +181,7 @@
52 void SplattingManager::removeListener(SplattingListener* listener)
54 - vector<SplattingListener*>::iterator it = find(mListeners.begin(), mListeners.end(), listener);
55 + std::vector<SplattingListener*>::iterator it = find(mListeners.begin(), mListeners.end(), listener);
56 if (it != mListeners.end())
57 mListeners.erase(it);
59 --- a/ETSubDescription.cpp 2010-01-27 22:52:44.000000000 +0100
60 +++ b/ETSubDescription.cpp 2011-02-20 17:42:06.530000003 +0100
61 @@ -57,7 +57,7 @@
63 // the parent is still active, so unregister as listener and inform own listeners of destruction
64 mDescription->removeListener(this);
65 - for (vector<TerrainListener*>::iterator it = mListeners.begin(); it != mListeners.end(); ++it)
66 + for (std::vector<TerrainListener*>::iterator it = mListeners.begin(); it != mListeners.end(); ++it)
67 (*it)->notifyDestroyed();
70 @@ -156,7 +156,7 @@
71 if (subList.empty())
72 return;
73 // notify listeners
74 - for (vector<TerrainListener*>::iterator it = mListeners.begin(); it != mListeners.end(); ++it)
75 + for (std::vector<TerrainListener*>::iterator it = mListeners.begin(); it != mListeners.end(); ++it)
76 (*it)->notifyUpdated(subList);
79 @@ -164,7 +164,7 @@
80 void SubDescription::notifyDestroyed()
82 // notify listeners
83 - for (vector<TerrainListener*>::iterator it = mListeners.begin(); it != mListeners.end(); ++it)
84 + for (std::vector<TerrainListener*>::iterator it = mListeners.begin(); it != mListeners.end(); ++it)
85 (*it)->notifyDestroyed();
87 // reset the parent description