Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c709dcc authored by Jason Sams's avatar Jason Sams
Browse files

Implement basic snapping.

parent 9bee51c4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ int main(void* con, int ft, int launchID)
    storeF(2, SCRATCH_ZOOM, zoom);

    float targetRot = loadI32(0, STATE_FIRST_VISIBLE) / 180.0f * 3.14f;
    targetRot = targetRot * 0.80f - .12f;
    float drawRot = filter(loadF(2, SCRATCH_ROT), targetRot, 0.1f * touchCut);
    storeF(2, SCRATCH_ROT, drawRot);

+0 −14
Original line number Diff line number Diff line
@@ -264,20 +264,6 @@ public class RolloRS {
            mLabels[27] = mLabels[8];
            mLabels[28] = mLabels[9];

/*
            mIcons[19] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.solitaire, ie8888, true);
            mIcons[20] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.sudoku, ie8888, true);
            mIcons[21] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.taptaprevenge, ie8888, true);
            mIcons[22] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.tetris, ie8888, true);
            mIcons[23] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.tictactoe, ie8888, true);
            mIcons[24] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.tweetie, ie8888, true);
            mIcons[25] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.urbanspoon, ie8888, true);
            mIcons[26] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.waterslide_extreme, ie8888, true);
            mIcons[27] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.weather_channel, ie8888, true);
            mIcons[28] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.zippo, ie8888, true);
*/


            for(int ct=0; ct < mIcons.length; ct++) {
                mIcons[ct].uploadToTexture(0);
                mLabels[ct].uploadToTexture(0);
+2 −0
Original line number Diff line number Diff line
@@ -187,6 +187,8 @@ public class RolloView extends RSSurfaceView {
                mFlingY = ny;
            } else {
                mFlingMode = false;
                mColumn = (float)(java.lang.Math.floor(mColumn * 0.25f + 0.3f) * 4.f) + 1.f;
                setColumn(true);
            }
        }