diff options
| author | enricotenuti <tenutz_27@outlook.it> | 2024-08-30 17:47:48 +0200 |
|---|---|---|
| committer | enricotenuti <tenutz_27@outlook.it> | 2024-08-30 17:47:48 +0200 |
| commit | 4abb800c4b4f3a509c07821ade8d34e3699bdf10 (patch) | |
| tree | 92656dec1fe1ae38365d93c5a910fd415f979e1e /src/core/moves.h | |
| parent | 754e632241859b224497ee4e0239670d5d90759f (diff) | |
| download | nissy-core-4abb800c4b4f3a509c07821ade8d34e3699bdf10.tar.gz nissy-core-4abb800c4b4f3a509c07821ade8d34e3699bdf10.zip | |
format fix
Diffstat (limited to 'src/core/moves.h')
| -rw-r--r-- | src/core/moves.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/moves.h b/src/core/moves.h index 9753993..8f9c8f5 100644 --- a/src/core/moves.h +++ b/src/core/moves.h | |||
| @@ -12,6 +12,7 @@ _static uint32_t allowednextmoveH48(uint8_t *, uint8_t, uint32_t); | |||
| 12 | _static_inline uint8_t inverse_trans(uint8_t); | 12 | _static_inline uint8_t inverse_trans(uint8_t); |
| 13 | _static_inline uint8_t movebase(uint8_t); | 13 | _static_inline uint8_t movebase(uint8_t); |
| 14 | _static_inline uint8_t moveaxis(uint8_t); | 14 | _static_inline uint8_t moveaxis(uint8_t); |
| 15 | _static_inline uint32_t disable_moves(uint32_t, uint8_t); | ||
| 15 | 16 | ||
| 16 | _static cube_t move(cube_t, uint8_t); | 17 | _static cube_t move(cube_t, uint8_t); |
| 17 | _static cube_t premove(cube_t, uint8_t); | 18 | _static cube_t premove(cube_t, uint8_t); |
| @@ -43,10 +44,10 @@ allowednextmove(uint8_t *moves, uint8_t n) | |||
| 43 | return axis[1] != axis[2] || base[0] != base[2]; | 44 | return axis[1] != axis[2] || base[0] != base[2]; |
| 44 | } | 45 | } |
| 45 | 46 | ||
| 46 | static uint32_t | 47 | _static_inline uint32_t |
| 47 | disable_moves(uint32_t current_result, uint8_t base_index) | 48 | disable_moves(uint32_t current_result, uint8_t base_index) |
| 48 | { | 49 | { |
| 49 | return current_result & ~((1 << base_index) | (1 << (base_index + 1)) | (1 << (base_index + 2))); | 50 | return current_result & ~(7 << base_index); |
| 50 | } | 51 | } |
| 51 | 52 | ||
| 52 | _static uint32_t | 53 | _static uint32_t |
| @@ -144,7 +145,7 @@ move(cube_t c, uint8_t m) | |||
| 144 | _static cube_t | 145 | _static cube_t |
| 145 | premove(cube_t c, uint8_t m) | 146 | premove(cube_t c, uint8_t m) |
| 146 | { | 147 | { |
| 147 | switch (m) { | 148 | switch (m) { |
| 148 | case _move_U: | 149 | case _move_U: |
| 149 | return _premove(U3, c); | 150 | return _premove(U3, c); |
| 150 | case _move_U2: | 151 | case _move_U2: |
