1 #include "map_memory.h"
2 
3 static const memorized_terrain_tile default_tile{ "", 0, 0 };
4 
get_tile(const tripoint & pos) const5 memorized_terrain_tile map_memory::get_tile( const tripoint &pos ) const
6 {
7     return tile_cache.get( pos, default_tile );
8 }
9 
memorize_tile(int limit,const tripoint & pos,const std::string & ter,const int subtile,const int rotation)10 void map_memory::memorize_tile( int limit, const tripoint &pos, const std::string &ter,
11                                 const int subtile, const int rotation )
12 {
13     tile_cache.insert( limit, pos, memorized_terrain_tile{ ter, subtile, rotation } );
14 }
15 
get_symbol(const tripoint & pos) const16 int map_memory::get_symbol( const tripoint &pos ) const
17 {
18     return symbol_cache.get( pos, 0 );
19 }
20 
memorize_symbol(int limit,const tripoint & pos,const int symbol)21 void map_memory::memorize_symbol( int limit, const tripoint &pos, const int symbol )
22 {
23     symbol_cache.insert( limit, pos, symbol );
24 }
25 
clear_memorized_tile(const tripoint & pos)26 void map_memory::clear_memorized_tile( const tripoint &pos )
27 {
28     tile_cache.remove( pos );
29     symbol_cache.remove( pos );
30 }
31