| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Currently unused, but there are plans.
|
| |
|
|
|
|
|
| |
Sometimes, they're there to emphasize a break between two sections of code,
which is good. In a majority of cases, though, they're just inconsistent.
|
|
|
|
|
|
|
|
|
|
| |
As the comment said, every single use of this function was a save-corrupting
bug.
Too bad, there's one case left: on Unix, HUP will fclose(stdin), which can
immediately fail due to fclose() using malloc (free() to be exact), and then
it still relies on undefined behaviour which sometimes works only because
ncurses does weird things behind our back.
|
|
|
|
|
|
|
|
|
|
| |
For most header files, this only saves on having to recompile a
small number of source files, but there are also a few headers
where small changes would now take significantly less time.
This is most obvious for the Tiles build for which the dependencies
have been greatly reduced, so that the only additional includes
when compared to console are strictly library or tile related.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had to rename distance() (in coord.h) to distance2() because it conflicts
with the STL function to compare 2 iterators. Not a bad change given how it
returns the square of the distance anyway.
I also had to rename the message global variable (in message.cc) to buffer.
I tried to fix and improve the coding style has much as I could, but I
probably missed a few given how huge and tedious it is.
I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool
and util/levcomp.*, because I have no clue about those.
|
|
|
|
|
|
| |
In portable code, basically every use of long or %ld/%lu/%lx is a bug.
A legitimate use in Crawl is the bit array: storing it in-memory should be
preferably done a word at a time.
|
|\
| |
| |
| |
| | |
This includes fixes for 64834896234968 places in master that add new uses of
LEVEL_FOO and so on.
|
| |
| |
| |
| |
| | |
This allows detecting input files going backwards -- ie, with any non-git
downgrade.
|
| |
| |
| |
| |
| | |
Looks like get_XXX_path and the like in files.cc could use some drastic
simplification, or perhaps even a nuking and rewrite.
|
| |
| |
| |
| | |
It joined the choir invisible years ago.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
They had one legitimate user that could be called from a single place (as
opposed to two callbacks) together with many other similar initializations.
2/3 of code served for compiler/platform differences -- explicitely declared
by the language standard as undefined behaviour.
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
Cached map information previously just used the name of the map file, so
that for example entry/large.des and variable/large.des would collide in
the cache. Instead, produce cache entry names that use the full path of
the file relative to the des directory, entry_large.des and variable_large.des.
|
| |
|
|
|
|
|
| |
Skipping this just causes corruption if you start Crawl twice, and it was
not supported only on DOS.
|
|
|
|
| |
(Ok, ok, on Windows it's a ConsoleHandler but does basically the same).
|
| |
|
|
|
|
| |
Before, they would show up but start a new game after choosing them.
|
|
|
|
|
| |
Declining this question currently exits, which is suboptimal. It should
be probably merged with any other error when loading a game, though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This saves the timestamp in the database instead of relying on the .db
file's mtime (which would be newer than source). There are better ways to
do this, but I did the simplest one for now, since aborted builds result in
very "fun" bugs, and we badly want this fixed for 0.8.
Also, there were nice race conditions, multiple rw opens, and so on.
The whole database system needs to be rewritten quite badly, it's a mess of
layers upon layers, remnants of DBM that was used in the dark past.
This is only the db, dsc files suffer from the same problems, and the fix
there will be a lot more complex :(
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to its documentation, FT_New_Face() expects the file's name in
UTF-8 regardless of the system locale. Too bad, there's a bug where
sometimes on Windows an 8 bit code page is used instead:
http://www.mail-archive.com/freetype@nongnu.org/msg00939.html
Since we don't know if the version we're talking to is fixed or not,
it's safer to load the font file ourselves.
This fixes cases where zipped (not installed) builds were put into
a directory with a non-ASCII name.
|
|
|
|
|
|
|
| |
"File:" is shown in your editor's status bar.
"Written by:" was used only for the first person who changed a file. We got
git for that now, and pre-DCSS history is so woefully inaccurate it doesn't
really matter.
|
|
|
|
| |
Now we can give them proper names.
|
|
|
|
| |
For bones, '-' is used instead of ':' to handle Windows.
|
| |
|
|
|
|
| |
They make sense only for setgid binaries which cause no end of security issues.
|
| |
|
|
|
|
|
|
| |
I did review it manually to find places where they made sense (like some
tables), but for a massive sed job like this there might be places that
I missed.
|
| |
|
|
|
|
|
|
| |
I especially enjoyed removing that big ALL-CAPS shouting comment telling
people to never touch the write/read functions for individual tags.
Down with hugely granulated inflexible versioning schemes!
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This should help against the signed char problems, and is good for
code readability. Now, if you have a char, it's either an untyped
in-memory byte, or a symbol inside a string. Small numbers are instead
[u]int8_t, ints, an enum type, or, in so many cases, bools.
I didn't touch any of the tiles code, as it's currently broken and I don't
want to risk making it unbroken harder.
|
|
|
|
|
|
|
|
| |
There is a new compile-time option, SHAREDDIR; it specifies the directory
to put the logfile, scores and bones into -- they used to be in SAVEDIR/saves
(and that's the default when not specified).
A typical layout is SAVEDIR='~/.crawl' SHAREDDIR=/var/games/crawl
|
|
|
|
|
|
|
|
|
| |
apply_to_all_dungeons().
Functional changes:
* Yred's penance won't insta-enslave mons you merely marked.
* Xom-gifted pet perm daevas won't abandon you if you drop TSO.
(I've actually had this happen to me in a real game!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the same character name to have ongoing Crawl and Sprint games
without filename collisions. I'm using a subdirectory instead of a filename
suffix (such as Foo-501-spr.chr) to avoid blowing DOS compatibility.
Add GAME_TYPE_UNSPECIFIED as the uninitialised game_type. It's synonymous with
GAME_TYPE_NORMAL, but allows the code to distinguish between a player having
chosen the main game and the player not having made a choice yet.
get_savefile_directory() returns the current savefile directory based on game
type. Direct use of Options.save_dir should be avoided in new code.
player_save_info now tracks game type as well.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and recompiled by new Crawl processes while older processes are running.
When mapdef.cc detects that a .dsc file is out of sync, it throws an exception
that dungeon.cc catches. dungeon.cc then discards all loaded maps and reloads
then from the map index (.idx) files.
The old behaviour was to create a panic save and exit for out-of-sync .dsc
files, which is not ideal since the panic save code is rarely used and tends to
bitrot.
When regenerating text database files in DGL installs, the game no longer
unlinks the old .db file, and will instead update the old file with the
new db keys.
None of this code should be relevant to single-user installs.
|
|
|
|
| |
savedir so that different save-compatible Crawls can share a common savedir while having different data dirs.
|
| |
|
|
|
|
| |
travel_load_map no longer did the Right Thing after my level_vaults changes, tossed it in favour of level_excursion.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
level_excursion was reactivating Lua markers only if the player was not on the
original level when the destructor was called. Since the level-map explicitly
does a go_to(original), this is never the case.
The fix is to reactivate Lua markers if the level_excursion *ever* moved
off-level.
This also allows us to dispense with the LOAD_RETURN mode of reloading levels.
LOAD_RETURN only served two purposes: to activate markers and then to fire the
dungeon event for the player entering the level. However, this event should not
be fired for level excursions, because the player never physically left the
level, and reactivating markers can be done safely after _load_level returns.
|
|
|
|
|
| |
In particular, checking save existence in newgame is now not responsible
for unpacking packaged saves...
|
|
|
|
|
|
| |
choose_game() is now only concerned with choosing a character, and
doesn't touch "you". setup_game() (ng-setup.cc) then fills out
"you" and other stuff.
|
| |
|