Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Rename Wild Arms hack #11356

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bin/docs/GameIndex.pdf
Binary file not shown.
216 changes: 108 additions & 108 deletions bin/resources/GameIndex.yaml

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions pcsx2-qt/Settings/GraphicsSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.textureOffsetY, "EmuCore/GS", "UserHacks_TCOffsetY", 0);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.alignSprite, "EmuCore/GS", "UserHacks_align_sprite_X", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.mergeSprite, "EmuCore/GS", "UserHacks_merge_pp_sprite", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.wildHack, "EmuCore/GS", "UserHacks_WildHack", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.forceEvenSpritePosition, "EmuCore/GS", "UserHacks_forceEvenSpritePosition", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.nativePaletteDraw, "EmuCore/GS", "UserHacks_NativePaletteDraw", false);

//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -633,8 +633,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
//: Namco: a game publisher and development company. Leave the name as-is. Ace Combat, Tekken, Soul Calibur: game names. Leave as-is or use official translations.
tr("Fixes issues with upscaling (vertical lines) in Namco games like Ace Combat, Tekken, Soul Calibur, etc."));

//: Wild Arms: name of a game series. Leave as-is or use an official translation.
dialog->registerWidgetHelp(m_ui.wildHack, tr("Wild Arms Hack"), tr("Unchecked"),
dialog->registerWidgetHelp(m_ui.forceEvenSpritePosition, tr("Force Even Sprite Position"), tr("Unchecked"),
//: Wild Arms: name of a game series. Leave as-is or use an official translation.
tr("Lowers the GS precision to avoid gaps between pixels when upscaling. Fixes the text on Wild Arms games."));

Expand Down Expand Up @@ -1145,7 +1144,7 @@ void GraphicsSettingsWidget::resetManualHardwareFixes()
check_int("EmuCore/GS", "UserHacks_TCOffsetY", 0);
check_bool("EmuCore/GS", "UserHacks_align_sprite_X", false);
check_bool("EmuCore/GS", "UserHacks_merge_pp_sprite", false);
check_bool("EmuCore/GS", "UserHacks_WildHack", false);
check_bool("EmuCore/GS", "UserHacks_ForceEvenSpritePosition", false);
check_bool("EmuCore/GS", "UserHacks_BilinearHack", false);
}

Expand Down
4 changes: 2 additions & 2 deletions pcsx2-qt/Settings/GraphicsSettingsWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1172,9 +1172,9 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="wildHack">
<widget class="QCheckBox" name="forceEvenSpritePosition">
<property name="text">
<string extracomment="Wild Arms: name of a game series. Leave as-is or use an official translation.">Wild Arms Hack</string>
<string>Force Even Sprite Position</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ struct Pcsx2Config
UserHacks_DisableSafeFeatures : 1,
UserHacks_DisableRenderFixes : 1,
UserHacks_MergePPSprite : 1,
UserHacks_WildHack : 1,
UserHacks_ForceEvenSpritePosition : 1,
UserHacks_NativePaletteDraw : 1,
UserHacks_EstimateTextureRegion : 1,
FXAA : 1,
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/Docs/GameIndex.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ The clamp modes are also numerically based.

* alignSprite [`0` or `1`] {Off or On} Default: Off (`0`)
* mergeSprite [`0` or `1`] {Off or On} Default: Off (`0`)
* wildArmsHack [`0` or `1`] {Off or On} Default: Off (`0`)
* forceEvenSpritePosition [`0` or `1`] {Off or On} Default: Off (`0`)
* bilinearUpscale [`0` or `1` or `2`] {Automatic, Force Bilinear, Force Nearest} Default: Automatic
* skipDrawStart [Value between `0` to `10000`] {0-10000} Default: Off (`0`)
* skipDrawEnd [Value between `0` to `10000`] {0-10000} Default: Off (`0`)
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/Docs/gamedb-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"minimum": 0,
"maximum": 1
},
"wildArmsHack": {
"forceEvenSpritePosition": {
"type": "integer",
"minimum": 0,
"maximum": 1
Expand Down
6 changes: 3 additions & 3 deletions pcsx2/GS/GSState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void GSState::ResetHandlers()
m_fpGIFPackedRegHandlers[GIF_REG_PRIM] = (GIFPackedRegHandler)(GIFRegHandler)&GSState::GIFRegHandlerPRIM;
m_fpGIFPackedRegHandlers[GIF_REG_RGBA] = &GSState::GIFPackedRegHandlerRGBA;
m_fpGIFPackedRegHandlers[GIF_REG_STQ] = &GSState::GIFPackedRegHandlerSTQ;
m_fpGIFPackedRegHandlers[GIF_REG_UV] = GSConfig.UserHacks_WildHack ? &GSState::GIFPackedRegHandlerUV_Hack : &GSState::GIFPackedRegHandlerUV;
m_fpGIFPackedRegHandlers[GIF_REG_UV] = GSConfig.UserHacks_ForceEvenSpritePosition ? &GSState::GIFPackedRegHandlerUV_Hack : &GSState::GIFPackedRegHandlerUV;
m_fpGIFPackedRegHandlers[GIF_REG_TEX0_1] = (GIFPackedRegHandler)(GIFRegHandler)&GSState::GIFRegHandlerTEX0<0>;
m_fpGIFPackedRegHandlers[GIF_REG_TEX0_2] = (GIFPackedRegHandler)(GIFRegHandler)&GSState::GIFRegHandlerTEX0<1>;
m_fpGIFPackedRegHandlers[GIF_REG_CLAMP_1] = (GIFPackedRegHandler)(GIFRegHandler)&GSState::GIFRegHandlerCLAMP<0>;
Expand All @@ -244,7 +244,7 @@ void GSState::ResetHandlers()
m_fpGIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GSState::GIFRegHandlerRGBAQ;
m_fpGIFRegHandlers[GIF_A_D_REG_RGBAQ + 0x10] = &GSState::GIFRegHandlerRGBAQ;
m_fpGIFRegHandlers[GIF_A_D_REG_ST] = &GSState::GIFRegHandlerST;
m_fpGIFRegHandlers[GIF_A_D_REG_UV] = GSConfig.UserHacks_WildHack ? &GSState::GIFRegHandlerUV_Hack : &GSState::GIFRegHandlerUV;
m_fpGIFRegHandlers[GIF_A_D_REG_UV] = GSConfig.UserHacks_ForceEvenSpritePosition ? &GSState::GIFRegHandlerUV_Hack : &GSState::GIFRegHandlerUV;
m_fpGIFRegHandlers[GIF_A_D_REG_TEX0_1] = &GSState::GIFRegHandlerTEX0<0>;
m_fpGIFRegHandlers[GIF_A_D_REG_TEX0_2] = &GSState::GIFRegHandlerTEX0<1>;
m_fpGIFRegHandlers[GIF_A_D_REG_CLAMP_1] = &GSState::GIFRegHandlerCLAMP<0>;
Expand Down Expand Up @@ -310,7 +310,7 @@ void GSState::UpdateSettings(const Pcsx2Config::GSOptions& old_config)
if (
GSConfig.AutoFlushSW != old_config.AutoFlushSW ||
GSConfig.UserHacks_AutoFlush != old_config.UserHacks_AutoFlush ||
GSConfig.UserHacks_WildHack != old_config.UserHacks_WildHack)
GSConfig.UserHacks_ForceEvenSpritePosition != old_config.UserHacks_ForceEvenSpritePosition)
{
ResetHandlers();
}
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/GS/Renderers/HW/GSRendererHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3389,7 +3389,7 @@ void GSRendererHW::SetupIA(float target_scale, float sx, float sy)
{
GL_PUSH("IA");

if (GSConfig.UserHacks_WildHack && !m_isPackedUV_HackFlag && m_process_texture && PRIM->FST)
if (GSConfig.UserHacks_ForceEvenSpritePosition && !m_isPackedUV_HackFlag && m_process_texture && PRIM->FST)
{
for (u32 i = 0; i < m_vertex.next; i++)
m_vertex.buff[i].UV &= 0x3FEF3FEF;
Expand Down
10 changes: 5 additions & 5 deletions pcsx2/GameDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static const char* s_gs_hw_fix_names[] = {
"alignSprite",
"mergeSprite",
"mipmap",
"wildArmsHack",
"forceEvenSpritePosition",
"bilinearUpscale",
"nativePaletteDraw",
"estimateTextureRegion",
Expand Down Expand Up @@ -602,8 +602,8 @@ bool GameDatabaseSchema::GameEntry::configMatchesHWFix(const Pcsx2Config::GSOpti
case GSHWFixId::MergeSprite:
return (config.UpscaleMultiplier <= 1.0f || static_cast<int>(config.UserHacks_MergePPSprite) == value);

case GSHWFixId::WildArmsHack:
return (config.UpscaleMultiplier <= 1.0f || static_cast<int>(config.UserHacks_WildHack) == value);
case GSHWFixId::ForceEvenSpritePosition:
return (config.UpscaleMultiplier <= 1.0f || static_cast<int>(config.UserHacks_ForceEvenSpritePosition) == value);

case GSHWFixId::BilinearUpscale:
return (config.UpscaleMultiplier <= 1.0f || static_cast<int>(config.UserHacks_BilinearHack) == value);
Expand Down Expand Up @@ -747,8 +747,8 @@ void GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions&
config.UserHacks_MergePPSprite = (value > 0);
break;

case GSHWFixId::WildArmsHack:
config.UserHacks_WildHack = (value > 0);
case GSHWFixId::ForceEvenSpritePosition:
config.UserHacks_ForceEvenSpritePosition = (value > 0);
break;

case GSHWFixId::BilinearUpscale:
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/GameDatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace GameDatabaseSchema
AlignSprite,
MergeSprite,
Mipmap,
WildArmsHack,
ForceEvenSpritePosition,
BilinearUpscale,
NativePaletteDraw,
EstimateTextureRegion,
Expand Down
6 changes: 3 additions & 3 deletions pcsx2/ImGui/FullscreenUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3822,9 +3822,9 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
DrawToggleSetting(bsi, FSUI_CSTR("Merge Sprite"),
FSUI_CSTR("Replaces multiple post-processing sprites with a larger single sprite."), "EmuCore/GS",
"UserHacks_merge_pp_sprite", false, manual_hw_fixes);
DrawToggleSetting(bsi, FSUI_CSTR("Wild Arms Hack"),
DrawToggleSetting(bsi, FSUI_CSTR("Force Even Sprite Position"),
FSUI_CSTR("Lowers the GS precision to avoid gaps between pixels when upscaling. Fixes the text on Wild Arms games."),
"EmuCore/GS", "UserHacks_WildHack", false, manual_hw_fixes);
"EmuCore/GS", "UserHacks_ForceEvenSpritePosition", false, manual_hw_fixes);
DrawToggleSetting(bsi, FSUI_CSTR("Unscaled Palette Texture Draws"),
FSUI_CSTR("Can fix some broken effects which rely on pixel perfect precision."), "EmuCore/GS",
"UserHacks_NativePaletteDraw", false, manual_hw_fixes);
Expand Down Expand Up @@ -7073,7 +7073,7 @@ TRANSLATE_NOOP("FullscreenUI", "Align Sprite");
TRANSLATE_NOOP("FullscreenUI", "Fixes issues with upscaling (vertical lines) in some games.");
TRANSLATE_NOOP("FullscreenUI", "Merge Sprite");
TRANSLATE_NOOP("FullscreenUI", "Replaces multiple post-processing sprites with a larger single sprite.");
TRANSLATE_NOOP("FullscreenUI", "Wild Arms Hack");
TRANSLATE_NOOP("FullscreenUI", "Force Even Sprite Position");
TRANSLATE_NOOP("FullscreenUI", "Lowers the GS precision to avoid gaps between pixels when upscaling. Fixes the text on Wild Arms games.");
TRANSLATE_NOOP("FullscreenUI", "Unscaled Palette Texture Draws");
TRANSLATE_NOOP("FullscreenUI", "Can fix some broken effects which rely on pixel perfect precision.");
Expand Down
4 changes: 2 additions & 2 deletions pcsx2/ImGui/ImGuiOverlays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@ __ri void ImGuiManager::DrawSettingsOverlay(float scale, float margin, float spa
APPEND("TexRT={} ", static_cast<unsigned>(GSConfig.UserHacks_TextureInsideRt));
if (GSConfig.UserHacks_BilinearHack != GSBilinearDirtyMode::Automatic)
APPEND("BLU={} ", static_cast<unsigned>(GSConfig.UserHacks_BilinearHack));
if (GSConfig.UserHacks_WildHack)
APPEND("WA ");
if (GSConfig.UserHacks_ForceEvenSpritePosition)
APPEND("FESP ");
if (GSConfig.UserHacks_NativePaletteDraw)
APPEND("NPD ");
if (GSConfig.UserHacks_MergePPSprite)
Expand Down
8 changes: 4 additions & 4 deletions pcsx2/Pcsx2Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ Pcsx2Config::GSOptions::GSOptions()
UserHacks_DisableSafeFeatures = false;
UserHacks_DisableRenderFixes = false;
UserHacks_MergePPSprite = false;
UserHacks_WildHack = false;
UserHacks_ForceEvenSpritePosition = false;
UserHacks_BilinearHack = GSBilinearDirtyMode::Automatic;
UserHacks_NativePaletteDraw = false;

Expand Down Expand Up @@ -852,7 +852,7 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
SettingsWrapBitBoolEx(UserHacks_DisableSafeFeatures, "UserHacks_Disable_Safe_Features");
SettingsWrapBitBoolEx(UserHacks_DisableRenderFixes, "UserHacks_DisableRenderFixes");
SettingsWrapBitBoolEx(UserHacks_MergePPSprite, "UserHacks_merge_pp_sprite");
SettingsWrapBitBoolEx(UserHacks_WildHack, "UserHacks_WildHack");
SettingsWrapBitBoolEx(UserHacks_ForceEvenSpritePosition, "UserHacks_ForceEvenSpritePosition");
SettingsWrapIntEnumEx(UserHacks_BilinearHack, "UserHacks_BilinearHack");
SettingsWrapBitBoolEx(UserHacks_NativePaletteDraw, "UserHacks_NativePaletteDraw");
SettingsWrapIntEnumEx(UserHacks_TextureInsideRt, "UserHacks_TextureInsideRt");
Expand Down Expand Up @@ -958,7 +958,7 @@ void Pcsx2Config::GSOptions::MaskUserHacks()

UserHacks_AlignSpriteX = false;
UserHacks_MergePPSprite = false;
UserHacks_WildHack = false;
UserHacks_ForceEvenSpritePosition = false;
UserHacks_NativePaletteDraw = false;
UserHacks_DisableSafeFeatures = false;
UserHacks_DisableRenderFixes = false;
Expand Down Expand Up @@ -991,7 +991,7 @@ void Pcsx2Config::GSOptions::MaskUpscalingHacks()

UserHacks_AlignSpriteX = false;
UserHacks_MergePPSprite = false;
UserHacks_WildHack = false;
UserHacks_ForceEvenSpritePosition = false;
UserHacks_BilinearHack = GSBilinearDirtyMode::Automatic;
UserHacks_NativePaletteDraw = false;
UserHacks_HalfPixelOffset = GSHalfPixelOffset::Off;
Expand Down