From 783ac75683a26baa669839298689b6b79854a6ae Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 19 May 2022 17:07:05 +0200 Subject: [PATCH] fix kirby size --- src/credits.c | 9 ++++----- src/kirby.c | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/credits.c b/src/credits.c index d61b1af..226fe3c 100644 --- a/src/credits.c +++ b/src/credits.c @@ -7,6 +7,7 @@ void kirbyRotation(int etat) { static GLuint boule = 0, proc_id = 0, tex_id = 0; static int a = 0; + static GLfloat b = 0.f; switch(etat) { case GL4DH_INIT: @@ -52,6 +53,7 @@ void kirbyRotation(int etat) { gl4duPushMatrix(); gl4duRotatef(135 - a, 0, 1, 0); + gl4duScalef(.23f + b, .23f + b, .23f + b); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); gl4duSendMatrices(); @@ -65,8 +67,8 @@ void kirbyRotation(int etat) { glUseProgram(0); - a += 6; - printf("rot=%d\n", 135-a); + a += 2; + b += 0.012f; break; default: @@ -76,7 +78,6 @@ void kirbyRotation(int etat) { void kirbyCredits(int etat) { static GLuint boule = 0, proc_id = 0, tex_id = 0; - static int a = 0; switch(etat) { case GL4DH_INIT: @@ -134,8 +135,6 @@ void kirbyCredits(int etat) { gl4duPopMatrix(); glUseProgram(0); - - a += 7; break; default: diff --git a/src/kirby.c b/src/kirby.c index dbae5db..a7def2e 100644 --- a/src/kirby.c +++ b/src/kirby.c @@ -57,10 +57,10 @@ void kirby(int etat) { if(musique[0] != 0 || musique[1] != 0) { s = (s - musique[0]) / (musique[1] - musique[0]) + .2f; if(s > musique[2]) { - s -= s / 20.f; + s -= s / 7.f; } if(s < musique[2]) { - s += s / 20.f; + s += s / 7.f; } } musique[1] = musique[1] < s ? s : musique[1];