1
0
Fork 0

Initial Commit

This commit is contained in:
Henrik Hautakoski 2025-07-04 07:34:31 +02:00
commit 5314a9d5c5
308 changed files with 190647 additions and 0 deletions

31
include/shape.h Normal file
View file

@ -0,0 +1,31 @@
#ifndef __SHAPE_H
#define __SHAPE_H
#include "render/tile.h"
#include <stdint.h>
#include <sys/types.h>
#define NUM_SHAPES 7
typedef enum {
SHAPE_O,
SHAPE_L,
SHAPE_J,
SHAPE_T,
SHAPE_Z,
SHAPE_S,
SHAPE_I,
} SHAPETYPE;
typedef struct _shape {
uint8_t type;
int8_t coordinates[6];
} shape_t;
void shape_create(shape_t* shape, SHAPETYPE type);
void shape_copy(shape_t* dest, const shape_t* src);
tile_t shape_color(const shape_t* shape);
#endif /* __SHAPE_H */