diff --git a/desmume/src/windows/memView.cpp b/desmume/src/windows/memView.cpp index d24af5d84..d40772647 100644 --- a/desmume/src/windows/memView.cpp +++ b/desmume/src/windows/memView.cpp @@ -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); diff --git a/desmume/src/windows/ramwatch.cpp b/desmume/src/windows/ramwatch.cpp index c185e894c..17a96f290 100644 --- a/desmume/src/windows/ramwatch.cpp +++ b/desmume/src/windows/ramwatch.cpp @@ -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; diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index b64ad3f23..a16a307f0 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -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 diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 10993303e..7c3b7370a 100644 Binary files a/desmume/src/windows/resources.rc and b/desmume/src/windows/resources.rc differ