From e21b7634bfbe680308344afe04e070ce91356754 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 17 Oct 2007 20:09:16 +0000 Subject: (svn r11287) -Codechange: add support for pushing paramaters into NewIndustries' error messages. Patch by Csaboka. --- src/newgrf_industrytiles.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/newgrf_industrytiles.cpp') diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index f090d12c5..ae69591d5 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -265,6 +265,11 @@ bool PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, return callback_res != 0; } + /* Copy some parameters from the registers to the error message text ref. stack */ + SwitchToErrorRefStack(); + PrepareTextRefStackUsage(4); + SwitchToNormalRefStack(); + switch (callback_res) { case 0x400: return true; case 0x401: _error_message = STR_0239_SITE_UNSUITABLE; return false; -- cgit v1.2.3-54-g00ecf