Skip to content

Commit

Permalink
xrRender_R4: Fix conformance in For loop scope (#104).
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Jan 16, 2016
1 parent 1b68a3f commit 4b9b4a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R4/r4_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ void CRender::LoadSectors(IReader* fs)
{
CDB::Collector CL;
fs->find_chunk (fsL_PORTALS);
for (i=0; i<count; i++)
for (u32 i=0; i<count; i++)
{
b_portal P;
fs->r (&P,sizeof(P));
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R4/r4_rendertarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ CRenderTarget::CRenderTarget ()
descHBAO.CPUAccessFlags = 0;
descHBAO.MiscFlags = 0;

it = TEX_jitter_count-1;
int it = TEX_jitter_count-1;
subData[it].pSysMem = tempDataHBAO;
subData[it].SysMemPitch = descHBAO.Width*sampleSize * sizeof(float);

Expand Down
4 changes: 2 additions & 2 deletions src/Layers/xrRenderPC_R4/r4_rendertarget_phase_bloom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ void CalcGauss_k7(
// calculate
float mag = 0;
for (int i=-7; i<=0; i++) W[-i] = expf (-float(i*i)/(2*r*r)); // weight
for (i=0; i<8; i++) mag += i?2*W[i]:W[i]; // symmetrical weight
for (i=0; i<8; i++) W[i] = s_out*W[i]/mag;
for (int i=0; i<8; i++) mag += i?2*W[i]:W[i]; // symmetrical weight
for (int i=0; i<8; i++) W[i] = s_out*W[i]/mag;

// W[0]=0, W[7]=-7
w0.set (W[1],W[2],W[3],W[4]); // -1, -2, -3, -4
Expand Down

0 comments on commit 4b9b4a8

Please sign in to comment.