yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
rom.h File Reference
#include <SDL.h>
#include <zelda.h>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <map>
#include <memory>
#include <string>
#include <variant>
#include <vector>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/match.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "app/core/project.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/snes_palette.h"
#include "app/gfx/snes_tile.h"
#include "util/macro.h"

Go to the source code of this file.

Classes

class  yaze::Rom
 The Rom class is used to load, save, and modify Rom data. More...
 
struct  yaze::Rom::WriteAction
 
class  yaze::GraphicsSheetManager
 
class  yaze::SharedRom
 A class to hold a shared pointer to a Rom object. More...
 

Namespaces

namespace  yaze
 Main namespace for the application.
 

Functions

absl::StatusOr< std::array< gfx::Bitmap, kNumGfxSheets > > yaze::LoadAllGraphicsData (Rom &rom, bool defer_render=false)
 This function iterates over all graphics sheets in the Rom and loads them into memory. Depending on the sheet's index, it may be uncompressed or compressed using the LC-LZ2 algorithm. The uncompressed sheets are 3 bits per pixel (BPP), while the compressed sheets are 4 BPP. The loaded graphics data is converted to 8 BPP and stored in a bitmap.
 
absl::Status yaze::SaveAllGraphicsData (Rom &rom, std::array< gfx::Bitmap, kNumGfxSheets > &gfx_sheets)
 
absl::StatusOr< std::vector< uint8_t > > yaze::Load2BppGraphics (const Rom &rom)
 Loads 2bpp graphics from Rom data.
 
absl::StatusOr< std::array< gfx::Bitmap, kNumLinkSheets > > yaze::LoadLinkGraphics (const Rom &rom)
 Loads the players 4bpp graphics sheet from Rom data.
 
uint32_t yaze::SnesToPc (uint32_t addr) noexcept
 
uint32_t yaze::PcToSnes (uint32_t addr)
 
uint32_t yaze::Get24LocalFromPC (uint8_t *data, int addr, bool pc=true)
 
int yaze::AddressFromBytes (uint8_t bank, uint8_t high, uint8_t low) noexcept
 
uint32_t yaze::MapBankToWordAddress (uint8_t bank, uint16_t addr) noexcept
 

Variables

constexpr uint32_t yaze::kNumGfxSheets = 223
 
constexpr uint32_t yaze::kNumLinkSheets = 14
 
constexpr uint32_t yaze::kTile16Ptr = 0x78000
 
constexpr uint32_t yaze::kNormalGfxSpaceStart = 0x87000
 
constexpr uint32_t yaze::kNormalGfxSpaceEnd = 0xC4200
 
constexpr uint32_t yaze::kFontSpriteLocation = 0x70000
 
constexpr uint32_t yaze::kGfxGroupsPointer = 0x6237
 
constexpr uint32_t yaze::kUncompressedSheetSize = 0x0800
 
constexpr uint32_t yaze::kNumMainBlocksets = 37
 
constexpr uint32_t yaze::kNumRoomBlocksets = 82
 
constexpr uint32_t yaze::kNumSpritesets = 144
 
constexpr uint32_t yaze::kNumPalettesets = 72
 
constexpr uint32_t yaze::kEntranceGfxGroup = 0x5D97
 
constexpr uint32_t yaze::kMaxGraphics = 0x0C3FFF
 
constexpr uint32_t yaze::kFastRomRegion = 0x808000