Dolphin, the GameCube and Wii emulator - Forums

Full Version: Devs, Please! I will pay to have the heat blur removed in Sunshine!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
Below is a patch to remove the heat effect. I can't compile Windows builds at the moment, so you'll have to ask someone to compile a build for you.

And, because I'm so nice, I won't even demand any money for the patch Tongue

Code:
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.h b/Source/Core/VideoCommon/Src/VertexLoader.h
index 98a57cb..51cbb09 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader.h
+++ b/Source/Core/VideoCommon/Src/VertexLoader.h
@@ -98,8 +98,10 @@ private:
        NRM_THREE = 3,
    };

+public:
    int m_VertexSize;      // number of bytes of a raw GC vertex. Computed by CompileVertexTranslator.

+private:
    // GC vertex format
    TVtxAttr m_VtxAttr;  // VAT decoded into easy format
    TVtxDesc m_VtxDesc;  // Not really used currently - or well it is, but could be easily avoided.
diff --git a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
index 316941a..8445069 100644
--- a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
@@ -141,6 +141,30 @@ void RunVertices(int vtx_attr_group, int primitive, int count)
        return;

    RefreshLoader(vtx_attr_group);
+
+    bool skip = false;
+    u8* data = g_pVideoData;
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 3)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 3)
+                if (*data++ == 0)
+                if (*data++ == 1)
+                    skip = true;
+
+    if (skip)
+    {
+        g_pVideoData += g_VertexLoaders[vtx_attr_group]->m_VertexSize * count;
+        return;
+    }
    g_VertexLoaders[vtx_attr_group]->RunVertices(vtx_attr_group, primitive, count);
}
(01-07-2012, 12:55 PM)neobrain Wrote: [ -> ]Below is a patch to remove the heat effect. I can't compile Windows builds at the moment, so you'll have to ask someone to compile a build for you.

And, because I'm so nice, I won't even demand any money for the patch Tongue

Code:
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.h b/Source/Core/VideoCommon/Src/VertexLoader.h
index 98a57cb..51cbb09 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader.h
+++ b/Source/Core/VideoCommon/Src/VertexLoader.h
@@ -98,8 +98,10 @@ private:
        NRM_THREE = 3,
    };

+public:
    int m_VertexSize;      // number of bytes of a raw GC vertex. Computed by CompileVertexTranslator.

+private:
    // GC vertex format
    TVtxAttr m_VtxAttr;  // VAT decoded into easy format
    TVtxDesc m_VtxDesc;  // Not really used currently - or well it is, but could be easily avoided.
diff --git a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
index 316941a..8445069 100644
--- a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
@@ -141,6 +141,30 @@ void RunVertices(int vtx_attr_group, int primitive, int count)
        return;

    RefreshLoader(vtx_attr_group);
+
+    bool skip = false;
+    u8* data = g_pVideoData;
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 3)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 0)
+                if (*data++ == 3)
+                if (*data++ == 0)
+                if (*data++ == 1)
+                    skip = true;
+
+    if (skip)
+    {
+        g_pVideoData += g_VertexLoaders[vtx_attr_group]->m_VertexSize * count;
+        return;
+    }
    g_VertexLoaders[vtx_attr_group]->RunVertices(vtx_attr_group, primitive, count);
}

My god!

I cannot express how grateful I am!

Thank you so much neobrain!

Now to compiling, hmmm, anyone?
Neo, I get a "Patch format detection failed" error in Git Extension when I try to apply that patch. What am I doing wrong?
Neobrain, just one honest question, WHY?
(01-07-2012, 02:40 PM)NaturalViolence Wrote: [ -> ]Neobrain, just one honest question, WHY?

Why what?

(01-07-2012, 02:39 PM)HawaiianPunch Wrote: [ -> ]Neo, I get a "Patch format detection failed" error in Git Extension when I try to apply that patch. What am I doing wrong?

... just manually apply the patch or sth, it's not THAT terribly hard to look up line numbers or in some other way figure out where to put the big codeblock Tongue
(01-07-2012, 02:40 PM)NaturalViolence Wrote: [ -> ]Neobrain, just one honest question, WHY?

Coz using FifoPlayer is always fun Tongue
(01-07-2012, 02:39 PM)HawaiianPunch Wrote: [ -> ]Neo, I get a "Patch format detection failed" error in Git Extension when I try to apply that patch. What am I doing wrong?

Hi HawaiianPunch, thanks for trying to compile the patch and if it's not too much could you please make a 32-bit version because the 3D drivers I am using only work with 32-bit builds.
(01-07-2012, 03:33 PM)neobrain Wrote: [ -> ]
(01-07-2012, 02:40 PM)NaturalViolence Wrote: [ -> ]Neobrain, just one honest question, WHY?

Coz using FifoPlayer is always fun Tongue

So is the patch a hack or is that the accurate behavior? I would guess the former but the latter seems somewhat legitimate as well.

Here is a properly formatted patch...
Pages: 1 2 3 4 5 6 7 8