8namespace draw_routines {
14 if (size == 0) size = 32;
16 for (
int s = 0; s < size; s++) {
17 if (ctx.
tiles.size() >= 4) {
44 if (size == 0) size = 26;
46 for (
int s = 0; s < size; s++) {
47 if (ctx.
tiles.size() >= 8) {
67 }
else if (ctx.
tiles.size() >= 4) {
96 for (
int s = 0; s < count; s++) {
97 if (ctx.
tiles.size() >= 8) {
136 int count = size + 1;
138 for (
int s = 0; s < count; s++) {
139 if (ctx.
tiles.size() >= 4) {
166 int count = size + 2;
168 for (
int s = 0; s < count; s++) {
169 if (ctx.
tiles.size() >= 1) {
182 int count = size + 1;
184 for (
int s = 0; s < count; s++) {
185 if (ctx.
tiles.size() >= 1) {
198 int count = size + 10;
200 for (
int s = 0; s < count; s++) {
201 if (ctx.
tiles.size() >= 2) {
216 int count = size + 10;
218 for (
int s = 0; s < count; s++) {
219 if (ctx.
tiles.size() >= 2) {
234 .name =
"Downwards2x2_1to15or32",
236 .draws_to_both_bgs =
false,
239 .category = Category::Downwards});
243 .name =
"Downwards4x2_1to15or26",
245 .draws_to_both_bgs =
false,
248 .category = Category::Downwards});
252 .name =
"Downwards4x2_1to16_BothBG",
254 .draws_to_both_bgs =
true,
257 .category = Category::Downwards});
261 .name =
"DownwardsDecor4x2spaced4_1to16",
263 .draws_to_both_bgs =
false,
266 .category = Category::Downwards});
270 .name =
"Downwards2x2_1to16",
272 .draws_to_both_bgs =
false,
275 .category = Category::Downwards});
279 .name =
"DownwardsHasEdge1x1_1to16_plus3",
281 .draws_to_both_bgs =
false,
284 .category = Category::Downwards});
288 .name =
"DownwardsEdge1x1_1to16",
290 .draws_to_both_bgs =
false,
293 .category = Category::Downwards});
297 .name =
"DownwardsLeftCorners2x1_1to16_plus12",
299 .draws_to_both_bgs =
false,
302 .category = Category::Downwards});
306 .name =
"DownwardsRightCorners2x1_1to16_plus12",
308 .draws_to_both_bgs =
false,
311 .category = Category::Downwards});
void WriteTile8(gfx::BackgroundBuffer &bg, int tile_x, int tile_y, const gfx::TileInfo &tile_info)
Write an 8x8 tile to the background buffer.
void DrawDownwards4x2_1to15or26(const DrawContext &ctx)
Draw 4x2 tiles downward pattern (1-15 or 26 iterations)
void DrawDownwardsEdge1x1_1to16(const DrawContext &ctx)
Draw 1x1 edge tiles downward (1-16 iterations)
void DrawDownwards2x2_1to15or32(const DrawContext &ctx)
Draw 2x2 tiles downward pattern (1-15 or 32 iterations)
void DrawDownwards2x2_1to16(const DrawContext &ctx)
Draw 2x2 tiles downward pattern (1-16 iterations)
void RegisterDownwardsRoutines(std::vector< DrawRoutineInfo > ®istry)
Register all downwards draw routines to the registry.
void DrawDownwardsHasEdge1x1_1to16_plus3(const DrawContext &ctx)
Draw 1x1 tiles with edge detection +3 offset downward.
void DrawDownwardsLeftCorners2x1_1to16_plus12(const DrawContext &ctx)
Draw left corner 2x1 tiles with +12 offset downward.
void DrawDownwardsRightCorners2x1_1to16_plus12(const DrawContext &ctx)
Draw right corner 2x1 tiles with +12 offset downward.
void DrawDownwardsDecor4x2spaced4_1to16(const DrawContext &ctx)
Draw 4x2 decoration downward with spacing (1-16 iterations)
void DrawDownwards4x2_1to16_BothBG(const DrawContext &ctx)
Draw 4x2 tiles downward pattern for both BG layers.
Context passed to draw routines containing all necessary state.
std::span< const gfx::TileInfo > tiles
gfx::BackgroundBuffer & target_bg
const RoomObject & object
Metadata about a draw routine.