mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 05:55:46 +01:00
fix: stored I tetrominos read as empty.
This commit is contained in:
@@ -74,7 +74,8 @@ void tetris_place(u8 *restrict *restrict rows, u8 tetromino, uint x, uint y) {
|
|||||||
uint *pos = (uint[8]){x, y, x, y, x, y, x, y};
|
uint *pos = (uint[8]){x, y, x, y, x, y, x, y};
|
||||||
uint *end = pos + 8;
|
uint *end = pos + 8;
|
||||||
tetris_get_blocks(tetromino, pos);
|
tetris_get_blocks(tetromino, pos);
|
||||||
tetromino &= 7; /* strip rotation data */
|
tetromino &= 7; /* strip rotation data */
|
||||||
|
tetromino |= 0x80; /* set an undefined bit, to signify there is data here. */
|
||||||
for (; pos < end; pos += 2)
|
for (; pos < end; pos += 2)
|
||||||
rows[*(pos + 1)][*pos] = tetromino;
|
rows[*(pos + 1)][*pos] = tetromino;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user