| 1357 | } |
| 1358 | |
| 1359 | Vector4 CalculateReferenceScale(HScene scene, InternalNode* node) |
| 1360 | { |
| 1361 | float scale_x = 1.0f; |
| 1362 | float scale_y = 1.0f; |
| 1363 | |
| 1364 | if (scene->m_AdjustReference == ADJUST_REFERENCE_LEGACY || node == 0x0 || node->m_ParentIndex == INVALID_INDEX) { |
| 1365 | scale_x = (float) scene->m_AdjustWidth / (float) scene->m_Width; |
| 1366 | scale_y = (float) scene->m_AdjustHeight / (float) scene->m_Height; |
| 1367 | } else { |
| 1368 | Vector4 adjust_scale = scene->m_Nodes[node->m_ParentIndex].m_Node.m_LocalAdjustScale; |
| 1369 | scale_x = adjust_scale.getX(); |
| 1370 | scale_y = adjust_scale.getY(); |
| 1371 | } |
| 1372 | return Vector4(scale_x, scale_y, 1.0f, 1.0f); |
| 1373 | } |
| 1374 | |
| 1375 | inline void CalculateNodeSize(InternalNode* in) |
| 1376 | { |