aboutsummaryrefslogtreecommitdiff
path: root/sprites.ino
blob: 0f3d1bf43676d88f221802b6ffb344207260bded (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "sprites.h"

void initSprites() {
	/* The sprites work by having a reference to the rotated block
	 * Had some issues with linking them up i .h files, thus this is done here */
	iBlock.rotateNext = &iBlockR;
	iBlockR.rotateNext = &iBlock;

	oBlock.rotateNext = &oBlock;

	tBlock.rotateNext = &tBlockR;
	tBlockR.rotateNext = &tBlockD;
	tBlockD.rotateNext = &tBlockL;
	tBlockL.rotateNext = &tBlock;

	sBlock.rotateNext = &sBlockR;
	sBlockR.rotateNext = &sBlock;

	zBlock.rotateNext = &zBlockR;
	zBlockR.rotateNext = &zBlock;

	jBlock.rotateNext =  &jBlockR;
	jBlockR.rotateNext = &jBlockD;
	jBlockD.rotateNext = &jBlockL;
	jBlockL.rotateNext = &jBlock;

	lBlock.rotateNext =  &lBlockR;
	lBlockR.rotateNext = &lBlockD;
	lBlockD.rotateNext = &lBlockL;
	lBlockL.rotateNext = &lBlock;
}