| 921 | } |
| 922 | |
| 923 | void parseHudSettings(const char* key, const char* value) |
| 924 | { |
| 925 | if (strcasecmp("hudScale", key) == 0) |
| 926 | { |
| 927 | for (size_t i = 0; i < TFE_ARRAYSIZE(c_tfeHudScaleStrings); i++) |
| 928 | { |
| 929 | if (strcasecmp(value, c_tfeHudScaleStrings[i]) == 0) |
| 930 | { |
| 931 | s_hudSettings.hudScale = TFE_HudScale(i); |
| 932 | break; |
| 933 | } |
| 934 | } |
| 935 | } |
| 936 | else if (strcasecmp("hudPos", key) == 0) |
| 937 | { |
| 938 | for (size_t i = 0; i < TFE_ARRAYSIZE(c_tfeHudPosStrings); i++) |
| 939 | { |
| 940 | if (strcasecmp(value, c_tfeHudPosStrings[i]) == 0) |
| 941 | { |
| 942 | s_hudSettings.hudPos = TFE_HudPosition(i); |
| 943 | break; |
| 944 | } |
| 945 | } |
| 946 | } |
| 947 | else if (strcasecmp("scale", key) == 0) |
| 948 | { |
| 949 | s_hudSettings.scale = parseFloat(value); |
| 950 | } |
| 951 | else if (strcasecmp("pixelOffsetLeft", key) == 0) |
| 952 | { |
| 953 | s_hudSettings.pixelOffset[0] = parseInt(value); |
| 954 | } |
| 955 | else if (strcasecmp("pixelOffsetRight", key) == 0) |
| 956 | { |
| 957 | s_hudSettings.pixelOffset[1] = parseInt(value); |
| 958 | } |
| 959 | else if (strcasecmp("pixelOffsetY", key) == 0) |
| 960 | { |
| 961 | s_hudSettings.pixelOffset[2] = parseInt(value); |
| 962 | } |
| 963 | } |
| 964 | |
| 965 | void parseSoundSettings(const char* key, const char* value) |
| 966 | { |
no test coverage detected