From 73c6565cf269608092d119e353df522e97c5db7a Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 12 Jan 2014 18:00:19 +0000 Subject: (svn r26240) -Codechange: Pass the GRFFile to GetErrorMessageFromLocationCallbackResult instead of the GRFID. --- src/newgrf_commons.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/newgrf_commons.cpp') 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. -- cgit v1.2.3-54-g00ecf