mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
moved dual geometry puzzle to RogueViz
This commit is contained in:
parent
f3f502e65e
commit
9bb9fd572d
@ -125,7 +125,6 @@ EX bool wrongMode(char flags) {
|
|||||||
if(yendor::on) return true;
|
if(yendor::on) return true;
|
||||||
if(peace::on) return true;
|
if(peace::on) return true;
|
||||||
if(tactic::on) return true;
|
if(tactic::on) return true;
|
||||||
if(dpgen::in) return true;
|
|
||||||
#if CAP_TOUR
|
#if CAP_TOUR
|
||||||
if(tour::on) return true;
|
if(tour::on) return true;
|
||||||
#endif
|
#endif
|
||||||
|
@ -121,7 +121,6 @@
|
|||||||
#include "bigstuff.cpp"
|
#include "bigstuff.cpp"
|
||||||
#include "multigame.cpp"
|
#include "multigame.cpp"
|
||||||
#include "inforder.cpp"
|
#include "inforder.cpp"
|
||||||
#include "dpgen.cpp"
|
|
||||||
#include "vr.cpp"
|
#include "vr.cpp"
|
||||||
#include "intra.cpp"
|
#include "intra.cpp"
|
||||||
|
|
||||||
|
@ -327,7 +327,6 @@ EX void wandering() {
|
|||||||
if(!canmove) return;
|
if(!canmove) return;
|
||||||
if(!gen_wandering) return;
|
if(!gen_wandering) return;
|
||||||
if(racing::on) return;
|
if(racing::on) return;
|
||||||
if(dpgen::in) return;
|
|
||||||
if(items[itOrbSafety]) return;
|
if(items[itOrbSafety]) return;
|
||||||
pathdata pd(moYeti);
|
pathdata pd(moYeti);
|
||||||
int seepcount = getSeepcount();
|
int seepcount = getSeepcount();
|
||||||
|
@ -136,6 +136,8 @@ EX namespace dual {
|
|||||||
|
|
||||||
hyperpoint which_dir;
|
hyperpoint which_dir;
|
||||||
|
|
||||||
|
EX purehookset hooks_after_move;
|
||||||
|
|
||||||
int remap_direction(int d, int cg) {
|
int remap_direction(int d, int cg) {
|
||||||
if(WDIM == 2 || cg == currently_loaded) return d;
|
if(WDIM == 2 || cg == currently_loaded) return d;
|
||||||
|
|
||||||
@ -247,7 +249,7 @@ EX namespace dual {
|
|||||||
switch_to(1); forcedmovetype = fm; movepcto(0, subdir, false); forcedmovetype = fmSkip;
|
switch_to(1); forcedmovetype = fm; movepcto(0, subdir, false); forcedmovetype = fmSkip;
|
||||||
switch_to(cg);
|
switch_to(cg);
|
||||||
reduceOrbPowers();
|
reduceOrbPowers();
|
||||||
dpgen::check();
|
callhooks(hooks_after_move);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
addMessage(XLAT("Impossible."));
|
addMessage(XLAT("Impossible."));
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* \brief dual geometry puzzle generator
|
* \brief dual geometry puzzle generator
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hyper.h"
|
#include "rogueviz.h"
|
||||||
|
|
||||||
namespace hr {
|
namespace hr {
|
||||||
|
|
||||||
@ -58,6 +58,8 @@ void solve(cpos at) {
|
|||||||
|
|
||||||
int last_elimit, last_hlimit;
|
int last_elimit, last_hlimit;
|
||||||
|
|
||||||
|
void check();
|
||||||
|
|
||||||
void launch(int seed, int elimit, int hlimit) {
|
void launch(int seed, int elimit, int hlimit) {
|
||||||
|
|
||||||
/* setup */
|
/* setup */
|
||||||
@ -159,6 +161,10 @@ void launch(int seed, int elimit, int hlimit) {
|
|||||||
|
|
||||||
worst.first->wall = waOpenPlate;
|
worst.first->wall = waOpenPlate;
|
||||||
worst.second->wall = waOpenPlate;
|
worst.second->wall = waOpenPlate;
|
||||||
|
rogueviz::rv_hook(dual::hooks_after_move, 100, dpgen::check);
|
||||||
|
bool b = gen_wandering;
|
||||||
|
rogueviz::on_cleanup_or_next([b] { gen_wandering = b; });
|
||||||
|
gen_wandering = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct puzzle {
|
struct puzzle {
|
||||||
@ -260,7 +266,21 @@ auto sbhook = addHook(hooks_args, 100, [] {
|
|||||||
return 0;
|
return 0;
|
||||||
}) + addHook(hooks_o_key, 91, [] (o_funcs& v) {
|
}) + addHook(hooks_o_key, 91, [] (o_funcs& v) {
|
||||||
if(in) v.push_back(named_dialog(XLAT("select a puzzle"), show_menu));
|
if(in) v.push_back(named_dialog(XLAT("select a puzzle"), show_menu));
|
||||||
});
|
})
|
||||||
|
+ addHook_rvslides(205, [] (string s, vector<tour::slide>& v) {
|
||||||
|
if(s != "mixed") return;
|
||||||
|
v.push_back(tour::slide{
|
||||||
|
"dual geometry puzzle", 10, tour::LEGAL::NONE | tour::QUICKSKIP | tour::QUICKGEO,
|
||||||
|
"Move both characters to marked squares at once!\n"
|
||||||
|
,
|
||||||
|
[] (tour::presmode mode) {
|
||||||
|
slide_action(mode, 'r', "launch the dual geometry puzzle", [] {
|
||||||
|
pushScreen(show_menu);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EX }
|
EX }
|
@ -376,7 +376,6 @@ EX void initgame() {
|
|||||||
truelotus = 0;
|
truelotus = 0;
|
||||||
asteroids_generated = 0;
|
asteroids_generated = 0;
|
||||||
asteroid_orbs_generated = 0;
|
asteroid_orbs_generated = 0;
|
||||||
dpgen::in = false;
|
|
||||||
survivalist = true;
|
survivalist = true;
|
||||||
#if CAP_CRYSTAL
|
#if CAP_CRYSTAL
|
||||||
crystal::used_compass_inside = false;
|
crystal::used_compass_inside = false;
|
||||||
@ -1022,7 +1021,6 @@ EX void saveStats(bool emergency IS(false)) {
|
|||||||
if(randomPatternsMode) return;
|
if(randomPatternsMode) return;
|
||||||
if(daily::on) return;
|
if(daily::on) return;
|
||||||
if(peace::on) return;
|
if(peace::on) return;
|
||||||
if(dpgen::in) return;
|
|
||||||
if(experimental) return;
|
if(experimental) return;
|
||||||
|
|
||||||
if(!gold() && !racing::on) return;
|
if(!gold() && !racing::on) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user