diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-04 12:01:41 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-04 12:01:41 +0200 |
| commit | 80b065f757240af7920862b3e09f32a6dc06d392 (patch) | |
| tree | c0223ba1f0a3254305f59637b3fb25bd58698cf8 /src/core/io_cube.h | |
| parent | fd111a1a51b8293f79db6284331af50824df92b9 (diff) | |
| download | nissy-core-80b065f757240af7920862b3e09f32a6dc06d392.tar.gz nissy-core-80b065f757240af7920862b3e09f32a6dc06d392.zip | |
Table-based transformations (will revert immediately)
This commit changes transformations to being based on a lookup
table intead of a big switch. This is something I had planned for a long
time and the code is nicer with this change. But unfortunately the performance
is noticeably worse, so I'll revert all these changes in the next commit.
I wanted to push this anyway so we can keep track of this.
Diffstat (limited to '')
| -rw-r--r-- | src/core/io_cube.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/io_cube.h b/src/core/io_cube.h index 9ae82d7..58b332c 100644 --- a/src/core/io_cube.h +++ b/src/core/io_cube.h | |||
| @@ -143,7 +143,7 @@ readcube_B32(const char *buf) | |||
| 143 | "Error reading B32 edge %d (char %d)\n", i, i+9); | 143 | "Error reading B32 edge %d (char %d)\n", i, i+9); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | return cubefromarray(c, e); | 146 | return cubefromarray_ce(c, e); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | STATIC cube_t | 149 | STATIC cube_t |
| @@ -178,7 +178,7 @@ readcube_H48(const char *buf) | |||
| 178 | c[i] = piece | orient; | 178 | c[i] = piece | orient; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | return cubefromarray(c, e); | 181 | return cubefromarray_ce(c, e); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | STATIC uint8_t | 184 | STATIC uint8_t |
| @@ -210,7 +210,7 @@ readcube_LST(const char *buf) | |||
| 210 | for (i = 0; i < 12; i++) | 210 | for (i = 0; i < 12; i++) |
| 211 | e[i] = readpiece_LST(&buf); | 211 | e[i] = readpiece_LST(&buf); |
| 212 | 212 | ||
| 213 | return cubefromarray(c, e); | 213 | return cubefromarray_ce(c, e); |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | STATIC int | 216 | STATIC int |
