diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-09-17 21:50:34 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-09-17 21:50:34 +0200 |
| commit | 1f7e8e937d0e71e7eb3b5deab38b34d0a0159d88 (patch) | |
| tree | 3eddf00f6f44356596b688325d4ef197c0e673e0 /src/core | |
| parent | aa306fa0a2047f30d585da7923f963e8d321aa0b (diff) | |
| download | nissy-core-include-guards.tar.gz nissy-core-include-guards.zip | |
Added include guardsHEADmasterinclude-guards
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/constants.h | 5 | ||||
| -rw-r--r-- | src/core/core.h | 5 | ||||
| -rw-r--r-- | src/core/core_types.h | 5 | ||||
| -rw-r--r-- | src/core/cube.h | 5 | ||||
| -rw-r--r-- | src/core/moves.h | 5 | ||||
| -rw-r--r-- | src/core/oriented_cube.h | 5 | ||||
| -rw-r--r-- | src/core/transform.h | 5 |
7 files changed, 35 insertions, 0 deletions
diff --git a/src/core/constants.h b/src/core/constants.h index 076a483..7e51f67 100644 --- a/src/core/constants.h +++ b/src/core/constants.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef CORE_CONSTANTS_H | ||
| 2 | #define CORE_CONSTANTS_H | ||
| 3 | |||
| 1 | #define ZERO_ORIENTED_CUBE ((oriented_cube_t) {0}) | 4 | #define ZERO_ORIENTED_CUBE ((oriented_cube_t) {0}) |
| 2 | #define SOLVED_ORIENTED_CUBE \ | 5 | #define SOLVED_ORIENTED_CUBE \ |
| 3 | ((oriented_cube_t) { .cube = SOLVED_CUBE, .orientation = 0 }) | 6 | ((oriented_cube_t) { .cube = SOLVED_CUBE, .orientation = 0 }) |
| @@ -913,3 +916,5 @@ STATIC uint8_t basic_to_rotation[] = { | |||
| 913 | [MOVE_B2] = MOVE_z2, | 916 | [MOVE_B2] = MOVE_z2, |
| 914 | [MOVE_B3] = MOVE_z, | 917 | [MOVE_B3] = MOVE_z, |
| 915 | }; | 918 | }; |
| 919 | |||
| 920 | #endif /* CORE_CONSTANTS_H */ | ||
diff --git a/src/core/core.h b/src/core/core.h index 5e0faaa..d1c0ec1 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | #ifndef CORE_CORE_H | ||
| 2 | #define CORE_CORE_H | ||
| 3 | |||
| 1 | #include "core_types.h" | 4 | #include "core_types.h" |
| 2 | #include "constants.h" | 5 | #include "constants.h" |
| 3 | #include "cube.h" | 6 | #include "cube.h" |
| 4 | #include "moves.h" | 7 | #include "moves.h" |
| 5 | #include "transform.h" | 8 | #include "transform.h" |
| 6 | #include "oriented_cube.h" | 9 | #include "oriented_cube.h" |
| 10 | |||
| 11 | #endif /* CORE_CORE_H */ | ||
diff --git a/src/core/core_types.h b/src/core/core_types.h index 53cc95e..6f69a8b 100644 --- a/src/core/core_types.h +++ b/src/core/core_types.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef CORE_CORE_TYPES_H | ||
| 2 | #define CORE_CORE_TYPES_H | ||
| 3 | |||
| 1 | typedef struct { | 4 | typedef struct { |
| 2 | cube_t cube; | 5 | cube_t cube; |
| 3 | uint8_t orientation; | 6 | uint8_t orientation; |
| @@ -9,3 +12,5 @@ typedef struct { | |||
| 9 | uint8_t normal[NISSY_SIZE_MOVES]; | 12 | uint8_t normal[NISSY_SIZE_MOVES]; |
| 10 | uint8_t inverse[NISSY_SIZE_MOVES]; | 13 | uint8_t inverse[NISSY_SIZE_MOVES]; |
| 11 | } moves_struct_t; | 14 | } moves_struct_t; |
| 15 | |||
| 16 | #endif /* CORE_CORE_TYPES_H */ | ||
diff --git a/src/core/cube.h b/src/core/cube.h index 1c21ce1..1dc6b61 100644 --- a/src/core/cube.h +++ b/src/core/cube.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef CORE_CUBE_H | ||
| 2 | #define CORE_CUBE_H | ||
| 3 | |||
| 1 | STATIC bool cube_true(cube_t); | 4 | STATIC bool cube_true(cube_t); |
| 2 | 5 | ||
| 3 | STATIC cube_t cubefromarray(uint8_t [SIZE(8)], uint8_t [SIZE(12)]); | 6 | STATIC cube_t cubefromarray(uint8_t [SIZE(8)], uint8_t [SIZE(12)]); |
| @@ -369,3 +372,5 @@ cornertob32(uint8_t corner) | |||
| 369 | 372 | ||
| 370 | return val < 26 ? 'A' + (char)val : 'a' + (char)(val - 26); | 373 | return val < 26 ? 'A' + (char)val : 'a' + (char)(val - 26); |
| 371 | } | 374 | } |
| 375 | |||
| 376 | #endif /* CORE_CUBE_H */ | ||
diff --git a/src/core/moves.h b/src/core/moves.h index 9f1f7cc..19314de 100644 --- a/src/core/moves.h +++ b/src/core/moves.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef CORE_MOVES_H | ||
| 2 | #define CORE_MOVES_H | ||
| 3 | |||
| 1 | #define MOVE(M, c) compose(c, MOVE_CUBE_ ## M) | 4 | #define MOVE(M, c) compose(c, MOVE_CUBE_ ## M) |
| 2 | #define PREMOVE(M, c) compose(MOVE_CUBE_ ## M, c) | 5 | #define PREMOVE(M, c) compose(MOVE_CUBE_ ## M, c) |
| 3 | 6 | ||
| @@ -719,3 +722,5 @@ unniss_error: | |||
| 719 | LOG("[variations] Error writing result.\n"); | 722 | LOG("[variations] Error writing result.\n"); |
| 720 | return NISSY_ERROR_BUFFER_SIZE; | 723 | return NISSY_ERROR_BUFFER_SIZE; |
| 721 | } | 724 | } |
| 725 | |||
| 726 | #endif /* CORE_MOVES_H */ | ||
diff --git a/src/core/oriented_cube.h b/src/core/oriented_cube.h index 5449204..cc08736 100644 --- a/src/core/oriented_cube.h +++ b/src/core/oriented_cube.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef CORE_ORIENTED_CUBE_H | ||
| 2 | #define CORE_ORIENTED_CUBE_H | ||
| 3 | |||
| 1 | STATIC oriented_cube_t solvedcube(void); | 4 | STATIC oriented_cube_t solvedcube(void); |
| 2 | 5 | ||
| 3 | STATIC oriented_cube_t move_extended(oriented_cube_t, uint8_t); | 6 | STATIC oriented_cube_t move_extended(oriented_cube_t, uint8_t); |
| @@ -75,3 +78,5 @@ applymoves(oriented_cube_t cube, const char *buf) | |||
| 75 | cinv.cube = inverse(cinv.cube); | 78 | cinv.cube = inverse(cinv.cube); |
| 76 | return compose_oriented(cinv, c); | 79 | return compose_oriented(cinv, c); |
| 77 | } | 80 | } |
| 81 | |||
| 82 | #endif /* CORE_ORIENTED_CUBE_H */ | ||
diff --git a/src/core/transform.h b/src/core/transform.h index af4634e..1c896e0 100644 --- a/src/core/transform.h +++ b/src/core/transform.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef CORE_TRANSFORM_H | ||
| 2 | #define CORE_TRANSFORM_H | ||
| 3 | |||
| 1 | #define TRANS_EDGES_ROTATION(T, c) \ | 4 | #define TRANS_EDGES_ROTATION(T, c) \ |
| 2 | compose_edges(compose_edges(TRANS_CUBE_ ## T, c), \ | 5 | compose_edges(compose_edges(TRANS_CUBE_ ## T, c), \ |
| 3 | TRANS_CUBE_ ## T ## _INVERSE) | 6 | TRANS_CUBE_ ## T ## _INVERSE) |
| @@ -418,3 +421,5 @@ symmetry_mask(cube_t cube) | |||
| 418 | 421 | ||
| 419 | return ret; | 422 | return ret; |
| 420 | } | 423 | } |
| 424 | |||
| 425 | #endif /* CORE_TRANSFORM_H */ | ||
