From 5ad9be7bcc6f0709c5b5a1ac90f326a32355bd8d Mon Sep 17 00:00:00 2001 From: Quinn Date: Tue, 11 Feb 2025 21:55:20 +0100 Subject: [PATCH] fix: macros didn't have new struct name --- src/game/tetromino/shapes.c | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/game/tetromino/shapes.c b/src/game/tetromino/shapes.c index cfbeeba..c4ba88f 100644 --- a/src/game/tetromino/shapes.c +++ b/src/game/tetromino/shapes.c @@ -3,37 +3,37 @@ #include "../../window/colour8.h" /* 0 1 2 3 */ -#define SHAPE_O ((Shape)0x0660) // 0000 0110 0110 0000 the O tetromino with no rotation +#define SHAPE_O ((shape)0x0660) // 0000 0110 0110 0000 the O tetromino with no rotation -#define SHAPE_I ((Shape)0x0F00) // 0000 1111 0000 0000 the I tetromino with no rotation -#define SHAPE_I_90 ((Shape)0x2222) // 0010 0010 0010 0010 the I tetromino with a 90° rotation -#define SHAPE_I_180 ((Shape)0x00F0) // 0000 0000 1111 0000 the I tetromino with a 180° rotation -#define SHAPE_I_270 ((Shape)0x4444) // 0100 0100 0100 0100 the I tetromino with a 270° rotation +#define SHAPE_I ((shape)0x0F00) // 0000 1111 0000 0000 the I tetromino with no rotation +#define SHAPE_I_90 ((shape)0x2222) // 0010 0010 0010 0010 the I tetromino with a 90° rotation +#define SHAPE_I_180 ((shape)0x00F0) // 0000 0000 1111 0000 the I tetromino with a 180° rotation +#define SHAPE_I_270 ((shape)0x4444) // 0100 0100 0100 0100 the I tetromino with a 270° rotation -#define SHAPE_S ((Shape)0xC600) // 1100 0110 0000 0000 the Z tetromino with no rotation -#define SHAPE_S_90 ((Shape)0x2640) // 0010 0110 0100 0000 the Z tetromino with a 90° rotation -#define SHAPE_S_180 ((Shape)0x0C60) // 0000 1100 0110 0000 the Z tetromino with a 180° rotation -#define SHAPE_S_270 ((Shape)0x4C80) // 0100 1100 1000 0000 the Z tetromino with a 270° rotation +#define SHAPE_S ((shape)0xC600) // 1100 0110 0000 0000 the Z tetromino with no rotation +#define SHAPE_S_90 ((shape)0x2640) // 0010 0110 0100 0000 the Z tetromino with a 90° rotation +#define SHAPE_S_180 ((shape)0x0C60) // 0000 1100 0110 0000 the Z tetromino with a 180° rotation +#define SHAPE_S_270 ((shape)0x4C80) // 0100 1100 1000 0000 the Z tetromino with a 270° rotation -#define SHAPE_Z ((Shape)0x6C00) // 0110 1100 0000 0000 the S tetromino with no rotation -#define SHAPE_Z_90 ((Shape)0x4620) // 0100 0110 0010 0000 the S tetromino with a 90° rotation -#define SHAPE_Z_180 ((Shape)0x06C0) // 0000 0110 1100 0000 the S tetromino with a 180° rotation -#define SHAPE_Z_270 ((Shape)0x8C40) // 1000 1100 0100 0000 the S tetromino with a 270° rotation +#define SHAPE_Z ((shape)0x6C00) // 0110 1100 0000 0000 the S tetromino with no rotation +#define SHAPE_Z_90 ((shape)0x4620) // 0100 0110 0010 0000 the S tetromino with a 90° rotation +#define SHAPE_Z_180 ((shape)0x06C0) // 0000 0110 1100 0000 the S tetromino with a 180° rotation +#define SHAPE_Z_270 ((shape)0x8C40) // 1000 1100 0100 0000 the S tetromino with a 270° rotation -#define SHAPE_T ((Shape)0x0E40) // 0000 1110 0100 0000 the T tetromino with no rotation -#define SHAPE_T_90 ((Shape)0x4C40) // 0100 1100 0100 0000 the T tetromino with a 90° rotation -#define SHAPE_T_180 ((Shape)0x4E00) // 0100 1110 0000 0000 the T tetromino with a 180° rotation -#define SHAPE_T_270 ((Shape)0x4640) // 0100 0110 0100 0000 the T tetromino with a 270° rotation +#define SHAPE_T ((shape)0x0E40) // 0000 1110 0100 0000 the T tetromino with no rotation +#define SHAPE_T_90 ((shape)0x4C40) // 0100 1100 0100 0000 the T tetromino with a 90° rotation +#define SHAPE_T_180 ((shape)0x4E00) // 0100 1110 0000 0000 the T tetromino with a 180° rotation +#define SHAPE_T_270 ((shape)0x4640) // 0100 0110 0100 0000 the T tetromino with a 270° rotation -#define SHAPE_L ((Shape)0x4460) // 0100 0100 0110 0000 the L tetromino with no rotation -#define SHAPE_L_90 ((Shape)0x0E80) // 0000 1110 1000 0000 the L tetromino with a 90° rotation -#define SHAPE_L_180 ((Shape)0xC440) // 1100 0100 0100 0000 the L tetromino with a 180° rotation -#define SHAPE_L_270 ((Shape)0x2E00) // 0010 1110 0000 0000 the L tetromino with a 270° rotation +#define SHAPE_L ((shape)0x4460) // 0100 0100 0110 0000 the L tetromino with no rotation +#define SHAPE_L_90 ((shape)0x0E80) // 0000 1110 1000 0000 the L tetromino with a 90° rotation +#define SHAPE_L_180 ((shape)0xC440) // 1100 0100 0100 0000 the L tetromino with a 180° rotation +#define SHAPE_L_270 ((shape)0x2E00) // 0010 1110 0000 0000 the L tetromino with a 270° rotation -#define SHAPE_J ((Shape)0x44C0) // 0100 0100 1100 0000 the J tetromino with no rotation -#define SHAPE_J_90 ((Shape)0x8E00) // 1000 1110 0000 0000 the J tetromino with a 90° rotation -#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 +#define SHAPE_J ((shape)0x44C0) // 0100 0100 1100 0000 the J tetromino with no rotation +#define SHAPE_J_90 ((shape)0x8E00) // 1000 1110 0000 0000 the J tetromino with a 90° rotation +#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(shape_id const id) { // clang-format off