Remove TEXTCOLOR build option
This commit is contained in:
@@ -77,7 +77,6 @@ extern int qt_compact_mode;
|
||||
|
||||
namespace nethack_qt_ {
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
static const QPen nhcolor_to_pen(uint32_t c)
|
||||
{
|
||||
static QPen *pen = (QPen *) 0;
|
||||
@@ -119,7 +118,6 @@ static const QPen nhcolor_to_pen(uint32_t c)
|
||||
return pen[c];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
NetHackQtMapViewport::NetHackQtMapViewport(NetHackQtClickBuffer& click_sink) :
|
||||
QWidget(NULL),
|
||||
@@ -182,10 +180,9 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
||||
painter.begin(this);
|
||||
|
||||
unsigned special, tileidx;
|
||||
#ifdef TEXTCOLOR
|
||||
uint32 color;
|
||||
uint32 framecolor;
|
||||
#endif
|
||||
|
||||
if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map) {
|
||||
// You enter a VERY primitive world!
|
||||
|
||||
@@ -204,12 +201,8 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
||||
if (SYMHANDLING(H_IBM)) {
|
||||
ch = cp437(ch);
|
||||
}
|
||||
#ifdef TEXTCOLOR
|
||||
color = Glyphcolor(i, j);
|
||||
painter.setPen(nhcolor_to_pen(color));
|
||||
#else
|
||||
painter.setPen(Qt::green);
|
||||
#endif
|
||||
if (!DrawWalls(painter, i * gW, j * gH, gW, gH, ch)) {
|
||||
ushort utf16[3];
|
||||
if (ch < 0x10000) {
|
||||
@@ -231,7 +224,6 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
||||
painter.drawPixmap(QPoint(i * gW, j * gH),
|
||||
pile_annotation);
|
||||
}
|
||||
#ifdef TEXTCOLOR
|
||||
framecolor = GlyphFramecolor(i, j);
|
||||
if (framecolor != NO_COLOR) {
|
||||
painter.setPen(nhcolor_to_pen(framecolor));
|
||||
@@ -240,7 +232,6 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
||||
qt_settings->glyphs().width() - 1,
|
||||
qt_settings->glyphs().height() - 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,7 +253,6 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
||||
painter.drawPixmap(QPoint(i * gW, j * gH),
|
||||
pile_annotation);
|
||||
}
|
||||
#ifdef TEXTCOLOR
|
||||
framecolor = GlyphFramecolor(i, j);
|
||||
if (framecolor != NO_COLOR) {
|
||||
painter.setPen(nhcolor_to_pen(framecolor));
|
||||
@@ -271,18 +261,13 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
||||
qt_settings->glyphs().width() - 1,
|
||||
qt_settings->glyphs().height() - 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (garea.contains(cursor)) {
|
||||
if (Is_rogue_level(&u.uz)) {
|
||||
#ifdef TEXTCOLOR
|
||||
painter.setPen( Qt::white );
|
||||
#else
|
||||
painter.setPen( Qt::green ); // REALLY primitive
|
||||
#endif
|
||||
} else {
|
||||
int hp = !Upolyd ? u.uhp : u.mh,
|
||||
hpmax = !Upolyd ? u.uhpmax : u.mhmax,
|
||||
@@ -935,9 +920,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
nhcolor_to_pen(framecolor).color());
|
||||
}
|
||||
painter.setPen( Qt::green );
|
||||
#ifdef TEXTCOLOR
|
||||
painter.setPen( nhcolor_to_pen(color) );
|
||||
#endif
|
||||
painter.drawText(
|
||||
i*qt_settings->glyphs().width(),
|
||||
j*qt_settings->glyphs().height(),
|
||||
@@ -946,7 +929,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
Qt::AlignCenter,
|
||||
QString(QChar(ch)).left(1)
|
||||
);
|
||||
#ifdef TEXTCOLOR
|
||||
if ((special & MG_PET) != 0 && ::iflags.hilite_pet) {
|
||||
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
||||
j*qt_settings->glyphs().height()),
|
||||
@@ -957,7 +939,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
j*qt_settings->glyphs().height()),
|
||||
pile_annotation);
|
||||
}
|
||||
#endif
|
||||
if (framecolor != NO_COLOR) {
|
||||
painter.setPen( nhcolor_to_pen(framecolor) );
|
||||
painter.drawRect(i*qt_settings->glyphs().width(),
|
||||
@@ -978,7 +959,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
uint32 framecolor = GlyphFramecolor(i,j);
|
||||
|
||||
qt_settings->glyphs().drawCell(painter, g, tileidx, i, j);
|
||||
#ifdef TEXTCOLOR
|
||||
if ((special & MG_PET) != 0 && ::iflags.hilite_pet) {
|
||||
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
||||
j*qt_settings->glyphs().height()),
|
||||
@@ -989,7 +969,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
j*qt_settings->glyphs().height()),
|
||||
pile_annotation);
|
||||
}
|
||||
#endif
|
||||
if (framecolor != NO_COLOR) {
|
||||
painter.setPen( nhcolor_to_pen(framecolor) );
|
||||
painter.drawRect(i*qt_settings->glyphs().width(),
|
||||
@@ -1003,13 +982,8 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
|
||||
if (garea.contains(cursor)) {
|
||||
if (Is_rogue_level(&u.uz)) {
|
||||
#ifdef TEXTCOLOR
|
||||
painter.setPen( Qt::white );
|
||||
#else
|
||||
painter.setPen( Qt::green ); // REALLY primitive
|
||||
#endif
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
int hp100;
|
||||
if (Upolyd) {
|
||||
hp100=u.mhmax ? u.mh*100/u.mhmax : 100;
|
||||
|
||||
Reference in New Issue
Block a user