diff --git a/card.c b/card.c index 5074afc..37be84b 100644 --- a/card.c +++ b/card.c @@ -6,12 +6,12 @@ static char *month_english_abbr[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun" void draw_card(Card *c, Texture2D *cards_texture) { int i_vert = c->index % 4; int i_horiz = c->index / 4; - int pos_vert = i_vert * 240; - int pos_horiz = i_horiz * 146; + int pos_vert = i_vert * CARD_HEIGHT; + int pos_horiz = i_horiz * CARD_WIDTH; DrawTexturePro( *cards_texture, - (Rectangle) { pos_horiz, pos_vert, 146, 240 }, + (Rectangle) { pos_horiz, pos_vert, CARD_WIDTH, CARD_HEIGHT }, (Rectangle) { c->position.x, c->position.y, card_size.x, card_size.y }, (Vector2) { 0, 0 }, 0., diff --git a/card.h b/card.h index c9bf09c..e00e9b4 100644 --- a/card.h +++ b/card.h @@ -6,8 +6,8 @@ typedef struct Card Card; typedef struct Hand Hand; -#define CARD_WIDTH 63 -#define CARD_HEIGHT 105 +#define CARD_WIDTH 73 +#define CARD_HEIGHT 120 #define CARD_BORDER 5 typedef enum CardType { diff --git a/img/cards.aseprite b/img/cards.aseprite index e8dc32c..e718ec2 100644 Binary files a/img/cards.aseprite and b/img/cards.aseprite differ diff --git a/img/cards.png b/img/cards.png index 48e7ff6..d43999c 100644 Binary files a/img/cards.png and b/img/cards.png differ diff --git a/main.c b/main.c index a278944..a5d6ab1 100644 --- a/main.c +++ b/main.c @@ -13,7 +13,7 @@ char *text = "こんにちわ、 世界!"; int main(int argc, char** argv) { - InitWindow(800, 550, "Hanafuda Hachi-Hachi"); + InitWindow(900, 600, "Hanafuda Hachi-Hachi"); SetTargetFPS(60); Image cards_image = LoadImage("img/cards.png"); @@ -70,7 +70,7 @@ int main(int argc, char** argv) { case 41: t = ANIMAL; break; } - cards[i] = (Card) { i, t, rt, month, (Vector2) { month * 65, (i % 4) * 110 }, false }; + cards[i] = (Card) { i, t, rt, month, (Vector2) { month * 75, (i % 4) * 123 }, false }; } // float delta; @@ -122,7 +122,7 @@ int main(int argc, char** argv) { dekiyaku_to_string(&d, dekiyaku_calculation); } - DrawText(teyaku_calculation, 10, 450, 25, BLACK); + DrawText(teyaku_calculation, 10, 550, 25, BLACK); DrawText(dekiyaku_calculation, 10, 500, 25, BLACK); EndDrawing(); }