Skip to content

Commit

Permalink
Refactor|FakeRadio: Reworked the Rend_RadioWallSection() API wrt Sect…
Browse files Browse the repository at this point in the history
…ionEdge
  • Loading branch information
danij-deng committed May 7, 2013
1 parent 712bd7f commit 6549845
Show file tree
Hide file tree
Showing 3 changed files with 265 additions and 292 deletions.
29 changes: 10 additions & 19 deletions doomsday/client/include/render/rend_fakeradio.h
Expand Up @@ -150,31 +150,22 @@ void Rend_RadioUpdateVertexShadowOffsets(Vertex &vtx);
*/
float Rend_RadioCalcShadowDarkness(float lightLevel);

/**
* Arguments for Rend_RadioWallSection()
*/
struct RendRadioWallSectionParms
{
float shadowDark;
float shadowSize;
shadowcorner_t const *botCn, *topCn, *sideCn;
edgespan_t const *spans;
coord_t segOffset;
coord_t segLength;
Line const *line;
Sector *frontSec, *backSec;
SectionEdge const *leftEdge;
SectionEdge const *rightEdge;
};

/**
* Render FakeRadio for the specified wall section. Generates and then draws all
* shadow geometry for the wall section.
*
* Note that unlike Rend_RadioBspLeafEdges() there is no guard to ensure shadow
* geometry is rendered only once per frame.
*/
void Rend_RadioWallSection(rvertex_t const *rvertices, RendRadioWallSectionParms const &parms);
*
* @param leftEdge Geometry for the left edge of the wall section.
* @param rightEdge Geometry for the right edge of the wall section.
* @param shadowDark Shadow darkness scale factor.
* @param shadowSize Shadow size scale factor.
* @param frontSec @todo refactor away
* @param backSec @todo refactor away
*/
void Rend_RadioWallSection(SectionEdge const &leftEdge, SectionEdge const &rightEdge,
float shadowDark, float shadowSize, Sector *frontSec, Sector *backSec);

/**
* Render FakeRadio for the given BSP leaf. Draws all shadow geometry linked to the
Expand Down

0 comments on commit 6549845

Please sign in to comment.