aboutsummaryrefslogtreecommitdiff
path: root/src/core/transform_with_switch.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-09-03 21:52:16 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-09-03 21:52:16 +0200
commitc9e2d6466e42d6b779ac9ffa7c5ee9a9c7558df8 (patch)
treef4f569fcbd4d6704fb5dd44892911ce808f03332 /src/core/transform_with_switch.h
parentff4bde84872ec0b93f0f097f5a56bd5e7cbb0311 (diff)
downloadnissy-core-c9e2d6466e42d6b779ac9ffa7c5ee9a9c7558df8.tar.gz
nissy-core-c9e2d6466e42d6b779ac9ffa7c5ee9a9c7558df8.zip
Moved stuff around
Diffstat (limited to 'src/core/transform_with_switch.h')
-rw-r--r--src/core/transform_with_switch.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/transform_with_switch.h b/src/core/transform_with_switch.h
index d3a108c..429e656 100644
--- a/src/core/transform_with_switch.h
+++ b/src/core/transform_with_switch.h
@@ -17,6 +17,11 @@
17 invertco(compose(compose(_trans_cube_ ## T, c), \ 17 invertco(compose(compose(_trans_cube_ ## T, c), \
18 _trans_cube_ ## T ## _inverse)) 18 _trans_cube_ ## T ## _inverse))
19 19
20_static cube_t transform_edges(cube_t, uint8_t);
21_static cube_t transform_corners(cube_t, uint8_t);
22_static cube_t transform(cube_t, uint8_t);
23_static cube_t applytrans(cube_t, const char *);
24
20_static cube_t 25_static cube_t
21transform_edges(cube_t c, uint8_t t) 26transform_edges(cube_t c, uint8_t t)
22{ 27{
@@ -334,3 +339,16 @@ transform(cube_t c, uint8_t t)
334 return zero; 339 return zero;
335 } 340 }
336} 341}
342
343_static cube_t
344applytrans(cube_t cube, const char *buf)
345{
346 uint8_t t;
347
348 DBG_ASSERT(isconsistent(cube), zero,
349 "transformation error: inconsistent cube\n");
350
351 t = readtrans(buf);
352
353 return transform(cube, t);
354}

Generated with cgit - Back to sebastiano.tronto.net