Qt map's "ttychar"
Change the glyphttychar[ROWNO][COLNO] array from uchar to unsighed short. DrawWalls() has handling for values in over 2000. This also reformats pretty much all of the NetHackQtMapViewport portion of qt_map.cpp.
This commit is contained in:
+23
-15
@@ -23,26 +23,34 @@ public:
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent* event);
|
||||
bool DrawWalls(QPainter& painter, int x, int y,
|
||||
int w, int h, unsigned ch);
|
||||
int w, int h, unsigned short ch);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
virtual void mousePressEvent(QMouseEvent* event);
|
||||
|
||||
private:
|
||||
QFont *rogue_font;
|
||||
unsigned short glyph[ROWNO][COLNO];
|
||||
unsigned short& Glyph(int x, int y) { return glyph[y][x]; }
|
||||
uchar glyphttychar[ROWNO][COLNO];
|
||||
uchar& Glyphttychar(int x, int y) { return glyphttychar[y][x]; }
|
||||
uchar glyphcolor[ROWNO][COLNO];
|
||||
uchar& Glyphcolor(int x, int y) { return glyphcolor[y][x]; }
|
||||
unsigned int glyphflags[ROWNO][COLNO];
|
||||
unsigned int& Glyphflags(int x, int y) { return glyphflags[y][x]; }
|
||||
QPoint cursor;
|
||||
QPixmap pet_annotation;
|
||||
QFont *rogue_font;
|
||||
unsigned short glyph[ROWNO][COLNO];
|
||||
unsigned short &Glyph(int x, int y) {
|
||||
return glyph[y][x];
|
||||
}
|
||||
unsigned short glyphttychar[ROWNO][COLNO];
|
||||
unsigned short &Glyphttychar(int x, int y) {
|
||||
return glyphttychar[y][x];
|
||||
}
|
||||
unsigned short glyphcolor[ROWNO][COLNO];
|
||||
unsigned short &Glyphcolor(int x, int y) {
|
||||
return glyphcolor[y][x];
|
||||
}
|
||||
unsigned int glyphflags[ROWNO][COLNO];
|
||||
unsigned int &Glyphflags(int x, int y) {
|
||||
return glyphflags[y][x];
|
||||
}
|
||||
QPoint cursor;
|
||||
QPixmap pet_annotation;
|
||||
QPixmap pile_annotation;
|
||||
NetHackQtClickBuffer& clicksink;
|
||||
Clusterizer change;
|
||||
NetHackQtClickBuffer &clicksink;
|
||||
Clusterizer change;
|
||||
|
||||
void clickCursor();
|
||||
void Clear();
|
||||
@@ -51,7 +59,7 @@ private:
|
||||
void PrintGlyph(int x,int y,int glyph,unsigned *glyphmod);
|
||||
void Changed(int x, int y);
|
||||
void updateTiles();
|
||||
void SetRogueFont(QPainter &painter);
|
||||
void SetupTextmapFont(QPainter &painter);
|
||||
|
||||
// NetHackQtMapWindow2 passes through many calls to the viewport
|
||||
friend class NetHackQtMapWindow2;
|
||||
|
||||
Reference in New Issue
Block a user