@@ -455,19 +455,19 @@ bool CUIXmlInit::InitDragDropListEx(CUIXml& xml_doc, const char* path, int index
455455 int cell_size = xml_doc.ReadAttribInt (path, index, " cell_size" , 50 ); // UP
456456
457457 // Определяем максимально допустимый размер ячеек, при котором у нас вместится нужное количество.
458- max_cell_size.x = iFloor (_max (1 .f , (real_wh.x - 1 .f )) / _max ((float )w_cells.x , 1 .0f )); // UP
459- max_cell_size.y = iFloor (_max (1 .f , (real_wh.y - 1 .f )) / _max ((float )w_cells.y , 1 .0f )); // UP
458+ max_cell_size.x = ( int ) trunc (_max (1 .f , (real_wh.x - 1 .f )) / _max ((float )w_cells.x , 1 .0f )); // UP
459+ max_cell_size.y = ( int ) trunc (_max (1 .f , (real_wh.y - 1 .f )) / _max ((float )w_cells.y , 1 .0f )); // UP
460460 float safe_cell_scale = _max (
461461 float (cell_size) / _max (1 .0f , float (max_cell_size.x )),
462462 float (cell_size) / _max (1 .0f , float (max_cell_size.y ))
463463 );
464464 float real_cell_size = float (cell_size) / safe_cell_scale; // UP
465465 // Вычисляем размеры ячеек в координатах 1024-768
466- w_cell_sz.x = iFloor (real_cell_size * device_scale.x ); // CP // cell size in grid
467- w_cell_sz.y = iFloor (real_cell_size * device_scale.y ); // CP
466+ w_cell_sz.x = ( int ) round (real_cell_size * device_scale.x ); // CP // cell size in grid
467+ w_cell_sz.y = ( int ) round (real_cell_size * device_scale.y ); // CP
468468 // Вычисляем количество ячеек в координатах 1024-768
469- w_cells.x = iFloor (_max (1 .f , (width - 1 .f )) / _max ((float )w_cell_sz.x , 1 .0f )); // cell count in grid
470- w_cells.y = iFloor (_max (1 .f , (height - 1 .f )) / _max ((float )w_cell_sz.y , 1 .0f ));
469+ w_cells.x = ( int ) round (_max (1 .f , (width - 1 .f )) / _max ((float )w_cell_sz.x , 1 .0f )); // cell count in grid
470+ w_cells.y = ( int ) round (_max (1 .f , (height - 1 .f )) / _max ((float )w_cell_sz.y , 1 .0f ));
471471
472472 w_cell_sp.x = xml_doc.ReadAttribInt (path, index, " cell_sp_x" , 0 );
473473 w_cell_sp.y = xml_doc.ReadAttribInt (path, index, " cell_sp_y" , 0 );
0 commit comments