Diff for /np2/win9x/debuguty/viewreg.cpp between versions 1.1.1.1 and 1.4

version 1.1.1.1, 2003/10/16 17:59:10 version 1.4, 2003/12/01 10:45:46
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        "debugsub.h"  #include        "debugsub.h"
 #include        "viewer.h"  #include        "viewer.h"
 #include        "viewcmn.h"  #include        "viewcmn.h"
 #include        "viewmenu.h"  #include        "viewmenu.h"
 #include        "viewmem.h"  #include        "viewmem.h"
 #include        "viewreg.h"  #include        "viewreg.h"
   #include        "i286.h"
   
   
 static void viewreg_paint(NP2VIEW_T *view, RECT *rc, HDC hdc) {  static void viewreg_paint(NP2VIEW_T *view, RECT *rc, HDC hdc) {
Line 16  static void viewreg_paint(NP2VIEW_T *vie Line 16  static void viewreg_paint(NP2VIEW_T *vie
         DWORD           pos;          DWORD           pos;
         char            str[128];          char            str[128];
         HFONT           hfont;          HFONT           hfont;
         I286REGS        *r;          I286STAT        *r;
   
         hfont = CreateFont(16, 0, 0, 0, 0, 0, 0, 0,           hfont = CreateFont(16, 0, 0, 0, 0, 0, 0, 0, 
                                         SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,                                          SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
Line 27  static void viewreg_paint(NP2VIEW_T *vie Line 27  static void viewreg_paint(NP2VIEW_T *vie
   
         if (view->lock) {          if (view->lock) {
                 if (view->buf1.type != ALLOCTYPE_REG) {                  if (view->buf1.type != ALLOCTYPE_REG) {
                         if (viewcmn_alloc(&view->buf1, sizeof(I286REGS))) {                          if (viewcmn_alloc(&view->buf1, sizeof(i286core.s))) {
                                 view->lock = FALSE;                                  view->lock = FALSE;
                                 viewmenu_lock(view);                                  viewmenu_lock(view);
                         }                          }
                         else {                          else {
                                 view->buf1.type = ALLOCTYPE_REG;                                  view->buf1.type = ALLOCTYPE_REG;
                                 CopyMemory(view->buf1.ptr, &i286r, sizeof(I286REGS));                                  CopyMemory(view->buf1.ptr, &i286core.s, sizeof(i286core.s));
                         }                          }
                         viewcmn_putcaption(view);                          viewcmn_putcaption(view);
                 }                  }
Line 41  static void viewreg_paint(NP2VIEW_T *vie Line 41  static void viewreg_paint(NP2VIEW_T *vie
   
         pos = view->pos;          pos = view->pos;
         if (view->lock) {          if (view->lock) {
                 r = (I286REGS *)view->buf1.ptr;                  r = (I286STAT *)view->buf1.ptr;
         }          }
         else {          else {
                 r = &i286r;                  r = &i286core.s;
         }          }
   
         for (y=0; y<rc->bottom && pos<4; y+=16, pos++) {          for (y=0; y<rc->bottom && pos<4; y+=16, pos++) {
                 switch(pos) {                  switch(pos) {
                         case 0:                          case 0:
                                 wsprintf(str, "AX=%04x  BX=%04x  CX=%04x  DX=%04x",                                  wsprintf(str, "AX=%04x  BX=%04x  CX=%04x  DX=%04x",
                                                                         r->w.ax, r->w.bx, r->w.cx, r->w.dx);                                                                  r->r.w.ax, r->r.w.bx, r->r.w.cx, r->r.w.dx);
                                 break;                                  break;
   
                         case 1:                          case 1:
                                 wsprintf(str, "SP=%04x  BP=%04x  SI=%04x  DI=%04x",                                  wsprintf(str, "SP=%04x  BP=%04x  SI=%04x  DI=%04x",
                                                                         r->w.sp, r->w.bp, r->w.si, r->w.di);                                                                  r->r.w.sp, r->r.w.bp, r->r.w.si, r->r.w.di);
                                 break;                                  break;
   
                         case 2:                          case 2:
                                 wsprintf(str, "DS=%04x  ES=%04x  SS=%04x  CS=%04x",                                  wsprintf(str, "DS=%04x  ES=%04x  SS=%04x  CS=%04x",
                                                                         r->w.ds, r->w.es, r->w.ss, r->w.cs);                                                                  r->r.w.ds, r->r.w.es, r->r.w.ss, r->r.w.cs);
                                 break;                                  break;
   
                         case 3:                          case 3:
                                 wsprintf(str, "IP=%04x   %s",                                  wsprintf(str, "IP=%04x   %s",
                                                                         r->w.ip, debugsub_flags(r->w.flag));                                                                  r->r.w.ip, debugsub_flags(r->r.w.flag));
                                 break;                                  break;
                 }                  }
                 TextOut(hdc, 0, y, str, strlen(str));                  TextOut(hdc, 0, y, str, strlen(str));
Line 109  void viewreg_init(NP2VIEW_T *dst, NP2VIE Line 109  void viewreg_init(NP2VIEW_T *dst, NP2VIE
         dst->mul = 1;          dst->mul = 1;
         dst->pos = 0;          dst->pos = 0;
 }  }
   

Removed from v.1.1.1.1  
changed lines
  Added in v.1.4


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