| 1512 | } |
| 1513 | |
| 1514 | void cFodder::Recruit_Render_Squad_Names() { |
| 1515 | |
| 1516 | int16 word_3A3BB = 7; |
| 1517 | mSidebar_Draw_Y = 0; |
| 1518 | |
| 1519 | for (auto& Troop : mGame_Data.mSoldiers_Allocated) { |
| 1520 | |
| 1521 | if (Troop.mRecruitID == -1) |
| 1522 | continue; |
| 1523 | |
| 1524 | if (Troop.mSprite == INVALID_SPRITE_PTR || Troop.mSprite == 0) |
| 1525 | continue; |
| 1526 | |
| 1527 | if (mSquad_Selected != Troop.mSprite->field_32) |
| 1528 | continue; |
| 1529 | |
| 1530 | const sRecruit* Data28 = &mRecruits[Troop.mRecruitID]; |
| 1531 | int16 Data14; |
| 1532 | |
| 1533 | for (Data14 = 0; Data14 <= 5; ++Data14) { |
| 1534 | |
| 1535 | if (Data28->mName[Data14] == 0x20) |
| 1536 | break; |
| 1537 | } |
| 1538 | |
| 1539 | Data14 <<= 2; |
| 1540 | word_3A05F = (0x30 - Data14) >> 1; |
| 1541 | |
| 1542 | if (mRecruit_Render_Name_SmallGap) |
| 1543 | word_3A05F -= 1; |
| 1544 | |
| 1545 | // Draw Troop name to list |
| 1546 | for (Data14 = 0; Data14 <= 5; ++Data14) { |
| 1547 | |
| 1548 | if (Data28->mName[Data14] != 0x20) { |
| 1549 | int16 Data0 = Data28->mName[Data14]; |
| 1550 | Data0 -= 0x41; |
| 1551 | Data0 += 0x29; |
| 1552 | |
| 1553 | int16 X = Data14; |
| 1554 | X <<= 2; |
| 1555 | X += word_3A05F; |
| 1556 | |
| 1557 | int16 Y = 0x4B; |
| 1558 | Y += mSidebar_Draw_Y; |
| 1559 | Y += mRecruit_Sidebar_Draw_Y_Start; |
| 1560 | |
| 1561 | mGraphics->Sidebar_Copy_Sprite_To_ScreenBufPtr(Data0, X, Y + 0x18); |
| 1562 | } |
| 1563 | } |
| 1564 | |
| 1565 | mSidebar_Draw_Y += 0x0C; |
| 1566 | |
| 1567 | if (--word_3A3BB < 0) |
| 1568 | break; |
| 1569 | } |
| 1570 | |
| 1571 | } |
nothing calls this directly
no test coverage detected