fixed stupid input interpretation bug

This commit is contained in:
Christian Kroll 2010-08-28 15:23:03 +00:00
parent e23f079ae9
commit a246779eff
1 changed files with 9 additions and 2 deletions

View File

@ -81,6 +81,13 @@ void tetris_fp_setLastInput(void *pVariantData,
tetris_standard_variant_t *pStdVariant = tetris_standard_variant_t *pStdVariant =
(tetris_standard_variant_t *)pVariantData; (tetris_standard_variant_t *)pVariantData;
pStdVariant->nBearing = if (inCmd == TETRIS_INCMD_ROT_CW)
(pStdVariant->nBearing + (TETRIS_INCMD_ROT_CW ? 1 : 3)) % 4; {
pStdVariant->nBearing += 1;
}
else if (inCmd == TETRIS_INCMD_ROT_CCW)
{
pStdVariant->nBearing += 3;
}
pStdVariant->nBearing %= 4;
} }