rowData
seems to be key here: It appears to contain all pixels of the piece, in binary form (one integer per row). So, if you move the piece to the right, you have to shift its values right instead of left, in addition to changing the test and incrementation.
Also note that this code does not check for existing pieces in the way: It only checks for bounds.
The moving code shold be something like this:
int8_t move_piece_right(piece_type* piecePtr) {
int8_t row;
/*
* Check if piece is all the way to the right If so, return.
* (Remember, column number is based on bit position - higher
* numbers to the left.
*/
if(piecePtr->right_column == 0) {
return 0;
}
/*
* Make the move.
*/
for(row=0; row < piecePtr->y_dimension; row++) {
piecePtr->rowdata[row] >>= 1;
}
piecePtr->right_column--;
return 1;
}