-
-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaf9bd0
commit da0adba
Showing
7 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
![rdr](https://thirteenag.github.io/screens/rdr/main2.jpg) | ||
|
||
![](https://habrastorage.org/webt/ow/yy/mg/owyymgpibfqzfbwyf_iqoiqrede.png) Added an option to skip intro and legal screens | ||
|
||
Installation: | ||
Download and extract the archive to the game directory, where the exe is located. | ||
|
||
[Website](https://thirteenag.github.io/wfp#rdr) | [Source](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/source/RedDeadRedemption.FusionMod/dllmain.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
loadfromscriptsonly |
2 changes: 2 additions & 0 deletions
2
data/RedDeadRedemption.FusionMod/plugins/RedDeadRedemption.FusionMod.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[MAIN] | ||
SkipIntro = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include "stdafx.h" | ||
#include <utility/Scan.hpp> | ||
|
||
namespace rdrFlashIntroHandler | ||
{ | ||
struct FlashIntroHandler | ||
{ | ||
char unk[17]; | ||
char bLegalsCompleted; | ||
}; | ||
|
||
SafetyHookInline FlashIntroHandlerHook{}; | ||
void __fastcall Update(FlashIntroHandler* smp_Instance) | ||
{ | ||
smp_Instance->bLegalsCompleted = 1; | ||
} | ||
} | ||
|
||
void Init() | ||
{ | ||
CIniReader iniReader(""); | ||
bool bSkipIntro = iniReader.ReadInteger("MAIN", "SkipIntro", 1) != 0; | ||
|
||
if (bSkipIntro) | ||
{ | ||
auto LegalsCompletedRef = utility::find_function_from_string_ref(GetModuleHandleW(NULL), "LegalsCompleted"); | ||
if (LegalsCompletedRef) | ||
{ | ||
auto func_start = utility::find_function_start_with_call(LegalsCompletedRef.value()); | ||
if (func_start) | ||
rdrFlashIntroHandler::FlashIntroHandlerHook = safetyhook::create_inline(func_start.value(), rdrFlashIntroHandler::Update); | ||
} | ||
} | ||
} | ||
|
||
CEXP void InitializeASI() | ||
{ | ||
std::call_once(CallbackHandler::flag, []() | ||
{ | ||
CallbackHandler::RegisterCallbackAtGetSystemTimeAsFileTime(Init); | ||
}); | ||
} | ||
|
||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved) | ||
{ | ||
if (reason == DLL_PROCESS_ATTACH) | ||
{ | ||
if (!IsUALPresent()) { InitializeASI(); } | ||
} | ||
else if (reason == DLL_PROCESS_DETACH) | ||
{ | ||
|
||
} | ||
return TRUE; | ||
} |