diff --git a/complex2.cpp b/complex2.cpp index 697cd48b..08da1681 100644 --- a/complex2.cpp +++ b/complex2.cpp @@ -224,7 +224,7 @@ EX namespace westwall { void build(vector& 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; itype; i++) if(at->move(i) && coastvalEdge1(at->move(i)) == d && at->move(i) != prev) { diff --git a/graph-player.cpp b/graph-player.cpp index 32ea8a9b..55911e57 100644 --- a/graph-player.cpp +++ b/graph-player.cpp @@ -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); } diff --git a/help.cpp b/help.cpp index 509caca9..5bf1f953 100644 --- a/help.cpp +++ b/help.cpp @@ -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)) { diff --git a/orbs.cpp b/orbs.cpp index 56ef8a56..a8074fae 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -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); diff --git a/passable.cpp b/passable.cpp index 6dc335d3..e584ad38 100644 --- a/passable.cpp +++ b/passable.cpp @@ -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) diff --git a/pcmove.cpp b/pcmove.cpp index 345a035d..476623ce 100644 --- a/pcmove.cpp +++ b/pcmove.cpp @@ -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!")); } diff --git a/rogueviz/presentation.cpp b/rogueviz/presentation.cpp index 3638e94c..34a107bf 100644 --- a/rogueviz/presentation.cpp +++ b/rogueviz/presentation.cpp @@ -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;