70 lines
1.8 KiB
C++
70 lines
1.8 KiB
C++
#ifndef YAZE_APP_EDITOR_GFX_GROUP_EDITOR_H
|
|
#define YAZE_APP_EDITOR_GFX_GROUP_EDITOR_H
|
|
|
|
#include <imgui/imgui.h>
|
|
|
|
#include <cmath>
|
|
|
|
#include "absl/status/status.h"
|
|
#include "absl/status/statusor.h"
|
|
#include "app/core/editor.h"
|
|
#include "app/editor/modules/palette_editor.h"
|
|
#include "app/gfx/bitmap.h"
|
|
#include "app/gfx/snes_palette.h"
|
|
#include "app/gfx/snes_tile.h"
|
|
#include "app/gui/canvas.h"
|
|
#include "app/gui/icons.h"
|
|
#include "app/gui/pipeline.h"
|
|
#include "app/gui/widgets.h"
|
|
#include "app/rom.h"
|
|
#include "app/zelda3/overworld.h"
|
|
|
|
namespace yaze {
|
|
namespace app {
|
|
namespace editor {
|
|
|
|
class GfxGroupEditor : public SharedROM {
|
|
public:
|
|
absl::Status Update();
|
|
|
|
void DrawBlocksetViewer(bool sheet_only = false);
|
|
void DrawRoomsetViewer();
|
|
void DrawSpritesetViewer(bool sheet_only = false);
|
|
void DrawPaletteViewer();
|
|
|
|
void SetSelectedBlockset(uint8_t blockset) { selected_blockset_ = blockset; }
|
|
void SetSelectedRoomset(uint8_t roomset) { selected_roomset_ = roomset; }
|
|
void SetSelectedSpriteset(uint8_t spriteset) {
|
|
selected_spriteset_ = spriteset;
|
|
}
|
|
|
|
void InitBlockset(gfx::Bitmap tile16_blockset);
|
|
|
|
private:
|
|
int preview_palette_id_ = 0;
|
|
int last_sheet_id_ = 0;
|
|
uint8_t selected_blockset_ = 0;
|
|
uint8_t selected_roomset_ = 0;
|
|
uint8_t selected_spriteset_ = 0;
|
|
|
|
PaletteEditor palette_editor_;
|
|
|
|
gui::Canvas blockset_canvas_;
|
|
gui::Canvas roomset_canvas_;
|
|
gui::Canvas spriteset_canvas_;
|
|
|
|
gfx::SnesPalette palette_;
|
|
gfx::PaletteGroup palette_group_;
|
|
gfx::Bitmap tile16_blockset_bmp_;
|
|
|
|
std::vector<Bytes> tile16_individual_data_;
|
|
std::vector<gfx::Bitmap> tile16_individual_;
|
|
|
|
gui::BitmapViewer gfx_group_viewer_;
|
|
zelda3::Overworld overworld_;
|
|
};
|
|
|
|
} // namespace editor
|
|
} // namespace app
|
|
} // namespace yaze
|
|
#endif // YAZE_APP_EDITOR_GFX_GROUP_EDITOR_H
|