summaryrefslogtreecommitdiff
path: root/src/newgrf_commons.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-01-12 18:00:19 +0000
committerfrosch <frosch@openttd.org>2014-01-12 18:00:19 +0000
commit73c6565cf269608092d119e353df522e97c5db7a (patch)
tree3c238ae76ed718acac990686636a6403f1f255b8 /src/newgrf_commons.cpp
parent477c15383d00caaf62bc554d6ff8890adebce071 (diff)
downloadopenttd-73c6565cf269608092d119e353df522e97c5db7a.tar.xz
(svn r26240) -Codechange: Pass the GRFFile to GetErrorMessageFromLocationCallbackResult instead of the GRFID.
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r--src/newgrf_commons.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 679642ff4..81228866d 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -473,16 +473,16 @@ uint32 GetCompanyInfo(CompanyID owner, const Livery *l)
/**
* Get the error message from a shape/location/slope check callback result.
* @param cb_res Callback result to translate. If bit 10 is set this is a standard error message, otherwise a NewGRF provided string.
- * @param grfid grfID to use to resolve a custom error message.
+ * @param grffile NewGRF to use to resolve a custom error message.
* @param default_error Error message to use for the generic error.
* @return CommandCost indicating success or the error message.
*/
-CommandCost GetErrorMessageFromLocationCallbackResult(uint16 cb_res, uint32 grfid, StringID default_error)
+CommandCost GetErrorMessageFromLocationCallbackResult(uint16 cb_res, const GRFFile *grffile, StringID default_error)
{
CommandCost res;
if (cb_res < 0x400) {
- res = CommandCost(GetGRFStringID(grfid, 0xD000 + cb_res));
+ res = CommandCost(GetGRFStringID(grffile->grfid, 0xD000 + cb_res));
} else {
switch (cb_res) {
case 0x400: return res; // No error.