| 11480 | } |
| 11481 | |
| 11482 | void cFodder::Sprite_Handle_Explosion(sSprite* pSprite) { |
| 11483 | if (pSprite->field_8 == 0x7C) { |
| 11484 | Sprite_Destroy_Wrapper_2(pSprite); |
| 11485 | return; |
| 11486 | } |
| 11487 | |
| 11488 | if (pSprite->field_8 == 0xC0 || pSprite->field_8 == 0x8E) { |
| 11489 | //loc_1A8D1 |
| 11490 | |
| 11491 | int16 X_Left = pSprite->field_0; |
| 11492 | X_Left += 8; |
| 11493 | |
| 11494 | if (pSprite->field_26 == 0x5F5F) |
| 11495 | X_Left += pSprite->field_28; |
| 11496 | |
| 11497 | int16 X_Right = pSprite->field_0; |
| 11498 | X_Right += 0x24; |
| 11499 | |
| 11500 | int16 Y_Top = pSprite->field_4; |
| 11501 | Y_Top -= 0x20; |
| 11502 | |
| 11503 | int16 Y_Bottom = pSprite->field_4; |
| 11504 | Y_Bottom -= 6; |
| 11505 | |
| 11506 | const int16* Explosion_Area_PerFrame = mSprite_Explosion_Area_PerFrame; |
| 11507 | int16 Frame = pSprite->field_A; |
| 11508 | |
| 11509 | if (pSprite->field_8 == 0xC0) |
| 11510 | Frame += 2; |
| 11511 | Frame -= 1; |
| 11512 | |
| 11513 | if (Frame >= 0) { |
| 11514 | |
| 11515 | do { |
| 11516 | X_Left -= *Explosion_Area_PerFrame; |
| 11517 | X_Right -= *(Explosion_Area_PerFrame + 1); |
| 11518 | Y_Top += *Explosion_Area_PerFrame; |
| 11519 | |
| 11520 | ++Explosion_Area_PerFrame; |
| 11521 | Y_Bottom += *Explosion_Area_PerFrame; |
| 11522 | ++Explosion_Area_PerFrame; |
| 11523 | |
| 11524 | } while (--Frame >= 0); |
| 11525 | } |
| 11526 | //loc_1A99D |
| 11527 | sSprite* Data24 = 0; |
| 11528 | |
| 11529 | pSprite->field_62 = ~pSprite->field_62; |
| 11530 | if (pSprite->field_62 >= 0) |
| 11531 | Squad_Member_Sprite_Hit_In_Region(pSprite, X_Left, X_Right, Y_Top, Y_Bottom); |
| 11532 | else |
| 11533 | Sprite_Find_In_Region(pSprite, Data24, X_Left, X_Right, Y_Top, Y_Bottom); |
| 11534 | |
| 11535 | pSprite->field_12 -= 1; |
| 11536 | if (pSprite->field_12 >= 0) |
| 11537 | return; |
| 11538 | |
| 11539 | pSprite->field_12 = 1; |
nothing calls this directly
no outgoing calls
no test coverage detected