sobinist

Untitled

Feb 13th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.38 KB | None | 0 0
  1. tdstEngineObject *__cdecl fn_vUpdateCurrentActivationForCharacter(HIE_tdstSuperObject *superObject)
  2. {
  3.   tdstEngineObject *result; // eax@1
  4.   struct_CollSet *collset; // edi@1
  5.   tdst3dData_ *p3dData; // eax@2
  6.   __int16 animCount; // si@2
  7.   tdstState_ *animState; // ecx@2
  8.   tdstState_ *i; // eax@2
  9.   struct_CollSet *activationListZDD; // eax@5
  10.   int activationListEntryZDD; // eax@6
  11.   int animIterZDD; // ecx@7
  12.   struct_CollSet *activationListZDE; // eax@11
  13.   int activationListEntryZDE; // eax@12
  14.   int animIterZDE; // ecx@13
  15.   struct_CollSet *activationListZDR; // eax@17
  16.   int activationListEntryZDR; // eax@18
  17.   int animIterZDR; // ecx@19
  18.   struct_CollSet *activationListZDM; // eax@23
  19.   int activationListEntryZDM; // eax@24
  20.   int animIterZDM; // ecx@25
  21.  
  22.   result = superObject->engineObject;
  23.   collset = result->collset;
  24.   if ( collset )
  25.   {
  26.     p3dData = result->p3dData;
  27.     animCount = 0;
  28.     animState = p3dData->animState;
  29.     for ( i = *(tdstState_ **)(p3dData->dword14 + 16); i != animState; ++animCount )
  30.     {
  31.       if ( !i )
  32.       {
  33.         break;
  34.       }
  35.       i = (tdstState_ *)i->anim3dData;
  36.     }
  37.     activationListZDD = CS_fn_hGetActivationList(0, superObject);
  38.     if ( activationListZDD )
  39.     {
  40.       activationListEntryZDD = activationListZDD->field_0;
  41.       if ( animCount > 0 )
  42.       {
  43.         animIterZDD = animCount;
  44.         do
  45.         {
  46.           activationListEntryZDD = *(_DWORD *)activationListEntryZDD;
  47.           --animIterZDD;
  48.         }
  49.         while ( animIterZDD );
  50.       }
  51.       updateActivation(0, collset, *(_DWORD *)(activationListEntryZDD + 4));
  52.     }
  53.     else
  54.     {
  55.       updateActivation(0, collset, 0);
  56.     }
  57.     activationListZDE = CS_fn_hGetActivationList(2, superObject);
  58.     if ( activationListZDE )
  59.     {
  60.       activationListEntryZDE = activationListZDE->field_0;
  61.       if ( animCount > 0 )
  62.       {
  63.         animIterZDE = animCount;
  64.         do
  65.         {
  66.           activationListEntryZDE = *(_DWORD *)activationListEntryZDE;
  67.           --animIterZDE;
  68.         }
  69.         while ( animIterZDE );
  70.       }
  71.       updateActivation(2u, collset, *(_DWORD *)(activationListEntryZDE + 4));
  72.     }
  73.     else
  74.     {
  75.       updateActivation(2u, collset, 0);
  76.     }
  77.     activationListZDR = CS_fn_hGetActivationList(3, superObject);
  78.     if ( activationListZDR )
  79.     {
  80.       activationListEntryZDR = activationListZDR->field_0;
  81.       if ( animCount > 0 )
  82.       {
  83.         animIterZDR = animCount;
  84.         do
  85.         {
  86.           activationListEntryZDR = *(_DWORD *)activationListEntryZDR;
  87.           --animIterZDR;
  88.         }
  89.         while ( animIterZDR );
  90.       }
  91.       updateActivation(3u, collset, *(_DWORD *)(activationListEntryZDR + 4));
  92.     }
  93.     else
  94.     {
  95.       updateActivation(3u, collset, 0);
  96.     }
  97.     activationListZDM = CS_fn_hGetActivationList(1, superObject);
  98.     if ( activationListZDM )
  99.     {
  100.       activationListEntryZDM = activationListZDM->field_0;
  101.       if ( animCount > 0 )
  102.       {
  103.         animIterZDM = animCount;
  104.         do
  105.         {
  106.           activationListEntryZDM = *(_DWORD *)activationListEntryZDM;
  107.           --animIterZDM;
  108.         }
  109.         while ( animIterZDM );
  110.       }
  111.       result = (tdstEngineObject *)updateActivation(1u, collset, *(_DWORD *)(activationListEntryZDM + 4));
  112.     }
  113.     else
  114.     {
  115.       result = (tdstEngineObject *)updateActivation(1u, collset, 0);
  116.     }
  117.   }
  118.   return result;
  119. }
Add Comment
Please, Sign In to add comment