MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Recruit_Render_Squad_RankKills

Method Recruit_Render_Squad_RankKills

Source/Recruits.cpp:1573–1616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1571}
1572
1573void cFodder::Recruit_Render_Squad_RankKills() {
1574 int16 Data0;
1575
1576 mSidebar_Draw_Y = 0;
1577
1578 for (auto& Troop : mGame_Data.mSoldiers_Allocated) {
1579
1580 if (Troop.mRecruitID == -1)
1581 continue;
1582
1583 if (Troop.mSprite == INVALID_SPRITE_PTR || Troop.mSprite == 0)
1584 continue;
1585
1586 if (mSquad_Selected != Troop.mSprite->field_32)
1587 continue;
1588
1589 int16 Data8 = 0;
1590 int16 DataC = mSidebar_Draw_Y - 1;
1591
1592 if (!mRecruit_Render_Name_SmallGap) {
1593 Data0 = Troop.mRank + 9;
1594 Data8 = 0x23;
1595
1596 DataC += 0x4A;
1597 DataC += mRecruit_Sidebar_Draw_Y_Start;
1598
1599 mGraphics->Sidebar_Copy_Sprite_To_ScreenBufPtr(Data0, Data8, DataC + 0x18);
1600
1601 }
1602 else {
1603 // Draw Kills
1604 Recruit_Render_Number(Troop.mNumberOfKills, 0x43);
1605
1606 }
1607
1608 //Draw Rank
1609 Data0 = Troop.mRank + 9;
1610
1611 DataC += 0x4A;
1612 DataC += mRecruit_Sidebar_Draw_Y_Start;
1613 mGraphics->Sidebar_Copy_Sprite_To_ScreenBufPtr(Data0, 0, DataC + 0x18);
1614 mSidebar_Draw_Y += 0x0C;
1615 }
1616}
1617
1618void cFodder::Recruit_Render_Number(int16 pNumber, int16 pData10) {
1619

Callers

nothing calls this directly

Tested by

no test coverage detected