diff --git a/Input/inputHandler.c b/Input/inputHandler.c index 2cdadef..8e97237 100644 --- a/Input/inputHandler.c +++ b/Input/inputHandler.c @@ -134,8 +134,11 @@ void mouseInput(InputHandler *inputHandler, List *sprites, Texture2D *texture, C float deltaY; Node *current = sprites->head; while (current != 0){ - deltaX = current->data.x + current->data.texture->width/2 - (rect.x + camera->target.x); - deltaY = current->data.y + current->data.texture->height/2 - (rect.y + camera->target.y); + Vector2 currPos = {current->data.x, current->data.y}; + IsometricMapUnproject(layers[0], camera, currPos.x, currPos.y, &currPos); + + deltaX = currPos.x + current->data.texture->width/2 - (rect.x + camera->target.x); + deltaY = currPos.y + current->data.texture->height/2 - (rect.y + camera->target.y); printf("deltaX: %f, deltaY: %f\n", deltaX, deltaY); diff --git a/README.md b/README.md index b52de6e..53efbdc 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,7 @@ Fantasy Welt oder Realistisch? + LinkedList erweitern + Sprites Animationen etc improven + +### WiP + + Sprite Auswahlrechteck in inputHandler umschreiben auf World Koordinaten. Sprites an sich sind auf World Koordinaten geƤndert \ No newline at end of file diff --git a/inputHandler.o b/inputHandler.o new file mode 100644 index 0000000..0dfacfa Binary files /dev/null and b/inputHandler.o differ diff --git a/isometricMap.o b/isometricMap.o new file mode 100644 index 0000000..d0e6aa8 Binary files /dev/null and b/isometricMap.o differ diff --git a/isometricRenderer.o b/isometricRenderer.o new file mode 100644 index 0000000..8152738 Binary files /dev/null and b/isometricRenderer.o differ diff --git a/list.o b/list.o new file mode 100644 index 0000000..11ae7d0 Binary files /dev/null and b/list.o differ diff --git a/main.o b/main.o new file mode 100644 index 0000000..789deb3 Binary files /dev/null and b/main.o differ diff --git a/spiel b/spiel new file mode 100755 index 0000000..457f303 Binary files /dev/null and b/spiel differ diff --git a/sprite.o b/sprite.o new file mode 100644 index 0000000..1db1cb1 Binary files /dev/null and b/sprite.o differ diff --git a/tile.o b/tile.o new file mode 100644 index 0000000..ab55776 Binary files /dev/null and b/tile.o differ