yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
sheet_png_transfer.h File Reference

PNG export and import for the Graphics editor. More...

#include <cstdint>
#include <string>
#include <vector>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "zelda3/gfx_sheet_png.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  yaze::editor::SheetPngImportPreview
 One sheet's pixels after an import, and what changed. More...
 

Namespaces

namespace  yaze
 
namespace  yaze::editor
 Editors are the view controllers for the application.
 

Functions

absl::StatusOr< std::vector< uint8_t > > yaze::editor::ExportSheetPixelsPng (uint16_t sheet_id, const std::vector< uint8_t > &indexed_pixels, const zelda3::SheetPalette &palette)
 
absl::StatusOr< SheetPngImportPreview > yaze::editor::PreviewSheetPngImport (uint16_t sheet_id, const std::vector< uint8_t > &indexed_pixels, const std::vector< uint8_t > &png_bytes, const zelda3::SheetPalette &palette, int first_block)
 
absl::StatusOr< std::vector< SheetPngImportPreview > > yaze::editor::PreviewRoomPngImport (const Rom &rom, const zelda3::RoomBackgroundSet &set, const std::vector< uint8_t > &png_bytes, const zelda3::SheetPalette &palette)
 
absl::Status yaze::editor::ApplySheetPngImport (const SheetPngImportPreview &preview, GraphicsEditorState &state, UndoManager *undo_manager)
 
std::string yaze::editor::DescribeSheetPngImport (const SheetPngImportPreview &preview)
 "Sheet 0x20: blocks 0, 3 (5 tiles)" for the preview list.
 

Detailed Description

PNG export and import for the Graphics editor.

These work on 128x32 sheets with one index 0-7 per pixel, including unsaved pixel edits. An import writes the session's GraphicsSheetStore (which refreshes the Arena copy) and marks the sheet modified; the ROM is written by GraphicsEditor::Save, which re-encodes the sheet in place or relocates it with rollback.

Definition in file sheet_png_transfer.h.