for (x = 0; x < Players[scr].boardWidth; ++x) {
oldBoard[scr][y][x] = board[scr][y][x] = BT_none;
}
-} //ClearField
+}
unsigned char GetBlock(int scr, int y, int x)
{ //Returns the block on field at position (x,y)
return BT_none;
else
return board[scr][y][x];
-} //GetBlock
+}
void SetBlock(int scr, int y, int x, unsigned char type)
{
board[scr][y][x] = type;
changed[scr][y] |= 1 << x;
}
-} //SetBlock
+}
int RefreshBoard(int scr)
{ //draw changes to screen
any = 1;
} //changed row
return any;
-} //RefreshBoard
+}
int GlanceFunc(int scr, int y, int x, unsigned char type)
{
PlotBlockXY(y, x, type);
return 0;
-} //GlanceFunc
+}
int ShadowFunc(int scr, int y, int x, unsigned char type)
{ //draw shadow
SetBlock(scr, y, x, BT_shadow);
return 0;
-} //ShadowFunc
+}
int PlotFunc(int scr, int y, int x, unsigned char type)
{
ShapeIterate(shape, scr, shadowy + 1, x, ShadowFunc);
} //draw shadow
ShapeIterate(shape, scr, y, x, PlotFunc);
-} //PlotShape
+}
int EraseFunc(int scr, int y, int x, unsigned char type)
{
ShapeIterate(shape, scr, y, x, EraseFunc);
if (shadow && scr == me) //draw shadow
ShapeIterate(shape, scr, shadowy + 1, x, EraseFunc);
-} //EraseShape
+}
int CollisionFunc(int scr, int y, int x, unsigned char type)
{
int ShapeFits(char shape, int scr, int y, int x)
{ //check if there's nothing in the way
return !ShapeIterate(shape, scr, y, x, CollisionFunc);
-} //ShapeFits
+}
int VisibleFunc(int scr, int y, int x, unsigned char type)
{
int ShapeVisible(char shape, int scr, int y, int x)
{
return ShapeIterate(shape, scr, y, x, VisibleFunc);
-} //ShapeVisible
+}
int MovePiece(int scr, int deltaY, int deltaX)
{
PlotShape(Players[scr].curShape, scr, Players[scr].curY, Players[scr].curX,
scr == me);
return result;
-} //MovePiece
+}
int RotatePiece(int scr, int dir)
{
PlotShape(Players[scr].curShape, scr,
Players[scr].curY, Players[scr].curX, scr == me);
return result;
-} //RotatePiece
+}
int DropPiece(int scr)
{
PlotShape(Players[scr].curShape, scr,
Players[scr].curY, Players[scr].curX, 0);
return count;
-} //DropPiece
+}
int BlockFree(int scr, int x, int y, unsigned char z)
{ //Check if blocks are empty below block (x,y) and sticking to (x,y) mask <z>
else break;
PlotShape(Players[scr].curShape, scr, Players[scr].curY, Players[scr].curX,
scr == me);
-} //InoertJunk
+}
/*
* vi: ts=4 ai