Renders a graphics sheet the way the game uses it, from unsaved sheet pixels, without writing the ROM or GameData. More...
#include <array>#include <cstdint>#include <functional>#include <map>#include <memory>#include <optional>#include <set>#include <string>#include <vector>#include "absl/status/status.h"#include "app/editor/graphics/graphics_edit_context.h"#include "app/editor/graphics/graphics_preview_image.h"#include "app/editor/sprite/zsprite.h"#include "app/gfx/core/bitmap.h"#include "app/gfx/types/snes_tile.h"#include "rom/rom.h"#include "zelda3/dungeon/room.h"#include "zelda3/game_data.h"#include "zelda3/gfx_sheet_inventory.h"#include "zelda3/overworld/overworld_map.h"
Go to the source code of this file.
Namespaces | |
| namespace | yaze |
| namespace | yaze::editor |
| Editors are the view controllers for the application. | |
| namespace | yaze::editor::usage_preview |
Typedefs | |
| using | yaze::editor::usage_preview::SheetPixels = std::map<uint16_t, std::vector<uint8_t>> |
| Sheet id -> 4096 8bpp pixels (the GameData::graphics_buffer layout). | |
| using | yaze::editor::usage_preview::LiveRoomContexts = std::map<int, LiveRoomContext> |
| using | yaze::editor::usage_preview::LiveRoomProvider = std::function<LiveRoomContexts()> |
Variables | |
| constexpr size_t | yaze::editor::usage_preview::kSheetBytes = 4096 |
Renders a graphics sheet the way the game uses it, from unsaved sheet pixels, without writing the ROM or GameData.
Every context reuses an existing renderer: rooms go through Room's RenderRoomGraphics/RenderComposite, vanilla sprites through Sprite::RenderPreviewGraphics, .zsm frames through SpriteDrawer, and tile16s through OverworldMap::BuildTileset/BuildTiles16Gfx. Edited sheets reach them through the renderers' SetGraphicsSheetOverrides() hooks.
No ImGui here, so tests and offscreen captures drive the same code the Usage Preview panel draws.
Definition in file usage_preview.h.