1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-31 01:37:57 +00:00

replaced rogueviz::kind with rogueviz::vizid and rogueviz::vizflags

This commit is contained in:
Zeno Rogue
2020-03-29 15:14:23 +02:00
parent 2b4b035604
commit 24dd8c9376
6 changed files with 63 additions and 69 deletions

View File

@@ -44,6 +44,8 @@ namespace rogueviz {
namespace flocking {
int flock_id;
int N;
bool draw_lines = false;
@@ -85,7 +87,7 @@ namespace flocking {
return;
}
stop_game();
rogueviz::init(); kind = kFlocking;
rogueviz::init(&flock_id, RV_GRAPH);
vdata.resize(N);
const auto v = currentmap->allcells();
@@ -277,8 +279,8 @@ namespace flocking {
}
bool turn(int delta) {
if(!on) return false;
if(kind == kFlocking) simulate(delta), timetowait = 0;
if(vizid != &flock_id) return false;
simulate(delta), timetowait = 0;
if(follow) {
@@ -496,7 +498,7 @@ namespace flocking {
}
named_functionality o_key() {
if(kind == kFlocking) return named_dialog("flocking", show);
if(vizid == &flock_id) return named_dialog("flocking", show);
return named_functionality();
}