diff --git a/examples/audio/audio_sound_positioning.c b/examples/audio/audio_sound_positioning.c index 34b15c07b..41ea4cb74 100644 --- a/examples/audio/audio_sound_positioning.c +++ b/examples/audio/audio_sound_positioning.c @@ -68,7 +68,7 @@ int main(void) .z = 5.0f*sinf(th) }; - SetSoundPosition(camera, sound, spherePos, 20.0f); + SetSoundPosition(camera, sound, spherePos, 1.0f); if (!IsSoundPlaying(sound)) PlaySound(sound); //---------------------------------------------------------------------------------- diff --git a/examples/core/core_2d_camera_platformer.c b/examples/core/core_2d_camera_platformer.c index 49d0a940c..8f443acba 100644 --- a/examples/core/core_2d_camera_platformer.c +++ b/examples/core/core_2d_camera_platformer.c @@ -148,10 +148,11 @@ int main(void) DrawText("Controls:", 20, 20, 10, BLACK); DrawText("- Right/Left to move", 40, 40, 10, DARKGRAY); DrawText("- Space to jump", 40, 60, 10, DARKGRAY); - DrawText("- Mouse Wheel to Zoom in-out, R to reset zoom", 40, 80, 10, DARKGRAY); - DrawText("- C to change camera mode", 40, 100, 10, DARKGRAY); - DrawText("Current camera mode:", 20, 120, 10, BLACK); - DrawText(cameraDescriptions[cameraOption], 40, 140, 10, DARKGRAY); + DrawText("- Mouse Wheel to Zoom in-out", 40, 80, 10, DARKGRAY); + DrawText("- R to reset position + zoom", 40, 100, 10, DARKGRAY); + DrawText("- C to change camera mode", 40, 120, 10, DARKGRAY); + DrawText("Current camera mode:", 20, 140, 10, BLACK); + DrawText(cameraDescriptions[cameraOption], 40, 160, 10, DARKGRAY); EndDrawing(); //---------------------------------------------------------------------------------- diff --git a/examples/core/core_input_actions.c b/examples/core/core_input_actions.c index f4b1156d8..d5fd74e84 100644 --- a/examples/core/core_input_actions.c +++ b/examples/core/core_input_actions.c @@ -117,7 +117,7 @@ int main(void) DrawRectangleV(position, size, releaseAction? BLUE : RED); - DrawText((actionSet == 0)? "Current input set: WASD (default)" : "Current input set: Cursor", 10, 10, 20, WHITE); + DrawText((actionSet == 0)? "Current input set: WASD (default)" : "Current input set: Arrow keys", 10, 10, 20, WHITE); DrawText("Use TAB key to toggles Actions keyset", 10, 50, 20, GREEN); EndDrawing(); diff --git a/examples/core/core_input_gamepad.c b/examples/core/core_input_gamepad.c index a9e0660e0..7291c6d78 100644 --- a/examples/core/core_input_gamepad.c +++ b/examples/core/core_input_gamepad.c @@ -24,7 +24,8 @@ // NOTE: Gamepad name ID depends on drivers and OS #define XBOX_ALIAS_1 "xbox" #define XBOX_ALIAS_2 "x-box" -#define PS_ALIAS "playstation" +#define PS_ALIAS_1 "playstation" +#define PS_ALIAS_2 "sony" //------------------------------------------------------------------------------------ // Program main entry point @@ -148,7 +149,8 @@ int main(void) //DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK); //DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK); } - else if (TextFindIndex(TextToLower(GetGamepadName(gamepad)), PS_ALIAS) > -1) + else if ((TextFindIndex(TextToLower(GetGamepadName(gamepad)), PS_ALIAS_1) > -1) || + (TextFindIndex(TextToLower(GetGamepadName(gamepad)), PS_ALIAS_2) > -1)) { DrawTexture(texPs3Pad, 0, 0, DARKGRAY); diff --git a/examples/core/core_input_virtual_controls.c b/examples/core/core_input_virtual_controls.c index db293b993..de4ac7ead 100644 --- a/examples/core/core_input_virtual_controls.c +++ b/examples/core/core_input_virtual_controls.c @@ -51,11 +51,31 @@ int main(void) { padPosition.x, padPosition.y + buttonRadius*1.5f } // Down }; - const char *buttonLabels[BUTTON_MAX] = { - "Y", // Up - "X", // Left - "B", // Right - "A" // Down + Vector2 arrowTris[4][3] = { + // Up + { + { buttonPositions[0].x, buttonPositions[0].y - 12 }, + { buttonPositions[0].x - 9, buttonPositions[0].y + 9 }, + { buttonPositions[0].x + 9, buttonPositions[0].y + 9 } + }, + // Left + { + { buttonPositions[1].x + 9, buttonPositions[1].y - 9 }, + { buttonPositions[1].x - 12, buttonPositions[1].y }, + { buttonPositions[1].x + 9, buttonPositions[1].y + 9 } + }, + // Right + { + { buttonPositions[2].x + 12, buttonPositions[2].y }, + { buttonPositions[2].x - 9, buttonPositions[2].y - 9 }, + { buttonPositions[2].x - 9, buttonPositions[2].y + 9 } + }, + // Down + { + { buttonPositions[3].x - 9, buttonPositions[3].y - 9 }, + { buttonPositions[3].x, buttonPositions[3].y + 12 }, + { buttonPositions[3].x + 9, buttonPositions[3].y - 9 } + } }; Color buttonLabelColors[BUTTON_MAX] = { @@ -128,9 +148,12 @@ int main(void) { DrawCircleV(buttonPositions[i], buttonRadius, (i == pressedButton)? DARKGRAY : BLACK); - DrawText(buttonLabels[i], - (int)buttonPositions[i].x - 7, (int)buttonPositions[i].y - 8, - 20, buttonLabelColors[i]); + DrawTriangle( + arrowTris[i][0], + arrowTris[i][1], + arrowTris[i][2], + buttonLabelColors[i] + ); } DrawText("move the player with D-Pad buttons", 10, 10, 20, DARKGRAY); diff --git a/examples/core/core_random_sequence.c b/examples/core/core_random_sequence.c index 580c2bb26..19d44461e 100644 --- a/examples/core/core_random_sequence.c +++ b/examples/core/core_random_sequence.c @@ -96,8 +96,6 @@ int main(void) { DrawRectangleRec(rectangles[i].rect, rectangles[i].color); - DrawText("Press SPACE to shuffle the sequence", 10, screenHeight - 96, 20, BLACK); - DrawText("Press SPACE to shuffle the current sequence", 10, screenHeight - 96, 20, BLACK); DrawText("Press UP to add a rectangle and generate a new sequence", 10, screenHeight - 64, 20, BLACK); DrawText("Press DOWN to remove a rectangle and generate a new sequence", 10, screenHeight - 32, 20, BLACK); diff --git a/examples/shapes/shapes_colors_palette.c b/examples/shapes/shapes_colors_palette.c index 44da323eb..aa287df53 100644 --- a/examples/shapes/shapes_colors_palette.c +++ b/examples/shapes/shapes_colors_palette.c @@ -45,7 +45,7 @@ int main(void) for (int i = 0; i < MAX_COLORS_COUNT; i++) { colorsRecs[i].x = 20.0f + 100.0f *(i%7) + 10.0f *(i%7); - colorsRecs[i].y = 80.0f + 100.0f *((float)i/7) + 10.0f *((float)i/7); + colorsRecs[i].y = 80.0f + 100.0f *((int)i/7) + 10.0f *((float)i/7); colorsRecs[i].width = 100.0f; colorsRecs[i].height = 100.0f; } diff --git a/src/rcamera.h b/src/rcamera.h index 82f14fecd..3c880bab7 100644 --- a/src/rcamera.h +++ b/src/rcamera.h @@ -199,7 +199,7 @@ RLAPI Matrix GetCameraProjectionMatrix(Camera *camera, float aspect); //---------------------------------------------------------------------------------- #define CAMERA_MOVE_SPEED 5.4f // Units per second #define CAMERA_ROTATION_SPEED 0.03f -#define CAMERA_PAN_SPEED 0.2f +#define CAMERA_PAN_SPEED 2.0f // Camera mouse movement sensitivity #define CAMERA_MOUSE_MOVE_SENSITIVITY 0.003f