- Tractant d'arreglar l'ordenació
This commit is contained in:
@@ -83,6 +83,7 @@ namespace actor
|
||||
|
||||
void setDirty(actor_t *act, const bool force)
|
||||
{
|
||||
/*
|
||||
if (act->prev==nullptr && act != first && !force) return;
|
||||
|
||||
if (act->prev) act->prev->next = act->next;
|
||||
@@ -92,12 +93,20 @@ namespace actor
|
||||
act->prev = nullptr;
|
||||
act->next = dirty;
|
||||
dirty = act;
|
||||
*/
|
||||
}
|
||||
|
||||
void insert(actor_t *act)
|
||||
{
|
||||
act->next = first;
|
||||
first = act;
|
||||
}
|
||||
|
||||
void reorder()
|
||||
{
|
||||
anim_frame=(anim_frame+1)%4;
|
||||
|
||||
dirty=first;
|
||||
first=nullptr;
|
||||
while (dirty)
|
||||
{
|
||||
//const int z_index = dirty->pos.x + dirty->pos.y + dirty->pos.z;
|
||||
@@ -108,7 +117,9 @@ namespace actor
|
||||
{
|
||||
//const int z_index2 = current->pos.x + current->pos.y + current->pos.z;
|
||||
//if ((dirty->pos.z < current->pos.z+current->size.z) && (current->pos.x+current->size.x+current->pos.y > dirty->pos.x+dirty->size.x+dirty->pos.y))
|
||||
if (current->pos.x+current->pos.y>dirty->pos.y+dirty->pos.x || current->pos.z>dirty->pos.z)
|
||||
|
||||
//if (current->pos.x+current->pos.y>dirty->pos.y+dirty->pos.x || current->pos.z+current->size.z>dirty->pos.z)
|
||||
if (current->pos.x>dirty->pos.x+dirty->size.x || current->pos.y>dirty->pos.y+dirty->size.y || current->pos.z>dirty->pos.z+dirty->size.z)
|
||||
{
|
||||
dirty->prev = current->prev;
|
||||
current->prev = dirty;
|
||||
|
||||
Reference in New Issue
Block a user