MCPcopy Create free account
hub / github.com/davemoore22/sorcery / _draw_loading_progress

Method _draw_loading_progress

src/core/ui.cpp:3880–3906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3878 constexpr auto tc{20};
3879 const auto map_c{components->get("automap:map_graphic")};
3880 const ImVec2 top_left_pos{map_c.x * adj_grid_w, map_c.y * adj_grid_h};
3881 const auto spacing{map_c.get_int("tile_spacing")};
3882 const ImVec2 tile_sz{map_c.get_int("tile_size"),
3883 map_c.get_int("tile_size")};
3884
3885 // Remember to flip in Y-direction as (0,0) is at bottom left of map
3886 const auto reverse_y{(tile_sz.x * tc) + ((tc - 1) * spacing) + 2};
3887
3888 for (auto y = 0; y < tc; ++y) {
3889 for (auto x = 0; x < tc; ++x) {
3890
3891 if (const Coordinate loc{x, y}; !explored.at(loc))
3892 continue;
3893
3894 const auto &tile{level->at(x, y)};
3895 const auto tile_x{(x * tile_sz.x) + (x * spacing)};
3896 const auto tile_y{(y * tile_sz.y) + (y * spacing)};
3897
3898 const ImVec2 tile_pos{top_left_pos.x + tile_x,
3899 top_left_pos.y + reverse_y - tile_y};
3900
3901 _draw_map_tile(tile, tile_pos, tile_sz);
3902 }
3903 }
3904
3905 auto player_icon{ICON_COMPASS_NORTH};
3906 auto tint{ImVec4{0.33f, 1.0f, 1.0f, _ctx.animation->fade}};
3907
3908 switch (_ctx.game->state->get_player_facing()) {
3909 using enum Enums::Map::Direction;

Callers

nothing calls this directly

Calls 3

with_WindowFunction · 0.85
get_default_fontMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected