示例#1
0
void game::draw_hit_player(player const &p, const int dam)
{
    if (!use_tiles) {
        draw_hit_player_curses(*this, p, dam);
        return;
    }

    static std::string const player_male   {
        "player_male"
    };
    static std::string const player_female {
        "player_female"
    };
    static std::string const npc_male      {
        "npc_male"
    };
    static std::string const npc_female    {
        "npc_female"
    };

    std::string const& type = p.is_player() ? (p.male ? player_male : player_female)
                              : (p.male ? npc_male    : npc_female);

    tilecontext->init_draw_hit( p.pos3(), type );
    wrefresh(w_terrain);
    draw_animation_delay();
}
示例#2
0
void game::draw_hit_player( const player &p, const int dam )
{
    if( test_mode ) {
        return; // avoid segfault from null tilecontext in tests
    }

    if( !use_tiles ) {
        draw_hit_player_curses( *this, p, dam );
        return;
    }

    static const std::string player_male   {"player_male"};
    static const std::string player_female {"player_female"};
    static const std::string npc_male      {"npc_male"};
    static const std::string npc_female    {"npc_female"};

    const std::string &type = p.is_player() ? ( p.male ? player_male : player_female )
                              : ( p.male ? npc_male    : npc_female );
    tilecontext->init_draw_hit( p.pos(), type );
    bullet_animation().progress();
}
void game::draw_hit_player(player const &p, const int dam)
{
    draw_hit_player_curses(*this, p, dam);
}