MCPcopy Create free account
hub / github.com/crossuo/crossuo / CollectFrameInformation

Method CollectFrameInformation

src/Managers/AnimationManager.cpp:1559–2932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1557}
1558
1559DRAW_FRAME_INFORMATION
1560CAnimationManager::CollectFrameInformation(CGameObject *gameObject, bool checkLayers)
1561{
1562 m_Sitting = 0;
1563 Anim.Direction = 0;
1564
1565 DRAW_FRAME_INFORMATION dfInfo = {};
1566
1567 std::vector<CGameItem *> &list = gameObject->m_DrawLayeredObjects;
1568
1569 if (checkLayers)
1570 {
1571 list.clear();
1572
1573 memset(&m_CharacterLayerGraphic[0], 0, sizeof(m_CharacterLayerGraphic));
1574 memset(&m_CharacterLayerAnimID[0], 0, sizeof(m_CharacterLayerAnimID));
1575
1576 QFOR(item, gameObject->m_Items, CGameItem *)
1577 {
1578 if (item->Layer < OL_MOUNT)
1579 {
1580 m_CharacterLayerGraphic[item->Layer] = item->Graphic;
1581 m_CharacterLayerAnimID[item->Layer] = item->AnimID;
1582 }
1583 }
1584 }
1585
1586 if (gameObject->NPC)
1587 {
1588 CGameCharacter *obj = (CGameCharacter *)gameObject;
1589 obj->UpdateAnimationInfo_ProcessSteps(Anim.Direction);
1590
1591 bool mirror = false;
1592 uint8_t layerDir = Anim.Direction;
1593
1594 GetAnimDirection(Anim.Direction, mirror);
1595
1596 uint8_t animIndex = obj->AnimIndex;
1597 uint8_t animGroup = obj->GetGroupForAnimation(0, true);
1598
1599 FRAME_OUTPUT_INFO info = {};
1600
1601 CGameItem *goi = obj->FindLayer(OL_MOUNT);
1602
1603 if (goi != nullptr) //Check mount
1604 {
1605 uint16_t mountID = goi->GetGraphicForAnimation();
1606 Anim.Group = obj->GetGroupForAnimation(mountID, false);
1607 CalculateFrameInformation(info, goi, mirror, animIndex);
1608 switch (animGroup)
1609 {
1610 case PAG_FIDGET_1:
1611 case PAG_FIDGET_2:
1612 case PAG_FIDGET_3:
1613 {
1614 animGroup = PAG_ONMOUNT_STAND;
1615 animIndex = 0;
1616 break;

Callers 2

ProcessMethod · 0.80
CalculateRenderListMethod · 0.80

Calls 10

GetGroupForAnimationMethod · 0.80
FindLayerMethod · 0.80
IsCorpseMethod · 0.80
QFORFunction · 0.70
clearMethod · 0.45
IsHumanMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected