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

Which graphics sheets back sprite OAM tiles 0x000-0x1FF. More...

#include <array>
#include <cstdint>
#include <set>
#include <vector>
#include "rom/rom.h"

Go to the source code of this file.

Classes

struct  yaze::zelda3::SpriteTileIssue
 

Namespaces

namespace  yaze
 
namespace  yaze::zelda3
 Zelda 3 specific classes and functions.
 

Functions

constexpr bool yaze::zelda3::IsUnderworldSpriteset (int spriteset)
 Dungeon rooms use spritesets 0x40-0x8F (room header value + 0x40).
 
std::array< uint8_t, 8 > yaze::zelda3::SpriteSheetSlots (const std::array< uint8_t, 4 > &spriteset_values, bool underworld)
 The eight sheets for a spriteset's four values.
 
constexpr int yaze::zelda3::SpriteSlotForTile (int tile)
 Slot (0-7) holding 8x8 OAM tile tile (name-table bit included).
 
std::vector< SpriteTileIssue > yaze::zelda3::CheckSpriteTiles (const Rom &rom, const std::vector< int > &tiles, const std::array< uint8_t, 8 > &slots, const std::set< uint16_t > &reserved_sheets)
 

Detailed Description

Which graphics sheets back sprite OAM tiles 0x000-0x1FF.

The game fills eight 64-tile slots: slots 0-3 hold the static sprite sheets (0x73, 0x74 on the overworld or 0x7D in dungeons, 0x79, 0x7A), matching OverworldMap::LoadSpritesBlocksets and Room::LoadRoomGraphics; slots 4-7 hold the spriteset's four values + 0x73. OAM tiles with the name-table bit set (0x100-0x1FF) therefore come from the spriteset.

Definition in file sprite_sheet_slots.h.