|
|
|
@ -207,6 +207,7 @@ void IsometricMapDraw(Game *game){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//printf("\n\n\n");
|
|
|
|
|
|
|
|
|
|
|
|
Node *current = game->sprites->head;
|
|
|
|
Node *current = game->sprites->head;
|
|
|
|
int extraPixels = 0;
|
|
|
|
int extraPixels = 0;
|
|
|
|
@ -227,13 +228,17 @@ void IsometricMapDraw(Game *game){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
current = current->next;
|
|
|
|
current = current->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MergeSort(buckets, counter);
|
|
|
|
|
|
|
|
|
|
|
|
int hmmm = counter;
|
|
|
|
|
|
|
|
// Merge Sort ist scuffed
|
|
|
|
|
|
|
|
MergeSort(buckets, hmmm);
|
|
|
|
|
|
|
|
|
|
|
|
//printf("HÄÄÄÄÄÄ\n");
|
|
|
|
//printf("HÄÄÄÄÄÄ\n");
|
|
|
|
int k = 0;
|
|
|
|
int k = 0;
|
|
|
|
for(k = 0; k < counter; k++){
|
|
|
|
for(k = 0; k < counter; k++){
|
|
|
|
if(buckets[k]->type == 1){
|
|
|
|
if(buckets[k]->type == 1){
|
|
|
|
//printf("Tile begin -");
|
|
|
|
//printf("Tile begin -");
|
|
|
|
|
|
|
|
//printf("Tile %f\n", buckets[k]->depth);
|
|
|
|
DrawTexture(
|
|
|
|
DrawTexture(
|
|
|
|
game->layers[0]->tileTextures[buckets[k]->tile->textureId],
|
|
|
|
game->layers[0]->tileTextures[buckets[k]->tile->textureId],
|
|
|
|
buckets[k]->tile->offsetX,
|
|
|
|
buckets[k]->tile->offsetX,
|
|
|
|
@ -242,11 +247,12 @@ void IsometricMapDraw(Game *game){
|
|
|
|
//printf("- Tile end \n");
|
|
|
|
//printf("- Tile end \n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(buckets[k]->type == 0){
|
|
|
|
else if(buckets[k]->type == 0){
|
|
|
|
//printf("Sprite begin -");
|
|
|
|
//printf("Sprite %f\n", buckets[k]->depth);
|
|
|
|
DrawSpriteToWorld(buckets[k]->sprite, game->layers, game->camera);
|
|
|
|
DrawSpriteToWorld(buckets[k]->sprite, game->layers, game->camera);
|
|
|
|
//printf("- Sprite end \n");
|
|
|
|
//printf("- Sprite end \n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//printf("\n\n");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|