From 1df02fbc89e05753a76a70fa4ea0b61672b5dfe2 Mon Sep 17 00:00:00 2001 From: parking_turkeys Date: Wed, 15 Jul 2026 09:59:38 -0400 Subject: [PATCH] added an animation (it's not very good but at least the animation code is there now) --- dialogue-img/aichan-default.png | Bin 0 -> 581 bytes player.c | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 dialogue-img/aichan-default.png diff --git a/dialogue-img/aichan-default.png b/dialogue-img/aichan-default.png new file mode 100644 index 0000000000000000000000000000000000000000..35b83103daf46e692f6e93cd40c0df814baf7a42 GIT binary patch literal 581 zcmV-L0=oT)P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0oqAKK~z{r?T|}O z13?T#bAsG}`|l7N4v~8xwj3c;r)oUa?$1o3Bp}3-HMs5SehPDHbG_8qw3h>B_to1)0>wpOz?8wGffe%y9BOBE47jw=@ zYSPg0NeZy%5LJFF|HO{4j|rM6PJs7h65xtDHhabVdIqE;@Jt(K6)R!Fb7_Kx#bYoU zriL(#k`*xFIiKLmI-icEYP2$9;&Tq^qO`y%Dnj0@+nyNYnDwdXqEy5#9%}E;#HVBV zE>~h6J>f)364SQ0D)$EBg01{kTk-{d2jxdL<-932cYGbm9BoYIy(YWGz~2cZbF^vb z-tY5c;vGolXw%~c@z=+jx*EwGZF)dlJ@k6&l!5Sl#AJOdDOn2>E0E05W=!>BvZ59y zRv?+9&6N4C0hsEI`vQ2PJ-EPvA8(t{fc+L1_;=|z^O;Ltd T`oR~`00000NkvXXu0mjf%83MR literal 0 HcmV?d00001 diff --git a/player.c b/player.c index fbae32e..2ec37f4 100644 --- a/player.c +++ b/player.c @@ -20,7 +20,7 @@ struct character *spielersetup(void) front_single = LoadTextureFromImage(img); UnloadImage(img); img = LoadImage("aichan-front-sheet.png"); - struct spritesheet front_sheet = {img, 15, 18, 13}; + front_sheet.img = img; front_sheet.width_each = 15; front_sheet.height_each = 18; front_sheet.columns=13; UnloadImage(img); sheets[0] = &front_sheet; txtr = LoadTextureFromImage(front_sheet.img); @@ -34,12 +34,13 @@ int spielerzeichnen(void) time_since_switch += delta_player; if (time_since_switch >= FRAMELENGTH) { UnloadTexture(txtr); - - Image imgy = ImageFromImage((front_sheet.img),croprec); + Image imgy = LoadImage("aichan-front-sheet.png"); + ImageCrop(&imgy,croprec); //ImageCrop(&imgy, croprec); txtr = LoadTextureFromImage(imgy); UnloadImage(imgy); time_since_switch = 0.0; + if (croprec.x < front_sheet.width_each * (front_sheet.columns - 1)) {croprec.x += front_sheet.width_each;} else {croprec.x = 0;}; } DrawTexture(txtr, player.rect.x, player.rect.y, WHITE); -- 2.47.3