Skip to content

Commit

Permalink
Renderer|LightGrid: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Apr 28, 2014
1 parent 7b82ef6 commit 7134846
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions doomsday/client/include/render/lightgrid.h
Expand Up @@ -73,9 +73,10 @@ class LightGrid
LightGrid(Vector2d const &origin, Vector2d const &dimensions);

/**
* To be called when physical dimensions of the grid or the logical block size
* changes to resize the light grid. Note that resizing inherently means clearing
* of primary illumination sources, so they'll need to be initialized again.
* To be called when the physical dimensions of the grid or the logical block
* size changes to resize the light grid. Note that resizing inherently means
* clearing of primary illumination sources, so they'll need to be initialized
* again.
*
* @param newOrigin Origin of the grid in map space.
* @param newDimensions Dimensions of the grid in map space units.
Expand Down Expand Up @@ -139,7 +140,7 @@ class LightGrid
* IBlockLightSources are obliged to call this whenever the attributes of the
* the light source have changed to schedule any necessary grid updates.
*/
void primarySourceLightChanged(IBlockLightSource *changedSource);
void blockLightSourceChanged(IBlockLightSource *changedSource);

/**
* Register the console comands and variables of this module.
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/render/lightgrid.cpp
Expand Up @@ -554,7 +554,7 @@ LightGrid::IBlockLightSource *LightGrid::primarySource(Index index) const
return d->block(index).source;
}

void LightGrid::primarySourceLightChanged(IBlockLightSource *changed)
void LightGrid::blockLightSourceChanged(IBlockLightSource *changed)
{
// Updates are unnecessary if not enabled.
if(!lgEnabled) return;
Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/world/sectorcluster.cpp
Expand Up @@ -805,13 +805,13 @@ DENG2_PIMPL(SectorCluster)
/// Observes Sector LightLevelChange.
void sectorLightLevelChanged(Sector &sector)
{
sector.map().lightGrid().primarySourceLightChanged(thisPublic);
sector.map().lightGrid().blockLightSourceChanged(thisPublic);
}

/// Observes Sector LightColorChange.
void sectorLightColorChanged(Sector &sector)
{
sector.map().lightGrid().primarySourceLightChanged(thisPublic);
sector.map().lightGrid().blockLightSourceChanged(thisPublic);
}
#endif // __CLIENT__
};
Expand Down

0 comments on commit 7134846

Please sign in to comment.