Fixing all other macros by adding RL_ prefix.

This commit is contained in:
Marco Lizza 2018-12-20 16:15:55 +01:00
commit b6cb51e3e8
5 changed files with 1821 additions and 1821 deletions

View file

@ -35,31 +35,31 @@ int main()
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
ClearBackground(RL_RAYWHITE);
DrawText("some basic shapes available on raylib", 20, 20, 20, DARKGRAY);
DrawText("some basic shapes available on raylib", 20, 20, 20, RL_DARKGRAY);
DrawCircle(screenWidth/4, 120, 35, DARKBLUE);
DrawCircle(screenWidth/4, 120, 35, RL_DARKBLUE);
DrawRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED);
DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines
DrawRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD);
DrawRectangle(screenWidth/4*2 - 60, 100, 120, 60, RL_RED);
DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, RL_ORANGE); // NOTE: Uses QUADS internally, not lines
DrawRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, RL_MAROON, RL_GOLD);
DrawTriangle((Vector2){screenWidth/4*3, 80},
(Vector2){screenWidth/4*3 - 60, 150},
(Vector2){screenWidth/4*3 + 60, 150}, VIOLET);
(Vector2){screenWidth/4*3 + 60, 150}, RL_VIOLET);
DrawPoly((Vector2){screenWidth/4*3, 320}, 6, 80, 0, BROWN);
DrawPoly((Vector2){screenWidth/4*3, 320}, 6, 80, 0, RL_BROWN);
DrawCircleGradient(screenWidth/4, 220, 60, GREEN, SKYBLUE);
DrawCircleGradient(screenWidth/4, 220, 60, RL_GREEN, RL_SKYBLUE);
// NOTE: We draw all LINES based shapes together to optimize internal drawing,
// this way, all LINES are rendered in a single draw pass
DrawLine(18, 42, screenWidth - 18, 42, BLACK);
DrawCircleLines(screenWidth/4, 340, 80, DARKBLUE);
DrawLine(18, 42, screenWidth - 18, 42, RL_BLACK);
DrawCircleLines(screenWidth/4, 340, 80, RL_DARKBLUE);
DrawTriangleLines((Vector2){screenWidth/4*3, 160},
(Vector2){screenWidth/4*3 - 20, 230},
(Vector2){screenWidth/4*3 + 20, 230}, DARKBLUE);
(Vector2){screenWidth/4*3 + 20, 230}, RL_DARKBLUE);
EndDrawing();
//----------------------------------------------------------------------------------
}

View file

@ -35,54 +35,54 @@ int main()
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
ClearBackground(RL_RAYWHITE);
DrawText("raylib color palette", 28, 42, 20, BLACK);
DrawText("raylib color palette", 28, 42, 20, RL_BLACK);
DrawRectangle(26, 80, 100, 100, DARKGRAY);
DrawRectangle(26, 188, 100, 100, GRAY);
DrawRectangle(26, 296, 100, 100, LIGHTGRAY);
DrawRectangle(134, 80, 100, 100, MAROON);
DrawRectangle(134, 188, 100, 100, RED);
DrawRectangle(134, 296, 100, 100, PINK);
DrawRectangle(242, 80, 100, 100, ORANGE);
DrawRectangle(242, 188, 100, 100, GOLD);
DrawRectangle(242, 296, 100, 100, YELLOW);
DrawRectangle(350, 80, 100, 100, DARKGREEN);
DrawRectangle(350, 188, 100, 100, LIME);
DrawRectangle(350, 296, 100, 100, GREEN);
DrawRectangle(458, 80, 100, 100, DARKBLUE);
DrawRectangle(458, 188, 100, 100, BLUE);
DrawRectangle(458, 296, 100, 100, SKYBLUE);
DrawRectangle(566, 80, 100, 100, DARKPURPLE);
DrawRectangle(566, 188, 100, 100, VIOLET);
DrawRectangle(566, 296, 100, 100, PURPLE);
DrawRectangle(674, 80, 100, 100, DARKBROWN);
DrawRectangle(674, 188, 100, 100, BROWN);
DrawRectangle(674, 296, 100, 100, BEIGE);
DrawRectangle(26, 80, 100, 100, RL_DARKGRAY);
DrawRectangle(26, 188, 100, 100, RL_GRAY);
DrawRectangle(26, 296, 100, 100, RL_LIGHTGRAY);
DrawRectangle(134, 80, 100, 100, RL_MAROON);
DrawRectangle(134, 188, 100, 100, RL_RED);
DrawRectangle(134, 296, 100, 100, RL_PINK);
DrawRectangle(242, 80, 100, 100, RL_ORANGE);
DrawRectangle(242, 188, 100, 100, RL_GOLD);
DrawRectangle(242, 296, 100, 100, RL_YELLOW);
DrawRectangle(350, 80, 100, 100, RL_DARKGREEN);
DrawRectangle(350, 188, 100, 100, RL_LIME);
DrawRectangle(350, 296, 100, 100, RL_GREEN);
DrawRectangle(458, 80, 100, 100, RL_DARKBLUE);
DrawRectangle(458, 188, 100, 100, RL_BLUE);
DrawRectangle(458, 296, 100, 100, RL_SKYBLUE);
DrawRectangle(566, 80, 100, 100, RL_DARKPURPLE);
DrawRectangle(566, 188, 100, 100, RL_VIOLET);
DrawRectangle(566, 296, 100, 100, RL_PURPLE);
DrawRectangle(674, 80, 100, 100, RL_DARKBROWN);
DrawRectangle(674, 188, 100, 100, RL_BROWN);
DrawRectangle(674, 296, 100, 100, RL_BEIGE);
DrawText("DARKGRAY", 65, 166, 10, BLACK);
DrawText("GRAY", 93, 274, 10, BLACK);
DrawText("LIGHTGRAY", 61, 382, 10, BLACK);
DrawText("MAROON", 186, 166, 10, BLACK);
DrawText("RED", 208, 274, 10, BLACK);
DrawText("PINK", 204, 382, 10, BLACK);
DrawText("ORANGE", 295, 166, 10, BLACK);
DrawText("GOLD", 310, 274, 10, BLACK);
DrawText("YELLOW", 300, 382, 10, BLACK);
DrawText("DARKGREEN", 382, 166, 10, BLACK);
DrawText("LIME", 420, 274, 10, BLACK);
DrawText("GREEN", 410, 382, 10, BLACK);
DrawText("DARKBLUE", 498, 166, 10, BLACK);
DrawText("BLUE", 526, 274, 10, BLACK);
DrawText("SKYBLUE", 505, 382, 10, BLACK);
DrawText("DARKPURPLE", 592, 166, 10, BLACK);
DrawText("VIOLET", 621, 274, 10, BLACK);
DrawText("PURPLE", 620, 382, 10, BLACK);
DrawText("DARKBROWN", 705, 166, 10, BLACK);
DrawText("BROWN", 733, 274, 10, BLACK);
DrawText("BEIGE", 737, 382, 10, BLACK);
DrawText("RL_DARKGRAY", 65, 166, 10, RL_BLACK);
DrawText("RL_GRAY", 93, 274, 10, RL_BLACK);
DrawText("RL_LIGHTGRAY", 61, 382, 10, RL_BLACK);
DrawText("RL_MAROON", 186, 166, 10, RL_BLACK);
DrawText("RL_RED", 208, 274, 10, RL_BLACK);
DrawText("RL_PINK", 204, 382, 10, RL_BLACK);
DrawText("RL_ORANGE", 295, 166, 10, RL_BLACK);
DrawText("RL_GOLD", 310, 274, 10, RL_BLACK);
DrawText("RL_YELLOW", 300, 382, 10, RL_BLACK);
DrawText("RL_DARKGREEN", 382, 166, 10, RL_BLACK);
DrawText("RL_LIME", 420, 274, 10, RL_BLACK);
DrawText("RL_GREEN", 410, 382, 10, RL_BLACK);
DrawText("RL_DARKBLUE", 498, 166, 10, RL_BLACK);
DrawText("RL_BLUE", 526, 274, 10, RL_BLACK);
DrawText("RL_SKYBLUE", 505, 382, 10, RL_BLACK);
DrawText("RL_DARKPURPLE", 592, 166, 10, RL_BLACK);
DrawText("RL_VIOLET", 621, 274, 10, RL_BLACK);
DrawText("RL_PURPLE", 620, 382, 10, RL_BLACK);
DrawText("RL_DARKBROWN", 705, 166, 10, RL_BLACK);
DrawText("RL_BROWN", 733, 274, 10, RL_BLACK);
DrawText("RL_BEIGE", 737, 382, 10, RL_BLACK);
EndDrawing();
//----------------------------------------------------------------------------------

View file

@ -40,11 +40,11 @@ int main()
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
ClearBackground(RL_RAYWHITE);
DrawText("USE MOUSE LEFT-RIGHT CLICK to DEFINE LINE START and END POINTS", 15, 20, 20, GRAY);
DrawText("USE MOUSE LEFT-RIGHT CLICK to DEFINE LINE START and END POINTS", 15, 20, 20, RL_GRAY);
DrawLineBezier(start, end, 2.0f, RED);
DrawLineBezier(start, end, 2.0f, RL_RED);
EndDrawing();
//----------------------------------------------------------------------------------

View file

@ -35,13 +35,13 @@ int main()
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
ClearBackground(RL_RAYWHITE);
DrawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, BLACK);
DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, RAYWHITE);
DrawText("raylib", screenWidth/2 - 44, screenHeight/2 + 48, 50, BLACK);
DrawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, RL_BLACK);
DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, RL_RAYWHITE);
DrawText("raylib", screenWidth/2 - 44, screenHeight/2 + 48, 50, RL_BLACK);
DrawText("this is NOT a texture!", 350, 370, 10, GRAY);
DrawText("this is NOT a texture!", 350, 370, 10, RL_GRAY);
EndDrawing();
//----------------------------------------------------------------------------------

View file

@ -111,40 +111,40 @@ int main()
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
ClearBackground(RL_RAYWHITE);
if (state == 0)
{
if ((framesCounter/15)%2) DrawRectangle(logoPositionX, logoPositionY, 16, 16, BLACK);
if ((framesCounter/15)%2) DrawRectangle(logoPositionX, logoPositionY, 16, 16, RL_BLACK);
}
else if (state == 1)
{
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, RL_BLACK);
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, RL_BLACK);
}
else if (state == 2)
{
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, RL_BLACK);
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, RL_BLACK);
DrawRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, BLACK);
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, BLACK);
DrawRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, RL_BLACK);
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, RL_BLACK);
}
else if (state == 3)
{
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(BLACK, alpha));
DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(RL_BLACK, alpha));
DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, Fade(RAYWHITE, alpha));
DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, Fade(RL_RAYWHITE, alpha));
DrawText(SubText("raylib", 0, lettersCount), screenWidth/2 - 44, screenHeight/2 + 48, 50, Fade(BLACK, alpha));
DrawText(SubText("raylib", 0, lettersCount), screenWidth/2 - 44, screenHeight/2 + 48, 50, Fade(RL_BLACK, alpha));
}
else if (state == 4)
{
DrawText("[R] REPLAY", 340, 200, 20, GRAY);
DrawText("[R] REPLAY", 340, 200, 20, RL_GRAY);
}
EndDrawing();