Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/Core/Resources/ConcreteLoaders/WaterPlaneLoaderImpl.cpp

Diff revisions: vs.
  @@ -7,10 +7,10 @@
7 7 namespace Divide {
8 8
9 9 WaterPlane* ImplResourceLoader<WaterPlane>::operator()(){
10 - WaterPlane* ptr = New WaterPlane();
10 + WaterPlane* ptr = MemoryManager_NEW WaterPlane();
11 11
12 12 if(!load(ptr, _descriptor.getName())){
13 - MemoryManager::SAFE_DELETE( ptr );
13 + MemoryManager::DELETE( ptr );
14 14 }
15 15
16 16 return ptr;
  @@ -18,6 +18,7 @@
18 18
19 19 template<>
20 20 bool ImplResourceLoader<WaterPlane>::load(WaterPlane* const res, const stringImpl& name) {
21 + ParamHandler& param = ParamHandler::getInstance();
21 22 res->setState(RES_LOADING);
22 23
23 24 SamplerDescriptor defaultSampler;
  @@ -27,9 +28,11 @@
27 28 ResourceDescriptor waterShader( "water_" + name );
28 29 ResourceDescriptor waterTexture( "waterTexture_" + name );
29 30 ResourceDescriptor waterTextureDUDV( "waterTextureDUDV_" + name );
30 - waterTexture.setResourceLocation(ParamHandler::getInstance().getParam<stringImpl>("assetsLocation") + "/misc_images/terrain_water_NM.jpg");
31 + waterTexture.setResourceLocation(param.getParam<stringImpl>("assetsLocation") +
32 + "/misc_images/terrain_water_NM.jpg");
31 33 waterTexture.setPropertyDescriptor(defaultSampler);
32 - waterTextureDUDV.setResourceLocation(ParamHandler::getInstance().getParam<stringImpl>("assetsLocation") + "/misc_images/water_dudv.jpg");
34 + waterTextureDUDV.setResourceLocation(param.getParam<stringImpl>("assetsLocation") +
35 + "/misc_images/water_dudv.jpg");
33 36 waterTextureDUDV.setPropertyDescriptor(defaultSampler);
34 37
35 38 Texture* waterNM = CreateResource<Texture>(waterTexture);