mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-17 06:07:12 +00:00
commandline:: replaced legacy rotation with -sview
This commit is contained in:
@@ -260,12 +260,13 @@ int arg::readCommon() {
|
|||||||
else if(argis("-draw")) {
|
else if(argis("-draw")) {
|
||||||
PHASE(3); start_game(); drawscreen();
|
PHASE(3); start_game(); drawscreen();
|
||||||
}
|
}
|
||||||
else if(argis("-rotate")) {
|
else if(argis("-sview")) {
|
||||||
PHASE(3); start_game();
|
PHASE(3); start_game();
|
||||||
shift(); ld a = argf();
|
|
||||||
shift(); ld b = argf();
|
|
||||||
View = View * spin(TAU * a / b);
|
|
||||||
playermoved = false;
|
playermoved = false;
|
||||||
|
transmatrix T = View;
|
||||||
|
shift(); View = parsematrix(args());
|
||||||
|
println(hlog, "View is set to ", View);
|
||||||
|
current_display->which_copy = View * inverse(T) * current_display->which_copy;
|
||||||
}
|
}
|
||||||
else if(argis("-rotate-up")) {
|
else if(argis("-rotate-up")) {
|
||||||
start_game();
|
start_game();
|
||||||
@@ -273,13 +274,6 @@ int arg::readCommon() {
|
|||||||
View = spin90() * spintox(S.T*C0) * View;
|
View = spin90() * spintox(S.T*C0) * View;
|
||||||
playermoved = false;
|
playermoved = false;
|
||||||
}
|
}
|
||||||
else if(argis("-rotate3")) {
|
|
||||||
PHASE(3); start_game();
|
|
||||||
shift(); ld a = argf();
|
|
||||||
shift(); ld b = argf();
|
|
||||||
View = View * cspin(1, 2, TAU * a / b);
|
|
||||||
playermoved = false;
|
|
||||||
}
|
|
||||||
else if(argis("-face-vertex")) {
|
else if(argis("-face-vertex")) {
|
||||||
PHASE(3); start_game();
|
PHASE(3); start_game();
|
||||||
auto &ss = currentmap->get_cellshape(cwt.at);
|
auto &ss = currentmap->get_cellshape(cwt.at);
|
||||||
@@ -290,20 +284,6 @@ int arg::readCommon() {
|
|||||||
PHASE(3); start_game();
|
PHASE(3); start_game();
|
||||||
View = cspin90(0, 2);
|
View = cspin90(0, 2);
|
||||||
}
|
}
|
||||||
else if(argis("-grotate")) {
|
|
||||||
PHASE(3); start_game();
|
|
||||||
shift(); int i = argi();
|
|
||||||
shift(); int j = argi();
|
|
||||||
shift(); View = View * cspin(i, j, argf());
|
|
||||||
playermoved = false;
|
|
||||||
}
|
|
||||||
else if(argis("-grotatei")) {
|
|
||||||
PHASE(3); start_game();
|
|
||||||
shift(); int i = argi();
|
|
||||||
shift(); int j = argi();
|
|
||||||
shift(); rotate_view(cspin(i, j, argf()));
|
|
||||||
playermoved = false;
|
|
||||||
}
|
|
||||||
else if(argis("-center-vertex")) {
|
else if(argis("-center-vertex")) {
|
||||||
PHASE(3); shift(); int i = argi();
|
PHASE(3); shift(); int i = argi();
|
||||||
shift(); int j = argi();
|
shift(); int j = argi();
|
||||||
@@ -320,10 +300,6 @@ int arg::readCommon() {
|
|||||||
rotate_view(cspin90(0, 2));
|
rotate_view(cspin90(0, 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(argis("-cview")) {
|
|
||||||
PHASE(3); start_game();
|
|
||||||
View = Id; playermoved = false;
|
|
||||||
}
|
|
||||||
else if(argis("-exit")) {
|
else if(argis("-exit")) {
|
||||||
PHASE(3);
|
PHASE(3);
|
||||||
int t = SDL_GetTicks();
|
int t = SDL_GetTicks();
|
||||||
|
|||||||
32
legacy.cpp
32
legacy.cpp
@@ -326,6 +326,38 @@ int read_legacy_args() {
|
|||||||
stop_game();
|
stop_game();
|
||||||
land_structure = lsNiceWalls;
|
land_structure = lsNiceWalls;
|
||||||
}
|
}
|
||||||
|
else if(argis("-grotate")) {
|
||||||
|
PHASE(3); start_game();
|
||||||
|
shift(); int i = argi();
|
||||||
|
shift(); int j = argi();
|
||||||
|
shift(); View = View * cspin(i, j, argf());
|
||||||
|
playermoved = false;
|
||||||
|
}
|
||||||
|
else if(argis("-grotatei")) {
|
||||||
|
PHASE(3); start_game();
|
||||||
|
shift(); int i = argi();
|
||||||
|
shift(); int j = argi();
|
||||||
|
shift(); rotate_view(cspin(i, j, argf()));
|
||||||
|
playermoved = false;
|
||||||
|
}
|
||||||
|
else if(argis("-rotate")) {
|
||||||
|
PHASE(3); start_game();
|
||||||
|
shift(); ld a = argf();
|
||||||
|
shift(); ld b = argf();
|
||||||
|
View = View * spin(TAU * a / b);
|
||||||
|
playermoved = false;
|
||||||
|
}
|
||||||
|
else if(argis("-rotate3")) {
|
||||||
|
PHASE(3); start_game();
|
||||||
|
shift(); ld a = argf();
|
||||||
|
shift(); ld b = argf();
|
||||||
|
View = View * cspin(1, 2, TAU * a / b);
|
||||||
|
playermoved = false;
|
||||||
|
}
|
||||||
|
else if(argis("-cview")) {
|
||||||
|
PHASE(3); start_game();
|
||||||
|
View = Id; playermoved = false;
|
||||||
|
}
|
||||||
else return 1;
|
else return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user