Skip to content

Commit

Permalink
Map Renderer|SurfaceDecorator|Client: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Dec 3, 2014
1 parent 1dbafbb commit 7f46433
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions doomsday/client/include/render/surfacedecorator.h
Expand Up @@ -17,15 +17,13 @@
* http://www.gnu.org/licenses</small>
*/

#ifndef DENG_CLIENT_RENDER_SURFACEDECORATOR_H
#define DENG_CLIENT_RENDER_SURFACEDECORATOR_H
#ifndef CLIENT_RENDER_SURFACEDECORATOR_H
#define CLIENT_RENDER_SURFACEDECORATOR_H

#include <de/libcore.h>

class Surface;

#define MAX_DECOR_LIGHTS (16384)

/**
* The decorator assumes responsibility for decorating surfaces according to
* the defined material when the surface is assigned. When a material changes
Expand Down Expand Up @@ -88,4 +86,4 @@ class SurfaceDecorator
DENG2_PRIVATE(d)
};

#endif // DENG_CLIENT_RENDER_SURFACEDECORATOR_H
#endif // CLIENT_RENDER_SURFACEDECORATOR_H
6 changes: 3 additions & 3 deletions doomsday/client/src/render/surfacedecorator.cpp
Expand Up @@ -166,7 +166,7 @@ DENG2_PIMPL_NOREF(SurfaceDecorator)

/// Observes MaterialAnimation DecorationStageChange
void materialAnimationDecorationStageChanged(MaterialAnimation & /*anim*/,
Material::Decoration &decor)
MaterialDecoration &decor)
{
markSurfacesForRedecoration(decor.material());
}
Expand Down Expand Up @@ -233,7 +233,7 @@ static inline Sector *containingSector(Surface &surface)
{
if(surface.parent().type() == DMU_PLANE)
return &surface.parent().as<Plane>().sector();
return 0;
return nullptr;
}

void SurfaceDecorator::decorate(Surface &surface)
Expand Down Expand Up @@ -265,7 +265,7 @@ void SurfaceDecorator::redecorate()
MaterialSurfaceMap::iterator i = d->decorated.begin();
while(i != d->decorated.end())
{
MaterialSnapshot const *materialSnapshot = 0;
MaterialSnapshot const *materialSnapshot = nullptr;

SurfaceSet const &surfaceSet = i.value();
for(Surface *surface : surfaceSet)
Expand Down

0 comments on commit 7f46433

Please sign in to comment.