diff options
Diffstat (limited to 'src/core/io_cube.h')
| -rw-r--r-- | src/core/io_cube.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/io_cube.h b/src/core/io_cube.h index cb0e4c7..9ae82d7 100644 --- a/src/core/io_cube.h +++ b/src/core/io_cube.h | |||
| @@ -39,7 +39,7 @@ readcube(const char *format, const char *buf) | |||
| 39 | return ioformat[i].read(buf); | 39 | return ioformat[i].read(buf); |
| 40 | 40 | ||
| 41 | LOG("Cannot read cube in the given format\n"); | 41 | LOG("Cannot read cube in the given format\n"); |
| 42 | return zero; | 42 | return ZERO_CUBE; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void | 45 | void |
| @@ -133,13 +133,13 @@ readcube_B32(const char *buf) | |||
| 133 | 133 | ||
| 134 | for (i = 0; i < 8; i++) { | 134 | for (i = 0; i < 8; i++) { |
| 135 | c[i] = b32tocorner(buf[i]); | 135 | c[i] = b32tocorner(buf[i]); |
| 136 | DBG_ASSERT(c[i] < 255, zero, | 136 | DBG_ASSERT(c[i] < 255, ZERO_CUBE, |
| 137 | "Error reading B32 corner %d (char %d)\n", i, i); | 137 | "Error reading B32 corner %d (char %d)\n", i, i); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | for (i = 0; i < 12; i++) { | 140 | for (i = 0; i < 12; i++) { |
| 141 | e[i] = b32toedge(buf[i+9]); | 141 | e[i] = b32toedge(buf[i+9]); |
| 142 | DBG_ASSERT(e[i] < 255, zero, | 142 | DBG_ASSERT(e[i] < 255, ZERO_CUBE, |
| 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 | ||
| @@ -159,10 +159,10 @@ readcube_H48(const char *buf) | |||
| 159 | while (*b == ' ' || *b == '\t' || *b == '\n') | 159 | while (*b == ' ' || *b == '\t' || *b == '\n') |
| 160 | b++; | 160 | b++; |
| 161 | if ((piece = readep(b)) == UINT8_ERROR) | 161 | if ((piece = readep(b)) == UINT8_ERROR) |
| 162 | return zero; | 162 | return ZERO_CUBE; |
| 163 | b += 2; | 163 | b += 2; |
| 164 | if ((orient = readeo(b)) == UINT8_ERROR) | 164 | if ((orient = readeo(b)) == UINT8_ERROR) |
| 165 | return zero; | 165 | return ZERO_CUBE; |
| 166 | b++; | 166 | b++; |
| 167 | e[i] = piece | orient; | 167 | e[i] = piece | orient; |
| 168 | } | 168 | } |
| @@ -170,10 +170,10 @@ readcube_H48(const char *buf) | |||
| 170 | while (*b == ' ' || *b == '\t' || *b == '\n') | 170 | while (*b == ' ' || *b == '\t' || *b == '\n') |
| 171 | b++; | 171 | b++; |
| 172 | if ((piece = readcp(b)) == UINT8_ERROR) | 172 | if ((piece = readcp(b)) == UINT8_ERROR) |
| 173 | return zero; | 173 | return ZERO_CUBE; |
| 174 | b += 3; | 174 | b += 3; |
| 175 | if ((orient = readco(b)) == UINT8_ERROR) | 175 | if ((orient = readco(b)) == UINT8_ERROR) |
| 176 | return zero; | 176 | return ZERO_CUBE; |
| 177 | b++; | 177 | b++; |
| 178 | c[i] = piece | orient; | 178 | c[i] = piece | orient; |
| 179 | } | 179 | } |
