mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-06-30 07:48:49 +00:00
Merge branch 'master' of https://github.com/zenorogue/hyperrogue
This commit is contained in:
+1
-1
@@ -224,7 +224,7 @@ EX namespace westwall {
|
||||
void build(vector<cell*>& whirlline, int d) {
|
||||
again:
|
||||
cell *at = whirlline[isize(whirlline)-1];
|
||||
cell *prev = whirlline[isize(whirlline)-2];
|
||||
cell *prev = isize(whirlline) >= 2 ? whirlline[isize(whirlline)-2] : NULL;
|
||||
if(looped(whirlline)) return;
|
||||
for(int i=0; i<at->type; i++)
|
||||
if(at->move(i) && coastvalEdge1(at->move(i)) == d && at->move(i) != prev) {
|
||||
|
||||
+5
-1
@@ -111,7 +111,11 @@ EX void drawWinter(const shiftmatrix& V, ld hdir, color_t col) {
|
||||
float ds = ptick(300);
|
||||
col = darkena(col, 0, 0xFF);
|
||||
for(int u=0; u<20; u++) {
|
||||
ld rad = sin(ds+u * TAU / 20) * M_PI / S7;
|
||||
ld rad;
|
||||
if(vid.flasheffects)
|
||||
rad = sin(ds+u * TAU / 20) * M_PI / S7;
|
||||
else
|
||||
rad = sin((ds+u) * TAU / 20) * M_PI / S7;
|
||||
shiftmatrix V1 = chei(V, u, 20);
|
||||
queueline(V1*xspinpush0(M_PI+hdir+rad, cgi.hexf*.5), V1*xspinpush0(M_PI+hdir+rad, cgi.hexf*3), col, 2 + vid.linequality);
|
||||
}
|
||||
|
||||
@@ -1030,7 +1030,7 @@ EX void describeMouseover() {
|
||||
}
|
||||
#endif
|
||||
|
||||
if(c->wall && !(c->wall == waChasm && c->land == laDual && ctof(c)) &&
|
||||
if(c->wall && !(c->land == laDual && pseudohept(c)) &&
|
||||
!(c->land == laMemory) &&
|
||||
!((c->wall == waFloorA || c->wall == waFloorB) && c->item)) {
|
||||
|
||||
|
||||
@@ -865,9 +865,11 @@ void telekinesis(cell *dest) {
|
||||
eItem it = cwt.at->item;
|
||||
bool saf = it == itOrbSafety;
|
||||
collectItem(cwt.at, cwt.at, true);
|
||||
if(cwt.at->item == it)
|
||||
if(saf)
|
||||
;
|
||||
else if(cwt.at->item == it)
|
||||
animateMovement(match(dest, cwt.at), LAYER_BOAT);
|
||||
else if(!saf)
|
||||
else
|
||||
animate_item_throw(dest, cwt.at, it);
|
||||
|
||||
useupOrb(itOrbSpace, cost.first);
|
||||
|
||||
+2
-1
@@ -143,6 +143,8 @@ EX bool anti_alchemy(cell *w, cell *from) {
|
||||
EX bool passable(cell *w, cell *from, flagtype flags) {
|
||||
bool vrevdir = bool(flags&P_VOID);
|
||||
|
||||
if(w->land == laDual && pseudohept(w) && !F(P_BULLET)) return false;
|
||||
|
||||
if(from && from != w && nonAdjacent(from, w) && !F(P_IGNORE37 | P_BULLET)) return false;
|
||||
|
||||
if((isWateryOrBoat(w) || w->wall == waShallow) && F(P_WATERCURSE))
|
||||
@@ -169,7 +171,6 @@ EX bool passable(cell *w, cell *from, flagtype flags) {
|
||||
if(airdist(w) < 3) return false;
|
||||
if(againstWind(w,from)) return false;
|
||||
if(isGravityLand(w)) return false;
|
||||
if(w->wall == waChasm && w->land == laDual) return false;
|
||||
}
|
||||
|
||||
if(from && strictlyAgainstGravity(w, from, vrevdir, flags)
|
||||
|
||||
+1
-1
@@ -1143,7 +1143,7 @@ void pcmove::tell_why_impassable() {
|
||||
if(vmsg(miRESTRICTED, siGRAVITY, c2, moNone))
|
||||
addMessage(XLAT("Gravity does not allow this!"));
|
||||
}
|
||||
else if(c2->wall == waChasm && c2->land == laDual) {
|
||||
else if(c2->land == laDual && pseudohept(c2)) {
|
||||
if(vmsg(miRESTRICTED, siWALL, c2, moNone))
|
||||
addMessage(XLAT("You cannot move there!"));
|
||||
}
|
||||
|
||||
@@ -208,7 +208,8 @@ string latex_cachename(string s, flagtype flags) {
|
||||
return hr::format("latex-cache/%08X.png", hash);
|
||||
}
|
||||
|
||||
/* note: you pdftopng from the xpdf package for this to work! */
|
||||
/* note: for this to work, you need either pdftopng from the xpdf package,
|
||||
* or pdftoppm from the poppler-utils package */
|
||||
string gen_latex(presmode mode, string s, int res, flagtype flags) {
|
||||
string filename = latex_cachename(s, flags);
|
||||
if(mode == pmStartAll) {
|
||||
@@ -225,13 +226,15 @@ string gen_latex(presmode mode, string s, int res, flagtype flags) {
|
||||
"\\end{document}\n", latex_packages.c_str(), s.c_str());
|
||||
fclose(f);
|
||||
hr::ignore(system("cd latex-cache; pdflatex rogueviz-latex.tex"));
|
||||
bool has_working_pdftopng = system("pdftopng -v > /dev/null 2>&1") == 0;
|
||||
string pdftopng_command = has_working_pdftopng ? "pdftopng" : "pdftoppm -png";
|
||||
string pngline =
|
||||
(flags & LATEX_COLOR) ?
|
||||
"cd latex-cache; pdftopng -alpha -r " + its(res) + " rogueviz-latex.pdf t"
|
||||
: "cd latex-cache; pdftopng -r " + its(res) + " rogueviz-latex.pdf t";
|
||||
(flags & LATEX_COLOR) && has_working_pdftopng ?
|
||||
"cd latex-cache; " + pdftopng_command + " -alpha -r " + its(res) + " rogueviz-latex.pdf t"
|
||||
: "cd latex-cache; " + pdftopng_command + " -r " + its(res) + " rogueviz-latex.pdf t";
|
||||
println(hlog, "calling: ", pngline);
|
||||
hr::ignore(system(pngline.c_str()));
|
||||
rename("latex-cache/t-000001.png", filename.c_str());
|
||||
rename(has_working_pdftopng ? "latex-cache/t-000001.png" : "latex-cache/t-1.png", filename.c_str());
|
||||
}
|
||||
}
|
||||
return filename;
|
||||
|
||||
Reference in New Issue
Block a user