The intent of the code was that if the window size cannot be determined,
it would be treated as having the maximum possible size. Because of a
missing assignment, it was actually treated as having a width of 0.
The reason the width could not be determined was because it was obtained
from stdout, not stderr, even though the printing was done to stderr.
This commit addresses both issues.
(cherry picked from commit c935ad3f025d5c3d8026711a1eb50b2917b61d59)
The FunctionCallTrace object consumes a few hundred bytes of stack
space, even when tracing is disabled. This was causing stack overflows:
$ nix-instantiate '<nixpkgs> -A texlive.combined.scheme-full --dry-run
error: stack overflow (possible infinite recursion)
This is with the default stack size of 8 MiB.
Putting the object on the heap reduces stack usage to < 5 MiB.
(cherry picked from commit 98ef11677c43db9aa669768d9f0cbec704e8831c)
Rather than having a single function in the Game.Lenses module for
determining what collision type if any an entity has, track it in the
Entity typeclass itself. This is both more extensible and a better
separation of concerns and gets rid of one of the two needs for a
circular import. Yay!
As part of this, I realized nothing was being done to prevent doors from
being placed on tiles that already had walls (since now that was
properly causing a collision!) so I've fixed that as well.
--
330051e00cd57ee516b4eaf656965656ffbcd0bc by Abseil Team <absl-team@google.com>:
Fix indentation in comment.
PiperOrigin-RevId: 287997504
--
35fb1a893e708031ba4fc0db460875eb0d31820e by Abseil Team <absl-team@google.com>:
Enable compile-time enforcement that absl::Substitute patterns to not contain unescaped $ symbols.
absl::Substitute already considers unescaped $ symbols undefined behavior and crashes when it's passed them in debug builds. Some code isn't ever built in debug mode, though, and inadvertently used some unescaped $ symbols, which led to surprising results. This change will prevent that problem from happening in the future.
PiperOrigin-RevId: 287906643
--
c5762833ebde6d7110bf68041a823b571c238e9e by Gennadiy Rozental <rogeeff@google.com>:
Move all the flag data into a single place instead of being split between handle and flag object.
After this change CommandLineFlag will not hold any data anymore. And we also do not need to pass the CommandLineFlag around in Abseil Flag implementation to report flag name and location.
PiperOrigin-RevId: 287899076
--
8b5fb644f1e3d9267b7a75106fe9a72c886db786 by Derek Mauro <dmauro@google.com>:
Upgrade CI testing to Bazel 2.0.0 and Clang 407ac2eb5f13
-fno-sanitize-blacklist is to workaround
https://github.com/bazelbuild/bazel/issues/10510
PiperOrigin-RevId: 287875363
--
a20cc1d58895de2babc3748a6c79d1d6813734ef by Abseil Team <absl-team@google.com>:
Make ABSL_RETIRED_FLAG behave consistently with ABSL_FLAG.
Before the change:
ABSL_RETIRED_FLAG does not compile when there are competing ctors in the type, even when ABSL_FLAG does.
After the change:
ABSL_RETIRED_FLAG compiles when ABSL_FLAG does.
PiperOrigin-RevId: 286483183
--
1cff7e67329d2be9e50bee1f2e76ef9ffd2edde5 by Abseil Team <absl-team@google.com>:
Support C++20 erase_if API in unordered associative containers
See [unord.set.erasure]: https://eel.is/c++draft/unord.set.erasure
See [unord.map.erasure]: https://eel.is/c++draft/unord.map.erasure
PiperOrigin-RevId: 286461140
GitOrigin-RevId: 330051e00cd57ee516b4eaf656965656ffbcd0bc
Change-Id: I5513110b41c2af08a44da54612cff341ac5c6607
Decouple the definition of the Gormlak AI from the creature type itself
using generic lenses and a "HasVisionRadius" typeclass, to begin to
untangle the hs-boot web of circular dependencies. This
actually *increases* the number of hs-boot files from 1 to 2, but both
of the source imports that use them are single-instance (unlike gormlak
AI which I would expect to grow linearly with the growth of the game),
plus at least one should be able to go away once we remove collision
from the game lenses module and move it into something defined in the
entity class itself.
When the character walks away from or around the corner from entities
that move such that they're no longer visible, stop rendering them.
Still render static entities like walls, doors, and items though. This
prevents entities walking into a "revealed position" after the
character's left being visible despite not being in a line of sight any
more.
When saving the game to a file that already exists, prompt for whether
or not to overwrite the file.
Since this was the first instance of a prompt triggered by another
prompt, this also had to do a minor fix to swap the order of completing
the prompt and clearing it, so that we don't submit the prompt and then
immediately clear it.
Pick a random subset of cells on the level that have a wall on two
opposite sides and are clear on the other two sides, and place closed,
unlocked doors on those cells.
Add a dungeon level generator, which:
1. generates an infinite sequence of rectangular rooms within the
dimensions of the level
2. removes any duplicates from that sequence
3. Generates a graph from the delaunay triangulation of the centerpoints
of those rooms
4. Generates the minimum-spanning-tree of that delaunay triangulation,
with weights given by line length in points
5. Adds back a subset (default 10-15%) of edges from the delaunay
triangulation to the graph
6. Uses the resulting graph to draw corridors between the rooms, using a
random point on the near edge of each room to pick the points of the
corridors
Make raster circle rendering use the Rasterific package instead of
attempting desperately to hand-roll it, and add a method for generating
filled circles.
Explicitly sets all local branches to all equivalent remote branches
after each update.
Branches deleted on the remote will eventually disappear when the
container is restarted.
It turns out I'm going to need multiple different OAuth clients for a
variety of reasons. This defaults to the client for tazj.in accounts,
but I use a different one in my work overlay.
Instead of splitting below and moving the target buffer into the new
split, split and move the buffer into the active window.
The other way around does (for some reason I don't fully understand)
not work because `split-window-below` may return invalid windows.
Configures edwina using `s-w` as the key prefix (in line with my other
EXWM-related commands).
An additional function is added that switches to a buffer (borrowing
the implementation from `ivy-switch-buffer`) but splitting it into a
new window instead.
Don't re-send the welcome message when loading the game if it's already
been sent. This is done by just tracking whether or not we've sent it as
a boolean in the game state, which may be a bit of a hack but should be fine
Recalculate the character's lines of sight every time we step the game,
rather than just every time the character *moves*. I had originally
thought this was a non-contiguous lines-of-sight bug - which there's a
test disproving - but it actually turned out to be that actions like
eating or attacking would step the game forward (thus moving gormlaks)
without re-calculating the positions visible to the character.