Fixing all other macros by adding RL_ prefix.
This commit is contained in:
parent
8579d1386d
commit
b6cb51e3e8
1 changed files with 1821 additions and 1821 deletions
|
|
@ -66,7 +66,7 @@ int main()
|
|||
char *hitObjectName = "None";
|
||||
nearestHit.distance = FLT_MAX;
|
||||
nearestHit.hit = false;
|
||||
Color cursorColor = WHITE;
|
||||
Color cursorColor = RL_WHITE;
|
||||
|
||||
// Get ray and test against ground, triangle, and mesh
|
||||
ray = GetMouseRay(GetMousePosition(), camera);
|
||||
|
|
@ -77,7 +77,7 @@ int main()
|
|||
if ((groundHitInfo.hit) && (groundHitInfo.distance < nearestHit.distance))
|
||||
{
|
||||
nearestHit = groundHitInfo;
|
||||
cursorColor = GREEN;
|
||||
cursorColor = RL_GREEN;
|
||||
hitObjectName = "Ground";
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ int main()
|
|||
if ((triHitInfo.hit) && (triHitInfo.distance < nearestHit.distance))
|
||||
{
|
||||
nearestHit = triHitInfo;
|
||||
cursorColor = PURPLE;
|
||||
cursorColor = RL_PURPLE;
|
||||
hitObjectName = "Triangle";
|
||||
|
||||
bary = Vector3Barycenter(nearestHit.position, ta, tb, tc);
|
||||
|
|
@ -109,7 +109,7 @@ int main()
|
|||
if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance))
|
||||
{
|
||||
nearestHit = meshHitInfo;
|
||||
cursorColor = ORANGE;
|
||||
cursorColor = RL_ORANGE;
|
||||
hitObjectName = "Mesh";
|
||||
}
|
||||
|
||||
|
|
@ -122,68 +122,68 @@ int main()
|
|||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
ClearBackground(RL_RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
// Draw the tower
|
||||
// WARNING: If scale is different than 1.0f,
|
||||
// not considered by GetCollisionRayModel()
|
||||
DrawModel(tower, towerPos, 1.0f, WHITE);
|
||||
DrawModel(tower, towerPos, 1.0f, RL_WHITE);
|
||||
|
||||
// Draw the test triangle
|
||||
DrawLine3D(ta, tb, PURPLE);
|
||||
DrawLine3D(tb, tc, PURPLE);
|
||||
DrawLine3D(tc, ta, PURPLE);
|
||||
DrawLine3D(ta, tb, RL_PURPLE);
|
||||
DrawLine3D(tb, tc, RL_PURPLE);
|
||||
DrawLine3D(tc, ta, RL_PURPLE);
|
||||
|
||||
// Draw the mesh bbox if we hit it
|
||||
if (hitMeshBBox) DrawBoundingBox(towerBBox, LIME);
|
||||
if (hitMeshBBox) DrawBoundingBox(towerBBox, RL_LIME);
|
||||
|
||||
// If we hit something, draw the cursor at the hit point
|
||||
if (nearestHit.hit)
|
||||
{
|
||||
DrawCube(nearestHit.position, 0.3, 0.3, 0.3, cursorColor);
|
||||
DrawCubeWires(nearestHit.position, 0.3, 0.3, 0.3, RED);
|
||||
DrawCubeWires(nearestHit.position, 0.3, 0.3, 0.3, RL_RED);
|
||||
|
||||
Vector3 normalEnd;
|
||||
normalEnd.x = nearestHit.position.x + nearestHit.normal.x;
|
||||
normalEnd.y = nearestHit.position.y + nearestHit.normal.y;
|
||||
normalEnd.z = nearestHit.position.z + nearestHit.normal.z;
|
||||
|
||||
DrawLine3D(nearestHit.position, normalEnd, RED);
|
||||
DrawLine3D(nearestHit.position, normalEnd, RL_RED);
|
||||
}
|
||||
|
||||
DrawRay(ray, MAROON);
|
||||
DrawRay(ray, RL_MAROON);
|
||||
|
||||
DrawGrid(10, 10.0f);
|
||||
|
||||
EndMode3D();
|
||||
|
||||
// Draw some debug GUI text
|
||||
DrawText(FormatText("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK);
|
||||
DrawText(FormatText("Hit Object: %s", hitObjectName), 10, 50, 10, RL_BLACK);
|
||||
|
||||
if (nearestHit.hit)
|
||||
{
|
||||
int ypos = 70;
|
||||
|
||||
DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
|
||||
DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, RL_BLACK);
|
||||
|
||||
DrawText(FormatText("Hit Pos: %3.2f %3.2f %3.2f",
|
||||
nearestHit.position.x,
|
||||
nearestHit.position.y,
|
||||
nearestHit.position.z), 10, ypos + 15, 10, BLACK);
|
||||
nearestHit.position.z), 10, ypos + 15, 10, RL_BLACK);
|
||||
|
||||
DrawText(FormatText("Hit Norm: %3.2f %3.2f %3.2f",
|
||||
nearestHit.normal.x,
|
||||
nearestHit.normal.y,
|
||||
nearestHit.normal.z), 10, ypos + 30, 10, BLACK);
|
||||
nearestHit.normal.z), 10, ypos + 30, 10, RL_BLACK);
|
||||
|
||||
if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
|
||||
if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, RL_BLACK);
|
||||
}
|
||||
|
||||
DrawText("Use Mouse to Move Camera", 10, 430, 10, GRAY);
|
||||
DrawText("Use Mouse to Move Camera", 10, 430, 10, RL_GRAY);
|
||||
|
||||
DrawText("(c) Turret 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY);
|
||||
DrawText("(c) Turret 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, RL_GRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue