mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-21 13:28:05 +00:00
move_to function
This commit is contained in:
@@ -159,6 +159,17 @@ void irradiate() {
|
|||||||
cleanup_protomap();
|
cleanup_protomap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void move_to(cellwalker cw) {
|
||||||
|
cwt = cw;
|
||||||
|
centerover = cwt.at;
|
||||||
|
View = Id;
|
||||||
|
}
|
||||||
|
|
||||||
|
void move_to(twalker dw) {
|
||||||
|
auto m = dynamic_cast<hrmap_testproto*> (currentmap);
|
||||||
|
move_to(cellwalker(m->clone(dw.at)->c7, dw.spin, dw.mirrored));
|
||||||
|
}
|
||||||
|
|
||||||
void debug_menu() {
|
void debug_menu() {
|
||||||
cmode = sm::SIDE | sm::MAYDARK;
|
cmode = sm::SIDE | sm::MAYDARK;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
@@ -216,10 +227,8 @@ void debug_menu() {
|
|||||||
dialog::init();
|
dialog::init();
|
||||||
for(auto dw: debuglist) {
|
for(auto dw: debuglist) {
|
||||||
dialog::addItem("go to " + index_pointer(dw.at), 'a');
|
dialog::addItem("go to " + index_pointer(dw.at), 'a');
|
||||||
dialog::add_action([dw,m] {
|
dialog::add_action([dw] {
|
||||||
cwt = cellwalker(m->clone(dw.at)->c7, dw.spin, dw.mirrored);
|
move_to(dw);
|
||||||
centerover = cwt.at;
|
|
||||||
View = Id;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
dialog::display();
|
dialog::display();
|
||||||
|
|||||||
Reference in New Issue
Block a user