I've noticed an interesting side effect of this change. When a save file has
its maps messed up due to new version having new tiles, if you load it in
console, and then back in tiles, the map of the current level is fixed.
Could we automate that? If we detect that tiles have been changed, then
reload the map? That would be nice for tiles player of trunk.

Raphaƫl

2010/12/14 jpeg <j-p-...@users.sourceforge.net>

>       via  718bcb9d3775cf76b54a5b97915798404a05e29c (commit)
>      from  a3da847f028ccdb3be013d014f0fa0be2443c0fc (commit)
>
> -----------------------------------------------------------------------
> commit 718bcb9d3775cf76b54a5b97915798404a05e29c
> Author: Johanna Ploog <j-p-...@users.sourceforge.net>
> Date:   Tue Dec 14 00:26:02 2010 +0100
>
>    Fix #2754: switching from console to tiles now displays map properly.
>
> -----------------------------------------------------------------------
>
> Summary of changes:
>  crawl-ref/source/tags.cc     |    3 ++-
>  crawl-ref/source/tileview.cc |    4 ++--
>  crawl-ref/source/tileview.h  |    7 ++++++-
>  3 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
> index 3b2c644..2f9a067 100644
> --- a/crawl-ref/source/tags.cc
> +++ b/crawl-ref/source/tags.cc
> @@ -3031,6 +3031,7 @@ void tag_read_level_tiles(reader &th)
>         return;
>     }
>  #ifdef USE_TILE
> +    // Initialise env settings.
>     for (int i = 0; i < GXM; i++)
>         for (int j = 0; j < GYM; j++)
>         {
> @@ -3126,7 +3127,7 @@ static void tag_missing_level_tiles()
>
>     mcache.clear_all();
>
> -    tile_new_level(true);
> +    tile_new_level(true, false);
>  #endif
>  }
>
> diff --git a/crawl-ref/source/tileview.cc b/crawl-ref/source/tileview.cc
> index 64d3551..6de4930 100644
> --- a/crawl-ref/source/tileview.cc
> +++ b/crawl-ref/source/tileview.cc
> @@ -25,7 +25,7 @@
>  #include "travel.h"
>  #include "viewgeom.h"
>
> -void tile_new_level(bool first_time)
> +void tile_new_level(bool first_time, bool init_unseen)
>  {
>     tiles.clear_minimap();
>
> @@ -36,7 +36,7 @@ void tile_new_level(bool first_time)
>     if (first_time)
>         tile_init_flavour();
>
> -    if (!player_in_mappable_area() || first_time)
> +    if (!player_in_mappable_area() || init_unseen)
>     {
>         for (unsigned int x = 0; x < GXM; x++)
>             for (unsigned int y = 0; y < GYM; y++)
> diff --git a/crawl-ref/source/tileview.h b/crawl-ref/source/tileview.h
> index 818741b..1555b0d 100644
> --- a/crawl-ref/source/tileview.h
> +++ b/crawl-ref/source/tileview.h
> @@ -19,7 +19,12 @@ class monster;
>  class tile_flavour;
>
>  // Initialize the flavour and the tile env when changing or creating
> levels.
> -void tile_new_level(bool first_time);
> +void tile_new_level(bool first_time, bool init_unseen);
> +
> +inline void tile_new_level(bool first_time)
> +{
> +    return tile_new_level(first_time, first_time);
> +}
>
>  // Tile flavour
>
>
> --
> Dungeon Crawl Stone Soup
>
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Crawl-ref-commits mailing list
> crawl-ref-comm...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/crawl-ref-commits
>
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Crawl-ref-discuss mailing list
Crawl-ref-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss

Reply via email to