returns true if this level has something interesting to print out */
| 2877 | |
| 2878 | /* returns true if this level has something interesting to print out */ |
| 2879 | staticfn boolean |
| 2880 | interest_mapseen(mapseen *mptr) |
| 2881 | { |
| 2882 | if (on_level(&u.uz, &mptr->lev)) |
| 2883 | return TRUE; |
| 2884 | if (mptr->flags.notreachable || mptr->flags.forgot) |
| 2885 | return FALSE; |
| 2886 | /* when in tutorial, show all tutorial levels visited whether interesting |
| 2887 | or not and don't show any other levels; when outside tutorial, don't |
| 2888 | show any tutorial levels even if they're considered interesting */ |
| 2889 | if (In_tutorial(&u.uz)) { |
| 2890 | return In_tutorial(&mptr->lev); |
| 2891 | } else { |
| 2892 | if (In_tutorial(&mptr->lev)) |
| 2893 | return FALSE; |
| 2894 | } |
| 2895 | /* level is of interest if it has an auto-generated annotation */ |
| 2896 | if (mptr->flags.oracle || mptr->flags.bigroom || mptr->flags.roguelevel |
| 2897 | || mptr->flags.castle || mptr->flags.valley |
| 2898 | || mptr->flags.msanctum || mptr->flags.vibrating_square |
| 2899 | || mptr->flags.quest_summons || mptr->flags.questing) |
| 2900 | return TRUE; |
| 2901 | /* when in Sokoban, list all sokoban levels visited; when not in it, |
| 2902 | list any visited Sokoban level which remains unsolved (will usually |
| 2903 | only be furthest one reached, but it's possible to enter pits and |
| 2904 | climb out on the far side on the first Sokoban level; also, wizard |
| 2905 | mode overrides teleport restrictions) */ |
| 2906 | if (In_sokoban(&mptr->lev) |
| 2907 | && (In_sokoban(&u.uz) || !mptr->flags.sokosolved)) |
| 2908 | return TRUE; |
| 2909 | /* when in the endgame, list all endgame levels visited, whether they |
| 2910 | have annotations or not, so that #overview doesn't become extremely |
| 2911 | sparse once the rest of the dungeon has been flagged as notreachable */ |
| 2912 | if (In_endgame(&u.uz)) |
| 2913 | return (boolean) In_endgame(&mptr->lev); |
| 2914 | /* level is of interest if it has non-zero feature count or known bones |
| 2915 | or user annotation or known connection to another dungeon branch |
| 2916 | or is the furthest level reached in its branch */ |
| 2917 | return (boolean) (OF_INTEREST(mptr->feat) |
| 2918 | || (mptr->final_resting_place |
| 2919 | && (mptr->flags.knownbones || wizard)) |
| 2920 | || mptr->custom || mptr->br |
| 2921 | || (mptr->lev.dlevel |
| 2922 | == svd.dungeons[mptr->lev.dnum].dunlev_ureached)); |
| 2923 | } |
| 2924 | |
| 2925 | /* update the lastseentyp at x,y */ |
| 2926 | void |
no test coverage detected