comparison Outdoor.cpp @ 142:8b8fd4d83fdc

Various things here and there
author Nomad
date Tue, 12 Feb 2013 06:28:08 +0200
parents cca78efb377e
children 8ab4484c22e0
comparison
equal deleted inserted replaced
141:cca78efb377e 142:8b8fd4d83fdc
124 v4 = WorldPosToGridCellZ(pParty->vPosition.y); 124 v4 = WorldPosToGridCellZ(pParty->vPosition.y);
125 v5 = WorldPosToGridCellX(pParty->vPosition.x); 125 v5 = WorldPosToGridCellX(pParty->vPosition.x);
126 pOutdoor->_47EF60(v5, v4, 1); 126 pOutdoor->_47EF60(v5, v4, 1);
127 } 127 }
128 pGame->uFlags2 &= 0xFFFFFFFEu; 128 pGame->uFlags2 &= 0xFFFFFFFEu;
129 if ( pRenderer->pRenderD3D && pRenderer->bUsingSpecular ) 129 if (pRenderer->pRenderD3D && pRenderer->bUsingSpecular)
130 pGame->pLightmapBuilder->uFlags |= 1u; 130 pGame->pLightmapBuilder->uFlags |= 1u;
131 else 131 else
132 pGame->pLightmapBuilder->uFlags &= 0xFFFFFFFEu; 132 pGame->pLightmapBuilder->uFlags &= 0xFFFFFFFEu;
133
133 uNumDecorationsDrawnThisFrame = 0; 134 uNumDecorationsDrawnThisFrame = 0;
134 _unused000 = 0; 135 _unused000 = 0;
135 uNumSpritesDrawnThisFrame = 0; 136 uNumSpritesDrawnThisFrame = 0;
136 uNumBillboardsToDraw = 0; 137 uNumBillboardsToDraw = 0;
137 DrawActors(); 138
138 if ( !pOutdoorCamera->bDoNotRenderDecorations ) 139 PrepareActorsDrawList();
140 if (!pOutdoorCamera->bDoNotRenderDecorations)
139 pRenderer->DrawDecorations(); 141 pRenderer->DrawDecorations();
142
140 pRenderer->DrawLayingItems_Shooting_Magic_ODM(); 143 pRenderer->DrawLayingItems_Shooting_Magic_ODM();
141 pRenderer->TransformBillboardsAndSetPalettesODM();//Ritor1: do comment to test 144 pRenderer->TransformBillboardsAndSetPalettesODM();//Ritor1: do comment to test
142 sub_485F53((Vec2_int_ *)unnamed_6BE060); 145 sub_485F53((Vec2_int_ *)unnamed_6BE060);
143 } 146 }
144 147
2892 2895
2893 return true; 2896 return true;
2894 } 2897 }
2895 2898
2896 //----- (0047B42C) -------------------------------------------------------- 2899 //----- (0047B42C) --------------------------------------------------------
2897 unsigned int OutdoorLocation::DrawActors() 2900 void OutdoorLocation::PrepareActorsDrawList()
2898 { 2901 {
2899 unsigned int result; // eax@1 2902 unsigned int result; // eax@1
2900 Actor *v1; // edi@2 2903 //Actor *v1; // edi@2
2901 __int16 v2; // ax@3 2904 //__int16 v2; // ax@3
2902 int v3; // esi@5 2905 int z; // esi@5
2903 float v4; // ST48_4@8 2906 float v4; // ST48_4@8
2904 double v5; // ST38_8@8 2907 //double v5; // ST38_8@8
2905 float v6; // ST48_4@10 2908 //float v6; // ST48_4@10
2906 double v7; // ST30_8@10 2909 //double v7; // ST30_8@10
2907 unsigned int v8; // eax@11 2910 unsigned int v8; // eax@11
2908 int v9; // edx@11 2911 int v9; // edx@11
2909 __int16 v10; // dx@11 2912 __int16 v10; // dx@11
2910 unsigned int v11; // eax@13 2913 unsigned int v11; // eax@13
2911 signed int v12; // eax@16 2914 signed int v12; // eax@16
2923 int v24; // esi@44 2926 int v24; // esi@44
2924 signed __int64 v25; // qtt@45 2927 signed __int64 v25; // qtt@45
2925 int v26; // ST54_4@45 2928 int v26; // ST54_4@45
2926 int v27; // ecx@45 2929 int v27; // ecx@45
2927 RenderBillboard *v28; // esi@45 2930 RenderBillboard *v28; // esi@45
2928 __int16 v29; // ax@46 2931 //__int16 v29; // ax@46
2929 unsigned __int8 v30; // zf@46 2932 unsigned __int8 v30; // zf@46
2930 unsigned __int8 v31; // sf@46 2933 unsigned __int8 v31; // sf@46
2931 signed __int16 v32; // ax@49 2934 signed __int16 v32; // ax@49
2932 signed int v33; // ecx@50 2935 signed int v33; // ecx@50
2933 int v34; // ecx@54 2936 int v34; // ecx@54
2934 MonsterDesc *v35; // edx@54 2937 MonsterDesc *v35; // edx@54
2935 int v36; // ecx@54 2938 int v36; // ecx@54
2936 unsigned __int8 v37; // zf@54 2939 //unsigned __int8 v37; // zf@54
2937 unsigned __int8 v38; // sf@54 2940 //unsigned __int8 v38; // sf@54
2938 unsigned int v39; // [sp-8h] [bp-68h]@23 2941 unsigned int v39; // [sp-8h] [bp-68h]@23
2939 unsigned int v40; // [sp-4h] [bp-64h]@23 2942 unsigned int v40; // [sp-4h] [bp-64h]@23
2940 int v41; // [sp+24h] [bp-3Ch]@11 2943 int v41; // [sp+24h] [bp-3Ch]@11
2941 int v42; // [sp+28h] [bp-38h]@38 2944 int v42; // [sp+28h] [bp-38h]@38
2942 int v43; // [sp+28h] [bp-38h]@45 2945 int v43; // [sp+28h] [bp-38h]@45
2948 signed int v49; // [sp+34h] [bp-2Ch]@5 2951 signed int v49; // [sp+34h] [bp-2Ch]@5
2949 int v50; // [sp+34h] [bp-2Ch]@36 2952 int v50; // [sp+34h] [bp-2Ch]@36
2950 int v51; // [sp+34h] [bp-2Ch]@41 2953 int v51; // [sp+34h] [bp-2Ch]@41
2951 int v52; // [sp+34h] [bp-2Ch]@50 2954 int v52; // [sp+34h] [bp-2Ch]@50
2952 int v53; // [sp+38h] [bp-28h]@36 2955 int v53; // [sp+38h] [bp-28h]@36
2953 int v54; // [sp+3Ch] [bp-24h]@2 2956 //int v54; // [sp+3Ch] [bp-24h]@2
2954 int y; // [sp+40h] [bp-20h]@5 2957 int y; // [sp+40h] [bp-20h]@5
2955 int x; // [sp+44h] [bp-1Ch]@5 2958 int x; // [sp+44h] [bp-1Ch]@5
2956 int v57; // [sp+48h] [bp-18h]@45 2959 int v57; // [sp+48h] [bp-18h]@45
2957 int v58; // [sp+4Ch] [bp-14h]@45 2960 int v58; // [sp+4Ch] [bp-14h]@45
2958 signed int v59; // [sp+50h] [bp-10h]@1 2961 //signed int v59; // [sp+50h] [bp-10h]@1
2959 int X; // [sp+54h] [bp-Ch]@36 2962 int X; // [sp+54h] [bp-Ch]@36
2960 __int16 v61; // [sp+58h] [bp-8h]@5 2963 //__int16 v61; // [sp+58h] [bp-8h]@5
2961 signed __int16 v62; // [sp+5Ch] [bp-4h]@25 2964 signed __int16 v62; // [sp+5Ch] [bp-4h]@25
2962 2965
2963 result = 0; 2966 //result = 0;
2964 v59 = 0; 2967 //v59 = 0;
2965 if ( (signed int)uNumActors > 0 ) 2968 for (int i = 0; i < uNumActors; ++i)
2966 { 2969 {
2967 v54 = 0; 2970 //v54 = 0;
2968 v1 = pActors;//[0].vPosition.z; 2971 //v1 = pActors;//[0].vPosition.z;
2969 do 2972 //do
2970 { 2973 //{
2971 v2 = v1->uAIState; 2974 auto actor = pActors + i;
2972 v1->uAttributes &= 0xFFFFFFF7u; 2975 //v2 = actor->uAIState;
2973 if ( v2 == 11 || v2 == 19 ) 2976
2974 goto LABEL_58; 2977 actor->uAttributes &= 0xFFFFFFF7u;
2975 v3 = v1->vPosition.z; 2978 if (actor->uAIState == Removed || actor->uAIState == Disabled)
2979 continue;
2980
2981 z = actor->vPosition.z;
2976 v49 = 0; 2982 v49 = 0;
2977 x = v1->vPosition.x; 2983 x = actor->vPosition.x;
2978 y = v1->vPosition.y; 2984 y = actor->vPosition.y;
2979 v61 = v1->vPosition.z; 2985 if (actor->uAIState == Summoned)
2980 if ( v2 == 17 )
2981 { 2986 {
2982 if ( (v1->uSummonerID & 7) != OBJECT_Actor || pActors[v1->uSummonerID >> 3].pMonsterInfo.uSpecialAbilityDamageDiceSides != 1 ) 2987 if ((actor->uSummonerID & 7) != OBJECT_Actor ||
2988 pActors[actor->uSummonerID >> 3].pMonsterInfo.uSpecialAbilityDamageDiceSides != 1 )
2983 { 2989 {
2984 v6 = (double)v1->uActorHeight * 0.5; 2990 z += floorf(actor->uActorHeight * 0.5f + 0.5f);
2985 v7 = v6 + 6.7553994e15;
2986 v3 += LODWORD(v7);
2987 v61 = v3;
2988 } 2991 }
2989 else 2992 else
2990 { 2993 {
2991 v49 = 1; 2994 v49 = 1;
2992 pGame->pStru6Instance->_4A7F74(v1->vPosition.x, v1->vPosition.y, v3); 2995 pGame->pStru6Instance->_4A7F74(actor->vPosition.x, actor->vPosition.y, z);
2993 v4 = (1.0 - (double)*(signed int *)(v1 + 38) / (double)*((short *)v1 + 7)) 2996 v4 = (1.0 - (double)actor->uCurrentActionTime / (double)actor->uCurrentActionLength) *
2994 * (double)(2 * (signed int)v1->uActorHeight); 2997 (double)(2 * actor->uActorHeight);
2995 v5 = v4 + 6.7553994e15; 2998 z -= floorf(v4 + 0.5f);
2996 v3 -= LODWORD(v5); 2999 if ( z > actor->vPosition.z )
2997 v61 = v3; 3000 z = actor->vPosition.z;
2998 if ( v3 > v1->vPosition.z )
2999 {
3000 v61 = v1->vPosition.z;
3001 v3 = v1->vPosition.z;
3002 }
3003 } 3001 }
3004 } 3002 }
3005 v8 = stru_5C6E00->Atan2( 3003 v8 = stru_5C6E00->Atan2(actor->vPosition.x - pIndoorCamera->pos.x,
3006 v1->vPosition.x - pIndoorCamera->pos.x, 3004 actor->vPosition.y - pIndoorCamera->pos.y);
3007 v1->vPosition.y - pIndoorCamera->pos.y); 3005 LOWORD(v9) = actor->uYawAngle;
3008 LOWORD(v9) = v1->uYawAngle;
3009 v41 = ((signed int)(stru_5C6E00->uIntegerPi + ((signed int)stru_5C6E00->uIntegerPi >> 3) + v9 - v8) >> 8) & 7; 3006 v41 = ((signed int)(stru_5C6E00->uIntegerPi + ((signed int)stru_5C6E00->uIntegerPi >> 3) + v9 - v8) >> 8) & 7;
3010 v10 = v1->uCurrentActionAnimation; 3007 v10 = actor->uCurrentActionAnimation;
3011 if ( pParty->bTurnBasedModeOn ) 3008 if ( pParty->bTurnBasedModeOn )
3012 { 3009 {
3013 if ( v10 != 1 ) 3010 if ( v10 != 1 )
3014 { 3011 {
3015 LABEL_17: 3012 LABEL_17:
3016 v12 = v1->uCurrentActionTime; 3013 v12 = actor->uCurrentActionTime;
3017 goto LABEL_18; 3014 goto LABEL_18;
3018 } 3015 }
3019 v11 = pMiscTimer->uTotalGameTimeElapsed; 3016 v11 = pMiscTimer->uTotalGameTimeElapsed;
3020 } 3017 }
3021 else 3018 else
3022 { 3019 {
3023 if ( v10 != 1 ) 3020 if ( v10 != 1 )
3024 goto LABEL_17; 3021 goto LABEL_17;
3025 v11 = pEventTimer->uTotalGameTimeElapsed; 3022 v11 = pEventTimer->uTotalGameTimeElapsed;
3026 } 3023 }
3027 v12 = v54 + v11; 3024 v12 = 32 * i + v11;
3028 LABEL_18: 3025 LABEL_18:
3029 if ( (signed __int64)v1->pActorBuffs[5].uExpireTime > 0 || (signed __int64)v1->pActorBuffs[6].uExpireTime > 0 ) 3026 if ( (signed __int64)actor->pActorBuffs[5].uExpireTime > 0 || (signed __int64)actor->pActorBuffs[6].uExpireTime > 0 )
3030 v12 = 0; 3027 v12 = 0;
3031 v13 = v1->uAIState; 3028 v13 = actor->uAIState;
3032 if ( v13 == 17 && !v49 ) 3029 if ( v13 == 17 && !v49 )
3033 { 3030 {
3034 v40 = v12; 3031 v40 = v12;
3035 v39 = uSpriteID_Spell11; 3032 v39 = uSpriteID_Spell11;
3036 LABEL_24: 3033 LABEL_24:
3037 v14 = pSpriteFrameTable->GetFrame(v39, v40); 3034 v14 = pSpriteFrameTable->GetFrame(v39, v40);
3038 goto LABEL_25; 3035 goto LABEL_25;
3039 } 3036 }
3040 v40 = v12; 3037 v40 = v12;
3041 v39 = v1->pSpriteIDs[v10]; 3038 v39 = actor->pSpriteIDs[v10];
3042 if ( v13 != 16 ) 3039 if ( v13 != 16 )
3043 goto LABEL_24; 3040 goto LABEL_24;
3044 v14 = pSpriteFrameTable->GetFrameBy_x(v39, v12); 3041 v14 = pSpriteFrameTable->GetFrameBy_x(v39, v12);
3045 LABEL_25: 3042 LABEL_25:
3046 v62 = 0; 3043 v62 = 0;
3055 if ((256 << v41) & v14->uFlags) 3052 if ((256 << v41) & v14->uFlags)
3056 v62 |= 4u; 3053 v62 |= 4u;
3057 if ( v15->uGlowRadius ) 3054 if ( v15->uGlowRadius )
3058 { 3055 {
3059 //LOBYTE(v16) = byte_4E94D3; 3056 //LOBYTE(v16) = byte_4E94D3;
3060 pMobileLightsStack->AddLight(x, y, v3, 0, v15->uGlowRadius, 0xFFu, 0xFFu, 0xFFu, byte_4E94D3); 3057 pMobileLightsStack->AddLight(x, y, z, 0, v15->uGlowRadius, 0xFFu, 0xFFu, 0xFFu, byte_4E94D3);
3061 } 3058 }
3062 v17 = (x - pIndoorCamera->pos.x) << 16; 3059 v17 = (x - pIndoorCamera->pos.x) << 16;
3063 if ( pIndoorCamera->sRotationX ) 3060 if ( pIndoorCamera->sRotationX )
3064 { 3061 {
3065 v18 = (y - pIndoorCamera->pos.y) << 16; 3062 v18 = (y - pIndoorCamera->pos.y) << 16;
3066 v47 = ((unsigned __int64)(v17 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16) 3063 v47 = ((unsigned __int64)(v17 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16)
3067 + ((unsigned __int64)(v18 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_sine) >> 16); 3064 + ((unsigned __int64)(v18 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_sine) >> 16);
3068 v50 = (unsigned __int64)(v17 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_sine) >> 16; 3065 v50 = (unsigned __int64)(v17 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_sine) >> 16;
3069 v53 = (unsigned __int64)(v18 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16; 3066 v53 = (unsigned __int64)(v18 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16;
3070 v44 = (v3 - pIndoorCamera->pos.z) << 16; 3067 v44 = (z - pIndoorCamera->pos.z) << 16;
3071 v19 = ((unsigned __int64)(v44 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_sine) >> 16) 3068 v19 = ((unsigned __int64)(v44 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_sine) >> 16)
3072 + ((unsigned __int64)(v47 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_cosine) >> 16); 3069 + ((unsigned __int64)(v47 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_cosine) >> 16);
3073 X = ((unsigned __int64)(v44 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_sine) >> 16) 3070 X = ((unsigned __int64)(v44 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_sine) >> 16)
3074 + ((unsigned __int64)(v47 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_cosine) >> 16); 3071 + ((unsigned __int64)(v47 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_cosine) >> 16);
3075 if ( v19 < 262144 || v19 > pOutdoorCamera->shading_dist_mist << 16 ) 3072 if ( v19 < 262144 || v19 > pOutdoorCamera->shading_dist_mist << 16 )
3076 goto LABEL_58; 3073 continue;
3077 v20 = v53 - v50; 3074 v20 = v53 - v50;
3078 v42 = v53 - v50; 3075 v42 = v53 - v50;
3079 v21 = ((unsigned __int64)(v44 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_cosine) >> 16) 3076 v21 = ((unsigned __int64)(v44 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_cosine) >> 16)
3080 - ((unsigned __int64)(v47 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_sine) >> 16); 3077 - ((unsigned __int64)(v47 * (signed __int64)pOutdoorCamera->camera_rotation_x_int_sine) >> 16);
3081 } 3078 }
3084 v48 = (y - pIndoorCamera->pos.y) << 16; 3081 v48 = (y - pIndoorCamera->pos.y) << 16;
3085 v51 = (unsigned __int64)(v17 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16; 3082 v51 = (unsigned __int64)(v17 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16;
3086 v22 = (unsigned __int64)(v48 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_sine) >> 16; 3083 v22 = (unsigned __int64)(v48 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_sine) >> 16;
3087 X = v22 + v51; 3084 X = v22 + v51;
3088 if ( v22 + v51 < 262144 || v22 + v51 > pOutdoorCamera->shading_dist_mist << 16 ) 3085 if ( v22 + v51 < 262144 || v22 + v51 > pOutdoorCamera->shading_dist_mist << 16 )
3089 goto LABEL_58; 3086 continue;
3090 v23 = (unsigned __int64)(((x - pIndoorCamera->pos.x) << 16) 3087 v23 = (unsigned __int64)(((x - pIndoorCamera->pos.x) << 16)
3091 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_sine) >> 16; 3088 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_sine) >> 16;
3092 v20 = ((unsigned __int64)(v48 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16) - v23; 3089 v20 = ((unsigned __int64)(v48 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16) - v23;
3093 v42 = ((unsigned __int64)(v48 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16) - v23; 3090 v42 = ((unsigned __int64)(v48 * (signed __int64)pOutdoorCamera->camera_rotation_y_int_cosine) >> 16) - v23;
3094 v21 = (v3 - pIndoorCamera->pos.z) << 16; 3091 v21 = (z - pIndoorCamera->pos.z) << 16;
3095 } 3092 }
3096 v45 = v21; 3093 v45 = v21;
3097 v24 = abs(v20); 3094 v24 = abs(v20);
3098 if ( abs(X) >= v24 ) 3095 if ( abs(X) >= v24 )
3099 { 3096 {
3109 v43 = pViewport->uScreenCenterX 3106 v43 = pViewport->uScreenCenterX
3110 - ((signed int)(((unsigned __int64)(v26 * (signed __int64)v42) >> 16) + 32768) >> 16); 3107 - ((signed int)(((unsigned __int64)(v26 * (signed __int64)v42) >> 16) + 32768) >> 16);
3111 v46 = pViewport->uScreenCenterY - ((signed int)(((unsigned __int64)(v25 / X * v45) >> 16) + 32768) >> 16); 3108 v46 = pViewport->uScreenCenterY - ((signed int)(((unsigned __int64)(v25 / X * v45) >> 16) + 32768) >> 16);
3112 result = uNumBillboardsToDraw; 3109 result = uNumBillboardsToDraw;
3113 v28 = &pBillboardRenderList[uNumBillboardsToDraw]; 3110 v28 = &pBillboardRenderList[uNumBillboardsToDraw];
3114 if ( (signed int)uNumBillboardsToDraw >= 500 ) 3111 if (uNumBillboardsToDraw >= 500)
3115 return result; 3112 return;
3116 ++uNumBillboardsToDraw; 3113 ++uNumBillboardsToDraw;
3117 ++uNumSpritesDrawnThisFrame; 3114 ++uNumSpritesDrawnThisFrame;
3118 v1->uAttributes |= 8u; 3115 actor->uAttributes |= 8u;
3119 v28->uHwSpriteID = v15->pHwSpriteIDs[v41]; 3116 v28->uHwSpriteID = v15->pHwSpriteIDs[v41];
3120 v29 = v15->uPaletteIndex;
3121 v28->uIndoorSectorID = 0; 3117 v28->uIndoorSectorID = 0;
3122 v28->uPalette = v29; 3118 v28->uPalette = v15->uPaletteIndex;
3123 v28->field_0 = (unsigned __int64)(v15->scale * (signed __int64)v58) >> 16; 3119 v28->field_0 = (unsigned __int64)(v15->scale * (signed __int64)v58) >> 16;
3124 v30 = HIDWORD(v1->pActorBuffs[3].uExpireTime) == 0; 3120 v30 = HIDWORD(actor->pActorBuffs[3].uExpireTime) == 0;
3125 v31 = SHIDWORD(v1->pActorBuffs[3].uExpireTime) < 0; 3121 v31 = SHIDWORD(actor->pActorBuffs[3].uExpireTime) < 0;
3126 v28->field_4 = (unsigned __int64)(v15->scale * (signed __int64)v57) >> 16; 3122 v28->field_4 = (unsigned __int64)(v15->scale * (signed __int64)v57) >> 16;
3127 if ( v31 || v31 | v30 && LODWORD(v1->pActorBuffs[3].uExpireTime) <= 0u ) 3123 if ( v31 || v31 | v30 && LODWORD(actor->pActorBuffs[3].uExpireTime) <= 0u )
3128 { 3124 {
3129 if ( (signed __int64)v1->pActorBuffs[10].uExpireTime > 0i64 ) 3125 if ( (signed __int64)actor->pActorBuffs[10].uExpireTime > 0i64 )
3130 { 3126 {
3131 v52 = (unsigned __int64)(pGame->pStru6Instance->_4A806F(v1) 3127 v52 = (unsigned __int64)(pGame->pStru6Instance->_4A806F(actor)
3132 * (signed __int64)v28->field_4) >> 16; 3128 * (signed __int64)v28->field_4) >> 16;
3133 LABEL_53: 3129 LABEL_53:
3134 LOWORD(v27) = v43; 3130 LOWORD(v27) = v43;
3135 v28->field_4 = v52; 3131 v28->field_4 = v52;
3136 } 3132 }
3137 } 3133 }
3138 else 3134 else
3139 { 3135 {
3140 v32 = v1->pActorBuffs[3].uPower; 3136 v32 = actor->pActorBuffs[3].uPower;
3141 if ( v32 ) 3137 if ( v32 )
3142 { 3138 {
3143 v33 = v1->pActorBuffs[3].uPower; 3139 v33 = actor->pActorBuffs[3].uPower;
3144 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;
3145 v52 = (unsigned __int64)(65536 / v33 * (signed __int64)v28->field_4) >> 16; 3141 v52 = (unsigned __int64)(65536 / v33 * (signed __int64)v28->field_4) >> 16;
3146 goto LABEL_53; 3142 goto LABEL_53;
3147 } 3143 }
3148 } 3144 }
3149 v28->uScreenSpaceX = v27; 3145 v28->uScreenSpaceX = v27;
3146 v28->uScreenSpaceY = v46;
3150 v28->some_x = x; 3147 v28->some_x = x;
3151 v28->uScreenSpaceY = v46;
3152 v28->some_y = y; 3148 v28->some_y = y;
3153 v28->some_z = v61; 3149 v28->some_z = z;
3154 HIWORD(v34) = HIWORD(X); 3150 HIWORD(v34) = HIWORD(X);
3155 LOWORD(v34) = 0; 3151 LOWORD(v34) = 0;
3156 v28->uPaletteSubindex = 0; 3152 v28->uPaletteSubindex = 0;
3157 v28->sZValue = v34 + (8 * v59 | 3); 3153 v28->sZValue = v34 + (8 * i | OBJECT_Actor);
3158 v28->field_14 = v59; 3154 v28->field_14_actor_id = i;
3159 v35 = pMonsterList->pMonsters; 3155 v35 = pMonsterList->pMonsters;
3160 v36 = v1->pMonsterInfo.uID; 3156 v36 = actor->pMonsterInfo.uID;
3161 v37 = HIDWORD(v1->pActorBuffs[5].uExpireTime) == 0;
3162 v38 = SHIDWORD(v1->pActorBuffs[5].uExpireTime) < 0;
3163 v28->field_1E = v62 | 0x200; 3157 v28->field_1E = v62 | 0x200;
3164 v28->pSpriteFrame = v15; 3158 v28->pSpriteFrame = v15;
3165 v28->uTintColor = *((int *)&v35[v36] - 36); 3159 v28->uTintColor = *((int *)&v35[v36] - 36);
3166 if ( !v38 && (!(v38 | v37) || LODWORD(v1->pActorBuffs[5].uExpireTime)) ) 3160 if (actor->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime > 0)
3167 v28->field_1E = v62 | 0x200; 3161 v28->field_1E = v62 | 0x200;
3168 } 3162 }
3169 LABEL_58: 3163 //LABEL_58:
3170 ++v59; 3164 //++v59;
3171 v54 += 32; 3165 //v54 += 32;
3172 result = v59; 3166 //result = v59;
3173 ++v1; 3167 //++v1;
3174 } 3168 //}
3175 while ( v59 < (signed int)uNumActors ); 3169 //while ( v59 < (signed int)uNumActors );
3176 } 3170 }
3177 return result; 3171 //return result;
3178 } 3172 }
3179 // 4E94D3: using guessed type char byte_4E94D3; 3173 // 4E94D3: using guessed type char byte_4E94D3;
3180 // 5187E4: using guessed type int uNumSpritesDrawnThisFrame; 3174 // 5187E4: using guessed type int uNumSpritesDrawnThisFrame;
3181 3175
3182 //----- (0044C1E8) -------------------------------------------------------- 3176 //----- (0044C1E8) --------------------------------------------------------