From: Ash Tyndall Date: Sat, 22 Oct 2011 01:45:29 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=commitdiff_plain;h=b09b1364ed07276886bbc6ef939445bc7fef8fb3 --- diff --git a/scene.c b/scene.c index 2cfafa1..003b2ea 100644 --- a/scene.c +++ b/scene.c @@ -308,8 +308,6 @@ void motion(int x, int y) { // For big/small scaling, we map negative numbers to 0->1 and positive numbers to 1->inf float diff = (y - starty); - if ( diff < 0 ) diff--; - if ( diff > 0 ) diff++; float scaling; if ( diff < 0 ) { @@ -322,9 +320,10 @@ void motion(int x, int y) { sceneObjs[curObject].scale[0] = scaling; sceneObjs[curObject].scale[1] = scaling; sceneObjs[curObject].scale[2] = scaling; + + starty = y + diff; } - starty = y; startx = x; break;