| 629 | #define NUM_ANIM_FRAMES 30 |
| 630 | |
| 631 | void CWorldObjectsRobotDialog::UpdateRobotView(void) { |
| 632 | #if 0 |
| 633 | int n=D3EditState.current_robot; |
| 634 | CWnd *robotwnd; |
| 635 | RECT rect; |
| 636 | int x, y, bm_handle,w,h; |
| 637 | static int frame=0,spin_frame=0; |
| 638 | static last_robot=-1; |
| 639 | static last_render_handle=-1; |
| 640 | static robot_dir=0; |
| 641 | |
| 642 | if (Num_robots<1) |
| 643 | return; |
| 644 | |
| 645 | if (robot_dir==0) |
| 646 | { |
| 647 | frame++; |
| 648 | if (frame==NUM_ANIM_FRAMES) |
| 649 | { |
| 650 | frame=NUM_ANIM_FRAMES-1; |
| 651 | robot_dir=1; |
| 652 | } |
| 653 | } |
| 654 | else |
| 655 | { |
| 656 | frame--; |
| 657 | if (frame==-1) |
| 658 | { |
| 659 | frame=0; |
| 660 | robot_dir=0; |
| 661 | } |
| 662 | } |
| 663 | |
| 664 | |
| 665 | |
| 666 | robotwnd = GetDlgItem(IDC_ROBOTVIEW); |
| 667 | robotwnd->GetWindowRect(&rect); |
| 668 | ScreenToClient(&rect); |
| 669 | |
| 670 | Desktop_surf->attach_to_window((unsigned)m_hWnd); |
| 671 | |
| 672 | w=rect.right-rect.left; |
| 673 | h=rect.bottom-rect.top; |
| 674 | |
| 675 | if (last_robot!=n || last_render_handle!=Robots[n].render_handle) |
| 676 | { |
| 677 | Desktop_surf->clear(rect.left,rect.top,w,h); |
| 678 | last_robot=n; |
| 679 | last_render_handle=Robots[n].render_handle; |
| 680 | } |
| 681 | |
| 682 | bm_handle=GetRobotImage (n); |
| 683 | |
| 684 | vector zero_vector; |
| 685 | vector view_vector={0,0,-20}; |
| 686 | matrix id_matrix,rot_matrix; |
| 687 | poly_model *pm=&Poly_models[bm_handle]; |
| 688 |
nothing calls this directly
no test coverage detected