• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 … 1188 1189 1190 1191 1192 … 1203 Next »

My SMGHack
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
My SMGHack
04-11-2009, 04:31 AM
#1
val532 Offline
A french
***
Posts: 98
Threads: 7
Joined: Mar 2009
My SMGhack Final version.

This is a complement to R2949/50 it add the HotKey M for enable or disable the hack and correct the hack so if it not work for you, you could apply this patch.

Code:
Index: Core/DolphinWX/Src/Frame.cpp
===================================================================
--- Core/DolphinWX/Src/Frame.cpp    (revision 2950)
+++ Core/DolphinWX/Src/Frame.cpp    (working copy)
@@ -498,7 +509,7 @@
        UpdateGUI();
    }
#ifdef _WIN32
-    if(event.GetKeyCode() == 'E') // Send this to the video plugin WndProc
+    if(event.GetKeyCode() == 'E','M') // Send this to the video plugin WndProc
    {
        PostMessage((HWND)Core::GetWindowHandle(), WM_KEYDOWN, event.GetKeyCode(), 0);
        event.Skip(); // Don't block the E key
Index: Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
===================================================================
--- Plugins/Plugin_VideoDX9/Src/VertexManager.cpp    (revision 2950)
+++ Plugins/Plugin_VideoDX9/Src/VertexManager.cpp    (working copy)
@@ -235,7 +235,7 @@
        if (numVertices)
        {
            // set global constants
-            VertexShaderManager::SetConstants(false);
+            VertexShaderManager::SetConstants(false,false);
            PixelShaderManager::SetConstants();

            PixelShaderCache::SetShader();
Index: Core/VideoCommon/Src/VertexShaderManager.cpp
===================================================================
--- Core/VideoCommon/Src/VertexShaderManager.cpp    (revision 2950)
+++ Core/VideoCommon/Src/VertexShaderManager.cpp    (working copy)
@@ -255,13 +255,8 @@
             g_fProjectionMatrix[9] = 0.0f;
             g_fProjectionMatrix[10] = xfregs.rawProjection[4];
            
-            if (SMG_hack) {
-                g_fProjectionMatrix[11] = -(0.512505 + xfregs.rawProjection[5]) + (proj_hax_1 ? 0.1f : 0.0f);
-            }
-            else {
-                g_fProjectionMatrix[11] = xfregs.rawProjection[5] + (proj_hax_1 ? 0.1f : 0.0f);
-            }
-
+            g_fProjectionMatrix[11] = (SMG_hack ? -(0.812505f + xfregs.rawProjection[5]) : xfregs.rawProjection[5]) + (proj_hax_1 ? 0.1f : 0.0f);
+  
             g_fProjectionMatrix[12] = 0.0f;
             g_fProjectionMatrix[13] = 0.0f;
             g_fProjectionMatrix[14] = 0.0f;
Index: Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
===================================================================
--- Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp    (revision 2950)
+++ Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp    (working copy)
@@ -355,6 +355,7 @@
    m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
    m_ProjectionHax1 = new wxCheckBox(m_PageAdvanced, ID_PROJECTIONHACK1, wxT("ZTP Bloom hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
    m_SMGh = new wxCheckBox(m_PageAdvanced, ID_SMGHACK, wxT("Mario Galaxy Hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
+    m_SMGh->SetToolTip(wxT("SMG hack for Super Mario Galaxy, Mario Kart Wii and other game probably  it will be disable for other game and during SMG ending sequence or movies use the P key to turn this option on or off"));

    // Disabled or enabled
    m_SafeTextureCache->Enable(true);
Index: Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp
===================================================================
--- Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp    (revision 2950)
+++ Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp    (working copy)
@@ -231,6 +231,14 @@
                    g_Config.bEFBCopyDisable ? "off" : "on").c_str(), 5000);
            }
            break;
+        case 'M': // SMGhack hotkey
+            if (true)
+            {
+                g_Config.bSMGhack = !g_Config.bSMGhack;
+                OSD::AddMessage(StringFromFormat("SMGhack was turned %s",
+                    g_Config.bSMGhack ? "on" : "off").c_str(), 5000);
+            }
+            break;        
        }
        g_VideoInitialize.pKeyPress(LOWORD(wParam), GetAsyncKeyState(VK_SHIFT) != 0, GetAsyncKeyState(VK_CONTROL) != 0);
        break;
Excuse me for my bad English I'm a little French, which uses google translated most of the time.
Find
Reply
04-21-2009, 12:30 AM
#2
BlackLionPT Offline
BlackLionPT
***
Posts: 91
Threads: 18
Joined: Mar 2009
How can i implement it?
[Image: 25g484l.gif]
CPU: Intel i7 2600 @ 4.6Ghz 1.295V | Motherboard: ASRock Z77 Extreme6 | RAM: 8 GB DDR3 1600Mhz CL7 | GPU: Ati 5870 1 GB + Artic Cooling Xtreme III | HD: 5TB (500GB x2 Raid0 + 2x2TB)
Find
Reply
04-21-2009, 01:21 AM
#3
DacoTaco Offline
His royal bitchness Tacoboy
*******
Moderators
Posts: 1,135
Threads: 31
Joined: Mar 2009
(04-21-2009, 12:30 AM)Palito Wrote: How can i implement it?
by applying the patch to the source and build dolphin yourself
[Image: PeachSig.jpg]
[Image: 566286.png]
[Image: 2280403.png]
Website Find
Reply
04-21-2009, 04:59 AM (This post was last modified: 04-21-2009, 05:09 AM by BlackLionPT.)
#4
BlackLionPT Offline
BlackLionPT
***
Posts: 91
Threads: 18
Joined: Mar 2009
Okay, thats it, time to learn some more new thinks, head straight to the Windows build wiki page!
(thx daco)

EDIT:
Oh, and by the way, Val532, can yuy create a fix to Sonic and the Black Knight too?
I think than it's only needed than mario galaxy hack stais in back of ZTP bloom hack, to the game runs almost perfectly.
[Image: 25g484l.gif]
CPU: Intel i7 2600 @ 4.6Ghz 1.295V | Motherboard: ASRock Z77 Extreme6 | RAM: 8 GB DDR3 1600Mhz CL7 | GPU: Ati 5870 1 GB + Artic Cooling Xtreme III | HD: 5TB (500GB x2 Raid0 + 2x2TB)
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma