summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/TransformUnit.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2014-05-30 14:54:16 +0200
committerdegasus <wickmarkus@web.de>2014-06-19 16:33:29 +0200
commit027baad73ba17f0a5d6311b7abbefbcca7f9b6a5 (patch)
tree167cb8a270b290d4bf570b2e72d43fe72ae26d7b /Source/Core/VideoBackends/Software/TransformUnit.cpp
parente642c8d0c10a9a26b2ca518c833a35e1b30ad4ee (diff)
VideoCommon: use the Light struct in XF memory
Diffstat (limited to 'Source/Core/VideoBackends/Software/TransformUnit.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/TransformUnit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/TransformUnit.cpp b/Source/Core/VideoBackends/Software/TransformUnit.cpp
index 2c4c495087..f79c57be00 100644
--- a/Source/Core/VideoBackends/Software/TransformUnit.cpp
+++ b/Source/Core/VideoBackends/Software/TransformUnit.cpp
@@ -210,7 +210,7 @@ inline float SafeDivide(float n, float d)
void LightColor(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChannel &chan, Vec3 &lightCol)
{
- const LightPointer *light = (const LightPointer*)&xfmem.lights[0x10*lightNum];
+ const LightPointer *light = (const LightPointer*)&xfmem.lights[lightNum];
if (!(chan.attnfunc & 1))
{
@@ -295,7 +295,7 @@ void LightColor(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChann
void LightAlpha(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChannel &chan, float &lightCol)
{
- const LightPointer *light = (const LightPointer*)&xfmem.lights[0x10*lightNum];
+ const LightPointer *light = (const LightPointer*)&xfmem.lights[lightNum];
if (!(chan.attnfunc & 1))
{
@@ -476,7 +476,7 @@ void TransformTexCoord(const InputVertexData *src, OutputVertexData *dst, bool s
break;
case XF_TEXGEN_EMBOSS_MAP:
{
- const LightPointer *light = (const LightPointer*)&xfmem.lights[0x10*texinfo.embosslightshift];
+ const LightPointer *light = (const LightPointer*)&xfmem.lights[texinfo.embosslightshift];
Vec3 ldir = (light->pos - dst->mvPosition).normalized();
float d1 = ldir * dst->normal[1];