Add two new tick boxes and associated description

For Gregory's two new awesome hacks

Also make new hacks obey "Enable HW Hacks"
This commit is contained in:
Blyss Sarania 2015-04-05 17:15:53 -05:00
parent 9a7d83989b
commit c6fb098703
4 changed files with 30 additions and 14 deletions

View File

@ -32,8 +32,8 @@ GSRendererHW::GSRendererHW(GSTextureCache* tc)
{
m_upscale_multiplier = theApp.GetConfig("upscale_multiplier", 1);
m_userhacks_skipdraw = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_SkipDraw", 0) : 0;
m_userhacks_align_sprite_X = !!theApp.GetConfig("UserHacks_align_sprite_X", 0);
m_userhacks_stretch_sprite = !!theApp.GetConfig("UserHacks_stretch_sprite", 0);
m_userhacks_align_sprite_X = !!theApp.GetConfig("UserHacks_align_sprite_X", 0) && !!theApp.GetConfig("UserHacks", 0);
m_userhacks_stretch_sprite = !!theApp.GetConfig("UserHacks_stretch_sprite", 0) && !!theApp.GetConfig("UserHacks", 0);
if(!m_nativeres)
{

View File

@ -600,6 +600,8 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_ALPHASTENCIL, theApp.GetConfig("UserHacks_AlphaStencil", 0));
CheckDlgButton(m_hWnd, IDC_CHECK_NVIDIA_HACK, theApp.GetConfig("UserHacks_NVIDIAHack", 0));
CheckDlgButton(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS, theApp.GetConfig("UserHacks_DisableCrcHacks", 0));
CheckDlgButton(m_hWnd, IDC_STRETCH_SPRITE, theApp.GetConfig("UserHacks_stretch_sprite", 0));
CheckDlgButton(m_hWnd, IDC_ALIGN_SPRITE, theApp.GetConfig("UserHacks_align_sprite_X", 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0));
@ -691,6 +693,14 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
"It's possible to exclude CRC hacks also via the gsdx.ini. E.g.:\n"
"CrcHacksExclusions=all\n"
"CrcHacksExclusions=0x0F0C4A9C, 0x0EE5646B, 0x7ACF7E03";
case IDC_ALIGN_SPRITE:
helpstr = "Sprite Alignment Hack\n\n"
"Fixes issues with upscaling(vertical lines) in Namco games like Ace Combat, Tekken, Soul Calibur, etc.";
break;
case IDC_STRETCH_SPRITE:
helpstr = "Corrects the sampling of 2D sprite textures when upscaling.\n\n"
"Fixes lines in sprites of games like Ar tonelico when upscaling.\n"
"Works best at 2x, but helps at any resolution.";
break;
case IDC_TCOFFSETX:
@ -733,6 +743,8 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
theApp.SetConfig("UserHacks_AlphaStencil", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHASTENCIL));
theApp.SetConfig("UserHacks_NVIDIAHack", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_NVIDIA_HACK));
theApp.SetConfig("UserHacks_DisableCrcHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS));
theApp.SetConfig("Userhacks_stretch_sprite", (int)IsDlgButtonChecked(m_hWnd, IDC_STRETCH_SPRITE));
theApp.SetConfig("Userhacks_align_sprite_X", (int)IsDlgButtonChecked(m_hWnd, IDC_ALIGN_SPRITE));
unsigned int TCOFFSET = SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETX), UDM_GETPOS, 0, 0) & 0xFFFF;
TCOFFSET |= (SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETY), UDM_GETPOS, 0, 0) & 0xFFFF) << 16;

View File

@ -88,14 +88,14 @@ IDB_LOGO10 BITMAP "res\\logo10.bmp"
// Dialog
//
IDD_HACKS DIALOGEX 0, 0, 315, 246
IDD_HACKS DIALOGEX 0, 0, 315, 278
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Hacks Configuration"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,258,225,50,14
GROUPBOX "Hack",IDC_STATIC,7,7,86,214,0,WS_EX_TRANSPARENT
GROUPBOX "Description",IDC_STATIC,96,7,212,214
DEFPUSHBUTTON "OK",IDOK,258,257,50,14
GROUPBOX "Hack",IDC_STATIC,7,7,86,246,0,WS_EX_TRANSPARENT
GROUPBOX "Description",IDC_STATIC,96,7,212,246
LTEXT "MSAA",IDC_STATIC_MSAA,14,20,20,8
LTEXT "Skipdraw",IDC_STATIC_SKIPDRAW,14,37,30,8
EDITTEXT IDC_SKIPDRAWHACKEDIT,53,35,35,14,ES_RIGHT | ES_AUTOHSCROLL
@ -103,19 +103,21 @@ BEGIN
CONTROL "Alpha",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,53,34,10
CONTROL "Half-pixel Offset",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,69,65,10
CONTROL "Sprite",IDC_SPRITEHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,85,35,10
LTEXT "USE AT YOUR OWN RISK!",IDC_STATIC,7,228,84,11,WS_DISABLED
LTEXT "USE AT YOUR OWN RISK!",IDC_STATIC,7,260,84,11,WS_DISABLED
COMBOBOX IDC_MSAACB,35,18,54,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,102,64,10
LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,102,20,199,192
CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,119,66,10
CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,136,66,10
CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,168,58,10
LTEXT "TC Offset X",IDC_STATIC_TCOFFSETX,14,186,37,8
EDITTEXT IDC_TCOFFSETX2,53,184,35,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,184,11,14
EDITTEXT IDC_TCOFFSETY2,53,201,35,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,201,11,14
LTEXT "TC Offset Y",IDC_STATIC_TCOFFSETY,14,203,37,8
CONTROL "Stretch Sprite",IDC_STRETCH_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,184,66,10
CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,200,60,10
LTEXT "TC Offset X",IDC_STATIC_TCOFFSETX,14,218,37,8
EDITTEXT IDC_TCOFFSETX2,53,216,35,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,216,11,14
EDITTEXT IDC_TCOFFSETY2,53,233,35,14,ES_RIGHT | ES_AUTOHSCROLL
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,233,11,14
LTEXT "TC Offset Y",IDC_STATIC_TCOFFSETY,14,235,37,8
CONTROL "NVIDIA Hack",IDC_CHECK_NVIDIA_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,152,57,10
END

View File

@ -72,6 +72,8 @@
#define IDC_ANISOTROPIC 2089
#define IDC_AFCOMBO 2090
#define IDC_OPENCL_DEVICE 2091
#define IDC_STRETCH_SPRITE 2092
#define IDC_ALIGN_SPRITE 2093
#define IDC_COLORSPACE 3000
#define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001
@ -92,7 +94,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 10012
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2092
#define _APS_NEXT_CONTROL_VALUE 2094
#define _APS_NEXT_SYMED_VALUE 5000
#endif
#endif