diff options
author | frosch <frosch@openttd.org> | 2014-01-12 18:00:39 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2014-01-12 18:00:39 +0000 |
commit | ba1779b978bb9640e278113c642b51517658c32f (patch) | |
tree | fe903b7ab298a455790b858a9346d307524cee45 /src/error.h | |
parent | 73c6565cf269608092d119e353df522e97c5db7a (diff) | |
download | openttd-ba1779b978bb9640e278113c642b51517658c32f.tar.xz |
(svn r26241) -Codechange: Remember the GRFFile which filled the TextRefStack in the TextRefStack.
Diffstat (limited to 'src/error.h')
-rw-r--r-- | src/error.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/error.h b/src/error.h index 4a78a07aa..597b62efb 100644 --- a/src/error.h +++ b/src/error.h @@ -16,6 +16,8 @@ #include "company_type.h" #include "core/geometry_type.hpp" +struct GRFFile; + /** Message severity/type */ enum WarningLevel { WL_INFO, ///< Used for DoCommand-like (and some non-fatal AI GUI) errors/information @@ -30,6 +32,7 @@ protected: uint duration; ///< Length of display of the message. 0 means forever, uint64 decode_params[20]; ///< Parameters of the message strings. const char *strings[20]; ///< Copies of raw strings that were used. + const GRFFile *textref_stack_grffile; ///< NewGRF that filled the #TextRefStack for the error message. uint textref_stack_size; ///< Number of uint32 values to put on the #TextRefStack for the error message. uint32 textref_stack[16]; ///< Values to put on the #TextRefStack for the error message. StringID summary_msg; ///< General error message showed in first line. Must be valid. @@ -40,7 +43,7 @@ protected: public: ErrorMessageData(const ErrorMessageData &data); ~ErrorMessageData(); - ErrorMessageData(StringID summary_msg, StringID detailed_msg, uint duration = 0, int x = 0, int y = 0, uint textref_stack_size = 0, const uint32 *textref_stack = NULL); + ErrorMessageData(StringID summary_msg, StringID detailed_msg, uint duration = 0, int x = 0, int y = 0, const GRFFile *textref_stack_grffile = NULL, uint textref_stack_size = 0, const uint32 *textref_stack = NULL); /** Check whether error window shall display a company manager face */ bool HasFace() const { return face != INVALID_COMPANY; } @@ -53,7 +56,7 @@ public: void ScheduleErrorMessage(const ErrorMessageData &data); -void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x = 0, int y = 0, uint textref_stack_size = 0, const uint32 *textref_stack = NULL); +void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x = 0, int y = 0, const GRFFile *textref_stack_grffile = NULL, uint textref_stack_size = 0, const uint32 *textref_stack = NULL); void ClearErrorMessages(); void ShowFirstError(); void UnshowCriticalError(); |