mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-02 07:36:34 +00:00
More warnings: mark/avert truncating conversions from float.
This commit is contained in:
parent
4f5729dd59
commit
2630169229
6 changed files with 13 additions and 13 deletions
|
@ -755,7 +755,7 @@ void Tev::Draw()
|
|||
// First, calculate the offset from the viewport center (normalized to 0..1)
|
||||
float offset = (Position[0] - (bpmem.fogRange.Base.Center - 342)) / (float)swxfregs.viewport.wd;
|
||||
// Based on that, choose the index such that points which are far away from the z-axis use the 10th "k" value and such that central points use the first value.
|
||||
int index = 9 - std::abs(offset) * 9.f;
|
||||
int index = (int) (9 - std::abs(offset) * 9.f);
|
||||
index = (index < 0) ? 0 : (index > 9) ? 9 : index; // TODO: Shouldn't be necessary!
|
||||
// Look up coefficient... Seems like multiplying by 4 makes Fortune Street work properly (fog is too strong without the factor)
|
||||
float k = bpmem.fogRange.K[index/2].GetValue(index%2) * 4.f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue