Source code at github.com/dashed/tetris-sdl-c
A simple tetris game implemented in C using SDL 2.x. It was just a toy project to play with and learn SDL 2.x. Developed in 2014.
Unfortunately, I have since lost the original link.
However, I have managed to find the piece of code I was working on to encode the tetrominoes and their rotations into a 4x4 grid:
This representation was ported into these lines of code: https://github.com/dashed/tetris-sdl-c/blob/80e6bad084746663bbe51a8d54c8f028269ae653/src/tetris.h#L62-L96