code cleanup:

- rename typedefs to a lowercase variant
- change variable names to shorter variants
This commit is contained in:
2025-02-10 12:28:05 +01:00
parent 94ca7e3d08
commit 3fd7806e5f
14 changed files with 121 additions and 119 deletions

View File

@@ -35,7 +35,7 @@
#define SHAPE_J_180 ((Shape)0x6440) // 0110 0100 0100 0000 the J tetromino with a 180° rotation
#define SHAPE_J_270 ((Shape)0x0E20) // 0000 1110 0010 0000 the J tetromino with a 270° rotation
Shape shape_from_id(ShapeId const id) {
Shape shape_from_id(shape_id const id) {
// clang-format off
static Shape const shapes[TETROMINO_COUNT][4] = {
// 0° 90° 180° 170°
@@ -53,7 +53,7 @@ Shape shape_from_id(ShapeId const id) {
return shapes[id & 7][id >> 3];
}
colour8 colour_from_id(ShapeId const id) {
colour8 colour_from_id(shape_id const id) {
switch (id & 7) {
case TETROMINO_O: return COLOUR_YELLOW;
case TETROMINO_I: return COLOUR_CYAN;