Auto depth skip hack initialization.

This commit is contained in:
Akash 2015-05-25 15:12:41 +05:30 committed by ssakash
parent 580d177951
commit 99f9407c24
5 changed files with 20 additions and 12 deletions

View File

@ -81,6 +81,9 @@ const char* dialog_message(int ID, bool* updateText) {
return "Corrects the sampling of 2D sprite textures when upscaling.\n\n" return "Corrects the sampling of 2D sprite textures when upscaling.\n\n"
"Fixes lines in sprites of games like Ar tonelico when upscaling.\n\n" "Fixes lines in sprites of games like Ar tonelico when upscaling.\n\n"
"Carries a total of three states: Unchecked (off), Shaded (on for all sprites) and Checked (on for flat sprites)"; "Carries a total of three states: Unchecked (off), Shaded (on for all sprites) and Checked (on for flat sprites)";
case IDC_AUTO_SKIP:
return "Auto-skip draw depth Hack\n\n"
"Fixes red lines for games like GOW and NFS:Underground.";
case IDC_TCOFFSETX: case IDC_TCOFFSETX:
case IDC_TCOFFSETX2: case IDC_TCOFFSETX2:
case IDC_STATIC_TCOFFSETX: case IDC_STATIC_TCOFFSETX:

View File

@ -57,6 +57,7 @@ enum {
IDC_CHECK_DISABLE_ALL_HACKS, IDC_CHECK_DISABLE_ALL_HACKS,
IDC_ALIGN_SPRITE, IDC_ALIGN_SPRITE,
IDC_ROUND_SPRITE, IDC_ROUND_SPRITE,
IDC_AUTO_SKIP,
IDC_TCOFFSETX, IDC_TCOFFSETX,
IDC_TCOFFSETX2, IDC_TCOFFSETX2,
IDC_STATIC_TCOFFSETX, IDC_STATIC_TCOFFSETX,

View File

@ -603,6 +603,7 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS, theApp.GetConfig("UserHacks_DisableCrcHacks", 0)); CheckDlgButton(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS, theApp.GetConfig("UserHacks_DisableCrcHacks", 0));
CheckDlgButton(m_hWnd, IDC_ROUND_SPRITE, theApp.GetConfig("UserHacks_round_sprite_offset", 0)); CheckDlgButton(m_hWnd, IDC_ROUND_SPRITE, theApp.GetConfig("UserHacks_round_sprite_offset", 0));
CheckDlgButton(m_hWnd, IDC_ALIGN_SPRITE, theApp.GetConfig("UserHacks_align_sprite_X", 0)); CheckDlgButton(m_hWnd, IDC_ALIGN_SPRITE, theApp.GetConfig("UserHacks_align_sprite_X", 0));
CheckDlgButton(m_hWnd, IDC_AUTO_SKIP, theApp.Getconfig("UserHacks_AutoSkipDrawDepth"));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 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)); SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0));
@ -666,6 +667,7 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
theApp.SetConfig("UserHacks_DisableCrcHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS)); theApp.SetConfig("UserHacks_DisableCrcHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS));
theApp.SetConfig("UserHacks_round_sprite_offset", (int)IsDlgButtonChecked(m_hWnd, IDC_ROUND_SPRITE)); theApp.SetConfig("UserHacks_round_sprite_offset", (int)IsDlgButtonChecked(m_hWnd, IDC_ROUND_SPRITE));
theApp.SetConfig("Userhacks_align_sprite_X", (int)IsDlgButtonChecked(m_hWnd, IDC_ALIGN_SPRITE)); theApp.SetConfig("Userhacks_align_sprite_X", (int)IsDlgButtonChecked(m_hWnd, IDC_ALIGN_SPRITE));
theApp.SetConfig("UserHacks_AutoSkipDrawDepth",(int)IsDlgButtonChecked(m_hWnd, IDC_AUTO_SKIP));
unsigned int TCOFFSET = SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETX), UDM_GETPOS, 0, 0) & 0xFFFF; 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; 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 // Dialog
// //
IDD_HACKS DIALOGEX 0, 0, 315, 278 IDD_HACKS DIALOGEX 0, 0, 315, 294
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Hacks Configuration" CAPTION "Hacks Configuration"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,258,257,50,14 DEFPUSHBUTTON "OK",IDOK,258,273,50,14
GROUPBOX "Hack",IDC_STATIC,7,7,86,246,0,WS_EX_TRANSPARENT GROUPBOX "Hack",IDC_STATIC,7,7,86,262,0,WS_EX_TRANSPARENT
GROUPBOX "Description",IDC_STATIC,96,7,212,246 GROUPBOX "Description",IDC_STATIC,96,7,212,262
LTEXT "MSAA",IDC_STATIC_MSAA,14,20,20,8 LTEXT "MSAA",IDC_STATIC_MSAA,14,20,20,8
LTEXT "Skipdraw",IDC_STATIC_SKIPDRAW,14,37,30,8 LTEXT "Skipdraw",IDC_STATIC_SKIPDRAW,14,37,30,8
EDITTEXT IDC_SKIPDRAWHACKEDIT,53,35,35,14,ES_RIGHT | ES_AUTOHSCROLL EDITTEXT IDC_SKIPDRAWHACKEDIT,53,35,35,14,ES_RIGHT | ES_AUTOHSCROLL
@ -103,7 +103,7 @@ BEGIN
CONTROL "Alpha",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,53,34,10 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 "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 CONTROL "Sprite",IDC_SPRITEHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,85,35,10
LTEXT "USE AT YOUR OWN RISK!",IDC_STATIC,7,260,84,11,WS_DISABLED LTEXT "USE AT YOUR OWN RISK!",IDC_STATIC,7,276,84,11,WS_DISABLED
COMBOBOX IDC_MSAACB,35,18,54,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP 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 CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,102,64,10
LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,102,20,199,192 LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,102,20,199,192
@ -112,12 +112,13 @@ BEGIN
CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,168,58,10 CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,168,58,10
CONTROL "Round Sprite",IDC_ROUND_SPRITE,"Button",BS_AUTO3STATE | WS_TABSTOP,14,184,66,10 CONTROL "Round Sprite",IDC_ROUND_SPRITE,"Button",BS_AUTO3STATE | WS_TABSTOP,14,184,66,10
CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,200,60,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 CONTROL "Auto-skip draw depth",IDC_AUTO_SKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,216,60,10
EDITTEXT IDC_TCOFFSETX2,53,216,35,14,ES_RIGHT | ES_AUTOHSCROLL LTEXT "TC Offset X",IDC_STATIC_TCOFFSETX,14,234,37,8
CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,216,11,14 EDITTEXT IDC_TCOFFSETX2,53,232,35,14,ES_RIGHT | ES_AUTOHSCROLL
EDITTEXT IDC_TCOFFSETY2,53,233,35,14,ES_RIGHT | ES_AUTOHSCROLL CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,232,11,14
CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,233,11,14 EDITTEXT IDC_TCOFFSETY2,53,249,35,14,ES_RIGHT | ES_AUTOHSCROLL
LTEXT "TC Offset Y",IDC_STATIC_TCOFFSETY,14,235,37,8 CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,249,11,14
LTEXT "TC Offset Y",IDC_STATIC_TCOFFSETY,14,251,37,8
CONTROL "NVIDIA Hack",IDC_CHECK_NVIDIA_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,152,57,10 CONTROL "NVIDIA Hack",IDC_CHECK_NVIDIA_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,152,57,10
END END

View File

@ -74,6 +74,7 @@
#define IDC_OPENCL_DEVICE 2091 #define IDC_OPENCL_DEVICE 2091
#define IDC_ROUND_SPRITE 2092 #define IDC_ROUND_SPRITE 2092
#define IDC_ALIGN_SPRITE 2093 #define IDC_ALIGN_SPRITE 2093
#define IDC_AUTO_SKIP 2094
#define IDC_COLORSPACE 3000 #define IDC_COLORSPACE 3000
#define IDR_CONVERT_FX 10000 #define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001 #define IDR_TFX_FX 10001
@ -94,7 +95,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 10012 #define _APS_NEXT_RESOURCE_VALUE 10012
#define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2094 #define _APS_NEXT_CONTROL_VALUE 2095
#define _APS_NEXT_SYMED_VALUE 5000 #define _APS_NEXT_SYMED_VALUE 5000
#endif #endif
#endif #endif