| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
| |
All that's left is 32K for marshallString() and 2G for marshallString4().
This also fixes a game-breaking crash when marshallString() saves one of
1000 bytes or longer -- it would fail on restore.
|
| |
|
|
|
|
|
|
|
| |
Wasn't unused after all.
This reverts commit 85c029f90f2150304624966408f27ed03fa557e6.
This reverts commit 8f1bf02ff69b91399f66c8542e115848ba0d79bb.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
This avoids unnecessary non-inlined copies.
Also, we had a few large functions that had no reason for inlining, let's
have them be regular ones.
I also made "static inline" always use the same order, for easier grepping.
|
|
|
|
|
| |
This will typically be checked only on a save (ie, taking stairs), but since
newly generated levels get saved immediately, this should be good enough.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This fixes invisible saves that don't show up until you type that name. You
still can't load those games, of course.
This code can read all old saves since the save packager was added (30.0), and
new ones until TAG_CHR_FORMAT will be bumped.
|
|\
| |
| |
| |
| | |
There are some issues left, like incorrect wrapping in some cases, but
we can fix them later.
|
| |\
| | |
| | |
| | | |
Conflicts galore...
|
| |\ \ |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I went the lazy way and just stuck stdint.h at the beginning, we include it
from a number of basic and/or platform-dependent headers so was pulled by
AppHdr.h anyway.
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
"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.
|
| | | |
| | | |
| | | |
| | | | |
to use getMinorVersion() uninitialised.
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
Make reader::getMinorVersion() the standard way of accessing a tagged chunk's
minor version. The old confusing situation where getMinorVersion() was
sometimes valid and sometimes not was a recipe for problems.
|
| |/
|/| |
|
|/
|
|
|
|
| |
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!
|
| |
| |
| |
| |
| |
| |
| | |
No chunk bears multiple tags anymore.
Splitting out the basic char data eliminated the need to allow loading only
certain parts of the main subfile/chunk.
|
| |
| |
| |
| |
| |
| | |
This is part 1 of removing multiple tag madness.
Breaks save compat (well, if you bothered to import files into chunks so far...)
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Wizard-casting Detect Items seems to crash when it finds something.
Signed-off-by: Eino Keskitalo <evktalo@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(BREAKS SAVES) (v3)
Changes in v3 (rob):
- update to current master
- fix colouring of out-of-LOS clouds
- fix reload crash due to env.cgrid
Changes in v2:
- Features and monsters should now be properly grayed
Currently map_cell only stores the topmost "thing" in a cell.
This is good enough for the console view, but not for more
sophisticated clients (e.g. tiles).
This commit refactors the code so that all player knowledge about a
cell (including detailed monster and item information) is represented
in map_cell, and so that map_cell is used to build the console view.
Save compatibility is broken since the new map_cell is serialized
instead of the old one.
This will allow, for instance, to load console savegames in the tiles
version, and still get proper tiles for the explored area.
Furthermore, this new map_cell will be the basis of the Crawl protocol
for the client/server split.
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes in v3 (rob):
- update for master (bleeding, deflect missiles, ...)
- fix misled not ending
- fix all monsters getting extreme fire resistance
Changes in v2:
- add operator =
monster_info is changed from the monster list's structure to a general
purpose structure storing player-known information about a monster.
The plan is to make all the user interface code read data from
moster_info, so that:
1. There is no risk of accidental leaks, since all the sensitive code
is in one place
2. Complicated things like misled and fake monsters are correctly
handled, and the code exists once
3. The structure can be serialized for client/server play, and the
deserialized structure can be passed to the UI code (this is still
theoretical)
This will be done in a successive patch.
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current serialization code only supports 8/16/32-bit fixed size
integers.
However, a variable sized representation is often more space efficient,
and allows to seamlessly expand the integer size without breaking
compatibility.
This patch uses the common scheme of using 7 bits for data, plus 1 bit
to indicate termination of the integer, all encoded in little endian order.
Signed integers are first transformed to unsigned ones where bit 0 is
the sign bit.
|
|
|
|
|
|
| |
clobbering files under conditions such as full disk or crawl crashing during save.
This probably needs more work. In particular, bones file locking looks broken.
|
| |
|
|
|
|
|
|
|
| |
Actually, it should be named marshallInt32_t as that's what it does, but
that's hard to read, no architecture with smaller ints can conceivably run
Crawl and the only architecture with bigger ints is long dead. And in even
in such a case, everything will be fine except for name confusion...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
These assert that writers actually get passed non-NULL file
or buffer pointers.
|
|
|
|
|
|
|
|
| |
Also unexport unmarshallCString since it's just used internally by
unmarshallString.
Hopefully these catch some of the unmarshalling crashes we've seen on
cdo (#1615).
|
|
|
|
|
|
| |
Vault metadata that was previously discarded at level generation time is now saved in the level file instead. This can be quite costly (~30k per level) if the level has large vaults.
The abyss can now use vaults as general scenery (tagged "abyss") or to place the rune ("abyss_rune"). abyss.des currently includes stub vaults for testing.
|
|
|
|
|
|
|
|
| |
Also #include this from enum.h, for the versioned mutation_type
changes.
This may require updating scripts that determined the versions
by parsing tags.h.
|
|
|
|
|
| |
Adding MUT_FEAST was an oversight, and deleting it from the middle of
enum.h broke compatibility anyway.
|