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

Method Recruit_Sprite_Draw

Source/PC/Graphics_PC.cpp:665–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663}
664
665void cGraphics_PC::Recruit_Sprite_Draw( int16 pColumns, int16 pRows,
666 int16 pData8, int16 pData10,
667 int16 pData14, int16 pDataC, uint8* pGraphics ) {
668 pColumns &= 0xFFFF;
669 pRows &= 0xFFFF;
670
671 uint8* es = mImageHillSprites.mData->data();
672
673 mRecruitDestX = (pData10 - (pData8 >> 1)) << 16;
674 dword_44A3E = mRecruitDestX;
675
676 mRecruitDestY = (pData14 - (pDataC >> 1)) << 16;
677 int32 eax = (pData8 << 0x10);
678 if (eax <= 0)
679 return;
680
681 int32 dword_44A42 = eax / pColumns;
682 eax = pDataC << 0x10;
683 if (eax <= 0)
684 return;
685
686 int32 dword_44A46 = eax / pRows;
687 for (int16 PosY = 0; PosY != pRows; ++PosY) {
688 mRecruitDestX = dword_44A3E;
689
690 for (int16 PosX = 0; PosX != pColumns; ++PosX) {
691 uint8 al = Video_Get_Pixel( pGraphics, PosX, PosY);
692 Video_Put_Pixel( es, al );
693
694 mRecruitDestX += dword_44A42;
695 }
696
697 mRecruitDestY += dword_44A46;
698 }
699
700}
701
702void cGraphics_PC::Load_And_Draw_Image( const std::string &pFilename, unsigned int pColors, size_t pBackColor) {
703 std::string Filename = pFilename;

Callers 1

Recruit_Copy_SpritesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected