| 110 | //============================================================================// |
| 111 | |
| 112 | static bool parseFloatFormat(const char* str, fvec4& color) { |
| 113 | fvec4 tmp(1.0f, 1.0f, 1.0f, 1.0f); |
| 114 | const int count = sscanf(str, "%f %f %f %f", &tmp.r, &tmp.g, &tmp.b, &tmp.a); |
| 115 | switch (count) { |
| 116 | case 3: { color.rgb() = tmp.rgb(); return true; } |
| 117 | case 4: { color = tmp; return true; } |
| 118 | } |
| 119 | return false; |
| 120 | } |
| 121 | |
| 122 | |
| 123 | //============================================================================// |