mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
commandline option -cmove
This commit is contained in:
parent
08032809a2
commit
0abb296e06
17
debug.cpp
17
debug.cpp
@ -557,6 +557,19 @@ EX void viewall() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** perform a move for the -cmove command */
|
||||||
|
|
||||||
|
void cheat_move(char c) {
|
||||||
|
using arg::cheat;
|
||||||
|
if(c >= '0' && c <= '9') cheat(), cwt += (c - '0');
|
||||||
|
else if(c == 's') cheat(), cwt += wstep, playermoved = false;
|
||||||
|
else if(c == 'r') cheat(), cwt += rev;
|
||||||
|
else if(c == 'm') cheat(), cwt += wmirror;
|
||||||
|
else if(c == 'z') cheat(), cwt.spin = 0, cwt.mirrored = false;
|
||||||
|
else if(c == 'F') fullcenter();
|
||||||
|
else println(hlog, "unknown move command: ", c);
|
||||||
|
}
|
||||||
|
|
||||||
/** launch a debugging screen, and continue normal working only after this screen is closed */
|
/** launch a debugging screen, and continue normal working only after this screen is closed */
|
||||||
EX void modalDebug(cell *c) {
|
EX void modalDebug(cell *c) {
|
||||||
centerover = c; View = Id;
|
centerover = c; View = Id;
|
||||||
@ -646,6 +659,10 @@ int read_cheat_args() {
|
|||||||
PHASEFROM(2);
|
PHASEFROM(2);
|
||||||
shift(); vid.stereo_mode = eStereo(argi());
|
shift(); vid.stereo_mode = eStereo(argi());
|
||||||
}
|
}
|
||||||
|
else if(argis("-cmove")) {
|
||||||
|
PHASE(3); shift();
|
||||||
|
for(char c: args()) cheat_move(c);
|
||||||
|
}
|
||||||
else if(argis("-ipd")) {
|
else if(argis("-ipd")) {
|
||||||
PHASEFROM(2);
|
PHASEFROM(2);
|
||||||
shift_arg_formula(vid.ipd);
|
shift_arg_formula(vid.ipd);
|
||||||
|
Loading…
Reference in New Issue
Block a user