From f88c95ce2d48730a7c4025a65d7b65402ffb8467 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 30 Jun 2016 00:26:56 +0200 Subject: [PATCH] Updated examples and makefile --- examples/Makefile | 5 +++++ examples/core_2d_camera.c | 4 ++-- examples/core_oculus_rift.c | 2 +- examples/core_world_screen.c | 1 - 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 15df3ec9..711f03a7 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -173,6 +173,7 @@ EXAMPLES = \ core_3d_camera_free \ core_3d_camera_first_person \ core_2d_camera \ + core_world_screen \ core_oculus_rift \ shapes_logo_raylib \ shapes_basic_shapes \ @@ -288,6 +289,10 @@ core_3d_camera_first_person: core_3d_camera_first_person.c # compile [core] example - 2d camera core_2d_camera: core_2d_camera.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + +# compile [core] example - world screen +core_world_screen: core_world_screen.c + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) # compile [core] example - oculus rift core_oculus_rift: core_oculus_rift.c diff --git a/examples/core_2d_camera.c b/examples/core_2d_camera.c index 73e1d65f..f2f219ef 100644 --- a/examples/core_2d_camera.c +++ b/examples/core_2d_camera.c @@ -23,8 +23,8 @@ int main() InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera"); Rectangle player = { 400, 280, 40, 40 }; - Rectangle buildings[MAX_BUILDINGS] = { 0, 0, 0, 0 }; - Color buildColors[MAX_BUILDINGS] = { 80, 80, 80, 255 }; + Rectangle buildings[MAX_BUILDINGS]; + Color buildColors[MAX_BUILDINGS]; int spacing = 0; diff --git a/examples/core_oculus_rift.c b/examples/core_oculus_rift.c index 95b89106..c073d3d6 100644 --- a/examples/core_oculus_rift.c +++ b/examples/core_oculus_rift.c @@ -34,7 +34,7 @@ int main() Vector3 cubePosition = { 0.0f, 0.0f, 0.0f }; - //SetTargetFPS(90); // Set our game to run at 90 frames-per-second + SetTargetFPS(90); // Set our game to run at 90 frames-per-second //-------------------------------------------------------------------------------------- // Main game loop diff --git a/examples/core_world_screen.c b/examples/core_world_screen.c index f3798830..aa9505e8 100644 --- a/examples/core_world_screen.c +++ b/examples/core_world_screen.c @@ -63,7 +63,6 @@ int main() DrawText("Enemy: 100 / 100", cubeScreenPosition.x - MeasureText("Enemy: 100 / 100", 20) / 2, cubeScreenPosition.y, 20, BLACK); DrawText("Text is always on top of the cube", (screenWidth - MeasureText("Text is always on top of the cube", 20)) / 2, 25, 20, GRAY); - EndDrawing(); //----------------------------------------------------------------------------------