yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
gfx_sheet_storage.cc File Reference
#include "zelda3/gfx_sheet_storage.h"
#include <algorithm>
#include <utility>
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include "app/gfx/util/compression.h"
#include "rom/snes.h"
#include "util/log.h"
#include "util/macro.h"

Go to the source code of this file.

Classes

class  yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::RomWriteJournal
 
struct  yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::OtherSheetExtents
 

Namespaces

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

Functions

bool yaze::zelda3::UsesJapaneseGfxSheetTables (const Rom &rom)
 
size_t yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::ExpectedDecodedSize (GfxSheetStorageKind kind)
 
bool yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::Overlaps (uint32_t a_begin, uint32_t a_end, uint32_t b_begin, uint32_t b_end)
 
absl::Status yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::CheckPolicyWrite (const GfxSheetWritePolicy &policy, uint32_t begin, uint32_t end)
 
OtherSheetExtents yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::CollectOtherExtents (const Rom &rom, uint16_t skip_sheet, const GfxSheetPointerTables &tables)
 
absl::StatusOr< uint32_t > yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::FindFreeSpace (const Rom &rom, const GfxSheetWritePolicy &policy, const OtherSheetExtents &others, const GfxSheetPointerTables &tables, size_t size)
 
absl::Status yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::VerifyCompressedSheet (const Rom &rom, uint16_t sheet_id, uint32_t expected_pc, const std::vector< uint8_t > &expected, size_t expected_stored_size, const GfxSheetPointerTables &tables)
 
std::array< int, 4 > yaze::zelda3::GfxSheetBlockTiles (int block)
 
bool yaze::zelda3::IsGfxSheetBlockEmpty (const std::vector< uint8_t > &data, int block, int bpp)
 
GfxSheetStorageKind yaze::zelda3::GetGfxSheetStorageKind (uint16_t sheet_id)
 
const char * yaze::zelda3::GfxSheetStorageKindName (GfxSheetStorageKind kind)
 
absl::StatusOr< uint32_t > yaze::zelda3::ReadGfxSheetPc (const Rom &rom, uint16_t sheet_id, const GfxSheetPointerTables &tables={})
 Resolves a sheet's pointer. Does not read the sheet data.
 
absl::StatusOr< GfxSheetExtent > yaze::zelda3::ReadGfxSheetExtent (const Rom &rom, uint16_t sheet_id, const GfxSheetPointerTables &tables)
 
absl::StatusOr< std::vector< uint8_t > > yaze::zelda3::ReadGfxSheetData (const Rom &rom, uint16_t sheet_id, const GfxSheetPointerTables &tables={})
 Returns the sheet's decoded bytes (SNES planar data).
 
absl::StatusOr< GfxSheetWriteResult > yaze::zelda3::WriteGfxSheet (Rom &rom, uint16_t sheet_id, const std::vector< uint8_t > &snes_3bpp, const GfxSheetWritePolicy &policy, const GfxSheetPointerTables &tables={})
 Writes one edited 3bpp sheet to the ROM buffer.
 

Variables

constexpr size_t yaze::zelda3::anonymous_namespace{gfx_sheet_storage.cc}::kMeasureDecodeLimit = 0x8000