void CSampleDialogScrollHelper::UpdateScrollInfo() { if (0 == m_pWnd) return; CRect rect; GetClientRectSB(m_pWnd, rect); //GetClientRectSB_Ex( m_pWnd, m_display_size, rect ); CSize window_size(rect.Width(), rect.Height()); CSize delta_pos(0, 0); UpdateScrollBar(SB_HORZ, window_size.cx, m_display_size.cx, m_page_size.cx, m_scroll_pos.cx, delta_pos.cx); UpdateScrollBar(SB_VERT, window_size.cy, m_display_size.cy, m_page_size.cy, m_scroll_pos.cy, delta_pos.cy); if (delta_pos.cx != 0 || delta_pos.cy != 0) m_pWnd->ScrollWindow(delta_pos.cx, delta_pos.cy); }
void CPs2Geom::plat_set_world_position(const Mth::Vector& pos) { // Garrett: we may need to do this in integer format instead to make it lossless Mth::Vector delta_pos(pos - m_rootMatrix[W]); // Set values m_rootMatrix[W][X] = pos[X]; m_rootMatrix[W][Y] = pos[Y]; m_rootMatrix[W][Z] = pos[Z]; //m_rootMatrix[W][W] = 1.0f; // Engine call here if (m_cloned != vCOPY) { update_engine_matrix(); } else { mp_instance->Translate(delta_pos); } }