MCPcopy Index your code
hub / github.com/NetHack/NetHack / Clear

Method Clear

win/Qt/qt_map.cpp:483–508  ·  view source on GitHub ↗

[re-]init map display to unexplored with no changed cells

Source from the content-addressed store, hash-verified

481
482// [re-]init map display to unexplored with no changed cells
483void NetHackQtMapViewport::Clear()
484{
485 for (int j = 0; j < ROWNO; ++j) {
486 //
487 // FIXME: map column 0 should be suppressed from being displayed
488 //
489 Glyph(0, j) = GLYPH_NOTHING;
490 Glyphttychar(0, j) = ' ';
491 Glyphcolor(0, j) = NO_COLOR;
492 GlyphFramecolor(0, j) = NO_COLOR;
493 Glyphflags(0, j) = 0U;
494 Glyphtileidx(0, j) = ::glyphmap[GLYPH_NOTHING].tileidx;
495
496 for (int i = 1; i < COLNO; ++i) {
497 Glyph(i, j) = GLYPH_UNEXPLORED;
498 Glyphttychar(i, j) = ' ';
499 Glyphcolor(i, j) = NO_COLOR;
500 GlyphFramecolor(i, j) = NO_COLOR;
501 Glyphflags(i, j) = 0U;
502 Glyphtileidx(i, j) = ::glyphmap[GLYPH_UNEXPLORED].tileidx;
503 }
504 }
505
506 change.clear();
507 change.add(0, 0, COLNO, ROWNO);
508}
509
510void NetHackQtMapViewport::Display(bool block)
511{

Callers 2

qt_clear_nhwindowMethod · 0.45
qt_display_fileMethod · 0.45

Calls 2

clearMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected