| 197 | } |
| 198 | |
| 199 | void CommandRegion::update() |
| 200 | { |
| 201 | m_items.clear(); |
| 202 | m_dirty = true; |
| 203 | |
| 204 | if (mx * my == 0) |
| 205 | return; |
| 206 | |
| 207 | const bool safe = i_feel_safe(false); |
| 208 | |
| 209 | for (int idx = 0; idx < n_common_commands; ++idx) |
| 210 | { |
| 211 | command_type cmd = _common_commands[idx]; |
| 212 | |
| 213 | // hackily toggle between display map and exit map display depending |
| 214 | // on whether we are in map mode |
| 215 | if (cmd == CMD_DISPLAY_MAP && tiles.get_map_display()) |
| 216 | cmd = CMD_MAP_EXIT_MAP; |
| 217 | |
| 218 | InventoryTile desc; |
| 219 | desc.tile = tileidx_command(cmd); |
| 220 | desc.idx = cmd; |
| 221 | |
| 222 | // Auto-explore while monsters around etc. |
| 223 | if (tile_command_not_applicable(cmd, safe)) |
| 224 | desc.flag |= TILEI_FLAG_INVALID; |
| 225 | |
| 226 | m_items.push_back(desc); |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | #endif |
nothing calls this directly
no test coverage detected