Skip to content

Commit

Permalink
Cherry-pick fixup_WebBox changes from 85db205 and 81789be in order to…
Browse files Browse the repository at this point in the history
… reduce differences with the experimental-reader-updated branch.
  • Loading branch information
Bluenaxela committed Sep 13, 2018
1 parent cc1aa82 commit 052e420
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions LunaDll/Misc/RuntimeHook.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ extern int (__stdcall *rtcMsgBox)(VARIANTARG*, DWORD, DWORD, DWORD, DWORD);
void fixup_TypeMismatch13();
void fixup_ErrorReporting();
void fixup_WarpLimit();
void fixup_WebBox();
void fixup_Credits();
void fixup_Mushbug();
void fixup_Veggibug();
Expand Down
16 changes: 16 additions & 0 deletions LunaDll/Misc/RuntimeHookComponents/RuntimeHookFixups.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,23 @@ void fixup_WarpLimit()
}
}

void fixup_WebBox()
{
const wchar_t* aboutBlank = L"about:blank";
const wchar_t* webBoxTitle = L"LunaLua-SMBX";

memcpy((void*)0x00431A34, aboutBlank, sizeof(wchar_t) * lstrlenW(aboutBlank) + 2);
memcpy((void*)0x00427614, webBoxTitle, sizeof(wchar_t) * lstrlenW(webBoxTitle) + 2);

//const unsigned char nullStrMove[] = { 0xBA, 0x00, 0x3D, 0x42, 0x00 };
//memcpy((void*)0x00B201AA, nullStrMove, sizeof(nullStrMove));//Heck off, WebBox!
//memcpy((void*)0x0096AF25, nullStrMove, sizeof(nullStrMove));//Heck off, WebBox!

//VB6StrPtr* aboutBlank = new VB6StrPtr(std::string("about:blank"));
//memcpy((void*)0x00B201AB, aboutBlank, 4);
//VB6StrPtr* webBoxTitle = new VB6StrPtr(std::string("What the heck?"));
//memcpy((void*)0x0096AF26, webBoxTitle, 4);
}

void fixup_Credits()
{
Expand Down
1 change: 1 addition & 0 deletions LunaDll/Misc/RuntimeHookComponents/RuntimeHookGeneral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ void TrySkipPatch()
/* Simple ASM Source Patches */
/************************************************************************/
fixup_TypeMismatch13();
fixup_WebBox();
fixup_Credits();
fixup_Mushbug();
fixup_Veggibug();
Expand Down

0 comments on commit 052e420

Please sign in to comment.