Current graphics set overworld editor
This commit is contained in:
@@ -281,11 +281,16 @@ void OverworldEditor::DrawTile8Selector() {
|
|||||||
|
|
||||||
void OverworldEditor::DrawAreaGraphics() {
|
void OverworldEditor::DrawAreaGraphics() {
|
||||||
if (overworld_.isLoaded()) {
|
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_.DrawBackground(ImVec2(256 + 1, 16 * 64 + 1));
|
||||||
current_gfx_canvas_.UpdateContext();
|
current_gfx_canvas_.UpdateContext();
|
||||||
current_gfx_canvas_.DrawGrid();
|
current_gfx_canvas_.DrawGrid();
|
||||||
for (const auto &[key, value] :
|
for (const auto &[key, value] : current_graphics_set_) {
|
||||||
overworld_.GetOverworldMap(0).GetCurrentGraphicsSet()) {
|
|
||||||
int offset = 64 * (key + 1);
|
int offset = 64 * (key + 1);
|
||||||
int top_left_y = current_gfx_canvas_.GetZeroPoint().y + 2;
|
int top_left_y = current_gfx_canvas_.GetZeroPoint().y + 2;
|
||||||
if (key >= 1) {
|
if (key >= 1) {
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ class OverworldEditor {
|
|||||||
|
|
||||||
std::unordered_map<unsigned int, gfx::Bitmap> graphics_bin_;
|
std::unordered_map<unsigned int, gfx::Bitmap> graphics_bin_;
|
||||||
absl::flat_hash_map<int, gfx::Bitmap> graphics_bin_v2_;
|
absl::flat_hash_map<int, gfx::Bitmap> graphics_bin_v2_;
|
||||||
|
absl::flat_hash_map<int, gfx::Bitmap> current_graphics_set_;
|
||||||
|
|
||||||
ROM rom_;
|
ROM rom_;
|
||||||
zelda3::Overworld overworld_;
|
zelda3::Overworld overworld_;
|
||||||
|
|||||||
Reference in New Issue
Block a user