forked from Perchik71/Creation-Kit-Platform-Extended
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FO4: - Skip check forms count Perchik71#72 SF: - Remove set thread dpi for dialogs
- Loading branch information
Showing
25 changed files
with
545 additions
and
51 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
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
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
74 changes: 74 additions & 0 deletions
74
Creation Kit Platform Extended Core/Patches/FO4/DontMatchForms.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Copyright © 2023-2024 aka perchik71. All rights reserved. | ||
// Contacts: <email:[email protected]> | ||
// License: https://www.gnu.org/licenses/gpl-3.0.html | ||
|
||
#include "Core/Engine.h" | ||
#include "DontMatchForms.h" | ||
|
||
namespace CreationKitPlatformExtended | ||
{ | ||
namespace Patches | ||
{ | ||
namespace Fallout4 | ||
{ | ||
DontMatchFormsPatch::DontMatchFormsPatch() : Module(GlobalEnginePtr) | ||
{} | ||
|
||
bool DontMatchFormsPatch::HasOption() const | ||
{ | ||
return false; | ||
} | ||
|
||
bool DontMatchFormsPatch::HasCanRuntimeDisabled() const | ||
{ | ||
return false; | ||
} | ||
|
||
const char* DontMatchFormsPatch::GetOptionName() const | ||
{ | ||
return nullptr; | ||
} | ||
|
||
const char* DontMatchFormsPatch::GetName() const | ||
{ | ||
return "Dont Match Forms"; | ||
} | ||
|
||
bool DontMatchFormsPatch::HasDependencies() const | ||
{ | ||
return false; | ||
} | ||
|
||
Array<String> DontMatchFormsPatch::GetDependencies() const | ||
{ | ||
return {}; | ||
} | ||
|
||
bool DontMatchFormsPatch::QueryFromPlatform(EDITOR_EXECUTABLE_TYPE eEditorCurrentVersion, | ||
const char* lpcstrPlatformRuntimeVersion) const | ||
{ | ||
return (eEditorCurrentVersion <= EDITOR_EXECUTABLE_TYPE::EDITOR_FALLOUT_C4_LAST) && | ||
(eEditorCurrentVersion != EDITOR_EXECUTABLE_TYPE::EDITOR_FALLOUT_C4_1_10_943_1); | ||
} | ||
|
||
bool DontMatchFormsPatch::Activate(const Relocator* lpRelocator, | ||
const RelocationDatabaseItem* lpRelocationDatabaseItem) | ||
{ | ||
if (lpRelocationDatabaseItem->Version() == 1) | ||
{ | ||
lpRelocator->Patch(_RELDATA_RAV(0), { 0xEB }); | ||
|
||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
bool DontMatchFormsPatch::Shutdown(const Relocator* lpRelocator, | ||
const RelocationDatabaseItem* lpRelocationDatabaseItem) | ||
{ | ||
return false; | ||
} | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
Creation Kit Platform Extended Core/Patches/FO4/DontMatchForms.h
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,41 @@ | ||
// Copyright © 2023-2024 aka perchik71. All rights reserved. | ||
// Contacts: <email:[email protected]> | ||
// License: https://www.gnu.org/licenses/gpl-3.0.html | ||
|
||
#pragma once | ||
|
||
#include "Core/Module.h" | ||
#include "Core/Relocator.h" | ||
#include "Core/RelocationDatabase.h" | ||
|
||
namespace CreationKitPlatformExtended | ||
{ | ||
namespace Patches | ||
{ | ||
namespace Fallout4 | ||
{ | ||
using namespace CreationKitPlatformExtended::Core; | ||
|
||
class DontMatchFormsPatch : public Module | ||
{ | ||
public: | ||
DontMatchFormsPatch(); | ||
|
||
virtual bool HasOption() const; | ||
virtual bool HasCanRuntimeDisabled() const; | ||
virtual const char* GetOptionName() const; | ||
virtual const char* GetName() const; | ||
virtual bool HasDependencies() const; | ||
virtual Array<String> GetDependencies() const; | ||
protected: | ||
virtual bool QueryFromPlatform(EDITOR_EXECUTABLE_TYPE eEditorCurrentVersion, | ||
const char* lpcstrPlatformRuntimeVersion) const; | ||
virtual bool Activate(const Relocator* lpRelocator, const RelocationDatabaseItem* lpRelocationDatabaseItem); | ||
virtual bool Shutdown(const Relocator* lpRelocator, const RelocationDatabaseItem* lpRelocationDatabaseItem); | ||
private: | ||
DontMatchFormsPatch(const DontMatchFormsPatch&) = default; | ||
DontMatchFormsPatch& operator=(const DontMatchFormsPatch&) = default; | ||
}; | ||
} | ||
} | ||
} |
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
86 changes: 86 additions & 0 deletions
86
Creation Kit Platform Extended Core/Patches/SF/LoadMaterialsAsync.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// Copyright © 2023-2024 aka perchik71. All rights reserved. | ||
// Contacts: <email:[email protected]> | ||
// License: https://www.gnu.org/licenses/gpl-3.0.html | ||
|
||
#include "Core/Engine.h" | ||
#include "LoadMaterialsAsync.h" | ||
|
||
namespace CreationKitPlatformExtended | ||
{ | ||
namespace Patches | ||
{ | ||
namespace Starfield | ||
{ | ||
uintptr_t pointer_LoadMaterialsAsyncPatch_sub0 = 0; | ||
|
||
LoadMaterialsAsyncPatch::LoadMaterialsAsyncPatch() : Module(GlobalEnginePtr) | ||
{} | ||
|
||
bool LoadMaterialsAsyncPatch::HasOption() const | ||
{ | ||
return false; | ||
} | ||
|
||
bool LoadMaterialsAsyncPatch::HasCanRuntimeDisabled() const | ||
{ | ||
return false; | ||
} | ||
|
||
const char* LoadMaterialsAsyncPatch::GetOptionName() const | ||
{ | ||
return nullptr; | ||
} | ||
|
||
const char* LoadMaterialsAsyncPatch::GetName() const | ||
{ | ||
return "Load Materials Async"; | ||
} | ||
|
||
bool LoadMaterialsAsyncPatch::HasDependencies() const | ||
{ | ||
return false; | ||
} | ||
|
||
Array<String> LoadMaterialsAsyncPatch::GetDependencies() const | ||
{ | ||
return {}; | ||
} | ||
|
||
bool LoadMaterialsAsyncPatch::QueryFromPlatform(EDITOR_EXECUTABLE_TYPE eEditorCurrentVersion, | ||
const char* lpcstrPlatformRuntimeVersion) const | ||
{ | ||
return eEditorCurrentVersion >= EDITOR_EXECUTABLE_TYPE::EDITOR_STARFIELD_1_14_70_0; | ||
} | ||
|
||
bool LoadMaterialsAsyncPatch::Activate(const Relocator* lpRelocator, | ||
const RelocationDatabaseItem* lpRelocationDatabaseItem) | ||
{ | ||
if (lpRelocationDatabaseItem->Version() == 1) | ||
{ | ||
pointer_LoadMaterialsAsyncPatch_sub0 = _RELDATA_ADDR(0); | ||
lpRelocator->DetourCall(_RELDATA_RAV(1), (uintptr_t)&sub); | ||
|
||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
bool LoadMaterialsAsyncPatch::Shutdown(const Relocator* lpRelocator, | ||
const RelocationDatabaseItem* lpRelocationDatabaseItem) | ||
{ | ||
return false; | ||
} | ||
|
||
void LoadMaterialsAsyncPatch::sub(void* arg1, void* arg2) | ||
{ | ||
auto mat_thread = std::thread([](void* arg1, void* arg2) { | ||
fastCall<void>(pointer_LoadMaterialsAsyncPatch_sub0, arg1, arg2); | ||
}, arg1, arg2); | ||
|
||
SetThreadPriority(mat_thread.native_handle(), THREAD_PRIORITY_HIGHEST); | ||
mat_thread.join(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.