Merge branch 'master' of https://github.com/TASVideos/fceux
This commit is contained in:
commit
1b0edf183d
|
@ -120,9 +120,11 @@ void UpdateOtherDebuggingDialogs()
|
|||
|
||||
void RestoreSize(HWND hwndDlg)
|
||||
{
|
||||
HDC hdc = GetDC(hwndDlg);
|
||||
//If the dialog dimensions are changed those changes need to be reflected here. - adelikat
|
||||
const int DEFAULT_WIDTH = 820 + (debuggerIDAFont ? 64 : 0); //Original width
|
||||
const int DEFAULT_HEIGHT = 576 + (debuggerIDAFont ? 2 : 0); //Original height
|
||||
const int DEFAULT_WIDTH = MulDiv(820 + (debuggerIDAFont ? 64 : 0), GetDeviceCaps(hdc, LOGPIXELSX), 96); //Original width
|
||||
const int DEFAULT_HEIGHT = MulDiv(576 + (debuggerIDAFont ? 2 : 0), GetDeviceCaps(hdc, LOGPIXELSY), 96); //Original height
|
||||
ReleaseDC(hwndDlg, hdc);
|
||||
|
||||
SetWindowPos(hwndDlg,HWND_TOP,DbgPosX,DbgPosY,DEFAULT_WIDTH,DEFAULT_HEIGHT,SWP_SHOWWINDOW);
|
||||
}
|
||||
|
|
|
@ -103,17 +103,6 @@ MemoryMappedRegister RegNames[] = {
|
|||
|
||||
int RegNameCount = sizeof(RegNames)/sizeof(MemoryMappedRegister);
|
||||
|
||||
/**
|
||||
* Tests whether a char is a valid hexadecimal character.
|
||||
*
|
||||
* @param c The char to test
|
||||
* @return True or false.
|
||||
**/
|
||||
int isHex(char c)
|
||||
{
|
||||
return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a line from a NL file.
|
||||
* @param line The line to parse
|
||||
|
@ -165,10 +154,10 @@ int parseLine(char* line, Name* n)
|
|||
if (llen == 5) // Offset size of normal lines of the form $XXXX
|
||||
{
|
||||
if (line[0] != '$'
|
||||
|| !isHex(line[1])
|
||||
|| !isHex(line[2])
|
||||
|| !isHex(line[3])
|
||||
|| !isHex(line[4])
|
||||
|| !IsLetterLegalHex(line[1])
|
||||
|| !IsLetterLegalHex(line[2])
|
||||
|| !IsLetterLegalHex(line[3])
|
||||
|| !IsLetterLegalHex(line[4])
|
||||
)
|
||||
{
|
||||
return 4;
|
||||
|
@ -178,10 +167,10 @@ int parseLine(char* line, Name* n)
|
|||
{
|
||||
int i;
|
||||
if (line[0] != '$'
|
||||
|| !isHex(line[1])
|
||||
|| !isHex(line[2])
|
||||
|| !isHex(line[3])
|
||||
|| !isHex(line[4])
|
||||
|| !IsLetterLegalHex(line[1])
|
||||
|| !IsLetterLegalHex(line[2])
|
||||
|| !IsLetterLegalHex(line[3])
|
||||
|| !IsLetterLegalHex(line[4])
|
||||
|| line[5] != '/'
|
||||
)
|
||||
{
|
||||
|
@ -190,7 +179,7 @@ int parseLine(char* line, Name* n)
|
|||
|
||||
for (i=6;line[i];i++)
|
||||
{
|
||||
if (!isHex(line[i]))
|
||||
if (!IsLetterLegalHex(line[i]))
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
@ -381,7 +370,7 @@ Name* parse(char* lines, const char* filename)
|
|||
int i;
|
||||
|
||||
// Create a node for each element of the array
|
||||
for (i=0;i<=arrlen;i++)
|
||||
for (i = 0; i < arrlen; i++)
|
||||
{
|
||||
char numbuff[10] = {0};
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ void DeleteAllDebuggerBookmarks();
|
|||
void FillDebuggerBookmarkListbox(HWND hwnd);
|
||||
|
||||
void GoToDebuggerBookmark(HWND hwnd);
|
||||
int isHex(char c);
|
||||
extern bool IsLetterLegalHex(char c);
|
||||
|
||||
bool DoSymbolicDebugNaming(int offset, HWND parentHWND);
|
||||
void AddNewSymbolicName(uint16 newAddress, char* newOffset, char* newName, char* newComment, int size, int init, bool nameOverwrite, bool commentHeadOnly, bool commentOverwrite);
|
||||
|
|
|
@ -120,7 +120,7 @@ BOOL updateResults(HWND hwndDlg, int rule)
|
|||
|
||||
for (unsigned int j=0;j<len;j++)
|
||||
{
|
||||
if (isHex(input_buff[j]) == FALSE)
|
||||
if (IsLetterLegalHex(input_buff[j]) == FALSE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -1701,9 +1701,9 @@ CAPTION "Symbolic Debug Naming"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "&File:",IDC_STATIC,7,7,15,9
|
||||
EDITTEXT IDC_SYMBOLIC_FILENAME,26,6,220,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_SYMBOLIC_FILENAME,26,6,220,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "&Address:",IDC_STATIC_SYMBOLIC_ADDRESS,13,26,30,10
|
||||
EDITTEXT IDC_SYMBOLIC_ADDRESS,45,24,33,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_SYMBOLIC_ADDRESS,45,24,33,13,ES_AUTOHSCROLL | ES_READONLY
|
||||
CONTROL "A&rray size: 0x",IDC_CHECK_SYMBOLIC_ARRAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,83,25,60,10
|
||||
EDITTEXT IDC_EDIT_SYMBOLIC_ARRAY,144,23,20,14,ES_UPPERCASE | ES_AUTOHSCROLL | WS_DISABLED
|
||||
LTEXT "byte(s)",IDC_STATIC_SYMBOLIC_BYTE,168,26,24,8,WS_DISABLED
|
||||
|
|
Loading…
Reference in New Issue