8namespace draw_routines {
18 for (
int s = 0; s < size; s++) {
19 if (ctx.
tiles.size() >= 4) {
45 for (
int s = 0; s < size; s++) {
46 if (ctx.
tiles.size() >= 8) {
66 }
else if (ctx.
tiles.size() >= 4) {
87 for (
int s = 0; s < count; s++) {
88 if (ctx.
tiles.size() >= 8) {
108 }
else if (ctx.
tiles.size() >= 4) {
135 int count = size + 1;
137 for (
int s = 0; s < count; s++) {
138 if (ctx.
tiles.size() >= 4) {
157 int count = (size * 2) + 1;
159 for (
int s = 0; s < count; s++) {
160 if (ctx.
tiles.size() >= 2) {
175 int count = size + 2;
177 for (
int s = 0; s < count; s++) {
178 if (ctx.
tiles.size() >= 1) {
191 int count = size + 1;
193 for (
int s = 0; s < count; s++) {
194 if (ctx.
tiles.size() >= 1) {
207 int count = size + 10;
209 for (
int s = 0; s < count; s++) {
210 if (ctx.
tiles.size() >= 2) {
225 int count = size + 10;
227 for (
int s = 0; s < count; s++) {
228 if (ctx.
tiles.size() >= 2) {
243 int count = size + 1;
245 for (
int s = 0; s < count; s++) {
246 if (ctx.
tiles.size() >= 16) {
249 for (
int x = 0; x < 4; ++x) {
250 for (
int y = 0; y < 4; ++y) {
264 int count = size + 4;
266 for (
int s = 0; s < count; s++) {
267 if (ctx.
tiles.size() >= 1) {
280 int count = size + 1;
282 for (
int s = 0; s < count; s++) {
283 if (ctx.
tiles.size() >= 16) {
285 for (
int x = 0; x < 4; ++x) {
286 for (
int y = 0; y < 4; ++y) {
301 int count = size + 1;
303 for (
int s = 0; s < count; s++) {
304 if (ctx.
tiles.size() >= 6) {
306 for (
int x = 0; x < 2; ++x) {
307 for (
int y = 0; y < 3; ++y) {
322 int count = size + 1;
324 for (
int s = 0; s < count; s++) {
325 if (ctx.
tiles.size() >= 8) {
327 for (
int x = 0; x < 2; ++x) {
328 for (
int y = 0; y < 4; ++y) {
343 int count = size + 1;
345 for (
int s = 0; s < count; s++) {
346 if (ctx.
tiles.size() >= 12) {
348 for (
int x = 0; x < 4; ++x) {
349 for (
int y = 0; y < 3; ++y) {
364 int count = size + 1;
366 for (
int s = 0; s < count; s++) {
367 if (ctx.
tiles.size() >= 8) {
369 for (
int x = 0; x < 4; ++x) {
370 for (
int y = 0; y < 2; ++y) {
384 int count = size + 1;
386 for (
int s = 0; s < count; s++) {
387 if (ctx.
tiles.size() >= 4) {
412 .name =
"Rightwards2x2_1to15or32",
414 .draws_to_both_bgs =
false,
422 .name =
"Rightwards2x4_1to15or26",
424 .draws_to_both_bgs =
false,
432 .name =
"Rightwards2x4_1to16",
434 .draws_to_both_bgs =
false,
442 .name =
"Rightwards2x4_1to16_BothBG",
444 .draws_to_both_bgs =
true,
452 .name =
"Rightwards2x2_1to16",
454 .draws_to_both_bgs =
false,
462 .name =
"Rightwards1x2_1to16_plus2",
464 .draws_to_both_bgs =
false,
472 .name =
"RightwardsHasEdge1x1_1to16_plus3",
474 .draws_to_both_bgs =
false,
482 .name =
"RightwardsHasEdge1x1_1to16_plus2",
484 .draws_to_both_bgs =
false,
492 .name =
"RightwardsTopCorners1x2_1to16_plus13",
494 .draws_to_both_bgs =
false,
502 .name =
"RightwardsBottomCorners1x2_1to16_plus13",
504 .draws_to_both_bgs =
false,
512 .name =
"Rightwards4x4_1to16",
514 .draws_to_both_bgs =
false,
522 .name =
"Rightwards1x1Solid_1to16_plus3",
524 .draws_to_both_bgs =
false,
532 .name =
"RightwardsDecor4x4spaced2_1to16",
534 .draws_to_both_bgs =
false,
542 .name =
"RightwardsStatue2x3spaced2_1to16",
544 .draws_to_both_bgs =
false,
552 .name =
"RightwardsPillar2x4spaced4_1to16",
554 .draws_to_both_bgs =
false,
562 .name =
"RightwardsDecor4x3spaced4_1to16",
564 .draws_to_both_bgs =
false,
572 .name =
"RightwardsDoubled2x2spaced2_1to16",
574 .draws_to_both_bgs =
false,
582 .name =
"RightwardsDecor2x2spaced12_1to16",
584 .draws_to_both_bgs =
false,
constexpr int kRightwards2x2_1to16
constexpr int kRightwardsHasEdge1x1_1to16_plus2
constexpr int kRightwardsDecor4x4spaced2_1to16
constexpr int kRightwardsDecor2x2spaced12_1to16
constexpr int kRightwardsStatue2x3spaced2_1to16
constexpr int kRightwards4x4_1to16
constexpr int kRightwardsBottomCorners1x2_1to16_plus13
constexpr int kRightwards2x4_1to16_BothBG
constexpr int kRightwards2x2_1to15or32
constexpr int kRightwardsHasEdge1x1_1to16_plus3
constexpr int kRightwards1x2_1to16_plus2
constexpr int kRightwardsPillar2x4spaced4_1to16
constexpr int kRightwardsTopCorners1x2_1to16_plus13
constexpr int kRightwards2x4_1to16
constexpr int kRightwards2x4_1to15or26
constexpr int kRightwardsDecor4x3spaced4_1to16
constexpr int kRightwards1x1Solid_1to16_plus3
constexpr int kRightwardsDoubled2x2spaced2_1to16
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 DrawRightwardsStatue2x3spaced2_1to16(const DrawContext &ctx)
Draw 2x3 statue with spacing.
void DrawRightwards2x4_1to15or26(const DrawContext &ctx)
Draw 2x4 tiles rightward (1-15 or 26 repetitions)
void DrawRightwards2x2_1to15or32(const DrawContext &ctx)
Draw 2x2 tiles rightward (1-15 or 32 repetitions)
void DrawRightwardsBottomCorners1x2_1to16_plus13(const DrawContext &ctx)
Draw bottom corner 1x2 tiles with +13 offset.
void DrawRightwardsTopCorners1x2_1to16_plus13(const DrawContext &ctx)
Draw top corner 1x2 tiles with +13 offset.
void DrawRightwardsHasEdge1x1_1to16_plus2(const DrawContext &ctx)
Draw 1x1 tiles with edge detection +2 offset.
void DrawRightwardsDecor2x2spaced12_1to16(const DrawContext &ctx)
Draw 2x2 decoration with large spacing.
void DrawRightwards1x1Solid_1to16_plus3(const DrawContext &ctx)
Draw 1x1 solid tiles +3 offset.
void DrawRightwards1x2_1to16_plus2(const DrawContext &ctx)
Draw 1x2 tiles rightward with +2 offset.
void DrawRightwards4x4_1to16(const DrawContext &ctx)
Draw 4x4 block rightward.
void DrawRightwardsHasEdge1x1_1to16_plus3(const DrawContext &ctx)
Draw 1x1 tiles with edge detection +3 offset.
void DrawRightwards2x2_1to16(const DrawContext &ctx)
Draw 2x2 tiles rightward (1-16 repetitions)
void DrawRightwardsDoubled2x2spaced2_1to16(const DrawContext &ctx)
Draw doubled 2x2 with spacing.
void DrawRightwards2x4_1to16(const DrawContext &ctx)
Draw 2x4 tiles rightward with adjacent spacing (1-16 repetitions)
void RegisterRightwardsRoutines(std::vector< DrawRoutineInfo > ®istry)
Register all rightwards draw routines to the registry.
void DrawRightwardsDecor4x3spaced4_1to16(const DrawContext &ctx)
Draw 4x3 decoration with spacing.
void DrawRightwards2x4_1to16_BothBG(const DrawContext &ctx)
Draw 2x4 tiles rightward with adjacent spacing to both BG layers.
void DrawRightwardsPillar2x4spaced4_1to16(const DrawContext &ctx)
Draw 2x4 pillar with spacing.
void DrawRightwardsDecor4x4spaced2_1to16(const DrawContext &ctx)
Draw 4x4 decoration with spacing.
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.