diff options
author | Luca Barbieri <luca@luca-barbieri.com> | 2010-06-07 06:46:42 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-07-29 00:43:59 +0200 |
commit | af76f809d3f1679210469c3b194f1b06dc85536b (patch) | |
tree | eadc06efba7cf8bb94ab139fa3b8e5d538e6ef10 /crawl-ref/source/tags.h | |
parent | 7184b88d886d74490447b01699bd2f95dc9cc804 (diff) | |
download | crawl-ref-af76f809d3f1679210469c3b194f1b06dc85536b.tar.gz crawl-ref-af76f809d3f1679210469c3b194f1b06dc85536b.zip |
Make map_cell store feat+cloud+item+mons instead of only the topmost one (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>
Diffstat (limited to 'crawl-ref/source/tags.h')
-rw-r--r-- | crawl-ref/source/tags.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h index 4e6db8c300..f619b641d5 100644 --- a/crawl-ref/source/tags.h +++ b/crawl-ref/source/tags.h @@ -14,6 +14,7 @@ struct show_type; struct monster_info; +struct map_cell; enum tag_type // used during save/load process to identify data blocks { @@ -137,7 +138,7 @@ void marshallCoord (writer &, const coord_def &); void marshallItem (writer &, const item_def &); void marshallMonster (writer &, const monsters &); void marshallMonsterInfo (writer &, const monster_info &); -void marshallShowtype (writer &, const show_type &); +void marshallMapCell (writer &, const map_cell &); void marshallEnumVal (writer &, const enum_info *, int); @@ -195,7 +196,7 @@ coord_def unmarshallCoord (reader &); void unmarshallItem (reader &, item_def &item); void unmarshallMonster (reader &, monsters &item); void unmarshallMonsterInfo (reader &, monster_info &mi); -show_type unmarshallShowtype (reader &); +void unmarshallMapCell (reader &, map_cell& cell); int unmarshallEnumVal (reader &, const enum_info *); |