yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
gfx_sheet_policy_adapter.h
Go to the documentation of this file.
1#ifndef YAZE_CORE_GFX_SHEET_POLICY_ADAPTER_H_
2#define YAZE_CORE_GFX_SHEET_POLICY_ADAPTER_H_
3
4#include "absl/status/statusor.h"
6#include "core/project.h"
9
10namespace yaze::core {
11
12// Builds the graphics-sheet write policy from a hack manifest:
13// allocation regions and reserved sheets come from `graphics_sheet_regions`,
14// and every write is refused when AnalyzePcWriteRanges() reports it touches
15// ASM-owned bytes (protected hooks, owned banks, expansion banks).
16//
17// An unloaded manifest yields an empty policy: in-place writes only, no
18// relocation. The returned check_write keeps a pointer to `manifest`, so the
19// manifest must outlive the policy.
20absl::StatusOr<zelda3::GfxSheetWritePolicy> BuildGfxSheetWritePolicy(
21 const HackManifest& manifest);
22
23// The manifest policy above plus the project's `[graphics_sheets]` rules:
24// reserved sheets are merged, reserved 16x16 blocks are added.
25absl::StatusOr<zelda3::GfxSheetWritePolicy> BuildGfxSheetWritePolicy(
26 const project::YazeProject& project);
27
28// Reserved sheets (project `[graphics_sheets]` plus the hack manifest),
29// flagged sheets and reserved 16x16 blocks for the sheet inventory. A null
30// project yields empty options.
31zelda3::GfxSheetInventoryOptions BuildGfxSheetInventoryOptions(
32 const project::YazeProject* project);
33
34} // namespace yaze::core
35
36#endif // YAZE_CORE_GFX_SHEET_POLICY_ADAPTER_H_
Which graphics sheets exist, which tables use them, and which 16x16 blocks are free.
Locates graphics sheets in the ROM and writes edited sheets back.
absl::StatusOr< zelda3::GfxSheetWritePolicy > BuildGfxSheetWritePolicy(const HackManifest &manifest)
zelda3::GfxSheetInventoryOptions BuildGfxSheetInventoryOptions(const project::YazeProject *project)