Diff for /np2/win9x/debuguty/viewer.cpp between versions 1.1 and 1.9

version 1.1, 2003/10/16 17:59:09 version 1.9, 2007/01/08 08:52:22
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "resource.h"  #include        "resource.h"
 #include        "np2.h"  #include        "np2.h"
 #include        "i286.h"  
 #include        "viewer.h"  #include        "viewer.h"
 #include        "viewcmn.h"  #include        "viewcmn.h"
   #include        "cpucore.h"
   
 static  char            np2viewclass[] = "NP2-ViewWindow";  
                 NP2VIEW_T       np2view[NP2VIEW_MAX];  
 extern  HINSTANCE       hInst;  
   
   static  const TCHAR             np2viewclass[] = _T("NP2-ViewWindow");
                   const TCHAR             np2viewfont[] = _T("£Í£Ó ¥´¥·¥Ã¥¯");
                   NP2VIEW_T               np2view[NP2VIEW_MAX];
   extern  HINSTANCE               hInst;
   
 static void viewer_segmode(HWND hwnd, BYTE type) {  
   static void viewer_segmode(HWND hwnd, UINT8 type) {
   
         NP2VIEW_T       *view;          NP2VIEW_T       *view;
   
Line 104  LRESULT CALLBACK ViewProc(HWND hWnd, UIN Line 106  LRESULT CALLBACK ViewProc(HWND hWnd, UIN
                         if (view) {                          if (view) {
                                 RECT    rc;                                  RECT    rc;
                                 GetClientRect(hWnd, &rc);                                  GetClientRect(hWnd, &rc);
                                 view->step = rc.bottom / 16;                                  view->step = (UINT16)(rc.bottom / 16);
                                 viewcmn_setvscroll(hWnd, view);                                  viewcmn_setvscroll(hWnd, view);
                         }                          }
                         break;                          break;
Line 112  LRESULT CALLBACK ViewProc(HWND hWnd, UIN Line 114  LRESULT CALLBACK ViewProc(HWND hWnd, UIN
                 case WM_VSCROLL:                  case WM_VSCROLL:
                         view = viewcmn_find(hWnd);                          view = viewcmn_find(hWnd);
                         if (view) {                          if (view) {
                                 DWORD newpos = view->pos;                                  UINT32 newpos = view->pos;
                                 switch(LOWORD(wParam)) {                                  switch(LOWORD(wParam)) {
                                         case SB_LINEUP:                                          case SB_LINEUP:
                                                 if (newpos) {                                                  if (newpos) {
Line 201  BOOL viewer_init(HINSTANCE hPreInst) { Line 203  BOOL viewer_init(HINSTANCE hPreInst) {
                 np2vc.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON2));                  np2vc.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON2));
                 np2vc.hCursor = LoadCursor(NULL, IDC_ARROW);                  np2vc.hCursor = LoadCursor(NULL, IDC_ARROW);
                 np2vc.hbrBackground = (HBRUSH)0;                  np2vc.hbrBackground = (HBRUSH)0;
                 np2vc.lpszMenuName = MAKEINTRESOURCE(IDM_VIEW);                  np2vc.lpszMenuName = MAKEINTRESOURCE(IDR_VIEW);
                 np2vc.lpszClassName = np2viewclass;                  np2vc.lpszClassName = np2viewclass;
                 if (!RegisterClass(&np2vc)) {                  if (!RegisterClass(&np2vc)) {
                         return(FAILURE);                          return(FAILURE);
Line 224  void viewer_open(void) { Line 226  void viewer_open(void) {
         view = np2view;          view = np2view;
         for (i=0; i<NP2VIEW_MAX; i++, view++) {          for (i=0; i<NP2VIEW_MAX; i++, view++) {
                 if (!view->alive) {                  if (!view->alive) {
                         char buf[256];                          TCHAR buf[256];
                         viewcmn_caption(view, buf);                          viewcmn_caption(view, buf);
                         ZeroMemory(view, sizeof(NP2VIEW_T));                          ZeroMemory(view, sizeof(NP2VIEW_T));
                         view->alive = TRUE;                          view->alive = TRUE;
Line 261  void viewer_allclose(void) { Line 263  void viewer_allclose(void) {
   
 void viewer_allreload(BOOL force) {  void viewer_allreload(BOOL force) {
   
 static  DWORD   last = 0;  static UINT32   last = 0;
                 DWORD   now;          UINT32          now;
   
         now = GetTickCount();          now = GetTickCount();
         if ((force) || ((now - last) >= 200)) {          if ((force) || ((now - last) >= 200)) {
Line 274  static DWORD last = 0; Line 276  static DWORD last = 0;
                 for (i=0; i<NP2VIEW_MAX; i++, view++) {                  for (i=0; i<NP2VIEW_MAX; i++, view++) {
                         if ((view->alive) && (!view->lock)) {                          if ((view->alive) && (!view->lock)) {
                                 if (view->type == VIEWMODE_ASM) {                                  if (view->type == VIEWMODE_ASM) {
                                         view->seg = I286_CS;                                          view->seg = CPU_CS;
                                         view->off = I286_IP;                                          view->off = CPU_IP;
                                         view->pos = 0;                                          view->pos = 0;
                                         viewcmn_setvscroll(view->hwnd, view);                                          viewcmn_setvscroll(view->hwnd, view);
                                 }                                  }

Removed from v.1.1  
changed lines
  Added in v.1.9


RetroPC.NET-CVS <cvs@retropc.net>