mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
optimize clearing lines by using pointers to define the row order
This commit is contained in:
@@ -74,8 +74,8 @@ void renderer_update(const RenderData* render_data) {
|
||||
Row row = data->row[y];
|
||||
|
||||
for (uint8_t x = 0; x < COLUMNS; x++) {
|
||||
if (row.columns[x].packed != 0) {
|
||||
set_colour(renderer, row.columns[x]);
|
||||
if (row[x].packed != 0) {
|
||||
set_colour(renderer, row[x]);
|
||||
success |= draw_block(renderer, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user