mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
rug:: live changing of the texture size
This commit is contained in:
parent
4791fd018e
commit
0c20fdac3b
11
rug.cpp
11
rug.cpp
@ -1817,6 +1817,13 @@ string geometry_name(eGeometry g) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void change_texturesize() {
|
||||||
|
if(rugged) {
|
||||||
|
close();
|
||||||
|
reopen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void show() {
|
void show() {
|
||||||
cmode = sm::SIDE | sm::MAYDARK;
|
cmode = sm::SIDE | sm::MAYDARK;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
@ -1963,9 +1970,10 @@ void show() {
|
|||||||
gwhere = eGeometry((gwhere+1) % 4);
|
gwhere = eGeometry((gwhere+1) % 4);
|
||||||
else if(uni == 'g' && !rug::rugged && CAP_SDL)
|
else if(uni == 'g' && !rug::rugged && CAP_SDL)
|
||||||
rendernogl = !rendernogl;
|
rendernogl = !rendernogl;
|
||||||
else if(uni == 's' && !rug::rugged) {
|
else if(uni == 's') {
|
||||||
texturesize *= 2;
|
texturesize *= 2;
|
||||||
if(texturesize == 8192) texturesize = 64;
|
if(texturesize == 8192) texturesize = 64;
|
||||||
|
change_texturesize();
|
||||||
}
|
}
|
||||||
#if CAP_SURFACE
|
#if CAP_SURFACE
|
||||||
else if(uni == 'c')
|
else if(uni == 'c')
|
||||||
@ -2032,6 +2040,7 @@ int rugArgs() {
|
|||||||
|
|
||||||
else if(argis("-rugtsize")) {
|
else if(argis("-rugtsize")) {
|
||||||
shift(); rug::texturesize = argi();
|
shift(); rug::texturesize = argi();
|
||||||
|
change_texturesize();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(argis("-rugv")) {
|
else if(argis("-rugv")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user