|
|
@@ -32,7 +32,7 @@ private: |
|
|
|
Tile const *t1 = (Tile const *)p1; |
|
|
|
Tile const *t2 = (Tile const *)p2; |
|
|
|
|
|
|
|
return t1->prio - t2->prio; |
|
|
|
return t2->prio - t1->prio; |
|
|
|
} |
|
|
|
|
|
|
|
Tile *tiles; |
|
|
@@ -55,12 +55,12 @@ Scene::~Scene() |
|
|
|
delete data; |
|
|
|
} |
|
|
|
|
|
|
|
void Scene::AddTile(uint32_t code, int x, int y, int z) |
|
|
|
void Scene::AddTile(uint32_t code, int x, int y, int z, int o) |
|
|
|
{ |
|
|
|
if ((data->ntiles % 1024) == 0) |
|
|
|
data->tiles = (Tile *)realloc(data->tiles, |
|
|
|
(data->ntiles + 1024) * sizeof(Tile)); |
|
|
|
data->tiles[data->ntiles].prio = 0; |
|
|
|
data->tiles[data->ntiles].prio = y - 2 * 32 * z + (o ? 0 : 32); |
|
|
|
data->tiles[data->ntiles].code = code; |
|
|
|
data->tiles[data->ntiles].x = x; |
|
|
|
data->tiles[data->ntiles].y = y; |
|
|
|