| 526 | } |
| 527 | |
| 528 | int16 cFodder::GUI_Sidebar_SelectedTroops_Count() { |
| 529 | |
| 530 | int16 Data10 = 0; |
| 531 | for (auto& Troop : mGame_Data.mSoldiers_Allocated) { |
| 532 | |
| 533 | if (Troop.mSprite == INVALID_SPRITE_PTR || Troop.mSprite == 0) |
| 534 | continue; |
| 535 | |
| 536 | if (mSquad_Selected != Troop.mSprite->field_32) |
| 537 | continue; |
| 538 | |
| 539 | if (!(Troop.mSelected & 1)) |
| 540 | continue; |
| 541 | |
| 542 | Data10++; |
| 543 | } |
| 544 | |
| 545 | int16 Data0 = mSquads_TroopCount[mSquad_Selected]; |
| 546 | if (Data10 == Data0) |
| 547 | return 0; |
| 548 | |
| 549 | if (Data10) |
| 550 | return Data10; |
| 551 | |
| 552 | Data0 = 0; |
| 553 | return 0; |
| 554 | } |
| 555 | |
| 556 | void cFodder::GUI_Sidebar_Setup() { |
| 557 |
nothing calls this directly
no outgoing calls
no test coverage detected