diff options
-rw-r--r-- | src/game.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -60,7 +60,7 @@ int main(void) { srand((unsigned int)time(NULL)); LoadAssets(); - InitGame(3); + InitGame(2); while(!WindowShouldClose()) { UpdateGame(GetFrameTime()); @@ -181,13 +181,13 @@ void UpdateCard(Card* c, float dt) { } static inline float HandWidth(int hand) { - return game.cardsInHand[hand] * CARD_WIDTH; + return (float)game.cardsInHand[hand] * CARD_WIDTH; } //Moves all the cards in the hand indexed to their correct positions void PositionCardsInHand(int hand) { float centerXpos = - (WINDOW_WIDTH - HandWidth(hand)) / 2.0; + (WINDOW_WIDTH - HandWidth(hand)) / 2.0f; float positionsX[] = { game.playerCount < 3 ? centerXpos : 0.0f, @@ -333,10 +333,10 @@ void HandleMousePress() { } MoveToStack(game.hands[game.turn], - i, - &game.cardsInHand[game.turn], - 0.5 - ); + i, + &game.cardsInHand[game.turn], + 0.5 + ); PositionCardsInHand(game.turn); } } |