weaver-framework
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Weaver-framework] Link options + stuff


From: Jocelyn Etienne
Subject: [Weaver-framework] Link options + stuff
Date: Thu, 24 Apr 2014 10:15:06 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello, and thanks for this soft. 

I'd like to mention than "-lz" option had to be added to compile the 
games with gcc (Debian 4.8.2-16) 4.8.2. 

My children are very happy to play pong, and it's good to be able to 
customize it, e.g. have a larger paddle for the younger, simply by 
scaling the jpeg (although I should fix the menu now!).  

I've also modified the ball.c code so that when the ball exits, it is 
put back at 3/4 of the screen, because the player whos has to catch it 
sometimes doesn't have time to reach the proper position when the ball 
is fast. Below are the patches, ideally there'd be a menu or at least a 
command-line option.

Best wishes,
Jocelyn

diff ball.c-old ball.c
20a21,24
> int sign (int x){
>   return (x>0)?1:(x<0)?-1:0;
> }
> 
45,46d48
<     ball -> x = window_width / 2;
<     ball -> y = window_height / 2 + 100;
47a50,51
>     ball -> x = window_width* (2 - sign( ball -> dx )) / 4;
>     ball -> y = window_height / 2 + 100;
54,55d57
<     ball -> x = window_width / 2;
<     ball -> y = window_height / 2 + 100;
56a59,60
>     ball -> x = window_width* (2 - sign( ball -> dx )) / 4;
>     ball -> y = window_height / 2 + 100;

23a24
>   paddle2 -> speed = 60;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]