yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
draw_routine_types.h File Reference
#include <cstdint>
#include <functional>
#include <span>
#include <string>
#include "app/gfx/render/background_buffer.h"
#include "app/gfx/types/snes_tile.h"
#include "rom/rom.h"

Go to the source code of this file.

Classes

struct  yaze::zelda3::DrawContext
 Context passed to draw routines containing all necessary state. More...
 
struct  yaze::zelda3::DrawRoutineInfo
 Metadata about a draw routine. More...
 

Namespaces

namespace  yaze
 
namespace  yaze::zelda3
 Zelda 3 specific classes and functions.
 
namespace  yaze::zelda3::DrawRoutineUtils
 Utility functions for tile writing used by all routines.
 

Typedefs

using yaze::zelda3::DrawRoutineFn = std::function<void(const DrawContext& ctx)>
 Function signature for a draw routine.
 

Functions

bool yaze::zelda3::DrawRoutineUtils::IsValidTilePosition (int tile_x, int tile_y)
 Check if tile position is within canvas bounds.
 
void yaze::zelda3::DrawRoutineUtils::WriteTile8 (gfx::BackgroundBuffer &bg, int tile_x, int tile_y, const gfx::TileInfo &tile_info)
 Write an 8x8 tile to the background buffer.
 
void yaze::zelda3::DrawRoutineUtils::DrawBlock2x2 (gfx::BackgroundBuffer &bg, int tile_x, int tile_y, std::span< const gfx::TileInfo > tiles, int offset=0)
 Draw a 2x2 block of tiles (16x16 pixels)
 
void yaze::zelda3::DrawRoutineUtils::DrawBlock2x4 (gfx::BackgroundBuffer &bg, int tile_x, int tile_y, std::span< const gfx::TileInfo > tiles, int offset=0)
 Draw a 2x4 block of tiles (16x32 pixels)
 
void yaze::zelda3::DrawRoutineUtils::DrawBlock4x2 (gfx::BackgroundBuffer &bg, int tile_x, int tile_y, std::span< const gfx::TileInfo > tiles, int offset=0)
 Draw a 4x2 block of tiles (32x16 pixels)
 
void yaze::zelda3::DrawRoutineUtils::DrawBlock4x4 (gfx::BackgroundBuffer &bg, int tile_x, int tile_y, std::span< const gfx::TileInfo > tiles, int offset=0)
 Draw a 4x4 block of tiles (32x32 pixels)