Changeset 1945


Ignore:
Timestamp:
Sep 24, 2012, 8:42:47 AM (11 years ago)
Author:
sam
Message:

core: fix sorting of 2D scenes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scene.cpp

    r1846 r1945  
    5151        Tile const *t2 = (Tile const *)p2;
    5252
    53         return t2->prio - t1->prio;
     53        if (t1->pos.z > t2->pos.z)
     54            return 1;
     55        if (t1->pos.z < t2->pos.z)
     56            return -1;
     57        return 0;
    5458    }
    5559
     
    177181#endif
    178182    data->m_model_matrix *= mat4::translate(-320.0f, -240.0f, 0.0f);
     183#if __ANDROID__
     184    data->m_model_matrix = mat4::scale(1280.0f / 640,
     185                                       736.0f / 480,
     186                                       1.0f) * data->m_model_matrix;
     187#endif
    179188    // XXX: end of debug stuff
    180189
Note: See TracChangeset for help on using the changeset viewer.