| 133 | } |
| 134 | |
| 135 | float Options_GetFloat(const char* key, float min, float max, float defValue) { |
| 136 | cc_string str; |
| 137 | float value; |
| 138 | if (!Options_UNSAFE_Get(key, &str)) return defValue; |
| 139 | if (!Convert_ParseFloat(&str, &value)) return defValue; |
| 140 | |
| 141 | Math_Clamp(value, min, max); |
| 142 | return value; |
| 143 | } |
| 144 | |
| 145 | int Options_GetEnum(const char* key, int defValue, const char* const* names, int namesCount) { |
| 146 | cc_string str; |
no test coverage detected