| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This fixes all the instances caught by unbrace.
|
|
|
|
|
| |
map or set.count() can test the presence of a given key and return 0 or 1
outright.
|
|
|
|
|
|
|
| |
Over the years, there were only two unexplained corruptions, and I have
a hunch there's a hardware/OS error too: something that zeroes a part
of the file. Hard to tell without knowing more, so let's introduce
these checks.
|
|
|
|
| |
All it protects against is save corruption during power loss.
|
|
|
|
|
|
| |
This might be portability for portability sake (Solaris is so dead), but
come on, we can't disappoint Igor Pashev by porting our stuff later than
several hours after the first installable build of Dyson is released :)
|
|
|
|
|
| |
The temp file is still needed because the "game" might move through levels,
but a pre-deleted file is quite unlikely to require durable storage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2 files are added to the root of the repository:
* AndroidAppSettings.cfg: settings file required for Android SDL port. Will
change on each minor release to reset configuration.
* AndroidBuild.sh: script called by the Android SDL port to commence building
the game itself
It might be nice to be able to move them elsewhere, but for now, their
presence here is required.
The build process is documented in docs/develop/android.txt
There's a TOUCH_UI compiler flag which sets all the things specific to a
touch screen interface.
There has been a large amount of changes in the Makefile for redefining where
the dat/, saves/, etc. directories go, because the "install" part of the make
isn't the final destination for these files under Android - the environment we
deploy to is a separate device from the build environment.
There is also a number of changes to the tiles interface. Some are specific
to the TOUCH_UI, but others are also changed in USE_TILE_LOCAL.
Touch only:
* 'a'bilities menu goes straight to menu without prompting first
* tap menu header to toggle/submit
* menu instead of prompt to select which corpse to butcher
* same for eating food from the floor (those 2 could go in local tiles too)
* show_more defaults to false and less --more-- messages
* pickup mode defaults to menu
* defaults for tile_layout_priority is different (commands are more
important than inventory)
* popup for yes/no prompts, level-up stat gain and swapping rings (should
be used for all prompts, and probably local tiles too)
* spell casting: force selection menu
* map mode: left-click rather than right-click for mouse mode; autotravel on
left-click removed
* remove skills training and memorisation panels
Also local tiles (some could also be integrated in webtiles):
* commands below description are clickable
* clickable shopping menu (uses PrecisionMenu)
* split the command panel in 2 (common actions and system commands)
* add a map command panel
* tapping or left-clicking the player is smarter:
* picks up the item if there's one on the tile, otherwise
* shows pick-up menu if there's several items on the tile, otherwise
* traverses stairs (or enters a portal or shop) if one is present, otherwise
* prays if an altar is present, otherwise
* waits one turn
* right-clicking the map enters map mode and brings the map commands tab to
the front; map mode stays until exited rather than upon release of mouse
Some more details can be found in android_patch_notes.txt on #5677 (although
some TODOs are already obsolete).
Signed-off-by: Raphael Langella <raphael.langella@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 way, we can tell save corruption from reader corruption.
|
|
|
|
|
|
|
|
| |
It uses a temporary file for the save file. This fixes canned tests breaking
if a run has been aborted (and thus a save by that name exists), and also
allows concurrently running multiple instances of the same test.
Implies wizmode.
|
|
|
|
|
| |
While X[] did not leak, it's not the case for regular walking between
levels. This means, stair dancing can result in enormous saves.
|
|
|
|
|
|
|
|
|
|
|
| |
Crawl itself doesn't ever read and write at the same time (I doubt it ever
does more than one operation at once, too), but it just feels wrong to have
a known data-loss bug in code that's separable from the rest of Crawl.
By reusing already instantiated STL templates, this actually reduces binary
size somewhat.
This reverts commit ed9508da27c3ef0803bfd1e600465a5eb6566441.
|
|
|
|
|
|
| |
I'm not putting that in, as Crawl currently doesn't need this and every use
of std::map for a new pair of types enlarges the executable by 30KB stripped,
1.1MB unstripped.
|
|
|
|
|
|
|
|
|
| |
Actually, not even one as it won't be committed until the next time you go
to a new level. Subsequent writes of a given level in a transaction
overwrite the old uncommitted version.
This sadly can double the size of saves, if someone views all existing levels
in a game.
|
|
|
|
|
|
| |
Crawl never needs that, but if that ever changes (or someone reuses the
transactional filesystem-in-a-file elsewhere), there are potential problems
that, while easy to fix, would require that effort.
|
| |
|
| |
|
|
|
|
|
| |
The MSVC2010/ dir is omitted, since it doesn't work for me yet, and adding a
whole yet useless dir just before branching would be counterproductive. -- 1KB
|
|
|
|
| |
This worked correctly, but inefficiently.
|
|
|
|
|
|
|
|
|
|
|
| |
Pre-increment looks worse than post-increment, but on a C++ object the
latter forces an allocation plus copy that is completely unnecessary but the
compiler doesn't know that yet.
Note that I did change some of our iterators to return void rather than the old
or new value for exactly this performance reason before, breaking the expected
behaviour. If that's an issue, tell me, we can use preincrements instead which
have very little penalty.
|
| |
|
|
|
|
|
|
| |
Unlike my attempt a year ago, this version actually tries a block that fits,
rather than one that's just below what we need, so a tiny new fragment is
created in most cases, making things worse :p
|
| |
|
|\
| |
| |
| |
| | |
There are some issues left, like incorrect wrapping in some cases, but
we can fix them later.
|
| |\
| | |
| | |
| | | |
Conflicts galore...
|
| |\ \ |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Only iostreams functions are left; on Windows they don't support Unicode
so a workaround will be needed.
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
"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.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The on-disk format has been changed; the saves will be upgraded just fine
but old Crawls will be unable to read them.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
They are currently fatal and I doubt we'll ever bother to handle them
(out of disk being the most likely thing we could possibly do).
|
| | | | |
|
| |_|/
|/| | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On a busy disk, this can cause a pause of several seconds -- or a spin-up
on a laptop. Still, people do lose games to crashes from time to time.
This commit sacrifices performance for a full guarantee against system or
power crashes, as long as the underlying fsync() implementation isn't
broken (many network filesystems and certain ATA disks).
Neither CAO nor CDO ever had a system crash, so we give a guarantee
against Crawl's crashes only. As long as writes are not maliciously
reordered, this should be enough. With the loads they experience during
the Tourney, fsync()s would be murder.
(What about emergency saves? They can write possibly tainted data during
a crash, claiming it's kosher.)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Actually, I can't think of a case where such error won't be fatal, but then,
it leaves Crawl in a consistent state so we might in theory merely return to
menu (restart_after_game).
I'm fixing it mostly in case someone reuses the transactional packager for
some purpose other than Crawl.
|
| |
| |
| |
| |
| |
| | |
The save browser is likely to open many, especially if you have a lot
of old saves after a compat break. Actually running out of descriptors
would require a bizarre case, but a bug is a bug...
|
| |
| |
| |
| |
| |
| | |
This fixes --edit-save foo repack on Windows, and is safer in case the
player's name ever changes (might be possible if we add that "read morgue"
functionality).
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
twice.
This fixes Mantis 2061.
I did not reuse the existing lk_open() because it's non-portable, waits for the
lock to become available and works using FILE* not a descriptor (bad for random
access).
|
|
|
|
|
|
|
|
| |
They apply only to the core internal format whose code is pretty solid
(stress-tested on hundreds of millions of random operations), and the file
gets fscked on rw opens anyway.
It's code outside of package.cc which could use better checks.
|
| |
|
| |
|