return any;
}
+ExtFunc int GlanceFunc(int scr, int y, int x, BlockType type, void *data)
+{
+ PlotBlock1(scr, y, x, type);
+ return 0;
+}
+
ExtFunc int PlotFunc(int scr, int y, int x, BlockType type, void *data)
{
SetBlock(scr, y, x, type);
return result;
}
-ExtFunc int RotatePiece(int scr)
+ExtFunc int RotatePiece(int scr, int dir)
{
int result;
EraseShape(curShape[scr], scr, curY[scr], curX[scr]);
- result = ShapeFits(curShape[scr]->rotateTo, scr, curY[scr], curX[scr]);
+ result = ShapeFits(dir ? curShape[scr]->rotateTo : curShape[scr]->rotateFrom,
+ scr, curY[scr], curX[scr]);
if (result)
- curShape[scr] = curShape[scr]->rotateTo;
+ curShape[scr] = dir ? curShape[scr]->rotateTo : curShape[scr]->rotateFrom;
PlotShape(curShape[scr], scr, curY[scr], curX[scr], 1);
return result;
}