Current graphics set overworld editor

This commit is contained in:
scawful
2022-07-24 10:14:12 -04:00
parent 7d08970a19
commit 835c898c48
2 changed files with 8 additions and 2 deletions

View File

@@ -281,11 +281,16 @@ void OverworldEditor::DrawTile8Selector() {
void OverworldEditor::DrawAreaGraphics() {
if (overworld_.isLoaded()) {
static bool set_loaded = false;
if (!set_loaded) {
current_graphics_set_ =
overworld_.GetOverworldMap(0).GetCurrentGraphicsSet();
set_loaded = true;
}
current_gfx_canvas_.DrawBackground(ImVec2(256 + 1, 16 * 64 + 1));
current_gfx_canvas_.UpdateContext();
current_gfx_canvas_.DrawGrid();
for (const auto &[key, value] :
overworld_.GetOverworldMap(0).GetCurrentGraphicsSet()) {
for (const auto &[key, value] : current_graphics_set_) {
int offset = 64 * (key + 1);
int top_left_y = current_gfx_canvas_.GetZeroPoint().y + 2;
if (key >= 1) {