Loading...
Searching...
No Matches
piece.h File Reference
#include <snes.h>

Go to the source code of this file.

Macros

#define CELLS_PER_PIECE   4
 
#define NUM_PIECE_TYPES   7
 
#define NUM_ROTATIONS   4
 
#define PIECE_I   1
 
#define PIECE_J   7
 
#define PIECE_L   6
 
#define PIECE_O   2
 
#define PIECE_S   4
 
#define PIECE_T   3
 
#define PIECE_Z   5
 

Functions

s8 pieceGetCellCol (u8 type, u8 rot, u8 i)
 
s8 pieceGetCellRow (u8 type, u8 rot, u8 i)
 
u8 pieceRandom (void)
 
u8 pieceRotateCCW (u8 rot)
 
u8 pieceRotateCW (u8 rot)
 
s8 pieceSpawnCol (u8 type)
 
s8 pieceSpawnRow (u8 type)
 

Macro Definition Documentation

◆ CELLS_PER_PIECE

#define CELLS_PER_PIECE   4

◆ NUM_PIECE_TYPES

#define NUM_PIECE_TYPES   7

◆ NUM_ROTATIONS

#define NUM_ROTATIONS   4

◆ PIECE_I

#define PIECE_I   1

◆ PIECE_J

#define PIECE_J   7

◆ PIECE_L

#define PIECE_L   6

◆ PIECE_O

#define PIECE_O   2

◆ PIECE_S

#define PIECE_S   4

◆ PIECE_T

#define PIECE_T   3

◆ PIECE_Z

#define PIECE_Z   5

Function Documentation

◆ pieceGetCellCol()

s8 pieceGetCellCol ( u8  type,
u8  rot,
u8  i 
)

◆ pieceGetCellRow()

s8 pieceGetCellRow ( u8  type,
u8  rot,
u8  i 
)

◆ pieceRandom()

u8 pieceRandom ( void  )

◆ pieceRotateCCW()

u8 pieceRotateCCW ( u8  rot)

◆ pieceRotateCW()

u8 pieceRotateCW ( u8  rot)

◆ pieceSpawnCol()

s8 pieceSpawnCol ( u8  type)

◆ pieceSpawnRow()

s8 pieceSpawnRow ( u8  type)