comparison Outdoor.cpp @ 105:56e11be29db1

Слияние
author Ritor1
date Tue, 05 Feb 2013 19:08:52 +0600
parents 41145af69341 170259c8c71f
children 23b213c3f8e1
comparison
equal deleted inserted replaced
104:41145af69341 105:56e11be29db1
87 if ( !v2 ) 87 if ( !v2 )
88 { 88 {
89 if ( !pRenderer->pRenderD3D ) 89 if ( !pRenderer->pRenderD3D )
90 { 90 {
91 pRenderer->OnOutdoorRedrawSW(); 91 pRenderer->OnOutdoorRedrawSW();
92 goto LABEL_16; 92 }
93 } 93 else
94 //goto LABEL_14; 94 {
95 pRenderer->DrawSkyD3D(); 95 pRenderer->DrawSkyD3D();
96 pRenderer->DrawBuildingsD3D(); 96 pRenderer->DrawBuildingsD3D();
97 pRenderer->DrawBezierTerrain(); 97 pRenderer->DrawBezierTerrain();
98 goto LABEL_16; 98 }
99 } 99 }
100 if ( pRenderer->pRenderD3D ) 100 else if ( pRenderer->pRenderD3D )
101 { 101 {
102 //LABEL_14:
103 pRenderer->DrawSkyD3D(); 102 pRenderer->DrawSkyD3D();
104 pRenderer->DrawBuildingsD3D(); 103 pRenderer->DrawBuildingsD3D();
105 pRenderer->DrawBezierTerrain();// Ritor1: sometimes crash 104 pRenderer->DrawBezierTerrain();// Ritor1: sometimes crash
106 goto LABEL_16; 105 }
107 } 106 else
108 pRenderer->DrawBuildingsSW(); 107 {
109 pRenderer->DrawBezierTerrain(); 108 pRenderer->DrawBuildingsSW();
110 sr_sub_486F92_MessWithEdgesAndSpans(); 109 pRenderer->DrawBezierTerrain();
111 pOutdoorCamera->_487355(); 110 sr_sub_486F92_MessWithEdgesAndSpans();
112 LABEL_16: 111 pOutdoorCamera->_487355();
112 }
113 pMobileLightsStack->uNumLightsActive = 0; 113 pMobileLightsStack->uNumLightsActive = 0;
114 pStationaryLightsStack->uNumLightsActive = 0; 114 pStationaryLightsStack->uNumLightsActive = 0;
115 if ( !pRenderer->pRenderD3D ) 115 if ( !pRenderer->pRenderD3D )
116 { 116 {
117 pRenderer->ExecOutdoorDrawSW(); 117 pRenderer->ExecOutdoorDrawSW();
1770 //uSourceLen = (char *)v44 + (int)pFilename; 1770 //uSourceLen = (char *)v44 + (int)pFilename;
1771 //v151 = 0; 1771 //v151 = 0;
1772 for (uint i = 0; i < uNumBModels; ++i) 1772 for (uint i = 0; i < uNumBModels; ++i)
1773 { 1773 {
1774 //v48 = 0; 1774 //v48 = 0;
1775 auto model = pBModels + i; 1775 auto model = &pBModels[i];
1776 1776
1777 model->pVertices.pVertices = nullptr; 1777 model->pVertices.pVertices = nullptr;
1778 model->pFaces = nullptr; 1778 model->pFaces = nullptr;
1779 model->pFacesOrdering = nullptr; 1779 model->pFacesOrdering = nullptr;
1780 model->pNodes = nullptr; 1780 model->pNodes = nullptr;
1854 { 1854 {
1855 auto texFilename = textureFilenames + j * 10; 1855 auto texFilename = textureFilenames + j * 10;
1856 //v149 = 0; 1856 //v149 = 0;
1857 //Str2 = (char *)ptr; 1857 //Str2 = (char *)ptr;
1858 1858
1859 auto face = model->pFaces + j; 1859 auto *face = &model->pFaces[j];
1860 //pFilename = (char *)v149 + (unsigned int)v60[v48].pFaces; 1860 //pFilename = (char *)v149 + (unsigned int)v60[v48].pFaces;
1861 if (~face->uAttributes & 0x40) 1861 if (~face->uAttributes & 0x40)
1862 { 1862 {
1863 v62 = pBitmaps_LOD->LoadTexture(texFilename); 1863 v62 = pBitmaps_LOD->LoadTexture(texFilename);
1864 // v63 = (ODMFace *)pFilename; 1864 // v63 = (ODMFace *)pFilename;
2128 //v25 = uNumBModels == 0; 2128 //v25 = uNumBModels == 0;
2129 //v26 = (uNumBModels & 0x80000000u) != 0; 2129 //v26 = (uNumBModels & 0x80000000u) != 0;
2130 //v151 = 0; 2130 //v151 = 0;
2131 for (uint i = 0; i < uNumBModels; ++i) 2131 for (uint i = 0; i < uNumBModels; ++i)
2132 { 2132 {
2133 auto model = pBModels + i; 2133 auto model = pBModels[i];
2134 //pNumItems = 0; 2134 //pNumItems = 0;
2135 //do 2135 //do
2136 //{ 2136 //{
2137 //v86 = pBModels; 2137 //v86 = pBModels;
2138 //thisa = 0; 2138 //thisa = 0;
2139 //v87 = (unsigned int)((char *)v86 + pNumItems); 2139 //v87 = (unsigned int)((char *)v86 + pNumItems);
2140 for (uint j = 0; j < model->uNumFaces; ++j) 2140 for (uint j = 0; j < model.uNumFaces; ++j)
2141 { 2141 {
2142 auto face = model->pFaces + j; 2142 auto face = model.pFaces[j];
2143 2143
2144 //if ( *(int *)(v87 + 76) > 0 ) 2144 //if ( *(int *)(v87 + 76) > 0 )
2145 //{ 2145 //{
2146 //File = 0; 2146 //File = 0;
2147 //do 2147 //do
2148 //{ 2148 //{
2149 //v106 = (char *)&File->uAttributes + *(int *)(v87 + 84); 2149 //v106 = (char *)&File->uAttributes + *(int *)(v87 + 84);
2150 memcpy(&face->uAttributes, pSrc, 4); 2150 memcpy(&face.uAttributes, pSrc, 4);
2151 pSrc += 4; 2151 pSrc += 4;
2152 //v88 = pBModels; 2152 //v88 = pBModels;
2153 //++File; 2153 //++File;
2154 //v85 = (char *)v85 + 4; 2154 //v85 = (char *)v85 + 4;
2155 //++thisa; 2155 //++thisa;
2158 //while ( thisa < *(int *)(v87 + 76) ); 2158 //while ( thisa < *(int *)(v87 + 76) );
2159 } 2159 }
2160 2160
2161 //v89 = pBModels; 2161 //v89 = pBModels;
2162 //thisa = 0; 2162 //thisa = 0;
2163 for (uint j = 0; j < model->uNumFaces; ++j) 2163 for (uint j = 0; j < model.uNumFaces; ++j)
2164 { 2164 {
2165 auto face = model->pFaces + j; 2165 auto face = model.pFaces[j];
2166 //pFilename = 0; 2166 //pFilename = 0;
2167 //do 2167 //do
2168 //{ 2168 //{
2169 //v90 = (ODMFace *)&pFilename[*(unsigned int *)((char *)&v89->pFaces + pNumItems)]; 2169 //v90 = (ODMFace *)&pFilename[*(unsigned int *)((char *)&v89->pFaces + pNumItems)];
2170 //File = v90; 2170 //File = v90;
2171 if (face->sCogTriggeredID) 2171 if (face.sCogTriggeredID)
2172 { 2172 {
2173 if (face->HasEventHint()) 2173 if (face.HasEventHint())
2174 BYTE2(face->uAttributes) |= 0x10u; 2174 BYTE2(face.uAttributes) |= 0x10u;
2175 else 2175 else
2176 BYTE2(face->uAttributes) &= 0xEFu; 2176 BYTE2(face.uAttributes) &= 0xEFu;
2177 } 2177 }
2178 //++thisa; 2178 //++thisa;
2179 //v89 = pBModels; 2179 //v89 = pBModels;
2180 //pFilename += 308; 2180 //pFilename += 308;
2181 //} 2181 //}
2787 2787
2788 //----- (0047F2D3) -------------------------------------------------------- 2788 //----- (0047F2D3) --------------------------------------------------------
2789 bool OutdoorLocation::InitalizeActors(int a1) 2789 bool OutdoorLocation::InitalizeActors(int a1)
2790 { 2790 {
2791 int v2; // ebx@1 2791 int v2; // ebx@1
2792 char *v3; // esi@2 2792 Actor *v3; // esi@2
2793 int v4; // eax@3 2793 int v4; // eax@3
2794 __int16 v5; // ax@11 2794 __int16 v5; // ax@11
2795 int v8; // [sp+348h] [bp-8h]@1 2795 int v8; // [sp+348h] [bp-8h]@1
2796 int v9; // [sp+34Ch] [bp-4h]@1 2796 int v9; // [sp+34Ch] [bp-4h]@1
2797 2797
2798 v2 = 0; 2798 v2 = 0;
2799 v8 = 0; 2799 v8 = 0;
2800 v9 = 0; 2800 v9 = 0;
2801 if ( (signed int)uNumActors > 0 ) 2801 if ( (signed int)uNumActors > 0 )
2802 { 2802 {
2803 v3 = (char *)&pActors[0].uAttributes; 2803 v3 = pActors;//[0].uAttributes;
2804 while ( 1 ) 2804 while ( v9 < (signed int)uNumActors )
2805 { 2805 {
2806 v4 = *(int *)v3; 2806 v4 = v3->uAttributes;
2807 if ( !(v4 & 0x100000) ) 2807 if ( !(v4 & 0x100000) )
2808 break; 2808 {
2809 if ( a1 == v2 ) 2809 if ( v8 != 1 )
2810 goto LABEL_8; 2810 {
2811 if ( v8 != v2 ) 2811 v3->uCurrentActionTime = v2;
2812 goto LABEL_9; 2812 v3->uCurrentActionLength = v2;
2813 *((short *)v3 + 70) = 19; 2813 if ( v4 & 0x10000 )
2814 *(int *)v3 = v4 | 0x10000; 2814 v3->uAIState = (AIState) 19;
2815 v8 = GetAlertStatus(); 2815 v5 = v3->uAIState;
2816 LABEL_17: 2816 if ( v5 != 11 && v5 != 19 && (v3->sCurrentHP == (short)v2 || v3->pMonsterInfo.uHP == v2) )
2817 v3->uAIState = (AIState) 5;
2818 v3->vVelocity.x = v2;
2819 v3->vVelocity.y = v2;
2820 v3->vVelocity.z = v2;
2821 v3->UpdateAnimation();
2822 v3->pMonsterInfo.uHostilityType = (MonsterInfo::HostilityRadius)0;
2823 v3->PrepareSprites(0);
2824 v2 = 0;
2825 }
2826 else
2827 {
2828 v3->uAIState = (AIState) 19;
2829 v3->uAttributes = v4 | 0x10000;
2830 }
2831 }
2832 else if ( a1 == v2 )
2833 {
2834 v3->uAIState = (AIState) 19;
2835 v3->uAttributes = v4 | 0x10000;
2836 }
2837 else if ( v8 != v2 )
2838 {
2839 v3->uCurrentActionTime = v2;
2840 v3->uCurrentActionLength = v2;
2841 if ( v4 & 0x10000 )
2842 v3->uAIState = (AIState) 19;
2843 v5 = v3->uAIState;
2844 if ( v5 != 11 && v5 != 19 && (v3->sCurrentHP == (short)v2 || v3->pMonsterInfo.uHP == v2) )
2845 v3->uAIState = (AIState) 5;
2846 v3->vVelocity.x = v2;
2847 v3->vVelocity.y = v2;
2848 v3->vVelocity.z = v2;
2849 v3->UpdateAnimation();
2850 v3->pMonsterInfo.uHostilityType = (MonsterInfo::HostilityRadius)0;
2851 v3->PrepareSprites(0);
2852 v2 = 0;
2853 }
2854 else
2855 {
2856 v3->uAIState = (AIState) 19;
2857 v3->uAttributes = v4 | 0x10000;
2858 v8 = GetAlertStatus();
2859 }
2817 ++v9; 2860 ++v9;
2818 v3 += 836; 2861 ++v3;
2819 if ( v9 >= (signed int)uNumActors ) 2862 }
2820 goto LABEL_18; 2863 }
2821 }
2822 if ( v8 != 1 )
2823 {
2824 LABEL_9:
2825 *((int *)v3 + 37) = v2;
2826 *((short *)v3 + 62) = v2;
2827 if ( v4 & 0x10000 )
2828 *((short *)v3 + 70) = 19;
2829 v5 = *((short *)v3 + 70);
2830 if ( v5 != 11 && v5 != 19 && (*((short *)v3 + 2) == (short)v2 || *((int *)v3 + 18) == v2) )
2831 *((short *)v3 + 70) = 5;
2832 *((short *)v3 + 56) = v2;
2833 *((short *)v3 + 57) = v2;
2834 *((short *)v3 + 58) = v2;
2835 ((Actor *)(v3 - 36))->UpdateAnimation();
2836 v3[25] = 0;
2837 ((Actor *)(v3 - 36))->PrepareSprites(0);
2838 v2 = 0;
2839 goto LABEL_17;
2840 }
2841 LABEL_8:
2842 *((short *)v3 + 70) = 19;
2843 *(int *)v3 = v4 | 0x10000;
2844 goto LABEL_17;
2845 }
2846 LABEL_18:
2847 pGameLoadingUI_ProgressBar->Progress(); 2864 pGameLoadingUI_ProgressBar->Progress();
2848 2865
2849 Actor thisa; 2866 Actor thisa;
2850 thisa.pMonsterInfo.uID = 45; 2867 thisa.pMonsterInfo.uID = 45;
2851 thisa.PrepareSprites(v2); 2868 thisa.PrepareSprites(v2);
2874 2891
2875 //----- (0047B42C) -------------------------------------------------------- 2892 //----- (0047B42C) --------------------------------------------------------
2876 unsigned int OutdoorLocation::DrawActors() 2893 unsigned int OutdoorLocation::DrawActors()
2877 { 2894 {
2878 unsigned int result; // eax@1 2895 unsigned int result; // eax@1
2879 char *v1; // edi@2 2896 Actor *v1; // edi@2
2880 __int16 v2; // ax@3 2897 __int16 v2; // ax@3
2881 int v3; // esi@5 2898 int v3; // esi@5
2882 float v4; // ST48_4@8 2899 float v4; // ST48_4@8
2883 double v5; // ST38_8@8 2900 double v5; // ST38_8@8
2884 float v6; // ST48_4@10 2901 float v6; // ST48_4@10
2942 result = 0; 2959 result = 0;
2943 v59 = 0; 2960 v59 = 0;
2944 if ( (signed int)uNumActors > 0 ) 2961 if ( (signed int)uNumActors > 0 )
2945 { 2962 {
2946 v54 = 0; 2963 v54 = 0;
2947 v1 = (char *)&pActors[0].vPosition.z; 2964 v1 = pActors;//[0].vPosition.z;
2948 do 2965 do
2949 { 2966 {
2950 v2 = *((short *)v1 + 15); 2967 v2 = v1->uAIState;
2951 *(int *)(v1 - 110) &= 0xFFFFFFF7u; 2968 v1->uAttributes &= 0xFFFFFFF7u;
2952 if ( v2 == 11 || v2 == 19 ) 2969 if ( v2 == 11 || v2 == 19 )
2953 goto LABEL_58; 2970 goto LABEL_58;
2954 v3 = *(short *)v1; 2971 v3 = v1->vPosition.z;
2955 v49 = 0; 2972 v49 = 0;
2956 x = *((short *)v1 - 2); 2973 x = v1->vPosition.x;
2957 y = *((short *)v1 - 1); 2974 y = v1->vPosition.y;
2958 v61 = *(short *)v1; 2975 v61 = v1->vPosition.z;
2959 if ( v2 == 17 ) 2976 if ( v2 == 17 )
2960 { 2977 {
2961 if ( (v1[666] & 7) != 3 || pActors[*(int *)(v1 + 666) >> 3].pMonsterInfo.uSpecialAbilityDamageDiceSides != 1 ) 2978 if ( (v1->uSummonerID & 7) != 3 || pActors[v1->uSummonerID >> 3].pMonsterInfo.uSpecialAbilityDamageDiceSides != 1 )
2962 { 2979 {
2963 v6 = (double)*((short *)v1 - 4) * 0.5; 2980 v6 = (double)v1->uActorHeight * 0.5;
2964 v7 = v6 + 6.7553994e15; 2981 v7 = v6 + 6.7553994e15;
2965 v3 += LODWORD(v7); 2982 v3 += LODWORD(v7);
2966 v61 = v3; 2983 v61 = v3;
2967 } 2984 }
2968 else 2985 else
2969 { 2986 {
2970 v49 = 1; 2987 v49 = 1;
2971 pGame->pStru6Instance->_4A7F74(*((short *)v1 - 2), *((short *)v1 - 1), v3); 2988 pGame->pStru6Instance->_4A7F74(v1->vPosition.x, v1->vPosition.y, v3);
2972 v4 = (1.0 - (double)*(signed int *)(v1 + 38) / (double)*((short *)v1 + 7)) 2989 v4 = (1.0 - (double)*(signed int *)(v1 + 38) / (double)*((short *)v1 + 7))
2973 * (double)(2 * (signed int)*((short *)v1 - 4)); 2990 * (double)(2 * (signed int)v1->uActorHeight);
2974 v5 = v4 + 6.7553994e15; 2991 v5 = v4 + 6.7553994e15;
2975 v3 -= LODWORD(v5); 2992 v3 -= LODWORD(v5);
2976 v61 = v3; 2993 v61 = v3;
2977 if ( v3 > *(short *)v1 ) 2994 if ( v3 > v1->vPosition.z )
2978 { 2995 {
2979 v61 = *(short *)v1; 2996 v61 = v1->vPosition.z;
2980 v3 = *(short *)v1; 2997 v3 = v1->vPosition.z;
2981 } 2998 }
2982 } 2999 }
2983 } 3000 }
2984 v8 = stru_5C6E00->Atan2( 3001 v8 = stru_5C6E00->Atan2(
2985 *((short *)v1 - 2) - pIndoorCamera->pos.x, 3002 v1->vPosition.x - pIndoorCamera->pos.x,
2986 *((short *)v1 - 1) - pIndoorCamera->pos.y); 3003 v1->vPosition.y - pIndoorCamera->pos.y);
2987 LOWORD(v9) = *((short *)v1 + 4); 3004 LOWORD(v9) = v1->uYawAngle;
2988 v41 = ((signed int)(stru_5C6E00->uIntegerPi + ((signed int)stru_5C6E00->uIntegerPi >> 3) + v9 - v8) >> 8) & 7; 3005 v41 = ((signed int)(stru_5C6E00->uIntegerPi + ((signed int)stru_5C6E00->uIntegerPi >> 3) + v9 - v8) >> 8) & 7;
2989 v10 = *((short *)v1 + 16); 3006 v10 = v1->uCurrentActionAnimation;
2990 if ( pParty->bTurnBasedModeOn ) 3007 if ( pParty->bTurnBasedModeOn )
2991 { 3008 {
2992 if ( v10 != 1 ) 3009 if ( v10 != 1 )
2993 { 3010 {
2994 LABEL_17: 3011 LABEL_17:
2995 v12 = *(int *)(v1 + 38); 3012 v12 = v1->uCurrentActionTime;
2996 goto LABEL_18; 3013 goto LABEL_18;
2997 } 3014 }
2998 v11 = pMiscTimer->uTotalGameTimeElapsed; 3015 v11 = pMiscTimer->uTotalGameTimeElapsed;
2999 } 3016 }
3000 else 3017 else
3003 goto LABEL_17; 3020 goto LABEL_17;
3004 v11 = pEventTimer->uTotalGameTimeElapsed; 3021 v11 = pEventTimer->uTotalGameTimeElapsed;
3005 } 3022 }
3006 v12 = v54 + v11; 3023 v12 = v54 + v11;
3007 LABEL_18: 3024 LABEL_18:
3008 if ( *(_QWORD *)(v1 + 146) > 0i64 || *(_QWORD *)(v1 + 162) > 0i64 ) 3025 if ( (signed __int64)v1->pActorBuffs[5].uExpireTime > 0 || (signed __int64)v1->pActorBuffs[6].uExpireTime > 0 )
3009 v12 = 0; 3026 v12 = 0;
3010 v13 = *((short *)v1 + 15); 3027 v13 = v1->uAIState;
3011 if ( v13 == 17 && !v49 ) 3028 if ( v13 == 17 && !v49 )
3012 { 3029 {
3013 v40 = v12; 3030 v40 = v12;
3014 v39 = uSpriteID_Spell11; 3031 v39 = uSpriteID_Spell11;
3015 LABEL_24: 3032 LABEL_24:
3016 v14 = pSpriteFrameTable->GetFrame(v39, v40); 3033 v14 = pSpriteFrameTable->GetFrame(v39, v40);
3017 goto LABEL_25; 3034 goto LABEL_25;
3018 } 3035 }
3019 v40 = v12; 3036 v40 = v12;
3020 v39 = *(short *)&v1[2 * v10 + 42]; 3037 v39 = v1->pSpriteIDs[v10];
3021 if ( v13 != 16 ) 3038 if ( v13 != 16 )
3022 goto LABEL_24; 3039 goto LABEL_24;
3023 v14 = pSpriteFrameTable->GetFrameBy_x(v39, v12); 3040 v14 = pSpriteFrameTable->GetFrameBy_x(v39, v12);
3024 LABEL_25: 3041 LABEL_25:
3025 v62 = 0; 3042 v62 = 0;
3092 v28 = &pBillboardRenderList[uNumBillboardsToDraw]; 3109 v28 = &pBillboardRenderList[uNumBillboardsToDraw];
3093 if ( (signed int)uNumBillboardsToDraw >= 500 ) 3110 if ( (signed int)uNumBillboardsToDraw >= 500 )
3094 return result; 3111 return result;
3095 ++uNumBillboardsToDraw; 3112 ++uNumBillboardsToDraw;
3096 ++uNumSpritesDrawnThisFrame; 3113 ++uNumSpritesDrawnThisFrame;
3097 *(int *)(v1 - 110) |= 8u; 3114 v1->uAttributes |= 8u;
3098 v28->uHwSpriteID = v15->pHwSpriteIDs[v41]; 3115 v28->uHwSpriteID = v15->pHwSpriteIDs[v41];
3099 v29 = v15->uPaletteIndex; 3116 v29 = v15->uPaletteIndex;
3100 v28->uIndoorSectorID = 0; 3117 v28->uIndoorSectorID = 0;
3101 v28->uPalette = v29; 3118 v28->uPalette = v29;
3102 v28->field_0 = (unsigned __int64)(v15->scale * (signed __int64)v58) >> 16; 3119 v28->field_0 = (unsigned __int64)(v15->scale * (signed __int64)v58) >> 16;
3103 v30 = *(int *)(v1 + 118) == 0; 3120 v30 = HIDWORD(v1->pActorBuffs[3].uExpireTime) == 0;
3104 v31 = *(int *)(v1 + 118) < 0; 3121 v31 = SHIDWORD(v1->pActorBuffs[3].uExpireTime) < 0;
3105 v28->field_4 = (unsigned __int64)(v15->scale * (signed __int64)v57) >> 16; 3122 v28->field_4 = (unsigned __int64)(v15->scale * (signed __int64)v57) >> 16;
3106 if ( v31 || v31 | v30 && *(int *)(v1 + 114) <= 0u ) 3123 if ( v31 || v31 | v30 && LODWORD(v1->pActorBuffs[3].uExpireTime) <= 0u )
3107 { 3124 {
3108 if ( *(_QWORD *)(v1 + 226) > 0i64 ) 3125 if ( (signed __int64)v1->pActorBuffs[10].uExpireTime > 0i64 )
3109 { 3126 {
3110 v52 = (unsigned __int64)(pGame->pStru6Instance->_4A806F((Actor *)(v1 - 146)) 3127 v52 = (unsigned __int64)(pGame->pStru6Instance->_4A806F(v1)
3111 * (signed __int64)v28->field_4) >> 16; 3128 * (signed __int64)v28->field_4) >> 16;
3112 LABEL_53: 3129 LABEL_53:
3113 LOWORD(v27) = v43; 3130 LOWORD(v27) = v43;
3114 v28->field_4 = v52; 3131 v28->field_4 = v52;
3115 } 3132 }
3116 } 3133 }
3117 else 3134 else
3118 { 3135 {
3119 v32 = *((short *)v1 + 61); 3136 v32 = v1->pActorBuffs[3].uPower;
3120 if ( v32 ) 3137 if ( v32 )
3121 { 3138 {
3122 v33 = *((short *)v1 + 61); 3139 v33 = v1->pActorBuffs[3].uPower;
3123 v28->field_0 = (unsigned __int64)(65536 / (unsigned __int16)v32 * (signed __int64)v28->field_0) >> 16; 3140 v28->field_0 = (unsigned __int64)(65536 / (unsigned __int16)v32 * (signed __int64)v28->field_0) >> 16;
3124 v52 = (unsigned __int64)(65536 / v33 * (signed __int64)v28->field_4) >> 16; 3141 v52 = (unsigned __int64)(65536 / v33 * (signed __int64)v28->field_4) >> 16;
3125 goto LABEL_53; 3142 goto LABEL_53;
3126 } 3143 }
3127 } 3144 }
3134 LOWORD(v34) = 0; 3151 LOWORD(v34) = 0;
3135 v28->uPaletteSubindex = 0; 3152 v28->uPaletteSubindex = 0;
3136 v28->sZValue = v34 + (8 * v59 | 3); 3153 v28->sZValue = v34 + (8 * v59 | 3);
3137 v28->field_14 = v59; 3154 v28->field_14 = v59;
3138 v35 = pMonsterList->pMonsters; 3155 v35 = pMonsterList->pMonsters;
3139 v36 = *((short *)v1 - 25); 3156 v36 = v1->pMonsterInfo.uID;
3140 v37 = *(int *)(v1 + 150) == 0; 3157 v37 = HIDWORD(v1->pActorBuffs[5].uExpireTime) == 0;
3141 v38 = *(int *)(v1 + 150) < 0; 3158 v38 = SHIDWORD(v1->pActorBuffs[5].uExpireTime) < 0;
3142 v28->field_1E = v62 | 0x200; 3159 v28->field_1E = v62 | 0x200;
3143 v28->pSpriteFrame = v15; 3160 v28->pSpriteFrame = v15;
3144 v28->uTintColor = *((int *)&v35[v36] - 36); 3161 v28->uTintColor = *((int *)&v35[v36] - 36);
3145 if ( !v38 && (!(v38 | v37) || *(int *)(v1 + 146)) ) 3162 if ( !v38 && (!(v38 | v37) || LODWORD(v1->pActorBuffs[5].uExpireTime)) )
3146 v28->field_1E = v62 | 0x200; 3163 v28->field_1E = v62 | 0x200;
3147 } 3164 }
3148 LABEL_58: 3165 LABEL_58:
3149 ++v59; 3166 ++v59;
3150 v54 += 32; 3167 v54 += 32;
3151 result = v59; 3168 result = v59;
3152 v1 += 836; 3169 ++v1;
3153 } 3170 }
3154 while ( v59 < (signed int)uNumActors ); 3171 while ( v59 < (signed int)uNumActors );
3155 } 3172 }
3156 return result; 3173 return result;
3157 } 3174 }