sprites now draw centered

main
JanEhehalt 3 years ago
parent 796b86cd1a
commit a2033b94ef

@ -19,5 +19,3 @@ Fantasy Welt oder Realistisch?
+ Sprites Animationen etc improven
### WiP
+ Sprite Auswahlrechteck in inputHandler umschreiben auf World Koordinaten. Sprites an sich sind auf World Koordinaten geändert

BIN
spiel

Binary file not shown.

@ -27,11 +27,11 @@ void DrawSpriteToWorld(Sprite *sprite, IsometricMap *map, Camera2D *camera){
pos.x -= camera->target.x;
pos.y -= camera->target.y;
if(sprite->selected){
DrawTexture(*sprite->texture, pos.x, pos.y, WHITE);
DrawTexture(*sprite->texture, pos.x - sprite->texture->width/4, pos.y - sprite->texture->height/4, BLACK);
//DrawTexture(*sprite->texture, sprite->x, sprite->y, BLACK);
}
else{
DrawTexture(*sprite->texture, pos.x, pos.y, WHITE);
DrawTexture(*sprite->texture, pos.x - sprite->texture->width/4, pos.y - sprite->texture->height/4, WHITE);
}
}

Binary file not shown.
Loading…
Cancel
Save