merge 3825-3862 from trunk

This commit is contained in:
zeromus 2010-10-27 04:59:56 +00:00
parent 79bd9ae0c1
commit ef4e0ac269
4 changed files with 33 additions and 14 deletions

View File

@ -390,6 +390,8 @@ LRESULT MemView_ViewBoxPaint(CMemView* wnd, HWND hCtl, WPARAM wParam, LPARAM lPa
{
case 0:
{
SetDlgItemText(wnd->hWnd,IDC_2012,"");
curx += (fontsize.cx * 2);
for(i = 0; i < 16; i++)
{
@ -422,6 +424,8 @@ LRESULT MemView_ViewBoxPaint(CMemView* wnd, HWND hCtl, WPARAM wParam, LPARAM lPa
case 1:
{
SetDlgItemText(wnd->hWnd,IDC_2012,"");
curx += (fontsize.cx * 6);
for(i = 0; i < 16; i += 2)
{
@ -456,6 +460,12 @@ LRESULT MemView_ViewBoxPaint(CMemView* wnd, HWND hCtl, WPARAM wParam, LPARAM lPa
case 2:
{
u8 smallbuf[4];
MMU_DumpMemBlock(wnd->cpu, wnd->selAddress, 4, smallbuf);
char textbuf[32];
sprintf(textbuf,"%f",((s32)T1ReadLong(smallbuf,0))/4096.0f);
SetDlgItemText(wnd->hWnd,IDC_2012,textbuf);
curx += (fontsize.cx * 8);
for(i = 0; i < 16; i += 4)
{
@ -604,7 +614,6 @@ LRESULT CALLBACK MemView_ViewBoxProc(HWND hCtl, UINT uMsg, WPARAM wParam, LPARAM
col = ((x - (fontsize.cx * 8)) / (fontsize.cx * (8+1)) * 4);
wnd->sel = TRUE;
}
break;
}
@ -612,6 +621,7 @@ LRESULT CALLBACK MemView_ViewBoxProc(HWND hCtl, UINT uMsg, WPARAM wParam, LPARAM
wnd->selAddress = (wnd->address + (line << 4) + col);
wnd->selPart = 0;
wnd->selNewVal = 0x00000000;
}
SelectObject(hdc, font);

View File

@ -683,6 +683,9 @@ LRESULT CALLBACK EditWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
case 'h':
SendDlgItemMessage(hDlg, IDC_HEX, BM_SETCHECK, BST_CHECKED, 0);
break;
case 'f':
SendDlgItemMessage(hDlg, IDC_2012, BM_SETCHECK, BST_CHECKED, 0);
break;
default:
t = 0;
break;
@ -703,6 +706,9 @@ LRESULT CALLBACK EditWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
case IDC_HEX:
t='h';
return true;
case IDC_2012:
t='f';
return true;
case IDC_1_BYTE:
s = 'b';
return true;
@ -967,13 +973,18 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
int t = rswatches[iNum].Type;
int size = rswatches[iNum].Size;
const char* formatString = ((t=='s') ? "%d" : (t=='u') ? "%u" : (size=='d' ? "%08X" : size=='w' ? "%04X" : "%02X"));
switch (size)
if(t=='f')
{
case 'b':
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;
sprintf(num,"%f",i/4096.0f);
}
else
switch (size)
{
case 'b':
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;
}
Item->item.pszText = num;
} return true;

View File

@ -248,6 +248,7 @@
#define IDC_2_BYTES 958
#define IDC_4_BYTES 959
#define IDC_WATCHLIST 960
#define IDC_HEX2 960
#define IDC_C_WATCH_EDIT 961
#define IDC_C_WATCH_REMOVE 962
#define IDC_C_WATCH 963
@ -386,6 +387,7 @@
#define IDC_RFILE 1038
#define IDC_EXPORT 1038
#define IDC_RFOLDER 1039
#define IDC_2012 1039
#define IDC_BBROWSE2 1040
#define IDC_PATHDESMUME 1041
#define IDC_BRESTART 1042
@ -770,8 +772,8 @@
#define ID_LABEL_HK51 4515
#define ID_LABEL_HK52 4516
#define ID_LABEL_HK53 4517
#define ID_LABEL_HK54 4519
#define ID_LABEL_HK13b 4518
#define ID_LABEL_HK54 4519
#define IDD_MICROPHONE 5000
#define IDM_MICROPHONESETTINGS 5001
#define IDC_MICSAMPLEBROWSE 5003
@ -781,12 +783,8 @@
#define IDC_USENOISE 5010
#define IDC_CPU 6000
#define IDC_IOREG 6001
//ZELDA SHADOW HACK
#define ID_LABEL_ZELDA_SHADOW_DEPTH_HACK 9000
#define IDC_ZELDA_SHADOW_DEPTH_HACK 9001
#define ID_LABEL_ZELDA_SHADOW_DEPTH_HACK 9000
#define IDC_ZELDA_SHADOW_DEPTH_HACK 9001
#define IDD_CHEAT_ADD_XX_CODE 10005
#define IDD_GBASLOT_GUITARGRIP 10009
#define IDD_GBASLOT_PIANO 10010
@ -954,7 +952,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 123
#define _APS_NEXT_COMMAND_VALUE 40085
#define _APS_NEXT_CONTROL_VALUE 1039
#define _APS_NEXT_CONTROL_VALUE 1040
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

Binary file not shown.