bool InitAlign( CvSize *faceSz) { PARAM *faceSz = cvSize(68,84); // set to return the size of the aligned face PARAM g_normRow = 27; PARAM g_normDis = 34; g_faceSz = *faceSz; g_nFiltLevel = 3; g_lefta = new CvPoint2D32f[g_nFiltLevel]; g_righta = new CvPoint2D32f[g_nFiltLevel]; return InitAsm(); }
void DbgEntry (void) /* Start up the debugger */ { static unsigned char FirstTime = 1; char c; char done; /* If this is the first call, setup the display */ if (FirstTime) { FirstTime = 0; /* Draw the window, default active frame is ASM frame */ RedrawStatic (WIN_ASM); InitAsm (); InitReg (); InitStack (); InitCStack (); UpdateDump (); } /* Only initialize variables here, don't do a display update. The actual * display update will be done while waiting for user input. */ AsmHome (); UpdateReg (); /* Must update this (static later) */ StackHome (); CStackHome (); /* Wait for user input */ done = 0; while (!done) { c = Frames [ActiveFrame]->fd_func (); switch (c) { case '1': case '2': case '3': case '4': case '5': ActivateFrame (c - '1', 0); break; case '?': #ifdef CH_F1 case CH_F1: #endif HelpHandler (); break; case 'u': #ifdef CH_F3 case CH_F3: #endif /* Go until return */ SetRTSBreak (); done = 1; break; case 'h': #ifdef CH_F4 case CH_F4: #endif /* Go to cursor, only possible if cursor not at current PC */ if (AsmAddr != brk_pc) { DbgSetTmpBreak (AsmAddr); done = 1; } break; case ' ': #ifdef CH_F7 case CH_F7: #endif SingleStep (1); if (DbgTmpBreaksOk ()) { /* Could set breakpoints */ done = 1; } break; case '\n': #ifdef CH_F8 case CH_F8: #endif SingleStep (0); if (DbgTmpBreaksOk ()) { /* Could set breakpoints */ done = 1; } break; case 'c': case 0: done = 1; break; case 's': /* Skip instruction */ brk_pc += DbgDisAsmLen (brk_pc); InitAsm (); break; case 'r': /* Redraw screen */ Redraw (ActiveFrame); break; case 'q': /* Quit program */ clrscr (); exit (1); } } }