summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-24 10:35:15 +0000
committerrubidium <rubidium@openttd.org>2008-05-24 10:35:15 +0000
commit6884f9cb419d141a09ed96ea6aab6f7bf245a6f5 (patch)
tree10eb78cf497a4c50a6ad92f8c547d50b538cf425 /src/settings.cpp
parent6c20f77330468a954ca2abcd396ab4135ea176fd (diff)
downloadopenttd-6884f9cb419d141a09ed96ea6aab6f7bf245a6f5.tar.xz
(svn r13229) -Codechange: replace some global variables that are only initialised once and always with the same value with enums.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index c49fdfc0f..a8096a75d 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1992,7 +1992,7 @@ bool IConsoleSetPatchSetting(const char *name, int32 value)
void *ptr;
if (sd == NULL) {
- IConsolePrintF(_icolour_warn, "'%s' is an unknown patch setting.", name);
+ IConsolePrintF(CC_WARNING, "'%s' is an unknown patch setting.", name);
return true;
}
@@ -2011,7 +2011,7 @@ void IConsoleGetPatchSetting(const char *name)
const void *ptr;
if (sd == NULL) {
- IConsolePrintF(_icolour_warn, "'%s' is an unknown patch setting.", name);
+ IConsolePrintF(CC_WARNING, "'%s' is an unknown patch setting.", name);
return;
}
@@ -2023,13 +2023,13 @@ void IConsoleGetPatchSetting(const char *name)
snprintf(value, sizeof(value), "%d", (int32)ReadValue(ptr, sd->save.conv));
}
- IConsolePrintF(_icolour_warn, "Current value for '%s' is: '%s' (min: %s%d, max: %d)",
+ IConsolePrintF(CC_WARNING, "Current value for '%s' is: '%s' (min: %s%d, max: %d)",
name, value, (sd->desc.flags & SGF_0ISDISABLED) ? "(0) " : "", sd->desc.min, sd->desc.max);
}
void IConsoleListPatches()
{
- IConsolePrintF(_icolour_warn, "All patches with their current value:");
+ IConsolePrintF(CC_WARNING, "All patches with their current value:");
for (const SettingDesc *sd = _patch_settings; sd->save.cmd != SL_END; sd++) {
char value[80];
@@ -2040,10 +2040,10 @@ void IConsoleListPatches()
} else {
snprintf(value, lengthof(value), "%d", (uint32)ReadValue(ptr, sd->save.conv));
}
- IConsolePrintF(_icolour_def, "%s = %s", sd->desc.name, value);
+ IConsolePrintF(CC_DEFAULT, "%s = %s", sd->desc.name, value);
}
- IConsolePrintF(_icolour_warn, "Use 'patch' command to change a value");
+ IConsolePrintF(CC_WARNING, "Use 'patch' command to change a value");
}
/** Save and load handler for patches/settings