summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.h
Commit message (Collapse)AuthorAgeFilesLines
* Don't die when encountering 0-byte ghost filesNicholas Feinberg2014-05-251-2/+6
|
* Make a few symbols static.Adam Borowski2013-12-151-4/+0
|
* Drop support for explicit string length limits.Adam Borowski2013-10-241-2/+2
| | | | | | | 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.
* Fix lots of typosChris Oelmueller2013-07-231-1/+1
|
* Revert "Remove unused option to ignore write errors for save fragments."Adam Borowski2012-12-171-5/+12
| | | | | | | Wasn't unused after all. This reverts commit 85c029f90f2150304624966408f27ed03fa557e6. This reverts commit 8f1bf02ff69b91399f66c8542e115848ba0d79bb.
* Remove unused option to ignore write errors for save fragments.Adam Borowski2012-12-171-12/+5
|
* Remove unused marshallEnumVal subsystem.Adam Borowski2012-12-171-65/+0
|
* Remove unnecessary includes from header files.Jay3.14152012-10-231-2/+0
| | | | | | | | | | 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.
* Use std namespace.Raphael Langella2012-08-261-26/+25
| | | | | | | | | | | | | 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.
* Make inline functions static.Adam Borowski2012-08-091-2/+2
| | | | | | | | | 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.
* Assert that all items being saved are valid.Adam Borowski2012-07-311-1/+1
| | | | | 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.
* Remove spaces between function identifiers and arguments lists.Adam Borowski2012-06-211-1/+1
|
* Get rid of level_type, unify BRANCH_*, LEVEL_* and portal vaults.Adam Borowski2011-11-041-0/+2
|
* Allow more than 64 mon_info flags.Adam Borowski2011-05-261-0/+1
|
* Make the chr chunk forward-compatible, so the save browser can view all games.Adam Borowski2011-04-291-0/+1
| | | | | | | | 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.
* Merge branch 'unicode'.Adam Borowski2011-04-011-1/+0
|\ | | | | | | | | There are some issues left, like incorrect wrapping in some cases, but we can fix them later.
| * Merge branch 'master' into unicodeAdam Borowski2011-01-111-7/+12
| |\ | | | | | | | | | Conflicts galore...
| * \ Merge branch 'master' into unicodeAdam Borowski2010-11-091-3/+0
| |\ \
| * \ \ Merge branch 'master' into unicodeAdam Borowski2010-10-151-9/+9
| |\ \ \
| * | | | Fix tiles compilation.Adam Borowski2010-09-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | "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.
* | | | Initialize all readers with the sentinel TAG_MINOR_INVALID to catch attempts ↵Darshan Shaligram2011-01-031-2/+2
| | | | | | | | | | | | | | | | to use getMinorVersion() uninitialised.
* | | | Simplify tag minor version handling.Darshan Shaligram2011-01-031-5/+10
| |_|/ |/| | | | | | | | | | | | | | 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.
* | | Staticalize, remove cruft.Adam Borowski2010-10-271-3/+0
| |/ |/|
* | Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-9/+9
|/ | | | | | 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.
* Merge branch 'save-package'Adam Borowski2010-09-061-28/+28
|\
| * Rip away the multiple tags code.Adam Borowski2010-09-041-12/+1
| | | | | | | | | | | | 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!
| * Merge TAG_YOU_*, split out TAG_CHR.Adam Borowski2010-09-041-5/+2
| | | | | | | | | | | | | | 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.
| * Merge TAG_LEVEL_ITEMS, TAG_LEVEL_MONSTERS and TAG_LEVEL_TILES into TAG_LEVEL.Adam Borowski2010-09-041-4/+1
| | | | | | | | | | | | This is part 1 of removing multiple tag madness. Breaks save compat (well, if you bothered to import files into chunks so far...)
| * Store most save subfiles as chunks, except chr, lua, tdl.Adam Borowski2010-09-041-6/+15
| |
| * Use a pointer instead of a reference, since you.save will be everywhere.Adam Borowski2010-09-031-2/+2
| |
| * Support for writing tags as chunks.Adam Borowski2010-09-031-3/+11
| |
* | Rename class "monsters" to "monster".Robert Vollmert2010-09-051-2/+2
|/
* Rename chars used as numbers to int8_t/uint8_t. Fix some other type usage.Adam Borowski2010-07-301-11/+13
| | | | | | | | | | 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.
* Fix console compilation.David Lawrence Ramsey2010-07-301-0/+1
|
* Fix tiles compile (with rob).Eino Keskitalo2010-07-301-1/+0
| | | | | | Wizard-casting Detect Items seems to crash when it finds something. Signed-off-by: Eino Keskitalo <evktalo@users.sourceforge.net>
* Make map_cell store feat+cloud+item+mons instead of only the topmost one ↵Luca Barbieri2010-07-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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>
* Make monster_info store all the player's knowledge on a monster (v3)Luca Barbieri2010-07-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add support for (un)marshalling variable-sized integersLuca Barbieri2010-07-281-0/+17
| | | | | | | | | | | | | | | 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.
* When saving file "X", first save "X.tmp" and rename to "X" to avoid ↵Darshan Shaligram2010-06-271-4/+20
| | | | | | 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.
* Don't store monster attitudes as a separate tag. Breaks save compat.Adam Borowski2010-06-211-1/+0
|
* s/marshallLong/marshallInt/, since this confusion tends to cause bugs.Adam Borowski2010-06-201-2/+2
| | | | | | | 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...
* Move Sprint saves into $SAVEDIR/sprint.Darshan Shaligram2010-06-191-2/+6
| | | | | | | | | | | | | | | 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.
* Make Crawl react better to seeing des files and database text files modified ↵Darshan Shaligram2010-06-141-2/+7
| | | | | | | | | | | | | | | | | | 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.
* Bring sanity to enums by making them diffable/patchable.Adam Borowski2010-06-081-1/+1
|
* Some file output asserts.Robert Vollmert2010-06-081-2/+2
| | | | | These assert that writers actually get passed non-NULL file or buffer pointers.
* Add some asserts to unmarshall(C)String.Robert Vollmert2010-06-081-1/+0
| | | | | | | | 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).
* Add support for vaults in the Abyss, save vault metadata in the level save.Darshan Shaligram2010-06-061-1/+1
| | | | | | 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.
* Move TAG_{MINOR,MAJOR}_VERSION definitions to tag-version.h.Robert Vollmert2010-04-061-11/+2
| | | | | | | | 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.
* Bump major save version.David Lawrence Ramsey2010-04-041-3/+2
| | | | | Adding MUT_FEAST was an oversight, and deleting it from the middle of enum.h broke compatibility anyway.