yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
gfx_sheet_png.cc File Reference
#include "zelda3/gfx_sheet_png.h"
#include <algorithm>
#include <map>
#include <string>
#include "absl/status/status.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include "app/gfx/types/snes_tile.h"
#include "util/macro.h"
#include "zelda3/dungeon/room.h"
#include "zelda3/game_data.h"
#include "zelda3/gfx_sheet_inventory.h"
#include "zelda3/gfx_sheet_storage.h"

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::zelda3
 Zelda 3 specific classes and functions.
 
namespace  yaze::zelda3::anonymous_namespace{gfx_sheet_png.cc}
 

Functions

std::pair< int, int > yaze::zelda3::anonymous_namespace{gfx_sheet_png.cc}::BlockOrigin (int block)
 
SheetColor yaze::zelda3::anonymous_namespace{gfx_sheet_png.cc}::ToSheetColor (const SDL_Color &color)
 
absl::StatusOr< Room > yaze::zelda3::anonymous_namespace{gfx_sheet_png.cc}::LoadRoomWithPalettes (Rom &rom, GameData &data, int room)
 
SheetPalette yaze::zelda3::GrayscaleSheetPalette ()
 
absl::StatusOr< SheetPalette > yaze::zelda3::RoomBackgroundSheetPalette (Rom &rom, GameData &data, int room, int row)
 
absl::StatusOr< SheetPalette > yaze::zelda3::RoomSpriteSheetPalette (Rom &rom, GameData &data, int room, int row)
 Sprite palette row (OAM palette 0-7, CGRAM row 8 + row) of room room.
 
absl::StatusOr< std::vector< uint8_t > > yaze::zelda3::ExportSheetBlocksPng (const std::vector< uint8_t > &snes_3bpp, const SheetPalette &palette, int first_block, int block_count)
 
absl::StatusOr< SheetImportResult > yaze::zelda3::ImportSheetBlocksPng (const std::vector< uint8_t > &snes_3bpp, const util::PngImage &png, int first_block, const SheetPalette &palette)
 Places a PNG's 16x16 blocks over a sheet from first_block.
 
RoomBackgroundSet yaze::zelda3::ResolveRoomBackgroundSet (const GameData &data, int room, uint8_t header_blockset)
 
absl::StatusOr< RoomSheetPaletteContext > yaze::zelda3::ResolveRoomSheetPalette (Rom &rom, GameData &data, int room, int slot, int row)
 
std::vector< RoomBackgroundSet > yaze::zelda3::ResolveAllRoomBackgroundSets (const Rom &rom, const GameData &data)
 All 296 rooms' background sets (header bytes read from the ROM).
 
absl::StatusOr< std::vector< uint8_t > > yaze::zelda3::ExportRoomBackgroundPng (const Rom &rom, const RoomBackgroundSet &set, const SheetPalette &palette)
 
absl::StatusOr< std::vector< RoomSheetImport > > yaze::zelda3::ImportRoomBackgroundPng (const Rom &rom, const RoomBackgroundSet &set, const util::PngImage &png, const SheetPalette &palette)
 

Variables

constexpr int yaze::zelda3::anonymous_namespace{gfx_sheet_png.cc}::kSheetWidth = 128
 
constexpr int yaze::zelda3::anonymous_namespace{gfx_sheet_png.cc}::kSheetHeight = 32
 
constexpr int yaze::zelda3::anonymous_namespace{gfx_sheet_png.cc}::kBlockSize = 16