mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-11 08:49:50 +00:00
Codechange: use GetString + StrMakeValid to pass string without colours/font sizes to Debug
This commit is contained in:
parent
00695c29de
commit
1a179cb297
@ -27,6 +27,7 @@
|
||||
#include "company_base.h"
|
||||
#include "error.h"
|
||||
#include "strings_func.h"
|
||||
#include "string_func.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@ -508,16 +509,12 @@ void ErrorUnknownCallbackResult(uint32 grfid, uint16 cbid, uint16 cb_res)
|
||||
}
|
||||
|
||||
/* debug output */
|
||||
char buffer[512];
|
||||
|
||||
SetDParamStr(0, grfconfig->GetName());
|
||||
GetString(buffer, STR_NEWGRF_BUGGY, lastof(buffer));
|
||||
Debug(grf, 0, "{}", buffer + 3);
|
||||
Debug(grf, 0, "{}", StrMakeValid(GetString(STR_NEWGRF_BUGGY)));
|
||||
|
||||
SetDParam(1, cbid);
|
||||
SetDParam(2, cb_res);
|
||||
GetString(buffer, STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT, lastof(buffer));
|
||||
Debug(grf, 0, "{}", buffer + 3);
|
||||
Debug(grf, 0, "{}", StrMakeValid(GetString(STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -315,15 +315,11 @@ void ShowNewGrfVehicleError(EngineID engine, StringID part1, StringID part2, GRF
|
||||
}
|
||||
|
||||
/* debug output */
|
||||
char buffer[512];
|
||||
|
||||
SetDParamStr(0, grfconfig->GetName());
|
||||
GetString(buffer, part1, lastof(buffer));
|
||||
Debug(grf, 0, "{}", buffer + 3);
|
||||
Debug(grf, 0, "{}", StrMakeValid(GetString(part1)));
|
||||
|
||||
SetDParam(1, engine);
|
||||
GetString(buffer, part2, lastof(buffer));
|
||||
Debug(grf, 0, "{}", buffer + 3);
|
||||
Debug(grf, 0, "{}", StrMakeValid(GetString(part2)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user