mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-23 05:59:40 +00:00
Fix some issues caused by the extended scene geometry enhancement by patching DLs (#830)
Some checks are pending
Some checks are pending
This commit is contained in:
parent
4669337a3f
commit
b7a607b765
@ -651,11 +651,13 @@ void DrawEnhancementsMenu() {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255, 255, 0, 255));
|
||||
ImGui::SeparatorText("Unstable");
|
||||
ImGui::PopStyleColor();
|
||||
UIWidgets::CVarCheckbox(
|
||||
"Disable Scene Geometry Distance Check", "gEnhancements.Graphics.DisableSceneGeometryDistanceCheck",
|
||||
{ .tooltip =
|
||||
"Disables the distance check for scene geometry, allowing it to be drawn no matter how far "
|
||||
"away it is from the player. This may have unintended side effects." });
|
||||
if (UIWidgets::CVarCheckbox(
|
||||
"Disable Scene Geometry Distance Check", "gEnhancements.Graphics.DisableSceneGeometryDistanceCheck",
|
||||
{ .tooltip =
|
||||
"Disables the distance check for scene geometry, allowing it to be drawn no matter how far "
|
||||
"away it is from the player. This may have unintended side effects." })) {
|
||||
GfxPatcher_ApplyGeometryIssuePatches();
|
||||
}
|
||||
UIWidgets::CVarCheckbox("Widescreen Actor Culling",
|
||||
"gEnhancements.Graphics.ActorCullingAccountsForWidescreen",
|
||||
{ .tooltip = "Adjusts the culling planes to account for widescreen resolutions. "
|
||||
|
@ -1244,10 +1244,13 @@ void AddEnhancements() {
|
||||
{ .widgetName = "Unstable",
|
||||
.widgetType = WIDGET_SEPARATOR_TEXT,
|
||||
.widgetOptions = { .color = UIWidgets::Colors::Yellow } },
|
||||
{ "Disable Scene Geometry Distance Check", "gEnhancements.Graphics.DisableSceneGeometryDistanceCheck",
|
||||
{ "Disable Scene Geometry Distance Check",
|
||||
"gEnhancements.Graphics.DisableSceneGeometryDistanceCheck",
|
||||
"Disables the distance check for scene geometry, allowing it to be drawn no matter how far "
|
||||
"away it is from the player. This may have unintended side effects.",
|
||||
WIDGET_CVAR_CHECKBOX },
|
||||
WIDGET_CVAR_CHECKBOX,
|
||||
{},
|
||||
[](widgetInfo& info) { GfxPatcher_ApplyGeometryIssuePatches(); } },
|
||||
{ "Widescreen Actor Culling", "gEnhancements.Graphics.ActorCullingAccountsForWidescreen",
|
||||
"Adjusts the culling planes to account for widescreen resolutions. "
|
||||
"This may have unintended side effects.",
|
||||
|
@ -265,9 +265,58 @@ void PatchMiniGameCrossAndCircleSymbols() {
|
||||
}
|
||||
}
|
||||
|
||||
void PatchKnifeChamberRoomGeometry() {
|
||||
if (CVarGetInteger("gEnhancements.Graphics.DisableSceneGeometryDistanceCheck", 0)) {
|
||||
ResourceMgr_PatchGfxByName("scenes/nonmq/Z2_YADOYA/Z2_YADOYA_room_00DL_012280", "disableDistanceCheck1", 5,
|
||||
gsSPNoOp());
|
||||
ResourceMgr_PatchGfxByName("scenes/nonmq/Z2_YADOYA/Z2_YADOYA_room_00DL_012280", "disableDistanceCheck2", 6,
|
||||
gsSPNoOp());
|
||||
} else {
|
||||
ResourceMgr_UnpatchGfxByName("scenes/nonmq/Z2_YADOYA/Z2_YADOYA_room_00DL_012280", "disableDistanceCheck1");
|
||||
ResourceMgr_UnpatchGfxByName("scenes/nonmq/Z2_YADOYA/Z2_YADOYA_room_00DL_012280", "disableDistanceCheck2");
|
||||
}
|
||||
}
|
||||
|
||||
void PatchClockTownBuildingGeometry() {
|
||||
if (CVarGetInteger("gEnhancements.Graphics.DisableSceneGeometryDistanceCheck", 0)) {
|
||||
ResourceMgr_PatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00D490", "disableDistanceCheck1",
|
||||
5, gsSPNoOp());
|
||||
ResourceMgr_PatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00D490", "disableDistanceCheck2",
|
||||
6, gsSPNoOp());
|
||||
ResourceMgr_PatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00CD70", "disableDistanceCheck1",
|
||||
5, gsSPNoOp());
|
||||
ResourceMgr_PatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00CD70", "disableDistanceCheck2",
|
||||
6, gsSPNoOp());
|
||||
ResourceMgr_PatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00D9C8", "disableDistanceCheck1",
|
||||
5, gsSPNoOp());
|
||||
ResourceMgr_PatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00D9C8", "disableDistanceCheck2",
|
||||
6, gsSPNoOp());
|
||||
} else {
|
||||
ResourceMgr_UnpatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00D490",
|
||||
"disableDistanceCheck1");
|
||||
ResourceMgr_UnpatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00D490",
|
||||
"disableDistanceCheck2");
|
||||
ResourceMgr_UnpatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00CD70",
|
||||
"disableDistanceCheck1");
|
||||
ResourceMgr_UnpatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00CD70",
|
||||
"disableDistanceCheck2");
|
||||
ResourceMgr_UnpatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00D9C8",
|
||||
"disableDistanceCheck1");
|
||||
ResourceMgr_UnpatchGfxByName("scenes/nonmq/Z2_00KEIKOKU/Z2_00KEIKOKU_room_00DL_00D9C8",
|
||||
"disableDistanceCheck2");
|
||||
}
|
||||
}
|
||||
|
||||
void GfxPatcher_ApplyGeometryIssuePatches() {
|
||||
PatchKnifeChamberRoomGeometry();
|
||||
PatchClockTownBuildingGeometry();
|
||||
}
|
||||
|
||||
// Applies required patches for authentic bugs to allow the game to play and render properly
|
||||
void GfxPatcher_ApplyNecessaryAuthenticPatches() {
|
||||
PatchMiniGameCrossAndCircleSymbols();
|
||||
|
||||
GfxPatcher_ApplyOverflowTexturePatches();
|
||||
|
||||
GfxPatcher_ApplyGeometryIssuePatches();
|
||||
}
|
||||
|
@ -3,5 +3,6 @@
|
||||
|
||||
void GfxPatcher_ApplyNecessaryAuthenticPatches();
|
||||
void GfxPatcher_ApplyOverflowTexturePatches();
|
||||
void GfxPatcher_ApplyGeometryIssuePatches();
|
||||
|
||||
#endif // AUTHENTIC_GFX_PATCHES_H
|
||||
|
Loading…
Reference in New Issue
Block a user