Added a Separator feature to the ram watch
This commit is contained in:
parent
69deb66c96
commit
f2f0ac5f55
|
@ -64,6 +64,7 @@ unsigned int GetCurrentValue(AddressWatcher& watch)
|
|||
|
||||
bool IsSameWatch(const AddressWatcher& l, const AddressWatcher& r)
|
||||
{
|
||||
if (r.Size == 'S') return false;
|
||||
return ((l.Address == r.Address) && (l.Size == r.Size) && (l.Type == r.Type)/* && (l.WrongEndian == r.WrongEndian)*/);
|
||||
}
|
||||
|
||||
|
@ -973,6 +974,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
default: sprintf(num, formatString, t=='s' ? (char)(i&0xff) : (unsigned char)(i&0xff)); break;
|
||||
case 'w': sprintf(num, formatString, t=='s' ? (short)(i&0xffff) : (unsigned short)(i&0xffff)); break;
|
||||
case 'd': sprintf(num, formatString, t=='s' ? (long)(i&0xffffffff) : (unsigned long)(i&0xffffffff)); break;
|
||||
case 'S': sprintf(num, "---------"); break;
|
||||
}
|
||||
|
||||
Item->item.pszText = num;
|
||||
|
@ -1031,6 +1033,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
watchIndex = ListView_GetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST));
|
||||
if(watchIndex != -1)
|
||||
{
|
||||
if(rswatches[watchIndex].Size == 'S') return true;
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, (DLGPROC) EditWatchProc,(LPARAM) watchIndex);
|
||||
SetFocus(GetDlgItem(hDlg,IDC_WATCHLIST));
|
||||
}
|
||||
|
@ -1054,6 +1057,17 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
SetFocus(GetDlgItem(hDlg,IDC_WATCHLIST));
|
||||
}
|
||||
return true;
|
||||
|
||||
case IDC_C_WATCH_SEPARATE:
|
||||
AddressWatcher separator;
|
||||
separator.Address = 0;
|
||||
separator.WrongEndian = false;
|
||||
separator.Size = 'S';
|
||||
separator.Type = 'S';
|
||||
InsertWatch(separator, "----------------------------");
|
||||
SetFocus(GetDlgItem(hDlg,IDC_WATCHLIST));
|
||||
return true;
|
||||
|
||||
case IDC_C_WATCH_UP:
|
||||
{
|
||||
watchIndex = ListView_GetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST));
|
||||
|
|
|
@ -21,8 +21,8 @@ extern bool RWfileChanged;
|
|||
struct AddressWatcher
|
||||
{
|
||||
unsigned int Address; // hardware address
|
||||
char Size;
|
||||
char Type;
|
||||
char Size; //'d' = 4 bytes, 'w' = 2 bytes, 'b' = 1 byte, and 'S' means it's a separator.
|
||||
char Type;//'s' = signed integer, 'u' = unsigned, 'h' = hex, 'S' = separator
|
||||
char* comment; // NULL means no comment, non-NULL means allocated comment
|
||||
bool WrongEndian;
|
||||
unsigned int CurValue;
|
||||
|
|
|
@ -417,6 +417,7 @@ BEGIN
|
|||
MENUITEM "&Edit Watch\tE", IDC_C_WATCH_EDIT
|
||||
MENUITEM "&Remove Watch\tR", IDC_C_WATCH_REMOVE
|
||||
MENUITEM "Duplicate Watch\tA", IDC_C_WATCH_DUPLICATE
|
||||
MENUITEM "Add &Separator\tS", IDC_C_WATCH_SEPARATE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Move Up\tU", IDC_C_WATCH_UP
|
||||
MENUITEM "Move Down\tD", IDC_C_WATCH_DOWN
|
||||
|
@ -1642,9 +1643,10 @@ BEGIN
|
|||
PUSHBUTTON "Remove",IDC_C_WATCH_REMOVE,226,83,34,14
|
||||
PUSHBUTTON "New",IDC_C_WATCH,226,100,34,14
|
||||
PUSHBUTTON "Duplicate",IDC_C_WATCH_DUPLICATE,226,117,34,14
|
||||
PUSHBUTTON "Add Cheat",IDC_C_ADDCHEAT,222,140,42,16,WS_DISABLED
|
||||
GROUPBOX "Watches",IDC_STATIC,222,11,42,125
|
||||
PUSHBUTTON "Add Cheat",IDC_C_ADDCHEAT,223,168,42,16,WS_DISABLED
|
||||
GROUPBOX "Watches",IDC_STATIC,222,11,42,145
|
||||
CONTROL "",ID_WATCHES_UPDOWN,"msctls_updown32",WS_TABSTOP,232,23,19,36
|
||||
PUSHBUTTON "Separator",IDC_C_WATCH_SEPARATE,225,137,36,14
|
||||
END
|
||||
|
||||
IDD_EDITWATCH DIALOGEX 0, 0, 181, 95
|
||||
|
@ -1854,6 +1856,14 @@ BEGIN
|
|||
TOPMARGIN, 8
|
||||
BOTTOMMARGIN, 268
|
||||
END
|
||||
|
||||
IDD_RAMWATCH, DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
IDD_EDITWATCH, DIALOG
|
||||
BEGIN
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
|
|
@ -466,6 +466,8 @@
|
|||
#define IDC_C_WATCH_DUPLICATE 1241
|
||||
#define ID_WATCHES_UPDOWN 1242
|
||||
#define IDC_C_WATCH_UP 1243
|
||||
#define IDC_C_WATCH_DUPLICATE2 1243
|
||||
#define IDC_C_WATCH_Separator 1243
|
||||
#define IDC_C_WATCH_DOWN 1244
|
||||
#define IDC_PROMPT_TEXT 1245
|
||||
#define IDC_PROMPT_TEXT2 1246
|
||||
|
@ -484,6 +486,7 @@
|
|||
#define IDC_CHECK2 1258
|
||||
#define IDC_SINGLEINSTANCE 1258
|
||||
#define IDC_MOVIE_CLOSEAFTERPLAYBACK 1258
|
||||
#define IDC_C_WATCH_SEPARATE 1259
|
||||
#define MENU_NETWORK 40040
|
||||
#define MENU_PALETTE 40041
|
||||
#define MENU_SOUND 40042
|
||||
|
@ -796,6 +799,11 @@
|
|||
#define ID_CONTEXT_FULLSAVESTATES 40409
|
||||
#define ID_CHEATLISTPOPUP_DELETESELECTEDCHEATS 40410
|
||||
#define ID_FILE_SAVESCREENSHOTAS 40411
|
||||
#define ID_WATCHES_ADDSEPARATOR 40412
|
||||
#define ID_WATCHES_SEPARATOR 40413
|
||||
#define IDC_C_WATCHES_SEPARATOR 40414
|
||||
#define IDC_C_WATCH_SEPARATORS 40415
|
||||
#define IDC_C_WATCH_Separa 40416
|
||||
#define IDC_DEBUGGER_ICONTRAY 55535
|
||||
#define MW_ValueLabel2 65423
|
||||
#define MW_ValueLabel1 65426
|
||||
|
@ -805,8 +813,8 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 160
|
||||
#define _APS_NEXT_COMMAND_VALUE 40412
|
||||
#define _APS_NEXT_CONTROL_VALUE 1259
|
||||
#define _APS_NEXT_COMMAND_VALUE 40417
|
||||
#define _APS_NEXT_CONTROL_VALUE 1260
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue