Refactor DungeonEditor to use std::array for gfx sheets
This commit is contained in:
@@ -109,7 +109,7 @@ absl::Status DungeonEditor::Initialize() {
|
|||||||
ASSIGN_OR_RETURN(current_palette_group_,
|
ASSIGN_OR_RETURN(current_palette_group_,
|
||||||
gfx::CreatePaletteGroupFromLargePalette(full_palette_));
|
gfx::CreatePaletteGroupFromLargePalette(full_palette_));
|
||||||
|
|
||||||
graphics_bin_ = *rom()->mutable_bitmap_manager();
|
graphics_bin_ = rom()->gfx_sheets();
|
||||||
// Create a vector of pointers to the current block bitmaps
|
// Create a vector of pointers to the current block bitmaps
|
||||||
for (int block : rooms_[current_room_id_].blocks()) {
|
for (int block : rooms_[current_room_id_].blocks()) {
|
||||||
room_gfx_sheets_.emplace_back(&graphics_bin_[block]);
|
room_gfx_sheets_.emplace_back(&graphics_bin_[block]);
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef YAZE_APP_EDITOR_DUNGEONEDITOR_H
|
#ifndef YAZE_APP_EDITOR_DUNGEONEDITOR_H
|
||||||
#define YAZE_APP_EDITOR_DUNGEONEDITOR_H
|
#define YAZE_APP_EDITOR_DUNGEONEDITOR_H
|
||||||
|
|
||||||
#include "imgui/imgui.h"
|
|
||||||
|
|
||||||
#include "app/core/common.h"
|
#include "app/core/common.h"
|
||||||
#include "app/core/labeling.h"
|
#include "app/core/labeling.h"
|
||||||
#include "app/editor/graphics/gfx_group_editor.h"
|
#include "app/editor/graphics/gfx_group_editor.h"
|
||||||
@@ -11,6 +9,7 @@
|
|||||||
#include "app/gui/canvas.h"
|
#include "app/gui/canvas.h"
|
||||||
#include "app/gui/icons.h"
|
#include "app/gui/icons.h"
|
||||||
#include "app/rom.h"
|
#include "app/rom.h"
|
||||||
|
#include "imgui/imgui.h"
|
||||||
#include "zelda3/dungeon/room.h"
|
#include "zelda3/dungeon/room.h"
|
||||||
#include "zelda3/dungeon/room_entrance.h"
|
#include "zelda3/dungeon/room_entrance.h"
|
||||||
#include "zelda3/dungeon/room_object.h"
|
#include "zelda3/dungeon/room_object.h"
|
||||||
@@ -120,7 +119,7 @@ class DungeonEditor : public Editor,
|
|||||||
gui::Canvas object_canvas_;
|
gui::Canvas object_canvas_;
|
||||||
|
|
||||||
gfx::Bitmap room_gfx_bmp_;
|
gfx::Bitmap room_gfx_bmp_;
|
||||||
gfx::BitmapManager graphics_bin_;
|
std::array<gfx::Bitmap, kNumGfxSheets> graphics_bin_;
|
||||||
|
|
||||||
std::vector<gfx::Bitmap*> room_gfx_sheets_;
|
std::vector<gfx::Bitmap*> room_gfx_sheets_;
|
||||||
std::vector<zelda3::dungeon::Room> rooms_;
|
std::vector<zelda3::dungeon::Room> rooms_;
|
||||||
|
|||||||
Reference in New Issue
Block a user