summaryrefslogtreecommitdiffhomepage
path: root/src/example.c
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-01-16 22:06:48 -0500
committerrealtradam <[email protected]>2022-01-16 22:06:48 -0500
commit21797d849c65da5d9dd42960ddd97861d68f2e2c (patch)
tree009a55f45011b3fbf3e6fc9da6d1089bf10dfae0 /src/example.c
parentcee502089c1e216aa26436a4551fd155b37e559c (diff)
downloadsample-mruby-gem-21797d849c65da5d9dd42960ddd97861d68f2e2c.tar.gz
sample-mruby-gem-21797d849c65da5d9dd42960ddd97861d68f2e2c.zip
Diffstat (limited to 'src/example.c')
-rw-r--r--src/example.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/src/example.c b/src/example.c
index 0f2cc07..896e243 100644
--- a/src/example.c
+++ b/src/example.c
@@ -15,29 +15,26 @@ mrb_c_method(mrb_state *mrb, mrb_value self)
// Initialization
//--------------------------------------------------------------------------------------
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
-/*
+ /*
#if defined(PLATFORM_WEB)
- printf("Web!\n");
- emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
+printf("Web!\n");
+emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
#else
- printf("Desktop!\n");
- SetTargetFPS(60); // Set our game to run at 60 frames-per-second
+printf("Desktop!\n");
+SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
- UpdateDrawFrame();
+ UpdateDrawFrame();
}
#endif
*/
- while (true)
- {
- }
// De-Initialization
//--------------------------------------------------------------------------------------
- CloseWindow(); // Close window and OpenGL context
+ //CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
@@ -48,25 +45,26 @@ mrb_c_method(mrb_state *mrb, mrb_value self)
//----------------------------------------------------------------------------------
// Module Functions Definition
//----------------------------------------------------------------------------------
-void UpdateDrawFrame(void)
-{
- // Update
- //----------------------------------------------------------------------------------
- // TODO: Update your variables here
- //----------------------------------------------------------------------------------
+/*
+ void UpdateDrawFrame(void)
+ {
+// Update
+//----------------------------------------------------------------------------------
+// TODO: Update your variables here
+//----------------------------------------------------------------------------------
- // Draw
- //----------------------------------------------------------------------------------
- BeginDrawing();
+// Draw
+//----------------------------------------------------------------------------------
+BeginDrawing();
- ClearBackground(RAYWHITE);
+ClearBackground(RAYWHITE);
- DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
+DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
- EndDrawing();
- //----------------------------------------------------------------------------------
+EndDrawing();
+//----------------------------------------------------------------------------------
}
-
+*/
void
mrb_my_silly_extension_gem_init(mrb_state* mrb) {
struct RClass *class_cextension = mrb_define_module(mrb, "Ye");