1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-04 21:26:17 +00:00
hyperrogue/rogueviz/fullnet.cpp

45 lines
1.2 KiB
C++
Raw Normal View History

2020-03-29 13:14:48 +00:00
// Hyperbolic Rogue
// Copyright (C) 2011-2016 Zeno Rogue, see 'hyper.cpp' for details
2020-03-29 13:15:18 +00:00
// a CLI option to label tiles
2020-03-29 13:14:48 +00:00
#include "rogueviz.h"
namespace rogueviz {
namespace fullnet {
2021-03-30 22:23:01 +00:00
void drawExtra() {
for(map<cell*, shiftmatrix>::iterator it = gmatrix.begin(); it != gmatrix.end(); it++) {
cell *c = it->first;
c->wall = waChasm;
}
int index = 0;
for(map<cell*, shiftmatrix>::iterator it = gmatrix.begin(); it != gmatrix.end(); it++) {
cell *c = it->first;
bool draw = true;
for(int i=0; i<isize(named); i++) if(named[i] == c) draw = false;
if(draw && gmatrix.count(c))
queuedisk(it->second, dftcolor, false, NULL, index++);
// queuepolyat(it->second, shDisk, dftcolor., PPR::LINE);
}
2020-03-29 13:14:48 +00:00
2021-03-30 22:23:01 +00:00
for(int i=0; i<isize(named); i++) if(gmatrix.count(named[i])) {
string s = ""; s += 'A'+i;
queuestr(gmatrix[named[i]], 1, s, forecolor, 1);
2020-03-29 13:14:48 +00:00
}
2021-03-30 22:23:01 +00:00
canmove = true; items[itOrbAether] = true;
2020-03-29 13:14:48 +00:00
}
auto hooks = arg::add3("-net", [] {
2021-03-30 23:10:45 +00:00
init(0);
2021-03-30 22:23:01 +00:00
rv_hook(hooks_frame, 0, drawExtra);
2020-03-29 13:14:48 +00:00
linepatterns::patTriTree.color = 0x30;
linepatterns::patDual.color = 0x10;
2020-03-29 13:14:48 +00:00
linepatterns::patTriRings.color = 0xFF;
});
2020-03-29 13:14:48 +00:00
}}