Skip to content

Commit

Permalink
scdaps2: update skip intro
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed May 11, 2024
1 parent ba6aaed commit d258cb9
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/docs/re0.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
Installation:
Download and extract the archive to the game directory, where the exe is located.

[Website](https://thirteenag.github.io/wfp#re0) | [Source](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/source/ResidentEvil0.FusionFix/dllmain.cpp) | [Default INI File](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/data/ResidentEvil6.FusionFix/scripts/ResidentEvil0.FusionFix.ini)
[Website](https://thirteenag.github.io/wfp#re0) | [Source](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/source/ResidentEvil0.FusionFix/dllmain.cpp) | [Default INI File](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/data/ResidentEvil0.FusionFix/scripts/ResidentEvil0.FusionFix.ini)

<a href="https://github.com/sponsors/ThirteenAG"><img src="https://img.shields.io/badge/Sponsor_me_on_GitHub-5c5c5c?style=for-the-badge&logo=github&logoColor=white" width="250"></a><br><a href="https://ko-fi.com/thirteenag"><img src="https://img.shields.io/badge/Support_me_on_Ko--Fi-ff5e5b?style=for-the-badge&logo=kofi&logoColor=white" width="250"></a><br><a href="https://paypal.me/SergeyP13"><img src="https://img.shields.io/badge/Donate_with_PayPal-009cde?style=for-the-badge&logo=paypal&logoColor=white" width="250"></a><br><a href="https://www.patreon.com/ThirteenAG"><img src="https://img.shields.io/badge/Support_me_on_Patreon-ff424d?style=for-the-badge&logo=patreon&logoColor=white" width="250"></a><br><a href="https://boosty.to/thirteenag/donate"><img src="https://img.shields.io/badge/Support_me_on_Boosty-f15e2d?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAA9CAYAAADvaTpkAAAAAXNSR0IArs4c6QAAAAR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6dvPsVBS9tYYoJephGIvS7n8uDoJGjKF4FVP2v7HWkJS024cpY7vz8SobRqHeRI+OyAT8HWPZjuNsnWGw3Z1Y++Iby2o06Vc3aWra3e1ib9j5eIpXsPRNsoTl6k2oIVdgypP2M1eG8iKmjGKKPbhMQTtH5j3KRzQRge4PDVLvwoEHQ/OH4g58hiN2SDNrsE+9GS7F1PeRt6j7SRNR6XqsirfNTgbAvEn4i1maxl94uavWvCGqj1UFGvN9x4Z1vITqc6WyiLPxlYvNEfrHtC8/a/FktxsD04+ZJeloOLYuQemMpLx/FPEBR+yIi9UIDdgtsFNJ6P7TfbfTTjrYQWoeb8ZOPNftQvsYgsu0IAMLXbX1sGCPXZ6VRa56A9NP2dnJrMLmI/Is2GpWycdxvMVVr/qnosZqU/kWJ7tqB6F75HsbZqMHuxWwYw2g6ek9VtMJaNDvYe4LfepuihriM3wTwlJ2qLdA8TT2n51I1Ig51Fn8rZ6jdiUewhzofjOfySivxQOamYBG3P2GVVlRGeVzbZWBJa7Okdht5sSj/z/2Zz4v2OA+s2kaJ/AOV98CMyeehRj+qZqNdFaWq4YE9Gl5KM7E2I9EerfR4HY8VHCRqyiWeahPdmpQKPoUvRhz9MFMY2ZhzANSn88uxJfNVBj6THeb+wn5oNJO/E57COBdvB19uzt6aK7BB1DPmmqgcv1Z4E30Scv6h8Nc9PkKvBuXoD7O1PWMK4WdXYNv4DZUVmrGFnzfhoNQI3XffYSPY557oAler5r8AI2SaGxYH+z1gNIP0vvAaPwBle/VvdYgxB+obyT6Q6a+l/TyVA4enAijre1/L2HL9k9Ji0sAAAAASUVORK5CYII=&logoColor=white" width="250"></a>
2 changes: 1 addition & 1 deletion .github/docs/re1.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ https://github.com/ThirteenAG/WidescreenFixesPack/assets/4904157/07921b0b-3dbf-4
Installation:
Download and extract the archive to the game directory, where the exe is located.

[Website](https://thirteenag.github.io/wfp#re0) | [Source](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/source/ResidentEvil0.FusionFix/dllmain.cpp) | [Default INI File](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/data/ResidentEvil6.FusionFix/scripts/ResidentEvil0.FusionFix.ini)
[Website](https://thirteenag.github.io/wfp#re1) | [Source](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/source/ResidentEvil.FusionFix/dllmain.cpp) | [Default INI File](https://github.com/ThirteenAG/WidescreenFixesPack/blob/master/data/ResidentEvil.FusionFix/scripts/ResidentEvil.FusionFix.ini)

<a href="https://github.com/sponsors/ThirteenAG"><img src="https://img.shields.io/badge/Sponsor_me_on_GitHub-5c5c5c?style=for-the-badge&logo=github&logoColor=white" width="250"></a><br><a href="https://ko-fi.com/thirteenag"><img src="https://img.shields.io/badge/Support_me_on_Ko--Fi-ff5e5b?style=for-the-badge&logo=kofi&logoColor=white" width="250"></a><br><a href="https://paypal.me/SergeyP13"><img src="https://img.shields.io/badge/Donate_with_PayPal-009cde?style=for-the-badge&logo=paypal&logoColor=white" width="250"></a><br><a href="https://www.patreon.com/ThirteenAG"><img src="https://img.shields.io/badge/Support_me_on_Patreon-ff424d?style=for-the-badge&logo=patreon&logoColor=white" width="250"></a><br><a href="https://boosty.to/thirteenag/donate"><img src="https://img.shields.io/badge/Support_me_on_Boosty-f15e2d?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAA9CAYAAADvaTpkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiIAAC4iAari3ZIAAAWCSURBVGhDtZpJjBVFHIdnBFRAAYMCBoO4RFwm4gLGZQiKGlwOatTgejAx6MWLBy4m4hJiYvQgiVEPRFFiRC8oB42RZQgDGDIs6rhHQQ2ERRAUiWzj96uqN5n35r3u2vpLvtS/t+pXvfy7uvq1hdDX1zcd/8ZjeCRQsRKHueqycpIrfenE03AI6geFKLrb29uPujgroQ2Z5coYjuNqG+bHuyFcEudQTLNTUfyKm22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8/a/FktxsD04+ZJeloOLYuQemMpLx/FPEBR+yIi9UIDdgtsFNJ6P7TfbfTTjrYQWoeb8ZOPNftQvsYgsu0IAMLXbX1sGCPXZ6VRa56A9NP2dnJrMLmI/Is2GpWycdxvMVVr/qnosZqU/kWJ7tqB6F75HsbZqMHuxWwYw2g6ek9VtMJaNDvYe4LfepuihriM3wTwlJ2qLdA8TT2n51I1Ig51Fn8rZ6jdiUewhzofjOfySivxQOamYBG3P2GVVlRGeVzbZWBJa7Okdht5sSj/z/2Zz4v2OA+s2kaJ/AOV98CMyeehRj+qZqNdFaWq4YE9Gl5KM7E2I9EerfR4HY8VHCRqyiWeahPdmpQKPoUvRhz9MFMY2ZhzANSn88uxJfNVBj6THeb+wn5oNJO/E57COBdvB19uzt6aK7BB1DPmmqgcv1Z4E30Scv6h8Nc9PkKvBuXoD7O1PWMK4WdXYNv4DZUVmrGFnzfhoNQI3XffYSPY557oAler5r8AI2SaGxYH+z1gNIP0vvAaPwBle/VvdYgxB+obyT6Q6a+l/TyVA4enAijre1/L2HL9k9Ji0sAAAAASUVORK5CYII=&logoColor=white" width="250"></a>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MAIN]
SkipIntro = 1
3 changes: 3 additions & 0 deletions source/GTAVCS.PCSX2F.WidescreenFix/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ void init()
injector.MakeInlineLUIORI(0x31f1d4, 2.0f * ARDiff); // money and time spacing, not adjusted by ws option originally
injector.MakeInlineLUIORI(0x31f5b4, fWeaponIconPos); //weapon icon pos
injector.MakeInlineLUIORI(0x31f648, fWeaponIconSize); // weapon icon size
injector.MakeInlineLUIORI(0x31FB3C, 438.0f - 4.0f); // ammo
injector.MakeInlineLUIORI(0x31FB5C, 444.0f - 4.0f); // ammo
//injector.MakeInlineLUIORI(0x31F8D8, 0.24f * ARDiff); // ammo font size
injector.MakeInlineLUIORI(0x31ff94, 13.5f - 2.5f);
injector.MakeInlineLUIORI(0x320b40, (405.0f + 10.0f));
injector.MakeInlineLUIORI(0x31f2ac, (float)round_f((64.0f * Screen.fHudScale))); //radar scale
Expand Down
27 changes: 26 additions & 1 deletion source/SplinterCellDoubleAgent.PCSX2F.WidescreenFix/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

#include "../../includes/pcsx2/pcsx2f_api.h"
#include "../../includes/pcsx2/log.h"
#include "../../includes/pcsx2/inireader.h"
#include "../../includes/pcsx2/patterns.h"
#include "../../includes/pcsx2/injector.h"

int CompatibleCRCList[] = { 0xC0498D24, 0xABE2FDE9 };
int CompatibleElfCRCList[] = { 0x198F1AD, 0x6BD0E9C2 };
int CompatibleElfCRCList[] = { 0xC0498D24, 0xABE2FDE9, 0x198F1AD, 0x6BD0E9C2 };
int PCSX2Data[PCSX2Data_Size] = { 1 };
char OSDText[OSDStringNum][OSDStringSize] = { {1} };
char PluginData[MaxIniSize] = { 1 };

struct ScreenX
{
Expand Down Expand Up @@ -44,6 +47,28 @@ void init()
logger.SetBuffer(OSDText, sizeof(OSDText) / sizeof(OSDText[0]), sizeof(OSDText[0]));
logger.Write("Loading SplinterCellDoubleAgent.PCSX2F.WidescreenFix...");

inireader.SetIniPath((char*)PluginData + sizeof(uint32_t), *(uint32_t*)PluginData);

int SkipIntro = inireader.ReadInteger("MAIN", "SkipIntro", 1);

if (SkipIntro)
{
char ElfPattern[] = "00 00 00 00 ? ? ? ? 00 00 00 00 ? ? ? ? 2D 28 00 00 ? ? ? ? 2D 30 00 00 2D 38 00 00";
uintptr_t ptr_222DB8 = pattern.get_first((const char*)&ElfPattern, -12);

if (ptr_222DB8 != 0)
{
logger.Write("Skipping intro...");
injector.WriteMemory16(ptr_222DB8 + 2, 0x1000); // beq -> b
uintptr_t ptr_223CBC = pattern.get(1, "00 00 45 8C ? ? ? ? B8 00 0B 24 ? ? ? ? 00 00 00 00", 20);
injector.MakeNOP(ptr_223CBC);
uintptr_t ptr_22312C = pattern.get(0, "00 00 00 00 02 00 02 24 ? ? ? ? 00 00 00 00 01 00 02 24 ? ? ? ? 00 00 00 00 ? ? ? ? 00 00 00 00 ? ? ? ? 00 00 00 00 00 00 00 00 ? ? ? ? 00 00 00 00", -4);
uintptr_t ptr_2231F8 = pattern.get(0, "03 00 02 24 00 00 00 00 ? ? ? ? 00 00 00 00", 0);
injector.MakeJMPwNOP(ptr_22312C, ptr_2231F8);
return;
}
}

uint32_t DesktopSizeX = PCSX2Data[PCSX2Data_DesktopSizeX];
uint32_t DesktopSizeY = PCSX2Data[PCSX2Data_DesktopSizeY];
Screen.nWidth = PCSX2Data[PCSX2Data_WindowSizeX];
Expand Down

This file was deleted.

40 changes: 0 additions & 40 deletions source/SplinterCellDoubleAgent.PCSX2F.WidescreenFix/skipintro.c

This file was deleted.

0 comments on commit d258cb9

Please sign in to comment.