11/* ******************************************************************************************
2- *
3- * raylib-cpp [core] example - Basic window (adapted for HTML5 platform)
4- *
5- * This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI
6- * As you will notice, code structure is slightly diferent to the other examples...
7- * To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning
8- *
9- * This example has been created using raylib 1.3 (www.raylib.com)
10- * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
11- *
12- * Copyright (c) 2015 Ramon Santamaria (@raysan5)
13- *
14- ********************************************************************************************/
2+ *
3+ * raylib-cpp [core] example - Basic window (adapted for HTML5 platform)
4+ *
5+ * This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI
6+ * As you will notice, code structure is slightly diferent to the other examples...
7+ * To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning
8+ *
9+ * This example has been created using raylib 1.3 (www.raylib.com)
10+ * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
11+ *
12+ * Copyright (c) 2015 Ramon Santamaria (@raysan5)
13+ *
14+ ********************************************************************************************/
1515
1616#include " raylib-cpp.hpp"
1717
1818#if defined(PLATFORM_WEB)
19- #include < emscripten/emscripten.h>
19+ #include < emscripten/emscripten.h>
2020#endif
2121
2222// ----------------------------------------------------------------------------------
@@ -28,25 +28,24 @@ int screenHeight = 450;
2828// ----------------------------------------------------------------------------------
2929// Module Functions Declaration
3030// ----------------------------------------------------------------------------------
31- void UpdateDrawFrame (void ); // Update and Draw one frame
31+ void UpdateDrawFrame (void ); // Update and Draw one frame
3232
3333// ----------------------------------------------------------------------------------
3434// Main Enry Point
3535// ----------------------------------------------------------------------------------
36- int main ()
37- {
36+ int main () {
3837 // Initialization
3938 // --------------------------------------------------------------------------------------
4039 raylib::Window window (screenWidth, screenHeight, " raylib-cpp [core] example - basic window" );
4140
4241#if defined(PLATFORM_WEB)
4342 emscripten_set_main_loop (UpdateDrawFrame, 0 , 1 );
4443#else
45- SetTargetFPS (60 ); // Set our game to run at 60 frames-per-second
44+ SetTargetFPS (60 ); // Set our game to run at 60 frames-per-second
4645 // --------------------------------------------------------------------------------------
4746
4847 // Main game loop
49- while (!window.ShouldClose ()) // Detect window close button or ESC key
48+ while (!window.ShouldClose ()) // Detect window close button or ESC key
5049 {
5150 UpdateDrawFrame ();
5251 }
@@ -58,8 +57,7 @@ int main()
5857// ----------------------------------------------------------------------------------
5958// Module Functions Definition
6059// ----------------------------------------------------------------------------------
61- void UpdateDrawFrame (void )
62- {
60+ void UpdateDrawFrame (void ) {
6361 // Update
6462 // ----------------------------------------------------------------------------------
6563 // TODO: Update your variables here
@@ -69,9 +67,9 @@ void UpdateDrawFrame(void)
6967 // ----------------------------------------------------------------------------------
7068 BeginDrawing ();
7169
72- ClearBackground (RAYWHITE );
70+ ClearBackground (RAYWHITE );
7371
74- raylib::DrawText (" Congrats! You created your first raylib-cpp window!" , 190 , 200 , 20 , LIGHTGRAY );
72+ raylib::DrawText (" Congrats! You created your first raylib-cpp window!" , 190 , 200 , 20 , LIGHTGRAY );
7573
7674 EndDrawing ();
7775 // ----------------------------------------------------------------------------------
0 commit comments