|
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) |
|
|
} |
|
|
} |
|
|
if(down) |
|
|
if(down) |
|
|
{ |
|
|
{ |
|
|
while((movable(current_piece, x-1, y, rotation)) && (!has_landed(current_piece, x-1, y, rotation))) |
|
|
|
|
|
|
|
|
while((movable(current_piece, x, y, rotation)) && (!has_landed(current_piece, x, y, rotation))) |
|
|
{ |
|
|
{ |
|
|
fixed_y+=speed; |
|
|
fixed_y+=speed; |
|
|
y = fixed_y>>8; |
|
|
y = fixed_y>>8; |
|
@@ -303,7 +303,6 @@ unsigned char has_landed(unsigned int id, unsigned int x, unsigned int y, unsign |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -319,8 +318,9 @@ unsigned char maybe_remove_line(void) |
|
|
|
|
|
|
|
|
if(v==FIELD_WIDTH) { |
|
|
if(v==FIELD_WIDTH) { |
|
|
memmove(&playfield[FIELD_WIDTH], playfield, (FIELD_HEIGHT-1)*FIELD_WIDTH); |
|
|
memmove(&playfield[FIELD_WIDTH], playfield, (FIELD_HEIGHT-1)*FIELD_WIDTH); |
|
|
|
|
|
ret++; |
|
|
ret += maybe_remove_line(); |
|
|
ret += maybe_remove_line(); |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
return 0; |
|
|
|
|
|
|
|
|
return ret; |
|
|
} |
|
|
} |