comparison mm7_4.cpp @ 45:bcc051713d20

BLV render & seffects
author Nomad
date Mon, 22 Oct 2012 20:45:14 +0200
parents 484492a6dd28
children 79a30ee1ecdb
comparison
equal deleted inserted replaced
43:484492a6dd28 45:bcc051713d20
7130 v13 = v12 + 6.7553994e15; 7130 v13 = v12 + 6.7553994e15;
7131 return LOBYTE(v13) | ((LOBYTE(v11) | (((v6 << 8) | v9) << 8)) << 8); 7131 return LOBYTE(v13) | ((LOBYTE(v11) | (((v6 << 8) | v9) << 8)) << 8);
7132 } 7132 }
7133 7133
7134 7134
7135 //----- (004A1C1E) --------------------------------------------------------
7136 void __cdecl DoRenderBillboards_D3D()
7137 {
7138 signed int v0; // ebp@1
7139 signed int *v1; // esi@2
7140 //IDirect3DDevice3Vtbl *v2; // esi@7
7141 unsigned int v3; // eax@7
7142 unsigned int v4; // [sp+58h] [bp-4h]@2
7143
7144 v0 = -1;
7145 ErrD3D(pRenderer->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, 3u));
7146 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 1u));
7147 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, 0));
7148 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 1u));
7149 if ( ((pRenderer->uNumBillboardsToDraw - 1) & 0x80000000u) == 0 )
7150 {
7151 v1 = (signed int *)&pRenderer->pBillboardRenderListD3D[pRenderer->uNumBillboardsToDraw - 1].bOpaque;
7152 v4 = pRenderer->uNumBillboardsToDraw;
7153 do
7154 {
7155 ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(
7156 0,
7157 (IDirect3DTexture2 *)*(v1 - 35)));
7158 if ( *v1 != v0 )
7159 {
7160 v0 = *v1;
7161 SetBillboardBlendOptions(*v1);
7162 }
7163 ErrD3D(pRenderer->pRenderD3D->pDevice->DrawPrimitive(
7164 D3DPT_TRIANGLEFAN,
7165 452,
7166 v1 - 33,
7167 *(v1 - 34),
7168 24));
7169 v1 -= 39;
7170 --v4;
7171 }
7172 while ( v4 );
7173 }
7174 if ( pRenderer->turnFogOn )
7175 {
7176 pRenderer->turnFogOn = 0;
7177 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 1u));
7178 //v2 = pRenderer->pRenderD3D->pDevice->lpVtbl;
7179 v3 = GetLevelFogColor();
7180 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR, v3 & 0xFFFFFF));
7181 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGTABLEMODE, 0));
7182 }
7183 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 2u));
7184 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, 1u));
7185 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 0));
7186 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, 2u));
7187 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, 1u));
7188 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, 1u));
7189 }
7190
7191 //----- (004A1DA8) --------------------------------------------------------
7192 void __fastcall SetBillboardBlendOptions(signed int a1)
7193 {
7194 //IDirect3DDevice3Vtbl *v1; // edi@9
7195 unsigned int v2; // eax@9
7196 int v3; // [sp+0h] [bp-4h]@0
7197
7198 if ( !a1 )
7199 {
7200 if ( pRenderer->turnFogOn )
7201 {
7202 pRenderer->turnFogOn = 0;
7203 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 1u));
7204 //v1 = pRenderer->pRenderD3D->pDevice->lpVtbl;
7205 v2 = GetLevelFogColor();
7206 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR, v2 & 0xFFFFFF));
7207 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGTABLEMODE, 0));
7208 }
7209 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, 5));
7210 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, 6u));
7211 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, 1));
7212 return;
7213 }
7214 if ( a1 > 0 && a1 <= 3 )
7215 {
7216 if ( pRenderer->bUsingSpecular )
7217 {
7218 if ( !pRenderer->turnFogOn )
7219 {
7220 pRenderer->turnFogOn = 1;
7221 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 0));
7222 }
7223 }
7224 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, 2));
7225 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, 2u));
7226 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, 0));
7227 }
7228 }
7229
7230
7231
7232
7233
7234
7235 7135
7236 //----- (004A46E6) -------------------------------------------------------- 7136 //----- (004A46E6) --------------------------------------------------------
7237 int __fastcall sub_4A46E6(unsigned int x, signed int y, signed int a3, int a4, unsigned int a5) 7137 int __fastcall sr_4A46E6_draw_particle_segment(unsigned int x, signed int y, signed int _z, int a4, unsigned int lightColor)
7238 { 7138 {
7239 int v5; // eax@1 7139 int v5; // eax@1
7240 int z; // eax@1 7140 int z; // eax@1
7241 unsigned int v7; // eax@9 7141 unsigned int v7; // eax@9
7242 unsigned int v8; // ecx@9 7142 unsigned int v8; // ecx@9
7255 int *pTargetZ; // [sp+10h] [bp-4h]@9 7155 int *pTargetZ; // [sp+10h] [bp-4h]@9
7256 unsigned int v22; // [sp+1Ch] [bp+8h]@9 7156 unsigned int v22; // [sp+1Ch] [bp+8h]@9
7257 signed int v23; // [sp+20h] [bp+Ch]@1 7157 signed int v23; // [sp+20h] [bp+Ch]@1
7258 7158
7259 v5 = a4; 7159 v5 = a4;
7260 v23 = a3 >> 16; 7160 v23 = _z >> 16;
7261 z = x + v5; 7161 z = x + v5;
7262 if ( z >= (signed int)pViewport->uViewportX 7162 if ( z >= (signed int)pViewport->uViewportX
7263 && (signed int)x <= (signed int)pViewport->uViewportZ 7163 && (signed int)x <= (signed int)pViewport->uViewportZ
7264 && y >= (signed int)pViewport->uViewportY 7164 && y >= (signed int)pViewport->uViewportY
7265 && y <= (signed int)pViewport->uViewportW ) 7165 && y <= (signed int)pViewport->uViewportW )
7269 if ( z > (signed int)pViewport->uViewportZ ) 7169 if ( z > (signed int)pViewport->uViewportZ )
7270 z = pViewport->uViewportZ; 7170 z = pViewport->uViewportZ;
7271 pTarget = &pRenderer->pTargetSurface[x + y * pRenderer->uTargetSurfacePitch]; 7171 pTarget = &pRenderer->pTargetSurface[x + y * pRenderer->uTargetSurfacePitch];
7272 v22 = z - x; 7172 v22 = z - x;
7273 pTargetZ = &pRenderer->pActiveZBuffer[x + 640 * y]; 7173 pTargetZ = &pRenderer->pActiveZBuffer[x + 640 * y];
7274 v7 = a5 >> 3; 7174 v7 = lightColor >> 3;
7275 v8 = a5 & 0xF0; 7175 v8 = lightColor & 0xF0;
7276 v9 = v7 & 0x1E0000; 7176 v9 = v7 & 0x1E0000;
7277 if ( pRenderer->uTargetGBits == 5 ) 7177 if ( pRenderer->uTargetGBits == 5 )
7278 { 7178 {
7279 v10 = (v8 | (((unsigned __int16)(a5 & 0xF000) | (unsigned int)v9) >> 3)) >> 4; 7179 v10 = (v8 | (((unsigned __int16)(lightColor & 0xF000) | (unsigned int)v9) >> 3)) >> 4;
7280 v11 = (int *)pTarget; 7180 v11 = (int *)pTarget;
7281 v12 = pTargetZ; 7181 v12 = pTargetZ;
7282 v13 = v22; 7182 v13 = v22;
7283 v14 = (v10 << 16) | v10; 7183 v14 = (v10 << 16) | v10;
7284 z = (unsigned __int8)pTarget & 2; 7184 z = (unsigned __int8)pTarget & 2;
7321 *(short *)v11 = z; 7221 *(short *)v11 = z;
7322 } 7222 }
7323 } 7223 }
7324 else 7224 else
7325 { 7225 {
7326 v15 = (v8 | (((unsigned __int16)(a5 & 0xF800) | (unsigned int)v9) >> 2)) >> 4; 7226 v15 = (v8 | (((unsigned __int16)(lightColor & 0xF800) | (unsigned int)v9) >> 2)) >> 4;
7327 v16 = (int *)pTarget; 7227 v16 = (int *)pTarget;
7328 v17 = pTargetZ; 7228 v17 = pTargetZ;
7329 v18 = v22; 7229 v18 = v22;
7330 v19 = (v15 << 16) | v15; 7230 v19 = (v15 << 16) | v15;
7331 z = (unsigned __int8)pTarget & 2; 7231 z = (unsigned __int8)pTarget & 2;
13445 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1; 13345 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
13446 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 13346 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
13447 ++pMessageQueue_50CBD0->uNumMessages; 13347 ++pMessageQueue_50CBD0->uNumMessages;
13448 } 13348 }
13449 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) 13349 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
13450 pDialogue_SpeakingActor->uAIState = 11; 13350 pDialogue_SpeakingActor->uAIState = Removed;
13451 if ( uActiveCharacter ) 13351 if ( uActiveCharacter )
13452 pPlayers[uActiveCharacter]->PlaySound(61, 0); 13352 pPlayers[uActiveCharacter]->PlaySound(61, 0);
13453 goto LABEL_87; 13353 goto LABEL_87;
13454 } 13354 }
13455 if ( v3 == 22 ) 13355 if ( v3 == 22 )
15170 } 15070 }
15171 else 15071 else
15172 { 15072 {
15173 v4->uCurrentActionTime = 0; 15073 v4->uCurrentActionTime = 0;
15174 v4->uCurrentActionLength = 0; 15074 v4->uCurrentActionLength = 0;
15175 v4->uAIState = 5; 15075 v4->uAIState = Dead;
15176 v4->UpdateAnimation(); 15076 v4->UpdateAnimation();
15177 } 15077 }
15178 v1 = v18; 15078 v1 = v18;
15179 v2 = 0; 15079 v2 = 0;
15180 } 15080 }
15247 15147
15248 15148
15249 15149
15250 15150
15251 //----- (0043FDED) -------------------------------------------------------- 15151 //----- (0043FDED) --------------------------------------------------------
15252 unsigned int __cdecl PrepareActorRenderList_BLV() 15152 void PrepareActorRenderList_BLV()
15253 { 15153 {
15254 RenderBillboard *v0; // esi@0 15154 RenderBillboard *v0; // esi@0
15255 unsigned int result; // eax@1
15256 char *v2; // edi@2
15257 unsigned __int16 v3; // ax@3 15155 unsigned __int16 v3; // ax@3
15258 unsigned int v4; // eax@5 15156 unsigned int v4; // eax@5
15259 unsigned __int16 v5; // cx@5 15157 unsigned __int16 v5; // cx@5
15260 int v6; // esi@5 15158 int v6; // esi@5
15261 unsigned int v7; // eax@7 15159 unsigned int v7; // eax@7
15262 int v8; // eax@10 15160 int v8; // eax@10
15263 SpriteFrame *v9; // eax@16 15161 SpriteFrame *v9; // eax@16
15264 SpriteFrame *v10; // ebx@18 15162 SpriteFrame *v10; // ebx@18
15265 int *v11; // eax@18 15163 int *v11; // eax@18
15266 int v12; // ecx@28 15164 int v12; // ecx@28
15267 Actor *v13; // ecx@35
15268 IndoorCameraD3D **v14; // eax@36 15165 IndoorCameraD3D **v14; // eax@36
15269 double v15; // st7@36 15166 double v15; // st7@36
15270 float v16; // eax@36 15167 float v16; // eax@36
15271 double v17; // ST30_8@36 15168 double v17; // ST30_8@36
15272 signed __int64 v18; // qtt@36 15169 signed __int64 v18; // qtt@36
15288 int a2; // [sp+24h] [bp-30h]@5 15185 int a2; // [sp+24h] [bp-30h]@5
15289 int a1a; // [sp+28h] [bp-2Ch]@5 15186 int a1a; // [sp+28h] [bp-2Ch]@5
15290 __int16 a5; // [sp+2Ch] [bp-28h]@5 15187 __int16 a5; // [sp+2Ch] [bp-28h]@5
15291 int a5a; // [sp+2Ch] [bp-28h]@36 15188 int a5a; // [sp+2Ch] [bp-28h]@36
15292 int a5b; // [sp+2Ch] [bp-28h]@40 15189 int a5b; // [sp+2Ch] [bp-28h]@40
15293 unsigned int v39; // [sp+30h] [bp-24h]@1
15294 int v40; // [sp+34h] [bp-20h]@2
15295 __int16 v41; // [sp+3Ch] [bp-18h]@18 15190 __int16 v41; // [sp+3Ch] [bp-18h]@18
15296 int a6; // [sp+40h] [bp-14h]@34 15191 int a6; // [sp+40h] [bp-14h]@34
15297 int v43; // [sp+44h] [bp-10h]@34 15192 int v43; // [sp+44h] [bp-10h]@34
15298 int z; // [sp+48h] [bp-Ch]@32 15193 int z; // [sp+48h] [bp-Ch]@32
15299 signed int y; // [sp+4Ch] [bp-8h]@32 15194 signed int y; // [sp+4Ch] [bp-8h]@32
15300 int x; // [sp+50h] [bp-4h]@32 15195 int x; // [sp+50h] [bp-4h]@32
15301 15196
15302 result = 0; 15197 for (uint i = 0; i < uNumActors; ++i)
15303 v39 = 0; 15198 {
15304 if ( (signed int)uNumActors > 0 ) 15199 auto p = pActors + i;
15305 { 15200
15306 v40 = 0; 15201 if (p->uAIState == Removed ||
15307 v2 = (char *)&pActors[0].uAttributes; 15202 p->uAIState == Disabled)
15308 while ( 1 ) 15203 continue;
15309 { 15204
15310 v3 = *((_WORD *)v2 + 70); 15205 a5 = p->uSectorID;
15311 *(_DWORD *)v2 &= 0xFFFFFFF7u; 15206 a2 = p->vPosition.y;
15312 if ( v3 != 11 ) 15207 a1a = p->vPosition.x;
15313 { 15208 a3 = p->vPosition.z;
15314 if ( v3 != 19 )
15315 break;
15316 }
15317 LABEL_48:
15318 ++v39;
15319 v40 += 32;
15320 result = v39;
15321 v2 += 836;
15322 if ( (signed int)v39 >= (signed int)uNumActors )
15323 return result;
15324 }
15325 a5 = *((_WORD *)v2 + 61);
15326 a2 = *((_WORD *)v2 + 54);
15327 a1a = *((_WORD *)v2 + 53);
15328 a3 = *((_WORD *)v2 + 55);
15329 v4 = stru_5C6E00->Atan2(a1a - pBLVRenderParams->vPartyPos.x, a2 - pBLVRenderParams->vPartyPos.y); 15209 v4 = stru_5C6E00->Atan2(a1a - pBLVRenderParams->vPartyPos.x, a2 - pBLVRenderParams->vPartyPos.y);
15330 LOWORD(v0) = *((_WORD *)v2 + 59); 15210 LOWORD(v0) = p->uYawAngle;
15331 v5 = *((_WORD *)v2 + 71); 15211 v5 = p->uCurrentActionAnimation;
15332 v6 = ((signed int)((char *)v0 + ((signed int)stru_5C6E00->uIntegerPi >> 3) - v4 + stru_5C6E00->uIntegerPi) >> 8) & 7; 15212 v6 = ((signed int)((char *)v0 + ((signed int)stru_5C6E00->uIntegerPi >> 3) - v4 + stru_5C6E00->uIntegerPi) >> 8) & 7;
15333 v32 = v6; 15213 v32 = v6;
15334 if ( pParty->bTurnBasedModeOn ) 15214 if ( pParty->bTurnBasedModeOn )
15335 { 15215 {
15336 if ( v5 == 1 ) 15216 if ( v5 == 1 )
15343 { 15223 {
15344 if ( v5 == 1 ) 15224 if ( v5 == 1 )
15345 { 15225 {
15346 v7 = pBLVRenderParams->field_0_timer_; 15226 v7 = pBLVRenderParams->field_0_timer_;
15347 LABEL_10: 15227 LABEL_10:
15348 v8 = v40 + v7; 15228 v8 = i * 32 + v7;
15349 goto LABEL_12; 15229 goto LABEL_12;
15350 } 15230 }
15351 } 15231 }
15352 v8 = *((_DWORD *)v2 + 37); 15232 v8 = p->uCurrentActionTime;
15353 LABEL_12: 15233 LABEL_12:
15354 if ( *((_QWORD *)v2 + 32) > 0i64 || *((_QWORD *)v2 + 34) > 0i64 ) 15234 if (p->pActorBuffs[5].uExpireTime > 0i64 || p->pActorBuffs[6].uExpireTime > 0i64 )
15355 v8 = 0; 15235 v8 = 0;
15356 v31 = *(_WORD *)&v2[2 * (signed __int16)v5 + 152]; 15236 v31 = p->pSpriteIDs[v5];
15357 if ( *((_WORD *)v2 + 70) == 16 ) 15237 if (p->uAIState == 16 )
15358 v9 = pSpriteFrameTable->GetFrameBy_x(v31, v8); 15238 v9 = pSpriteFrameTable->GetFrameBy_x(v31, v8);
15359 else 15239 else
15360 v9 = pSpriteFrameTable->GetFrame(v31, v8); 15240 v9 = pSpriteFrameTable->GetFrame(v31, v8);
15361 v41 = 0; 15241 v41 = 0;
15362 v10 = v9; 15242 v10 = v9;
15384 0xFFu, 15264 0xFFu,
15385 v11); 15265 v11);
15386 } 15266 }
15387 v12 = 0; 15267 v12 = 0;
15388 if ( pStru170->field_53730 <= 0 ) 15268 if ( pStru170->field_53730 <= 0 )
15389 goto LABEL_48; 15269 continue;
15390 while ( pStru170->pSectorIDs_toDrawDecorationsFrom[v12] != *((_WORD *)v2 + 61) ) 15270 while (pStru170->pSectorIDs_toDrawDecorationsFrom[v12] != p->uSectorID)
15391 { 15271 {
15392 ++v12; 15272 ++v12;
15393 if ( v12 >= pStru170->field_53730 ) 15273 if ( v12 >= pStru170->field_53730 )
15394 goto LABEL_48; 15274 continue;
15395 } 15275 }
15396 if ( !pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(a1a, a2, a3, &x, &y, &z, 1) 15276 if ( !pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(a1a, a2, a3, &x, &y, &z, 1)
15397 || (v0 = (RenderBillboard *)abs(x), (signed int)v0 < abs(y)) ) 15277 || (v0 = (RenderBillboard *)abs(x), (signed int)v0 < abs(y)) )
15398 goto LABEL_48; 15278 continue;
15399 pGame->pIndoorCameraD3D->Project(x, y, z, &v43, &a6); 15279 pGame->pIndoorCameraD3D->Project(x, y, z, &v43, &a6);
15400 result = uNumBillboardsToDraw; 15280
15401 v0 = &pBillboardRenderList[uNumBillboardsToDraw]; 15281 v0 = &pBillboardRenderList[uNumBillboardsToDraw];
15402 if ( (signed int)uNumBillboardsToDraw >= 500 ) 15282 if (uNumBillboardsToDraw >= 500)
15403 return result; 15283 break;
15404 ++uNumBillboardsToDraw; 15284 ++uNumBillboardsToDraw;
15405 ++uNumSpritesDrawnThisFrame; 15285 ++uNumSpritesDrawnThisFrame;
15406 v13 = (Actor *)(v2 - 36); 15286 p->uAttributes |= 8u;
15407 *(_DWORD *)v2 |= 8u;
15408 v29 = pRenderer->pRenderD3D == 0; 15287 v29 = pRenderer->pRenderD3D == 0;
15409 v0->uHwSpriteID = v10->pHwSpriteIDs[v32]; 15288 v0->uHwSpriteID = v10->pHwSpriteIDs[v32];
15410 v0->uPalette = v10->uPaletteIndex; 15289 v0->uPalette = v10->uPaletteIndex;
15411 v0->uIndoorSectorID = a5; 15290 v0->uIndoorSectorID = a5;
15412 if ( v29 ) 15291 if ( v29 )
15430 v19 = v18 / x; 15309 v19 = v18 / x;
15431 v0->field_0 = (unsigned __int64)(v10->scale * v18 / x) >> 16; 15310 v0->field_0 = (unsigned __int64)(v10->scale * v18 / x) >> 16;
15432 a5a = (unsigned __int64)(v10->scale * (signed __int64)v19) >> 16; 15311 a5a = (unsigned __int64)(v10->scale * (signed __int64)v19) >> 16;
15433 } 15312 }
15434 v0->field_4 = a5a; 15313 v0->field_4 = a5a;
15435 if ( (signed __int64)v13->pActorBuffs[3].uExpireTime <= 0 ) 15314 if ( (signed __int64)p->pActorBuffs[3].uExpireTime <= 0 )
15436 { 15315 {
15437 if ( (signed __int64)v13->pActorBuffs[10].uExpireTime > 0 ) 15316 if ( (signed __int64)p->pActorBuffs[10].uExpireTime > 0 )
15438 { 15317 {
15439 a5b = (unsigned __int64)(pGame->pStru6Instance->_4A806F((Actor *)(v2 - 36)) * (signed __int64)v0->field_4) >> 16; 15318 a5b = (unsigned __int64)(pGame->pStru6Instance->_4A806F(p) * (signed __int64)v0->field_4) >> 16;
15440 goto LABEL_43; 15319 goto LABEL_43;
15441 } 15320 }
15442 } 15321 }
15443 else 15322 else
15444 { 15323 {
15445 v22 = v13->pActorBuffs[3].uPower; 15324 v22 = p->pActorBuffs[3].uPower;
15446 if ( v22 ) 15325 if ( v22 )
15447 { 15326 {
15448 v23 = (unsigned __int64)(65536 / (unsigned __int16)v22 * (signed __int64)v0->field_0) >> 16; 15327 v23 = (unsigned __int64)(65536 / (unsigned __int16)v22 * (signed __int64)v0->field_0) >> 16;
15449 v24 = *((_WORD *)v2 + 116); 15328 v24 = p->pActorBuffs[3].uPower;
15450 v0->field_0 = v23; 15329 v0->field_0 = v23;
15451 a5b = (unsigned __int64)(65536 / v24 * (signed __int64)v0->field_4) >> 16; 15330 a5b = (unsigned __int64)(65536 / v24 * (signed __int64)v0->field_4) >> 16;
15452 LABEL_43: 15331 LABEL_43:
15453 v0->field_4 = a5b; 15332 v0->field_4 = a5b;
15454 goto LABEL_44; 15333 goto LABEL_44;
15455 } 15334 }
15456 } 15335 }
15457 LABEL_44: 15336 LABEL_44:
15458 HIWORD(v25) = HIWORD(x); 15337 HIWORD(v25) = HIWORD(x);
15459 v0->field_20 = a1a; 15338 v0->some_x = a1a;
15460 v0->field_22 = a2; 15339 v0->some_y = a2;
15461 v0->field_24 = a3; 15340 v0->some_z = a3;
15462 v0->field_26 = v43; 15341 v0->uScreenSpaceX = v43;
15463 v0->field_28 = a6; 15342 v0->uScreenSpaceY = a6;
15464 LOWORD(v25) = 0; 15343 LOWORD(v25) = 0;
15465 LOBYTE(v26) = v41; 15344 LOBYTE(v26) = v41;
15466 v0->sZValue = v25 + (8 * v39 | 3); 15345 v0->sZValue = v25 + (8 * i | 3);
15467 v27 = pMonsterList->pMonsters; 15346 v27 = pMonsterList->pMonsters;
15468 v28 = *((_WORD *)v2 + 30); 15347 v28 = p->pMonsterInfo.uID;
15469 v29 = *((_DWORD *)v2 + 65) == 0; 15348 v29 = HIDWORD(p->pActorBuffs[5].uExpireTime) == 0;
15470 v30 = *((_DWORD *)v2 + 65) < 0; 15349 v30 = HIDWORD(p->pActorBuffs[5].uExpireTime) < 0;
15471 v0->field_1E = v41; 15350 v0->field_1E = v41;
15472 v0->pSpriteFrame = v10; 15351 v0->pSpriteFrame = v10;
15473 v0->field_2C_prolly_tint = *((_DWORD *)&v27[v28] - 36); 15352 v0->uTintColor = *((_DWORD *)&v27[v28] - 36);
15474 if ( !v30 && (!(v30 | v29) || *((_DWORD *)v2 + 64)) ) 15353 if ( !v30 && (!(v30 | v29) || LODWORD(p->pActorBuffs[5].uExpireTime)) )
15475 { 15354 {
15476 HIBYTE(v26) = HIBYTE(v41) | 1; 15355 HIBYTE(v26) = HIBYTE(v41) | 1;
15477 v0->field_1E = v26; 15356 v0->field_1E = v26;
15478 } 15357 }
15479 goto LABEL_48; 15358 }
15480 }
15481 return result;
15482 } 15359 }
15483 15360
15484 15361
15485 15362
15486 15363