Namespaces | |
| namespace | anonymous_namespace{usage_preview.cc} |
Classes | |
| struct | LiveRoomContext |
| struct | LoadedRoomSourceUses |
| struct | PreviewImage |
| struct | RoomTileReference |
| class | RoomUsagePreview |
| struct | SourceObjectUse |
| class | SpriteUsagePreview |
| class | Tile16UsagePreview |
Typedefs | |
| using | SheetPixels = std::map<uint16_t, std::vector<uint8_t>> |
| Sheet id -> 4096 8bpp pixels (the GameData::graphics_buffer layout). | |
| using | LiveRoomContexts = std::map<int, LiveRoomContext> |
| using | LiveRoomProvider = std::function<LiveRoomContexts()> |
Functions | |
| SheetPixels | SnapshotSessionSheets (const std::set< uint16_t > &ids, const zelda3::GameData *game_data) |
| SheetPixels | SnapshotArenaSheets (const std::set< uint16_t > &ids, const zelda3::GameData *game_data) |
| PreviewImage | SnapshotBitmap (const gfx::Bitmap &bitmap) |
| Copies a palettized Bitmap (for example a room composite). | |
| std::map< int, std::array< uint8_t, 16 > > | CollectRoomSheetBlocks (Rom *rom, zelda3::GameData *game_data, const std::map< int, zelda3::RoomGfxInfo > &rooms) |
| std::vector< int > | RoomsUsingSheet (const std::map< int, std::array< uint8_t, 16 > > &room_blocks, uint16_t sheet, bool include_sprites) |
| std::string | RoomContextLabel (const LiveRoomContext *live) |
| std::vector< SourceObjectUse > | FindSourceObjectUses (const std::vector< RoomTileReference > &references, const std::vector< GraphicsEditTarget > &targets, const zelda3::GameData *owner) |
| std::vector< LoadedRoomSourceUses > | FindLoadedRoomSourceUses (Rom *rom, zelda3::GameData *game_data, const LiveRoomContexts &rooms, const std::vector< GraphicsEditTarget > &targets) |
Variables | |
| constexpr size_t | kSheetBytes = 4096 |
| using yaze::editor::usage_preview::SheetPixels = std::map<uint16_t, std::vector<uint8_t>> |
Sheet id -> 4096 8bpp pixels (the GameData::graphics_buffer layout).
Definition at line 46 of file usage_preview.h.
| using yaze::editor::usage_preview::LiveRoomContexts = std::map<int, LiveRoomContext> |
Definition at line 88 of file usage_preview.h.
| using yaze::editor::usage_preview::LiveRoomProvider = std::function<LiveRoomContexts()> |
Definition at line 89 of file usage_preview.h.
| SheetPixels yaze::editor::usage_preview::SnapshotSessionSheets | ( | const std::set< uint16_t > & | ids, |
| const zelda3::GameData * | game_data ) |
Definition at line 37 of file usage_preview.cc.
References yaze::zelda3::GraphicsSheetStore::Sheet(), and yaze::zelda3::GraphicsSheetStoreHolder::sheet_store.
Referenced by yaze::editor::UsagePreviewView::HashWatchedSheets(), yaze::editor::OverworldEditor::OpenGraphicsForTile16Quadrant(), yaze::editor::sprite_graphics_context::RenderCapturedFrame(), and yaze::editor::UsagePreviewView::Snapshot().

| SheetPixels yaze::editor::usage_preview::SnapshotArenaSheets | ( | const std::set< uint16_t > & | ids, |
| const zelda3::GameData * | game_data ) |
Compatibility reader for Arena display copies, not authoritative pixels. Copies sheets in ids. Sheets that are not loaded or not 128x32 8bpp are left out. Returns nothing when the Arena holds another ROM's sheets (its owner is not game_data).
Definition at line 52 of file usage_preview.cc.
References yaze::gfx::Arena::Get(), and kSheetBytes.

| PreviewImage yaze::editor::usage_preview::SnapshotBitmap | ( | const gfx::Bitmap & | bitmap | ) |
Copies a palettized Bitmap (for example a room composite).
Definition at line 109 of file usage_preview.cc.
References yaze::editor::usage_preview::PreviewImage::colors, yaze::editor::usage_preview::PreviewImage::format, yaze::platform::GetSurfacePalette(), yaze::editor::usage_preview::PreviewImage::height, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gfx::Bitmap::IsIndexed(), yaze::editor::usage_preview::PreviewImage::kIndexed, yaze::editor::usage_preview::PreviewImage::kRgba, yaze::editor::usage_preview::PreviewImage::pixels, yaze::gfx::Bitmap::surface(), yaze::gfx::Bitmap::vector(), yaze::editor::usage_preview::PreviewImage::width, and yaze::gfx::Bitmap::width().
Referenced by yaze::editor::DungeonEditorV2::OpenGraphicsEditorForObject(), and yaze::editor::usage_preview::RoomUsagePreview::Snapshot().
| std::map< int, std::array< uint8_t, 16 > > yaze::editor::usage_preview::CollectRoomSheetBlocks | ( | Rom * | rom, |
| zelda3::GameData * | game_data, | ||
| const std::map< int, zelda3::RoomGfxInfo > & | rooms ) |
Graphics blocks (0-7 background, 8-15 sprites) per dungeon room, from Room::LoadRoomGraphics() with each room's header blockset and spriteset. Only the group tables are read; no room objects are loaded.
Definition at line 140 of file usage_preview.cc.
References yaze::zelda3::Room::blocks(), yaze::zelda3::Room::LoadRoomGraphics(), yaze::zelda3::Room::SetBlockset(), and yaze::zelda3::Room::SetSpriteset().
Referenced by yaze::editor::UsagePreviewView::EnsureTables().

| std::vector< int > yaze::editor::usage_preview::RoomsUsingSheet | ( | const std::map< int, std::array< uint8_t, 16 > > & | room_blocks, |
| uint16_t | sheet, | ||
| bool | include_sprites ) |
Rooms whose background blocks (or, with include_sprites, sprite blocks) contain sheet. Sorted by room id.
Definition at line 160 of file usage_preview.cc.
Referenced by yaze::editor::UsagePreviewView::RefreshRoomContexts().
| std::string yaze::editor::usage_preview::RoomContextLabel | ( | const LiveRoomContext * | live | ) |
Definition at line 174 of file usage_preview.cc.
References yaze::editor::usage_preview::LiveRoomContext::entrance_slot.
| std::vector< SourceObjectUse > yaze::editor::usage_preview::FindSourceObjectUses | ( | const std::vector< RoomTileReference > & | references, |
| const std::vector< GraphicsEditTarget > & | targets, | ||
| const zelda3::GameData * | owner ) |
Definition at line 182 of file usage_preview.cc.
Referenced by FindLoadedRoomSourceUses().
| std::vector< LoadedRoomSourceUses > yaze::editor::usage_preview::FindLoadedRoomSourceUses | ( | Rom * | rom, |
| zelda3::GameData * | game_data, | ||
| const LiveRoomContexts & | rooms, | ||
| const std::vector< GraphicsEditTarget > & | targets ) |
Definition at line 233 of file usage_preview.cc.
References yaze::editor::usage_preview::LoadedRoomSourceUses::error, FindSourceObjectUses(), yaze::editor::usage_preview::LoadedRoomSourceUses::objects, yaze::editor::usage_preview::LoadedRoomSourceUses::room_id, yaze::editor::usage_preview::RoomUsagePreview::tile_references(), yaze::editor::usage_preview::RoomUsagePreview::TraceLoadedRoom(), yaze::editor::usage_preview::RoomUsagePreview::unknown_objects(), and yaze::editor::usage_preview::LoadedRoomSourceUses::unknown_objects.
Referenced by yaze::editor::UsagePreviewView::ScanSharedUses().

|
constexpr |
Definition at line 43 of file usage_preview.h.
Referenced by yaze::editor::usage_preview::anonymous_namespace{usage_preview.cc}::CopySheet(), yaze::editor::usage_preview::SpriteUsagePreview::SheetOrRom(), and SnapshotArenaSheets().