1#ifndef YAZE_APP_EDITOR_GRAPHICS_UI_USAGE_USAGE_PREVIEW_VIEW_H
2#define YAZE_APP_EDITOR_GRAPHICS_UI_USAGE_USAGE_PREVIEW_VIEW_H
67 float max_scale,
bool fit_height =
false);
88 std::optional<std::map<int, zelda3::OverworldAreaGfxInfo>>
areas_;
113 std::optional<zsprite::ZSprite>
zsm_;
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Shared state between GraphicsEditor panel components.
Shows how the game uses the current graphics sheet while it is edited: a room that loads it,...
std::optional< zsprite::ZSprite > zsm_
gfx::Bitmap source_bitmap_
usage_preview::SheetPixels Snapshot() const
static constexpr double kMinRenderInterval
uint64_t palette_revision_
uint64_t sprite_palette_revision_
void DrawBitmapFit(gfx::Bitmap &bitmap, const std::vector< SDL_Rect > &rects, float max_scale, bool fit_height=false)
bool shared_whole_pattern_
usage_preview::RoomUsagePreview shared_room_preview_
GraphicsEditorState * state_
usage_preview::LiveRoomProvider live_rooms_provider_
uint64_t source_context_revision_
std::optional< std::map< int, zelda3::OverworldAreaGfxInfo > > areas_
std::vector< GraphicsEditTarget > shared_targets_
void ShowImage(gfx::Bitmap &bitmap, const usage_preview::PreviewImage &image)
friend class UsagePreviewViewTestPeer
zelda3::GameData * game_data_
absl::Status ScanSharedUses(const usage_preview::LiveRoomContexts &rooms)
std::string zsm_loaded_path_
void DrawSourcePreview(bool show_controls=true)
std::string shared_scan_status_
double source_render_time_
void SetHackName(std::string hack_name)
void DrawSpriteContext(bool render_now, float delta)
uint64_t HashWatchedSheets(bool include_room_context) const
uint64_t shared_scan_hash_
std::vector< int > spritesets_for_sheet_
uint64_t rendered_source_revision_
std::string source_status_
std::vector< int > rooms_for_sheet_
void DrawRoomContext(bool render_now)
uint64_t SharedUsesHash(const usage_preview::LiveRoomContexts &rooms) const
std::map< int, uint64_t > live_room_revisions_
std::vector< SDL_Rect > tile16_highlights_
void SetLiveRoomProvider(usage_preview::LiveRoomProvider provider)
gfx::Bitmap tile16_bitmap_
void RefreshRoomContexts()
uint64_t source_palette_revision_
int configured_spriteset_
std::map< int, zelda3::RoomGfxInfo > room_gfx_
std::map< int, std::array< uint8_t, 16 > > room_blocks_
int SelectedTileIndex() const
void SetGameData(zelda3::GameData *game_data)
void DrawTile16Context(bool render_now)
friend class AuthoringSaveWorkflowTestPeer
size_t shared_preview_object_
gfx::Bitmap sprite_bitmap_
usage_preview::RoomUsagePreview room_preview_
std::map< int, std::array< uint8_t, 16 > > fallback_room_blocks_
std::vector< int > areas_for_sheet_
UsagePreviewView(GraphicsEditorState *state)
std::vector< usage_preview::LoadedRoomSourceUses > shared_uses_
usage_preview::Tile16UsagePreview tile16_preview_
std::vector< int > tile16s_
std::vector< SDL_Rect > object_rects_
usage_preview::SpriteUsagePreview sprite_preview_
usage_preview::LiveRoomContexts live_rooms_
Represents a bitmap image optimized for SNES ROM hacking.
Which graphics sheets exist, which tables use them, and which 16x16 blocks are free.
std::map< uint16_t, std::vector< uint8_t > > SheetPixels
Sheet id -> 4096 8bpp pixels (the GameData::graphics_buffer layout).
std::function< LiveRoomContexts()> LiveRoomProvider
std::map< int, LiveRoomContext > LiveRoomContexts
Editors are the view controllers for the application.
Renders a graphics sheet the way the game uses it, from unsaved sheet pixels, without writing the ROM...