diff options
Diffstat (limited to 'src/_constants.c')
| -rw-r--r-- | src/_constants.c | 286 |
1 files changed, 0 insertions, 286 deletions
diff --git a/src/_constants.c b/src/_constants.c deleted file mode 100644 index a6b19fe..0000000 --- a/src/_constants.c +++ /dev/null | |||
| @@ -1,286 +0,0 @@ | |||
| 1 | #define U 0U | ||
| 2 | #define U2 1U | ||
| 3 | #define U3 2U | ||
| 4 | #define D 3U | ||
| 5 | #define D2 4U | ||
| 6 | #define D3 5U | ||
| 7 | #define R 6U | ||
| 8 | #define R2 7U | ||
| 9 | #define R3 8U | ||
| 10 | #define L 9U | ||
| 11 | #define L2 10U | ||
| 12 | #define L3 11U | ||
| 13 | #define F 12U | ||
| 14 | #define F2 13U | ||
| 15 | #define F3 14U | ||
| 16 | #define B 15U | ||
| 17 | #define B2 16U | ||
| 18 | #define B3 17U | ||
| 19 | |||
| 20 | #define UFr 0 | ||
| 21 | #define ULr 1 | ||
| 22 | #define UBr 2 | ||
| 23 | #define URr 3 | ||
| 24 | #define DFr 4 | ||
| 25 | #define DLr 5 | ||
| 26 | #define DBr 6 | ||
| 27 | #define DRr 7 | ||
| 28 | #define RUr 8 | ||
| 29 | #define RFr 9 | ||
| 30 | #define RDr 10 | ||
| 31 | #define RBr 11 | ||
| 32 | #define LUr 12 | ||
| 33 | #define LFr 13 | ||
| 34 | #define LDr 14 | ||
| 35 | #define LBr 15 | ||
| 36 | #define FUr 16 | ||
| 37 | #define FRr 17 | ||
| 38 | #define FDr 18 | ||
| 39 | #define FLr 19 | ||
| 40 | #define BUr 20 | ||
| 41 | #define BRr 21 | ||
| 42 | #define BDr 22 | ||
| 43 | #define BLr 23 | ||
| 44 | |||
| 45 | #define UFm 24 | ||
| 46 | #define ULm 25 | ||
| 47 | #define UBm 26 | ||
| 48 | #define URm 27 | ||
| 49 | #define DFm 28 | ||
| 50 | #define DLm 29 | ||
| 51 | #define DBm 30 | ||
| 52 | #define DRm 31 | ||
| 53 | #define RUm 32 | ||
| 54 | #define RFm 33 | ||
| 55 | #define RDm 34 | ||
| 56 | #define RBm 35 | ||
| 57 | #define LUm 36 | ||
| 58 | #define LFm 37 | ||
| 59 | #define LDm 38 | ||
| 60 | #define LBm 39 | ||
| 61 | #define FUm 40 | ||
| 62 | #define FRm 41 | ||
| 63 | #define FDm 42 | ||
| 64 | #define FLm 43 | ||
| 65 | #define BUm 44 | ||
| 66 | #define BRm 45 | ||
| 67 | #define BDm 46 | ||
| 68 | #define BLm 47 | ||
| 69 | |||
| 70 | #define errormove 99U | ||
| 71 | #define errortrans 99U | ||
| 72 | |||
| 73 | #define _c_ufr 0U | ||
| 74 | #define _c_ubl 1U | ||
| 75 | #define _c_dfl 2U | ||
| 76 | #define _c_dbr 3U | ||
| 77 | #define _c_ufl 4U | ||
| 78 | #define _c_ubr 5U | ||
| 79 | #define _c_dfr 6U | ||
| 80 | #define _c_dbl 7U | ||
| 81 | |||
| 82 | #define _e_uf 0U | ||
| 83 | #define _e_ub 1U | ||
| 84 | #define _e_db 2U | ||
| 85 | #define _e_df 3U | ||
| 86 | #define _e_ur 4U | ||
| 87 | #define _e_ul 5U | ||
| 88 | #define _e_dl 6U | ||
| 89 | #define _e_dr 7U | ||
| 90 | #define _e_fr 8U | ||
| 91 | #define _e_fl 9U | ||
| 92 | #define _e_bl 10U | ||
| 93 | #define _e_br 11U | ||
| 94 | |||
| 95 | #define _eoshift 4U | ||
| 96 | #define _coshift 5U | ||
| 97 | |||
| 98 | #define _pbits 0xFU | ||
| 99 | #define _eobit 0x10U | ||
| 100 | #define _cobits 0xF0U | ||
| 101 | #define _cobits2 0x60U | ||
| 102 | #define _ctwist_cw 0x20U | ||
| 103 | #define _ctwist_ccw 0x40U | ||
| 104 | #define _eflip 0x10U | ||
| 105 | #define _error 0xFFU | ||
| 106 | |||
| 107 | static move_t inverse_move_arr[] = { | ||
| 108 | [U] = U3, | ||
| 109 | [U2] = U2, | ||
| 110 | [U3] = U, | ||
| 111 | [D] = D3, | ||
| 112 | [D2] = D2, | ||
| 113 | [D3] = D, | ||
| 114 | [R] = R3, | ||
| 115 | [R2] = R2, | ||
| 116 | [R3] = R, | ||
| 117 | [L] = L3, | ||
| 118 | [L2] = L2, | ||
| 119 | [L3] = L, | ||
| 120 | [F] = F3, | ||
| 121 | [F2] = F2, | ||
| 122 | [F3] = F, | ||
| 123 | [B] = B3, | ||
| 124 | [B2] = B2, | ||
| 125 | [B3] = B, | ||
| 126 | }; | ||
| 127 | |||
| 128 | static trans_t inverse_trans_arr[] = { | ||
| 129 | [UFr] = UFr, | ||
| 130 | [ULr] = URr, | ||
| 131 | [UBr] = UBr, | ||
| 132 | [URr] = URr, | ||
| 133 | [DFr] = DFr, | ||
| 134 | [DLr] = DLr, | ||
| 135 | [DRr] = DRr, | ||
| 136 | [DBr] = DBr, | ||
| 137 | [RUr] = FRr, | ||
| 138 | [RFr] = LFr, | ||
| 139 | [RDr] = BLr, | ||
| 140 | [RBr] = RBr, | ||
| 141 | [LUr] = FLr, | ||
| 142 | [LFr] = RFr, | ||
| 143 | [LDr] = BRr, | ||
| 144 | [LBr] = LBr, | ||
| 145 | [FUr] = FUr, | ||
| 146 | [FRr] = RUr, | ||
| 147 | [FDr] = BUr, | ||
| 148 | [FLr] = LUr, | ||
| 149 | [BUr] = FDr, | ||
| 150 | [BLr] = RDr, | ||
| 151 | [BDr] = BDr, | ||
| 152 | [BRr] = LDr, | ||
| 153 | [UFm] = UFm, | ||
| 154 | [ULm] = ULm, | ||
| 155 | [UBm] = UBm, | ||
| 156 | [URm] = ULm, | ||
| 157 | [DFm] = DFm, | ||
| 158 | [DLm] = DRm, | ||
| 159 | [DRm] = DLm, | ||
| 160 | [DBm] = DBm, | ||
| 161 | [RUm] = FLm, | ||
| 162 | [RFm] = RFm, | ||
| 163 | [RDm] = BRm, | ||
| 164 | [RBm] = LBm, | ||
| 165 | [LUm] = FRm, | ||
| 166 | [LFm] = LFm, | ||
| 167 | [LDm] = BLm, | ||
| 168 | [LBm] = RBm, | ||
| 169 | [FUm] = FUm, | ||
| 170 | [FRm] = LUm, | ||
| 171 | [FDm] = BUm, | ||
| 172 | [FLm] = RUm, | ||
| 173 | [BUm] = FDm, | ||
| 174 | [BLm] = LDm, | ||
| 175 | [BDm] = BDm, | ||
| 176 | [BRm] = RDm, | ||
| 177 | }; | ||
| 178 | |||
| 179 | static char *cornerstr[] = { | ||
| 180 | [_c_ufr] = "UFR", | ||
| 181 | [_c_ubl] = "UBL", | ||
| 182 | [_c_dfl] = "DFL", | ||
| 183 | [_c_dbr] = "DBR", | ||
| 184 | [_c_ufl] = "UFL", | ||
| 185 | [_c_ubr] = "UBR", | ||
| 186 | [_c_dfr] = "DFR", | ||
| 187 | [_c_dbl] = "DBL" | ||
| 188 | }; | ||
| 189 | |||
| 190 | static char *cornerstralt[] = { | ||
| 191 | [_c_ufr] = "URF", | ||
| 192 | [_c_ubl] = "ULB", | ||
| 193 | [_c_dfl] = "DLF", | ||
| 194 | [_c_dbr] = "DRB", | ||
| 195 | [_c_ufl] = "ULF", | ||
| 196 | [_c_ubr] = "URB", | ||
| 197 | [_c_dfr] = "DRF", | ||
| 198 | [_c_dbl] = "DLB" | ||
| 199 | }; | ||
| 200 | |||
| 201 | static char *edgestr[] = { | ||
| 202 | [_e_uf] = "UF", | ||
| 203 | [_e_ub] = "UB", | ||
| 204 | [_e_db] = "DB", | ||
| 205 | [_e_df] = "DF", | ||
| 206 | [_e_ur] = "UR", | ||
| 207 | [_e_ul] = "UL", | ||
| 208 | [_e_dl] = "DL", | ||
| 209 | [_e_dr] = "DR", | ||
| 210 | [_e_fr] = "FR", | ||
| 211 | [_e_fl] = "FL", | ||
| 212 | [_e_bl] = "BL", | ||
| 213 | [_e_br] = "BR" | ||
| 214 | }; | ||
| 215 | |||
| 216 | static char *movestr[] = { | ||
| 217 | [U] = "U", | ||
| 218 | [U2] = "U2", | ||
| 219 | [U3] = "U'", | ||
| 220 | [D] = "D", | ||
| 221 | [D2] = "D2", | ||
| 222 | [D3] = "D'", | ||
| 223 | [R] = "R", | ||
| 224 | [R2] = "R2", | ||
| 225 | [R3] = "R'", | ||
| 226 | [L] = "L", | ||
| 227 | [L2] = "L2", | ||
| 228 | [L3] = "L'", | ||
| 229 | [F] = "F", | ||
| 230 | [F2] = "F2", | ||
| 231 | [F3] = "F'", | ||
| 232 | [B] = "B", | ||
| 233 | [B2] = "B2", | ||
| 234 | [B3] = "B'", | ||
| 235 | }; | ||
| 236 | |||
| 237 | static char *transstr[] = { | ||
| 238 | [UFr] = "rotation UF", | ||
| 239 | [UFm] = "mirrored UF", | ||
| 240 | [ULr] = "rotation UL", | ||
| 241 | [ULm] = "mirrored UL", | ||
| 242 | [UBr] = "rotation UB", | ||
| 243 | [UBm] = "mirrored UB", | ||
| 244 | [URr] = "rotation UR", | ||
| 245 | [URm] = "mirrored UR", | ||
| 246 | [DFr] = "rotation DF", | ||
| 247 | [DFm] = "mirrored DF", | ||
| 248 | [DLr] = "rotation DL", | ||
| 249 | [DLm] = "mirrored DL", | ||
| 250 | [DBr] = "rotation DB", | ||
| 251 | [DBm] = "mirrored DB", | ||
| 252 | [DRr] = "rotation DR", | ||
| 253 | [DRm] = "mirrored DR", | ||
| 254 | [RUr] = "rotation RU", | ||
| 255 | [RUm] = "mirrored RU", | ||
| 256 | [RFr] = "rotation RF", | ||
| 257 | [RFm] = "mirrored RF", | ||
| 258 | [RDr] = "rotation RD", | ||
| 259 | [RDm] = "mirrored RD", | ||
| 260 | [RBr] = "rotation RB", | ||
| 261 | [RBm] = "mirrored RB", | ||
| 262 | [LUr] = "rotation LU", | ||
| 263 | [LUm] = "mirrored LU", | ||
| 264 | [LFr] = "rotation LF", | ||
| 265 | [LFm] = "mirrored LF", | ||
| 266 | [LDr] = "rotation LD", | ||
| 267 | [LDm] = "mirrored LD", | ||
| 268 | [LBr] = "rotation LB", | ||
| 269 | [LBm] = "mirrored LB", | ||
| 270 | [FUr] = "rotation FU", | ||
| 271 | [FUm] = "mirrored FU", | ||
| 272 | [FRr] = "rotation FR", | ||
| 273 | [FRm] = "mirrored FR", | ||
| 274 | [FDr] = "rotation FD", | ||
| 275 | [FDm] = "mirrored FD", | ||
| 276 | [FLr] = "rotation FL", | ||
| 277 | [FLm] = "mirrored FL", | ||
| 278 | [BUr] = "rotation BU", | ||
| 279 | [BUm] = "mirrored BU", | ||
| 280 | [BRr] = "rotation BR", | ||
| 281 | [BRm] = "mirrored BR", | ||
| 282 | [BDr] = "rotation BD", | ||
| 283 | [BDm] = "mirrored BD", | ||
| 284 | [BLr] = "rotation BL", | ||
| 285 | [BLm] = "mirrored BL", | ||
| 286 | }; | ||
