diff --git a/src/engine/input.h b/src/engine/input.h index ef27022..593e1ea 100644 --- a/src/engine/input.h +++ b/src/engine/input.h @@ -49,8 +49,8 @@ Vector2 GetDirectionVector(void){ Vector2 vector = {.x = 0.0f, .y = 0.0f}; if (IsKeyDown(KEY_RIGHT) || IsKeyDown(KEY_D)){vector.x += 1.0f; } if (IsKeyDown(KEY_LEFT) || IsKeyDown(KEY_A)){ vector.x -= 1.0f; } - if (IsKeyDown(KEY_UP) || IsKeyDown(KEY_W)){ vector.y += 1.0f; } - if (IsKeyDown(KEY_DOWN) || IsKeyDown(KEY_S)){ vector.y -= 1.0f; } + if (IsKeyDown(KEY_UP) || IsKeyDown(KEY_W)){ vector.y -= 1.0f; } + if (IsKeyDown(KEY_DOWN) || IsKeyDown(KEY_S)){ vector.y += 1.0f; } if (Vector2Length(vector) > 0.0f) {vector = Vector2Normalize(vector); } return vector; } diff --git a/src/engine/postfx.h b/src/engine/postfx.h index d10312b..fa3aad7 100644 --- a/src/engine/postfx.h +++ b/src/engine/postfx.h @@ -34,7 +34,7 @@ void UpdatePostFX(PostProcessing *postFX){ void RenderPostFX(PostProcessing *postFX, RenderTexture2D *target){ BeginShaderMode(postFX->shader); - DrawTextureRec(target->texture, (Rectangle){ 0, 0, target->texture.width, target->texture.height }, (Vector2){ 0, 0 }, WHITE); + DrawTextureRec(target->texture, (Rectangle){ 0, 0, target->texture.width, -target->texture.height }, (Vector2){ 0, 0 }, WHITE); EndShaderMode(); } diff --git a/src/game/game.h b/src/game/game.h index 8c49f44..a92385c 100644 --- a/src/game/game.h +++ b/src/game/game.h @@ -101,7 +101,7 @@ void RenderGame(GameState* g){ BeginMode2D(g->camera); RenderComponents(g); EndMode2D(); - DrawTextureRec(g->mouse.cursorTexture, (Rectangle){ 0, 0, g->mouse.cursorTexture.width, -g->mouse.cursorTexture.height }, (Vector2){ g->mouse.screenPosition.x, GetScreenHeight() - g->mouse.screenPosition.y - g->mouse.cursorTexture.height}, WHITE); + DrawTextureRec(g->mouse.cursorTexture, (Rectangle){ 0, 0, g->mouse.cursorTexture.width, g->mouse.cursorTexture.height }, (Vector2){ g->mouse.screenPosition.x, g->mouse.screenPosition.y}, WHITE); EndTextureMode(); BeginDrawing(); ClearBackground(BLACK); diff --git a/src/game/gameassets.h b/src/game/gameassets.h index 09a695a..ae1a219 100644 --- a/src/game/gameassets.h +++ b/src/game/gameassets.h @@ -17,9 +17,9 @@ typedef enum { } TextureID; const TextureAsset texAssets[TEX_COUNT] = { - {"assets/SproutLandsBasic/Characters/character.png", 48.0f, 48.0f, 180.0f}, - {"assets/SproutLandsBasic/Characters/BasicCharakterActions.png", 48.0f, 48.0f, 180.0f}, - {"assets/SproutLandsBasic/Objects/tools.png", 48.0f, 16.0f, 180.0f}, + {"assets/SproutLandsBasic/Characters/character.png", 48.0f, 48.0f, 0.0f}, + {"assets/SproutLandsBasic/Characters/BasicCharakterActions.png", 48.0f, 48.0f, 0.0f}, + {"assets/SproutLandsBasic/Objects/tools.png", 48.0f, 16.0f, 0.0f}, {"assets/flower.png", 16.0f, 16.0f, 45.0f}, {"assets/character_bee.png", 16.0f, 16.0f, 0.0f}, {"assets/grass.png", 16.0f, 16.0f, 0.0f}, diff --git a/src/game/menuassets.h b/src/game/menuassets.h index 115a139..c1f1962 100644 --- a/src/game/menuassets.h +++ b/src/game/menuassets.h @@ -14,11 +14,11 @@ typedef enum { const TextureAsset menuTextureAssets[MENU_TEX_COUNT] = { {"assets/SproutLandsUI/Spritesheets/Mouse sprites/TriangleMouseicon1.png", 16.0f, 16.0f, 0.0f }, - {"assets/SproutLandsUI/Spritesheets/UIBigPlayButtonHover.png", 96.0f, 32.0f, 180.0f}, - {"assets/SproutLandsUI/Spritesheets/Settingmenu.png", 128.0f, 144.0f, 180.0f}, - {"assets/Clouds/Clouds1/1.png", 576.0f, 324.0f, 180.0f}, - {"assets/Clouds/Clouds1/2.png", 576.0f, 324.0f, 180.0f}, - {"assets/Clouds/Clouds1/4.png", 576.0f, 324.0f, 180.0f} + {"assets/SproutLandsUI/Spritesheets/UIBigPlayButtonHover.png", 96.0f, 32.0f, 0.0f}, + {"assets/SproutLandsUI/Spritesheets/Settingmenu.png", 128.0f, 144.0f, 0.0f}, + {"assets/Clouds/Clouds1/1.png", 576.0f, 324.0f, 0.0f}, + {"assets/Clouds/Clouds1/2.png", 576.0f, 324.0f, 0.0f}, + {"assets/Clouds/Clouds1/4.png", 576.0f, 324.0f, 0.0f} }; typedef enum { diff --git a/src/game/player.h b/src/game/player.h index 0507e92..bdceee6 100644 --- a/src/game/player.h +++ b/src/game/player.h @@ -22,12 +22,12 @@ typedef enum { typedef enum { IDLE_DOWN, IDLE_UP, - IDLE_RIGHT, IDLE_LEFT, + IDLE_RIGHT, WALKING_DOWN, WALKING_UP, - WALKING_RIGHT, WALKING_LEFT, + WALKING_RIGHT, HOE_DOWN, HOE_UP, HOE_RIGHT, @@ -103,15 +103,15 @@ void UpdatePlayerAnimationState(int *state, SelectedTool *selectedTool, Vector2 switch (*state) { case WALKING_DOWN: *state = IDLE_DOWN; break; case WALKING_UP: *state = IDLE_UP; break; - case WALKING_RIGHT: *state = IDLE_RIGHT; break; case WALKING_LEFT: *state = IDLE_LEFT; break; + case WALKING_RIGHT: *state = IDLE_RIGHT; break; default: break; } } else { - if (dir->y == -1) *state = WALKING_DOWN; - else if (dir->y == 1) *state = WALKING_UP; - else if (dir->x == 1) *state = WALKING_RIGHT; + if (dir->y == 1) *state = WALKING_DOWN; + else if (dir->y == -1) *state = WALKING_UP; else if (dir->x == -1) *state = WALKING_LEFT; + else if (dir->x == 1) *state = WALKING_RIGHT; } }