summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilemcache.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix a crash with draconians with shields in tiles (#6340, #6345).Florian Diebold2012-11-081-1/+1
| | | | | | | | | The addition of shields made draconians use 4 tiles, but MAX_INFO_COUNT was still 3. That didn't cause problems when optimizations were disabled (probably because there was padding between stack frames), but in optimized binaries it led to overwriting the this pointer of a previous stack frame, which caused the crashes. Fun.
* Remove unnecessary includes from header files.Jay3.14152012-10-231-1/+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-1/+1
| | | | | | | | | | | | | 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.
* Don't read the mcache in any case; drop unmarshalling code.Adam Borowski2011-12-291-6/+0
| | | | | | It was read only to be immediately dropped, this would be important if there'd be any valuable data in the chunk after it but it happens that there is nothing relevant.
* Don't save the mcache; save monster_infos completely.Florian Diebold2011-11-231-3/+4
| | | | | | | | | | | | monster_info fields that were previously not saved: draco_type, holi, mintel, mresists, mitemuse, mbase_speed, two_weapons, no_regen, the inventory and the ghost data. monster_info::pos on the other hand is not saved anymore (it is regenerated after loading). Monster tiles are now always regenerated from the monster_info after loading. This still doesn't completely remove the need to save tile_bk_{f,b}g, though; for example, the necessary data for cloud tile picking is not yet in map_cell. We're not far from that, though.
* Use monster_info instead of monster for tile picking.Florian Diebold2011-11-231-1/+1
| | | | | | | | See #4280. This will allow regenerating tiles out of view from the map_knowledge, and we won't need to save the mcache anymore. There are still a few uses of monster in the interface code, which will have to be hunted down.
* Repair saves with bad saved mcache values.Adam Borowski2011-08-121-1/+1
| | | | | | | It can result in wrong tiles or lost weapon/enchantment markers, but at least there won't be a crash. (Please revert in trunk in a while, we want this assertion to stay.)
* Upon invalidating mcache, remove all references to it as well.Adam Borowski2011-08-121-0/+1
| | | | | | | | Otherwise, it's possible a new monster will occupy a slot we have a dangling reference to -- and then get decremented, triggering an assert. Really, now that we have map_knowledge, we shouldn't save the mcache nor the references at all, but that's 0.10 stuff.
* 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.
* Fix the struct/class clang warnings for tiles, too.Adam Borowski2011-01-081-1/+1
| | | | I'm unable to test optimized builds as clang (trunk) crashes during compilation.
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-1/+1
|
* Replace mcache max tiles magic number with enum.Enne Walker2010-06-011-1/+7
|
* Split up tiles.h.Enne Walker2010-05-301-0/+2
| | | | | | Most of it has gone into tilepick.h, but also into enum.h and initfile.cc. Unlike tiles.h which was included everywhere, tilepick.h is now only a dependency of about half the files.
* Use tileidx_t for tile indices. Also, cleanup.Enne Walker2010-05-301-3/+3
| | | | | | | | This new type defines to unsigned int, but it cleans up a lot of the int/unsigned int/short confusion all over the codebase for tile indices. This commit also cleans up tiles code to use coord_def more and to change function signatures to pass const refs and non-const pointers.
* Tile transparency in water without overlays.Enne Walker2010-01-171-0/+2
| | | | | | | | | | | | | | | | | In order for jpeg's waves to work on deep water as well as shallow, we need to not use partially transparent overlays to simulate an actor or an item being submerged. Now, non-flying objects on water will be drawn transparently to blend with the water below. This should mostly look the same, except it will now work on top of waves and will not require a mask for each water type. As a nice side-effect, ghosts are now transparent again and the water on top of submerged objects now animates properly. See the comments in tilebuf.cc for details. The mask tile itself can be adjusted to change the water level, but the parameters to SubmergedTileBuffer will need to be changed to compensate depending on what the new art looks like.
* Remove AppHdr.h from header filesMatthew Cline2009-11-011-1/+0
| | | | | gcc precompiled headers didn't work properly if AppHdr.h was included in include files, or included twice.
* Add whitespace fixes.dolorous2008-09-281-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7054 c06c8d41-db1a-0410-9941-cceddc491573
* Incorporating new tiles from Denzi/Mitsuhiro. Rings and amulets now have ↵ennewalker2008-09-121-1/+1
| | | | | | labels when identified. Centaurs/yaktaurs now display the weapon they're wielding (and look better too). Variations of weapons and armor (i.e. normal, shiny, randart) are now determined automatically from the tile definitions, rather than being hardcoded. Also, improved axe tiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6910 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles mcache improvements. Monsters out of sight are now shown with their ↵ennewalker2008-09-061-0/+80
last seen equipment. Player ghosts are now drawn correctly again. Denzi's new 48x32 pandemonium demon tiles are now used. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6875 c06c8d41-db1a-0410-9941-cceddc491573