mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
rogueviz::dhrg:: export some functions
This commit is contained in:
parent
67267cbe6b
commit
e9bb38d3b1
@ -123,6 +123,14 @@ int ts_coords;
|
|||||||
int ts_vertices;
|
int ts_vertices;
|
||||||
bool stored;
|
bool stored;
|
||||||
|
|
||||||
|
void graphv(string s) {
|
||||||
|
dhrg_init(); read_graph(s, true, true, true);
|
||||||
|
next_timestamp++;
|
||||||
|
ts_rogueviz = next_timestamp;
|
||||||
|
ts_rbase = next_timestamp;
|
||||||
|
stored = true;
|
||||||
|
}
|
||||||
|
|
||||||
int dhrgArgs() {
|
int dhrgArgs() {
|
||||||
using namespace arg;
|
using namespace arg;
|
||||||
|
|
||||||
@ -141,11 +149,7 @@ int dhrgArgs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if(argis("-graphv")) {
|
else if(argis("-graphv")) {
|
||||||
PHASE(3); shift(); dhrg_init(); read_graph(args(), true, true, true);
|
PHASE(3); shift(); graphv(args());
|
||||||
next_timestamp++;
|
|
||||||
ts_rogueviz = next_timestamp;
|
|
||||||
ts_rbase = next_timestamp;
|
|
||||||
stored = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(argis("-analyze_grid")) {
|
else if(argis("-analyze_grid")) {
|
||||||
@ -286,4 +290,4 @@ auto hook =
|
|||||||
#include "visualize.cpp"
|
#include "visualize.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -79,4 +79,14 @@ namespace dhrg {
|
|||||||
if(doStore) rogueviz::storeall();
|
if(doStore) rogueviz::storeall();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unsnap() {
|
||||||
|
for(int i=0; i<N; i++) {
|
||||||
|
using rogueviz::vdata;
|
||||||
|
transmatrix h = spin(coords[i].second * degree) * xpush(coords[i].first);
|
||||||
|
vdata[i].m->base = currentmap->gamestart();
|
||||||
|
vdata[i].m->at = h;
|
||||||
|
virtualRebase(vdata[i].m);
|
||||||
|
}
|
||||||
|
fixedges();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user