From ca3d6dc5dc7af97e41c9a3d9ee1f57b2b214c86e Mon Sep 17 00:00:00 2001 From: Felix Arends Date: Sun, 28 Apr 2002 09:10:47 +0000 Subject: [PATCH] commented and explained block_data array git-svn-id: svn://svn.rockbox.org/rockbox/trunk@294 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/tetris.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/uisimulator/tetris.c b/uisimulator/tetris.c index 53dace345d..31abe5ae36 100644 --- a/uisimulator/tetris.c +++ b/uisimulator/tetris.c @@ -45,6 +45,21 @@ char virtual[LCD_WIDTH*LCD_HEIGHT]; short level_speeds[10] = {1000,900,800,700,600,500,400,300,250,200}; int blocks = 7; int block_frames[7] = {1,2,2,2,4,4,4}; + +/* + block_data is built up the following way + + first array index specifies the block number + second array index specifies the rotation of the block + third array index specifies: + 0: x-coordinates of pixels + 1: y-coordinates of pixels + fourth array index specifies the coordinate of a pixel + + each block consists of four pixels whose relative coordinates are given + with block_data +*/ + int block_data[7][4][2][4] = { {