summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/Rasterizer.cpp
diff options
context:
space:
mode:
authorPokechu22 <pokechu022@gmail.com>2022-09-08 09:42:12 -0700
committerGitHub <noreply@github.com>2022-09-08 09:42:12 -0700
commit2dfe91336a739ba10d9bfcf7c85c1e8f4802e1b2 (patch)
tree2022f9d5f4e430dd3ec6711e2cd488b98097b539 /Source/Core/VideoBackends/Software/Rasterizer.cpp
parent74851fe94a86c64217721b9450ed184f43dae0be (diff)
parent698def66ff36fc0155d84b3777501e71a2ad22a1 (diff)
Merge pull request #10549 from Pokechu22/sw-tev-enum-map
Refactor various bits of graphics code for readability
Diffstat (limited to 'Source/Core/VideoBackends/Software/Rasterizer.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/Rasterizer.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/Core/VideoBackends/Software/Rasterizer.cpp b/Source/Core/VideoBackends/Software/Rasterizer.cpp
index 2a341d8093..b27dc14c89 100644
--- a/Source/Core/VideoBackends/Software/Rasterizer.cpp
+++ b/Source/Core/VideoBackends/Software/Rasterizer.cpp
@@ -108,8 +108,6 @@ static std::vector<BPFunctions::ScissorRect> scissors;
void Init()
{
- tev.Init();
-
// The other slopes are set each for each primitive drawn, but zfreeze means that the z slope
// needs to be set to an (untested) default value.
ZSlope = Slope();
@@ -142,9 +140,9 @@ static inline int iround(float x)
return t;
}
-void SetTevReg(int reg, int comp, s16 color)
+void SetTevKonstColors()
{
- tev.SetRegColor(reg, comp, color);
+ tev.SetKonstColors();
}
static void Draw(s32 x, s32 y, s32 xi, s32 yi)
@@ -288,13 +286,10 @@ static void BuildBlock(s32 blockX, s32 blockY)
}
}
- u32 indref = bpmem.tevindref.hex;
for (unsigned int i = 0; i < bpmem.genMode.numindstages; i++)
{
- u32 texmap = indref & 7;
- indref >>= 3;
- u32 texcoord = indref & 7;
- indref >>= 3;
+ u32 texmap = bpmem.tevindref.getTexMap(i);
+ u32 texcoord = bpmem.tevindref.getTexCoord(i);
CalculateLOD(&rasterBlock.IndirectLod[i], &rasterBlock.IndirectLinear[i], texmap, texcoord);
}