diff options
| author | Tony Wasserka <neobrainx@gmail.com> | 2014-08-12 11:59:21 +0200 |
|---|---|---|
| committer | Tony Wasserka <neobrainx@gmail.com> | 2014-08-12 11:59:21 +0200 |
| commit | d03e91962e9c7cb5a51693086df2ecaa50ec8c12 (patch) | |
| tree | 77ebbdf72b21419a3238d6ebb33d6096b3efb946 /Source/Core/VideoBackends/Software/Rasterizer.cpp | |
| parent | a46151e14690bdba78c5d8844e2c369b2c7a64e2 (diff) | |
| parent | bcd10bfda657d6af2d43c22de20b1d924e482b98 (diff) | |
Merge pull request #779 from lioncash/software-cleanup
Small software backend cleanup.
Diffstat (limited to 'Source/Core/VideoBackends/Software/Rasterizer.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/Rasterizer.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/Core/VideoBackends/Software/Rasterizer.cpp b/Source/Core/VideoBackends/Software/Rasterizer.cpp index cfe038b0ea..3d002da810 100644 --- a/Source/Core/VideoBackends/Software/Rasterizer.cpp +++ b/Source/Core/VideoBackends/Software/Rasterizer.cpp @@ -83,11 +83,9 @@ void Init() ZSlope.f0 = 1.f; } -inline int iround(float x) +static inline int iround(float x) { - int t; - - t = (int)x; + int t = (int)x; if ((x - t) >= 0.5) return t + 1; @@ -100,16 +98,20 @@ void SetScissor() int yoff = bpmem.scissorOffset.y * 2 - 342; scissorLeft = bpmem.scissorTL.x - xoff - 342; - if (scissorLeft < 0) scissorLeft = 0; + if (scissorLeft < 0) + scissorLeft = 0; scissorTop = bpmem.scissorTL.y - yoff - 342; - if (scissorTop < 0) scissorTop = 0; + if (scissorTop < 0) + scissorTop = 0; scissorRight = bpmem.scissorBR.x - xoff - 341; - if (scissorRight > EFB_WIDTH) scissorRight = EFB_WIDTH; + if (scissorRight > EFB_WIDTH) + scissorRight = EFB_WIDTH; scissorBottom = bpmem.scissorBR.y - yoff - 341; - if (scissorBottom > EFB_HEIGHT) scissorBottom = EFB_HEIGHT; + if (scissorBottom > EFB_HEIGHT) + scissorBottom = EFB_HEIGHT; } void SetTevReg(int reg, int comp, bool konst, s16 color) @@ -208,7 +210,7 @@ static void InitSlope(Slope *slope, float f1, float f2, float f3, float DX31, fl slope->f0 = f1; } -inline void CalculateLOD(s32 &lod, bool &linear, u32 texmap, u32 texcoord) +static inline void CalculateLOD(s32 &lod, bool &linear, u32 texmap, u32 texcoord) { FourTexUnits& texUnit = bpmem.tex[(texmap >> 2) & 1]; u8 subTexmap = texmap & 3; |
