remove the lookup table / binary-encoded logic.

This commit is contained in:
2025-07-03 09:46:40 +02:00
parent 6a807b59d7
commit b89fc62513
2 changed files with 0 additions and 59 deletions

View File

@@ -1,7 +1,6 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <sys/cdefs.h>
#include "../../io/colour/colour8.h"
#include "../../util/types.h"
@@ -25,14 +24,5 @@ enum {
#define SHAPE_HEIGHT 4
#define TETROMINO_COUNT 7
static inline u8 shape_get_row(u16 shape, u8 index) __attribute_deprecated_msg__("switching to a logic-based tetromino storage") {
return shape >> (((SHAPE_HEIGHT - 1) - index) * SHAPE_WIDTH) & 0xF;
}
static inline bool shape_is_set(u8 row, u8 index) __attribute_deprecated_msg__("switching to a logic-based tetromino storage") {
return (row >> ((SHAPE_WIDTH - 1) - index) & 1) != 0;
}
void shape_getblocks(u8 id, i8vec2* out);
u16 shape_from_id(u8 id) __attribute_deprecated_msg__("switching to a logic-based tetromino storage");
colour8 colour_from_id(u8 id);