mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
added an option to disable background particles and to change font size on desktop
This commit is contained in:
parent
ae3feb2055
commit
9f48dcf3f6
@ -1014,6 +1014,10 @@ void saveHighQualityShot(const char *fname, const char *caption, int fade) {
|
||||
#if CAP_SDL
|
||||
bool setfsize = true;
|
||||
|
||||
void do_setfsize() {
|
||||
vid.fsize = min(vid.yres * fontscale/ 3200, vid.xres * fontscale/ 4800), setfsize = false;
|
||||
}
|
||||
|
||||
void setvideomode() {
|
||||
|
||||
DEBB(DF_INIT, (debugfile,"setvideomode\n"));
|
||||
@ -1023,7 +1027,7 @@ void setvideomode() {
|
||||
if(vid.yres > vid.yscr) vid.yres = vid.yscr * 9/10, setfsize = true;
|
||||
}
|
||||
|
||||
if(setfsize) vid.fsize = min(vid.yres / 32, vid.xres / 48), setfsize = false;
|
||||
if(setfsize) do_setfsize();
|
||||
|
||||
int flags = 0;
|
||||
|
||||
@ -1047,7 +1051,7 @@ void setvideomode() {
|
||||
if(vid.full && !s) {
|
||||
vid.xres = vid.xscr;
|
||||
vid.yres = vid.yscr;
|
||||
vid.fsize = min(vid.yres / 32, vid.xres / 48);
|
||||
do_setfsize();
|
||||
s = SDL_SetVideoMode(vid.xres, vid.yres, 32, flags | SDL_FULLSCREEN);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
double randd() { return (rand() % 1000000) / 1000000. + .0000005; }
|
||||
|
||||
double cellgfxdist(cell *c, int i) {
|
||||
return purehepta ? tessf : (c->type == 6 && (i&1)) ? hexhexdist : crossf;
|
||||
}
|
||||
|
||||
transmatrix cellrelmatrix(cell *c, int i) {
|
||||
double d =
|
||||
purehepta ? tessf : (c->type == 6 && (i&1)) ? hexhexdist : crossf;
|
||||
double d = cellgfxdist(c, i);
|
||||
return ddspin(c, i) * xpush(d) * iddspin(c->mov[i], c->spin(i), euclid ? 0 : S42);
|
||||
}
|
||||
|
||||
|
16
config.cpp
16
config.cpp
@ -273,6 +273,7 @@ void initConfig() {
|
||||
addsaver(conformal::autobandhistory, "automatic band history");
|
||||
addsaver(conformal::dospiral, "do spiral");
|
||||
|
||||
addsaver(vid.backeffects, "background particle effects", (ISMOBILE || ISPANDORA) ? false : true);
|
||||
// control
|
||||
|
||||
addsaver(vid.joyvalue, "vid.joyvalue", 4800);
|
||||
@ -590,6 +591,7 @@ void showGraphConfig() {
|
||||
dialog::addSelItem(XLAT("movement animation speed"), fts(vid.mspeed), 'm');
|
||||
|
||||
dialog::addBoolItem(XLAT("extra graphical effects"), (vid.particles), 'u');
|
||||
dialog::addBoolItem(XLAT("background particle effects"), (vid.backeffects), 'p');
|
||||
|
||||
#ifdef WHATEVER
|
||||
dialog::addSelItem(XLAT("whatever"), fts(whatever), 'j');
|
||||
@ -606,9 +608,7 @@ void showGraphConfig() {
|
||||
|
||||
dialog::addSelItem(XLAT("inventory/kill mode"), XLAT(glyphmodenames[vid.graphglyph]), 'd');
|
||||
|
||||
#if ISMOBILE==1
|
||||
dialog::addSelItem(XLAT("font scale"), its(fontscale), 'b');
|
||||
#endif
|
||||
|
||||
dialog::addSelItem(XLAT("sight range"), its(sightrange), 'r');
|
||||
|
||||
@ -691,10 +691,14 @@ void showGraphConfig() {
|
||||
dialog::editNumber(vid.framelimit, 5, 300, 10, 300, XLAT("framerate limit"), "");
|
||||
#endif
|
||||
|
||||
#if ISMOBILE
|
||||
if(xuni =='b')
|
||||
dialog::editNumber(fontscale, 0, 400, 10, 100, XLAT("font scale"), "");
|
||||
#endif
|
||||
if(xuni =='b') {
|
||||
dialog::editNumber(fontscale, 25, 400, 10, 100, XLAT("font scale"), "");
|
||||
if(!ISMOBILE)
|
||||
dialog::reaction = [] () { setfsize = true; if(fontscale < 25) fontscale = 25; do_setfsize(); };
|
||||
}
|
||||
|
||||
if(xuni =='p')
|
||||
vid.backeffects = !vid.backeffects;
|
||||
|
||||
if(xuni =='z')
|
||||
dialog::editNumber(vid.aurastr, 0, 256, 10, 128, XLAT("aura brightness"), "");
|
||||
|
10
graph.cpp
10
graph.cpp
@ -4337,8 +4337,14 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
||||
}
|
||||
}
|
||||
|
||||
if(c->land == laBlizzard)
|
||||
blizzardcells[c].frame = frameid;
|
||||
if(c->land == laBlizzard) {
|
||||
if(vid.backeffects)
|
||||
blizzardcells[c].frame = frameid;
|
||||
else {
|
||||
forCellIdEx(c2, i, c) if(againstWind(c, c2))
|
||||
queuepoly(V * ddspin(c, i) * xpush(cellgfxdist(c, i)/2), shWindArrow, 0x8080FF80);
|
||||
}
|
||||
}
|
||||
|
||||
if(c->land == laWhirlwind) {
|
||||
whirlwind::calcdirs(c);
|
||||
|
2
hud.cpp
2
hud.cpp
@ -253,7 +253,7 @@ void displayglyph2(int cx, int cy, int buttonsize, int i) {
|
||||
if(t == IC_OTHER)
|
||||
mouseovers = XLAT("objects found: %1", it);
|
||||
if(t == IC_NAI)
|
||||
mouseovers = XLATN(it);
|
||||
mouseovers = XLATT1(it);
|
||||
if(t == IC_ORB)
|
||||
mouseovers = XLAT("orb power: %1", eItem(i));
|
||||
if(it == itGreenStone) {
|
||||
|
4
hyper.h
4
hyper.h
@ -361,6 +361,8 @@ struct videopar {
|
||||
bool samegender; // same gender for the Princess?
|
||||
int language;
|
||||
|
||||
bool backeffects; // background particle effects
|
||||
|
||||
int killreduction, itemreduction, portreduction;
|
||||
|
||||
multi::config scfg;
|
||||
@ -822,6 +824,8 @@ namespace dialog {
|
||||
};
|
||||
|
||||
extern vector<item> items;
|
||||
|
||||
extern reaction_t reaction;
|
||||
|
||||
item& lastItem();
|
||||
extern unsigned int *palette;
|
||||
|
3
init.cpp
3
init.cpp
@ -179,11 +179,12 @@
|
||||
#define CAP_SHMUP_GOOD (!ISMOBWEB)
|
||||
#endif
|
||||
|
||||
int fontscale = 100;
|
||||
|
||||
#if ISMOBILE
|
||||
#define EXTRALICENSE "\n\nHyperRogue soundtrack by Shawn Parrotte (http://www.shawnparrotte.com), under the Creative Commons BY-SA 3.0 license, http://creativecommons.org/licenses/by-sa/3.0/"
|
||||
#undef XEXTRALICENSE
|
||||
|
||||
int fontscale = 100;
|
||||
bool buttonclicked;
|
||||
void gdpush(int t);
|
||||
#endif
|
||||
|
@ -652,7 +652,7 @@ hpcshape
|
||||
shEgg,
|
||||
shSpikedRing, shTargetRing, shSawRing, shGearRing, shPeaceRing, shHeptaRing,
|
||||
shSpearRing, shLoveRing,
|
||||
shDaisy, shTriangle, shNecro, shStatue, shKey,
|
||||
shDaisy, shTriangle, shNecro, shStatue, shKey, shWindArrow,
|
||||
shGun,
|
||||
shFigurine, shTreat,
|
||||
shElementalShard,
|
||||
@ -1363,6 +1363,7 @@ void buildpolys() {
|
||||
|
||||
bshape(shMercuryBridge[0], PPR_FLOOR, scalef*spzoom6, 365);
|
||||
bshape(shMercuryBridge[1], PPR_FLOOR, scalef*spzoomd7, 366);
|
||||
bshape(shWindArrow, PPR_HEPTAMARK, scalef, 367);
|
||||
|
||||
bshape(shPalaceGate, PPR_STRUCT1, scalef, 47);
|
||||
bshape(shSemiFeatherFloor[0], PPR_FLOOR, scalef*spzoom6, 48);
|
||||
@ -2860,6 +2861,8 @@ NEWSHAPE, 364, 1, 2, -0.486619,0.002830, -0.418060,0.040577, -0.427473,0.022591,
|
||||
NEWSHAPE, 365, 1, 2, -0.236444,-0.000864, -0.300824,-0.142089, 0.027603,-0.331178, 0.117026,-0.205327,
|
||||
NEWSHAPE, 366, 1, 2, 0.120242,0.202432, 0.476077,0.202192,
|
||||
|
||||
NEWSHAPE, 367, 1, 2, -0.096569,0.019944, 0.040859,0.019906, 0.037742,0.058710, 0.116624,-0.000000,
|
||||
|
||||
NEWSHAPE
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user