add big endian toggle to memview
This commit is contained in:
parent
3f6e986076
commit
f13fabcc73
|
@ -29,6 +29,7 @@
|
|||
#include <windowsx.h>
|
||||
#include <commctrl.h>
|
||||
#include "memView.h"
|
||||
#include "winutil.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -430,6 +431,13 @@ LRESULT MemView_ViewBoxPaint(CMemView* wnd, HWND hCtl, WPARAM wParam, LPARAM lPa
|
|||
for(i = 0; i < 16; i += 2)
|
||||
{
|
||||
u16 val = T1ReadWord(memory, ((line << 4) + i));
|
||||
if(IsDlgCheckboxChecked(wnd->hWnd,IDC_BIG_ENDIAN))
|
||||
{
|
||||
char swp[2];
|
||||
swp[0] = (val>>8)&0xFF;
|
||||
swp[1] = val&0xFF;
|
||||
val = *(u16*)swp;
|
||||
}
|
||||
if(wnd->sel && (wnd->selAddress == (addr + i)))
|
||||
{
|
||||
SetBkColor(mem_hdc, GetSysColor(COLOR_HIGHLIGHT));
|
||||
|
@ -470,6 +478,15 @@ LRESULT MemView_ViewBoxPaint(CMemView* wnd, HWND hCtl, WPARAM wParam, LPARAM lPa
|
|||
for(i = 0; i < 16; i += 4)
|
||||
{
|
||||
u32 val = T1ReadLong(memory, ((line << 4) + i));
|
||||
if(IsDlgCheckboxChecked(wnd->hWnd,IDC_BIG_ENDIAN))
|
||||
{
|
||||
char swp[4];
|
||||
swp[0] = (val>>24)&0xFF;
|
||||
swp[1] = (val>>16)&0xFF;
|
||||
swp[2] = (val>>8)&0xFF;
|
||||
swp[3] = val&0xFF;
|
||||
val = *(u32*)swp;
|
||||
}
|
||||
if(wnd->sel && (wnd->selAddress == (addr + i)))
|
||||
{
|
||||
SetBkColor(mem_hdc, GetSysColor(COLOR_HIGHLIGHT));
|
||||
|
|
|
@ -434,6 +434,7 @@
|
|||
#define IDC_CAP0_ACTIVE 1078
|
||||
#define IDC_CHECK10 1079
|
||||
#define IDC_CAP0_RUNNING 1079
|
||||
#define IDC_BIG_ENDIAN 1079
|
||||
#define IDC_CHECK6 1080
|
||||
#define IDC_CAP1_SRC 1080
|
||||
#define IDC_CAP1_ONESHOT 1081
|
||||
|
@ -452,7 +453,7 @@
|
|||
#define IDC_EDIT1 1102
|
||||
#define IDC_EDIT2 1103
|
||||
#define IDC_EDIT3 1104
|
||||
#define IDC_WINDOW5X 1105
|
||||
#define IDC_WINDOW5X 1105
|
||||
#define IDC_EDIT_AUTHOR 1180
|
||||
#define IDD_MATRIX_VIEWER 1200
|
||||
#define IDM_MATRIX_VIEWER 1200
|
||||
|
@ -691,6 +692,8 @@
|
|||
#define MENU_PRINCIPAL 2012
|
||||
#define RAMWATCH_MENU 2013
|
||||
#define RECENTROMS 2014
|
||||
#define IDD_FONTSETTINGS 2464
|
||||
#define IDC_FONTCOMBO 2465
|
||||
#define IDC_GI_FATOFS 4464
|
||||
#define IDC_INTERPOLATECOLOR 4464
|
||||
#define IDC_GI_FATSIZE 4465
|
||||
|
@ -953,8 +956,6 @@
|
|||
#define IDM_RENDER_LQ2X 60082
|
||||
#define IDM_RENDER_LQ2XS 60083
|
||||
#define IDC_SAVETYPE 64000
|
||||
#define IDD_FONTSETTINGS 68000
|
||||
#define IDC_FONTCOMBO 68001
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue