Review spacing formatting

raylib uses spaces between '+' and '-' signs but not between '*' and '/'
signs, it's a chosen convention
This commit is contained in:
raysan5 2016-09-12 19:36:41 +02:00
parent 173f199313
commit 7f0880a735
7 changed files with 99 additions and 91 deletions

View file

@ -577,22 +577,30 @@ void DrawLight(Light light)
{ {
case LIGHT_POINT: case LIGHT_POINT:
{ {
DrawSphereWires(light->position, 0.3f*light->intensity, 4, 8, (light->enabled ? light->diffuse : BLACK)); DrawSphereWires(light->position, 0.3f*light->intensity, 8, 8, (light->enabled ? light->diffuse : GRAY));
DrawCircle3D(light->position, light->radius, 0.0f, (Vector3){ 0, 0, 0 }, (light->enabled ? light->diffuse : BLACK));
DrawCircle3D(light->position, light->radius, 90.0f, (Vector3){ 1, 0, 0 }, (light->enabled ? light->diffuse : BLACK)); DrawCircle3D(light->position, light->radius, 0.0f, (Vector3){ 0, 0, 0 }, (light->enabled ? light->diffuse : GRAY));
DrawCircle3D(light->position, light->radius, 90.0f, (Vector3){ 0, 1, 0 }, (light->enabled ? light->diffuse : BLACK)); DrawCircle3D(light->position, light->radius, 90.0f, (Vector3){ 1, 0, 0 }, (light->enabled ? light->diffuse : GRAY));
DrawCircle3D(light->position, light->radius, 90.0f, (Vector3){ 0, 1, 0 }, (light->enabled ? light->diffuse : GRAY));
} break; } break;
case LIGHT_DIRECTIONAL: case LIGHT_DIRECTIONAL:
{ {
DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : BLACK)); DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : GRAY));
DrawSphereWires(light->position, 0.3f*light->intensity, 4, 8, (light->enabled ? light->diffuse : BLACK));
DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : BLACK)); DrawSphereWires(light->position, 0.3f*light->intensity, 8, 8, (light->enabled ? light->diffuse : GRAY));
DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : GRAY));
} break; } break;
case LIGHT_SPOT: case LIGHT_SPOT:
{ {
DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : BLACK)); DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : GRAY));
DrawCylinderWires(light->position, 0.0f, 0.3f*light->coneAngle/50, 0.6f, 5, (light->enabled ? light->diffuse : BLACK));
DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : BLACK)); Vector3 dir = VectorSubtract(light->target, light->position);
VectorNormalize(&dir);
DrawCircle3D(light->position, 0.5f, 0.0f, dir, (light->enabled ? light->diffuse : GRAY));
//DrawCylinderWires(light->position, 0.0f, 0.3f*light->coneAngle/50, 0.6f, 5, (light->enabled ? light->diffuse : GRAY));
DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : GRAY));
} break; } break;
default: break; default: break;
} }