diff options
Diffstat (limited to 'examples/web/shapes/shapes_lines_bezier.c')
| -rw-r--r-- | examples/web/shapes/shapes_lines_bezier.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/web/shapes/shapes_lines_bezier.c b/examples/web/shapes/shapes_lines_bezier.c index 8c8b326..512660d 100644 --- a/examples/web/shapes/shapes_lines_bezier.c +++ b/examples/web/shapes/shapes_lines_bezier.c @@ -19,11 +19,11 @@ //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- -int screenWidth = 800; -int screenHeight = 450; +const int screenWidth = 800; +const int screenHeight = 450; -Vector2 start = { 0, 0 }; -Vector2 end = { 0, 0 }; +Vector2 start = { 0 }; +Vector2 end = { 0 }; //---------------------------------------------------------------------------------- // Module Functions Declaration @@ -31,7 +31,7 @@ Vector2 end = { 0, 0 }; void UpdateDrawFrame(void); // Update and Draw one frame //---------------------------------------------------------------------------------- -// Main Enry Point +// Program Main Entry Point //---------------------------------------------------------------------------------- int main(void) { @@ -40,13 +40,13 @@ int main(void) SetConfigFlags(FLAG_MSAA_4X_HINT); InitWindow(screenWidth, screenHeight, "raylib [shapes] example - cubic-bezier lines"); end = (Vector2){ screenWidth, screenHeight }; - + #if defined(PLATFORM_WEB) emscripten_set_main_loop(UpdateDrawFrame, 0, 1); #else SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- - + // Main game loop while (!WindowShouldClose()) // Detect window close button or ESC key { @@ -78,11 +78,11 @@ void UpdateDrawFrame(void) BeginDrawing(); ClearBackground(RAYWHITE); - + DrawText("USE MOUSE LEFT-RIGHT CLICK to DEFINE LINE START and END POINTS", 15, 20, 20, GRAY); DrawLineBezier(start, end, 2.0f, RED); - + EndDrawing(); //---------------------------------------------------------------------------------- } |
