MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / drawRoutine5

Method drawRoutine5

src/Battlescape/UnitSprite.cpp:868–888  ·  view source on GitHub ↗

* Drawing routine for sectopods and reapers. */

Source from the content-addressed store, hash-verified

866 * Drawing routine for sectopods and reapers.
867 */
868void UnitSprite::drawRoutine5()
869{
870 if (_unit->isOut())
871 {
872 // unit is drawn as an item
873 return;
874 }
875
876 Surface *s = 0;
877
878 if (_unit->getStatus() == STATUS_WALKING)
879 {
880 s = _unitSurface->getFrame( 32 + (_unit->getDirection() * 16) + (_part * 4) + ((_unit->getWalkingPhase() / 2) % 4));
881 }
882 else
883 {
884 s = _unitSurface->getFrame((_part * 8) + _unit->getDirection());
885 }
886
887 s->blit(this);
888}
889
890/**
891 * Drawing routine for snakemen.

Callers

nothing calls this directly

Calls 6

isOutMethod · 0.80
getFrameMethod · 0.80
getWalkingPhaseMethod · 0.80
getStatusMethod · 0.45
getDirectionMethod · 0.45
blitMethod · 0.45

Tested by

no test coverage detected