X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=fa90a18a2138f5b921c81a46a17c9915552a5ab8;hp=9e3cb2d5bfc54984a6b387267cd87bd51077492a;hb=6d1e2a49ce7bcb72838bce2b7962d20570dfa84e;hpb=0bbce418109732b9b7a61040b5d8a409ad90f977 diff --git a/scene.c b/scene.c index 9e3cb2d..fa90a18 100644 --- a/scene.c +++ b/scene.c @@ -311,7 +311,7 @@ void motion(int x, int y) { float scaling; if ( diff < 0 ) { - scaling = (diff - (float)-height)/(0 - (float)-height); + scaling = (diff - -((float)height/2))/(0 - -((float)height/2)); } else { scaling = diff; } @@ -322,6 +322,7 @@ void motion(int x, int y) { sceneObjs[curObject].scale[2] += scaling; } + starty = y; startx = x; break;