MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / InitPlayerGFX

Function InitPlayerGFX

Source/player.cpp:2163–2182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2161}
2162
2163void InitPlayerGFX(Player &player)
2164{
2165 if (HeadlessMode)
2166 return;
2167
2168 ResetPlayerGFX(player);
2169
2170 if (player._pHitPoints >> 6 == 0) {
2171 player._pgfxnum &= ~0xFU;
2172 LoadPlrGFX(player, player_graphic::Death);
2173 return;
2174 }
2175
2176 for (size_t i = 0; i < enum_size<player_graphic>::value; i++) {
2177 auto graphic = static_cast<player_graphic>(i);
2178 if (graphic == player_graphic::Death)
2179 continue;
2180 LoadPlrGFX(player, graphic);
2181 }
2182}
2183
2184void ResetPlayerGFX(Player &player)
2185{

Callers 2

LoadGameLevelFunction · 0.85
DebugCmdChangeTRNFunction · 0.85

Calls 2

ResetPlayerGFXFunction · 0.85
LoadPlrGFXFunction · 0.85

Tested by

no test coverage detected