2018-05-22 20:09:16 +00:00
|
|
|
// See: http://www.roguetemple.com/z/hyper/rogueviz.php
|
|
|
|
|
2017-12-01 23:24:07 +00:00
|
|
|
namespace rogueviz {
|
2018-06-10 23:58:31 +00:00
|
|
|
using namespace hr;
|
|
|
|
|
2018-11-17 19:25:47 +00:00
|
|
|
enum eVizkind { kNONE, kAnyGraph, kTree, kSpiral, kSAG, kCollatz, kFullNet, kKohonen, kFlocking };
|
2018-09-27 23:49:37 +00:00
|
|
|
extern eVizkind kind;
|
|
|
|
|
2018-06-10 23:58:31 +00:00
|
|
|
extern bool on;
|
|
|
|
void drawExtra();
|
|
|
|
void close();
|
2017-12-01 23:24:07 +00:00
|
|
|
|
2017-12-14 01:53:39 +00:00
|
|
|
void init();
|
2018-07-09 16:17:40 +00:00
|
|
|
|
|
|
|
struct edgetype {
|
|
|
|
double visible_from;
|
|
|
|
unsigned color;
|
|
|
|
string name;
|
|
|
|
};
|
|
|
|
|
|
|
|
static const unsigned DEFAULT_COLOR = 0x471293B5;
|
|
|
|
|
|
|
|
extern edgetype default_edgetype;
|
|
|
|
|
2018-09-25 01:47:42 +00:00
|
|
|
extern vector<shared_ptr<edgetype>> edgetypes;
|
2018-06-10 23:58:31 +00:00
|
|
|
|
|
|
|
struct edgeinfo {
|
|
|
|
int i, j;
|
|
|
|
double weight, weight2;
|
|
|
|
vector<glvertex> prec;
|
|
|
|
cell *orig;
|
|
|
|
int lastdraw;
|
2018-07-09 16:17:40 +00:00
|
|
|
edgetype *type;
|
|
|
|
edgeinfo(edgetype *t) { orig = NULL; lastdraw = -1; type = t; }
|
2018-06-10 23:58:31 +00:00
|
|
|
};
|
2017-12-14 01:53:39 +00:00
|
|
|
|
2018-06-10 23:58:31 +00:00
|
|
|
struct colorpair {
|
2018-09-04 17:53:42 +00:00
|
|
|
color_t color1, color2;
|
2018-06-10 23:58:31 +00:00
|
|
|
char shade;
|
2018-09-04 17:53:42 +00:00
|
|
|
colorpair(color_t col = 0xC0C0C0FF) { shade = 0; color1 = col; }
|
2018-06-10 23:58:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct vertexdata {
|
|
|
|
vector<pair<int, edgeinfo*> > edges;
|
|
|
|
string name;
|
|
|
|
colorpair cp;
|
|
|
|
edgeinfo *virt;
|
|
|
|
bool special;
|
|
|
|
int data;
|
|
|
|
string *info;
|
|
|
|
shmup::monster *m;
|
|
|
|
vertexdata() { virt = NULL; m = NULL; info = NULL; special = false; }
|
|
|
|
};
|
|
|
|
|
|
|
|
extern vector<vertexdata> vdata;
|
2017-12-14 01:53:39 +00:00
|
|
|
|
2018-07-05 07:55:11 +00:00
|
|
|
void storeall(int from = 0);
|
2017-12-01 23:24:07 +00:00
|
|
|
|
|
|
|
namespace anygraph {
|
|
|
|
extern double R, alpha, T;
|
|
|
|
extern vector<pair<double, double> > coords;
|
|
|
|
|
|
|
|
void fixedges();
|
|
|
|
void read(string fn, bool subdiv = true, bool doRebase = true, bool doStore = true);
|
|
|
|
extern int N;
|
|
|
|
}
|
|
|
|
|
2017-12-14 01:53:39 +00:00
|
|
|
extern bool showlabels;
|
2018-06-10 23:58:31 +00:00
|
|
|
|
|
|
|
extern bool rog3;
|
|
|
|
extern bool rvwarp;
|
|
|
|
#if CAP_TOUR
|
|
|
|
namespace rvtour {
|
|
|
|
extern tour::slide rvslides[];
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace kohonen {
|
|
|
|
extern int samples;
|
2018-07-04 12:37:33 +00:00
|
|
|
int showsample(int id);
|
2018-07-05 05:31:27 +00:00
|
|
|
int showsample(string id);
|
2018-06-10 23:58:31 +00:00
|
|
|
void describe(cell *c);
|
|
|
|
void steps();
|
|
|
|
void showMenu();
|
|
|
|
bool handleMenu(int sym, int uni);
|
2018-07-09 16:56:27 +00:00
|
|
|
void clear();
|
2018-06-10 23:58:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace staircase {
|
|
|
|
extern bool on;
|
|
|
|
void showMenu();
|
|
|
|
void make_staircase();
|
|
|
|
}
|
2018-06-12 19:16:52 +00:00
|
|
|
|
|
|
|
namespace banachtarski {
|
|
|
|
extern bool on;
|
|
|
|
void init_bantar();
|
|
|
|
void bantar_anim();
|
|
|
|
extern bool bmap;
|
|
|
|
extern void init_bantar_map();
|
|
|
|
}
|
2018-09-03 14:34:32 +00:00
|
|
|
|
|
|
|
namespace pentagonal {
|
|
|
|
void run_snub(int v, int w);
|
|
|
|
}
|
2017-12-01 23:24:07 +00:00
|
|
|
}
|
2018-06-10 23:58:31 +00:00
|
|
|
|