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

Method Recruit_Render_HeroList

Source/Recruits.cpp:1634–1681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1632}
1633
1634void cFodder::Recruit_Render_HeroList() {
1635
1636 int16 HeroesToRender = 4;
1637 mSidebar_Draw_Y = 0;
1638
1639 for (auto& Hero : mGame_Data.Heroes_Get()) {
1640
1641 if (Hero.mRecruitID < 0 || Hero.mKills == 0)
1642 continue;
1643
1644 int16 Data8 = 0;
1645 int16 DataC = mSidebar_Draw_Y - 1;
1646 DataC += 0x4A + mRecruit_Sidebar_Draw_Y_Start + 0x18;
1647
1648 mGraphics->Sidebar_Copy_Sprite_To_ScreenBufPtr(Hero.mRank + 9, Data8, DataC);
1649
1650 const sRecruit* Troop = &mRecruits[Hero.mRecruitID];
1651 int16 Position;
1652 for (Position = 0; Position <= 5; ++Position) {
1653 if (Troop->mName[Position] == 0x20)
1654 break;
1655 }
1656
1657 Position <<= 2;
1658 word_3A05F = (0x30 - Position) >> 1;
1659 --word_3A05F;
1660
1661 for (Position = 0; Position <= 5; ++Position) {
1662
1663 uint8 Character = Troop->mName[Position];
1664 if (Character == 0x20)
1665 continue;
1666
1667 Character -= 0x41;
1668 Character += 0x29;
1669 Data8 = (Position << 2) + word_3A05F;
1670 DataC = 0x4B + mSidebar_Draw_Y + mRecruit_Sidebar_Draw_Y_Start;
1671
1672 mGraphics->Sidebar_Copy_Sprite_To_ScreenBufPtr(Character, Data8, DataC + 0x18);
1673 }
1674
1675 Recruit_Render_Number(Hero.mKills, 0x67);
1676 mSidebar_Draw_Y += 0x0C;
1677
1678 if (--HeroesToRender < 0)
1679 break;
1680 }
1681}
1682
1683void cFodder::Recruit_Render_Names_UnusedSlots() {
1684 uint32* Data20 = (uint32*)mGraphics->mImageTemporary.mData->data();

Callers

nothing calls this directly

Calls 2

Heroes_GetMethod · 0.80

Tested by

no test coverage detected