simulation: only draw grid outline if DRAW_PROGRAM_OUTLINE is 1

This commit is contained in:
2026-03-18 14:51:49 +00:00
parent c9b820b5a8
commit 723c2ffc8a
2 changed files with 5 additions and 1 deletions

View File

@@ -50,6 +50,8 @@ typedef double f64;
#define MUTATION_CHANCE 5000
#define MUTATION_OFFSET 1
#define DRAW_PROGRAM_OUTLINE 1
#endif
/* Copyright (C) 2026 Aryadev Chavali

View File

@@ -96,11 +96,13 @@ void simulation_draw(simulation_t *sim)
(Vector2){CELL_WIDTH, CELL_HEIGHT}, color);
}
#if DRAW_PROGRAM_OUTLINE
DrawRectangleLinesEx((Rectangle){.x = s_x * CELL_WIDTH,
.y = s_y * CELL_HEIGHT,
.width = CELL_WIDTH * PROGRAM_ROW_SIZE,
.height = CELL_HEIGHT * PROGRAM_ROW_SIZE},
1, DARKGRAY);
CELL_WIDTH / PROGRAM_ROW_SIZE, DARKGRAY);
#endif
}
}