示例#1
0
/*
 * Drawing-related functions
 */
void Creature::draw(WINDOW *w, int player_x, int player_y, bool inverted)
{
    int draw_x = getmaxx(w) / 2 + xpos() - player_x;
    int draw_y = getmaxy(w) / 2 + ypos() - player_y;
    if(inverted) {
        mvwputch_inv(w, draw_y, draw_x, basic_symbol_color(), symbol());
    } else if(is_symbol_highlighted()) {
        mvwputch_hi(w, draw_y, draw_x, basic_symbol_color(), symbol());
    } else {
        mvwputch(w, draw_y, draw_x, symbol_color(), symbol() );
    }
}
示例#2
0
void Creature::draw( WINDOW *w, const tripoint &p, bool inverted ) const
{
    int draw_x = getmaxx(w) / 2 + posx() - p.x;
    int draw_y = getmaxy(w) / 2 + posy() - p.y;
    if(inverted) {
        mvwputch_inv(w, draw_y, draw_x, basic_symbol_color(), symbol());
    } else if(is_symbol_highlighted()) {
        mvwputch_hi(w, draw_y, draw_x, basic_symbol_color(), symbol());
    } else {
        mvwputch(w, draw_y, draw_x, symbol_color(), symbol() );
    }
}
void Creature::draw( const catacurses::window &w, const tripoint &p, bool inverted ) const
{
    if (is_draw_tiles_mode()) {
        return;
    }

    int draw_x = getmaxx(w) / 2 + posx() - p.x;
    int draw_y = getmaxy(w) / 2 + posy() - p.y;
    if(inverted) {
        mvwputch_inv(w, draw_y, draw_x, basic_symbol_color(), symbol());
    } else if(is_symbol_highlighted()) {
        mvwputch_hi(w, draw_y, draw_x, basic_symbol_color(), symbol());
    } else {
        mvwputch(w, draw_y, draw_x, symbol_color(), symbol() );
    }
}
示例#4
0
nc_color Creature::symbol_color()
{
    return symbol_color();
}