1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-24 06:03:23 +00:00

some work on RogueViz

This commit is contained in:
Zeno Rogue 2017-12-14 02:53:39 +01:00
parent 6c4538df69
commit 5884368892
2 changed files with 10 additions and 5 deletions

View File

@ -147,7 +147,7 @@ hyperpoint where(int i) {
auto m = vdata[i].m;
if(m->base == currentmap->gamestart()) return tC0(m->at);
else {
notimpl(); // actually probably that's a buug
// notimpl(); // actually probably that's a buug
return inverse(shmup::ggmatrix(currentmap->gamestart())) * (shmup::ggmatrix(m->base) * tC0(m->at));
}
}
@ -169,7 +169,7 @@ void addedge(int i, int j, edgeinfo *ei) {
addedge(i, id, ei);
addedge(id, j, ei);
shmup::virtualRebase(vd.m, true);
shmup::virtualRebase(vdata[i].m, true);
}
else addedge0(i, j, ei);
}
@ -309,7 +309,7 @@ namespace anygraph {
vdata.reserve(N);
while(true) {
string s = readLabel_s(f);
if(s == "" || s == "-1") break;
if(s == "" || s == "#ROGUEVIZ_ENDOFDATA") break;
int id = getid(s);
vertexdata& vd(vdata[id]);
vd.name = s;
@ -1774,7 +1774,7 @@ string cname() {
template<class T> function<void(presmode)> roguevizslide(char c, T t) {
return [c,t] (presmode mode) {
mapeditor::canvasback = 0x101010;
patterns::canvasback = 0x101010;
setCanvas(mode, c);
if(mode == 1 || mode == pmGeometryStart) t();
@ -1792,7 +1792,7 @@ template<class T> function<void(presmode)> roguevizslide(char c, T t) {
template<class T, class T1> function<void(presmode)> roguevizslide_action(char c, T t, T1 act) {
return [c,t,act] (presmode mode) {
mapeditor::canvasback = 0x101010;
patterns::canvasback = 0x101010;
setCanvas(mode, c);
if(mode == pmStart || mode == pmGeometryStart) t();

View File

@ -1,5 +1,7 @@
namespace rogueviz {
void init();
struct edgeinfo {
int i, j;
double weight, weight2;
@ -29,6 +31,8 @@ struct vertexdata {
};
extern vector<vertexdata> vdata;
void storeall();
namespace anygraph {
extern double R, alpha, T;
@ -40,4 +44,5 @@ extern vector<vertexdata> vdata;
}
extern ld ggamma;
extern bool showlabels;
}