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 "company_base.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "strings_func.h"
|
#include "strings_func.h"
|
||||||
|
#include "string_func.h"
|
||||||
|
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
|
|
||||||
@ -508,16 +509,12 @@ void ErrorUnknownCallbackResult(uint32 grfid, uint16 cbid, uint16 cb_res)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* debug output */
|
/* debug output */
|
||||||
char buffer[512];
|
|
||||||
|
|
||||||
SetDParamStr(0, grfconfig->GetName());
|
SetDParamStr(0, grfconfig->GetName());
|
||||||
GetString(buffer, STR_NEWGRF_BUGGY, lastof(buffer));
|
Debug(grf, 0, "{}", StrMakeValid(GetString(STR_NEWGRF_BUGGY)));
|
||||||
Debug(grf, 0, "{}", buffer + 3);
|
|
||||||
|
|
||||||
SetDParam(1, cbid);
|
SetDParam(1, cbid);
|
||||||
SetDParam(2, cb_res);
|
SetDParam(2, cb_res);
|
||||||
GetString(buffer, STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT, lastof(buffer));
|
Debug(grf, 0, "{}", StrMakeValid(GetString(STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT)));
|
||||||
Debug(grf, 0, "{}", buffer + 3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -315,15 +315,11 @@ void ShowNewGrfVehicleError(EngineID engine, StringID part1, StringID part2, GRF
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* debug output */
|
/* debug output */
|
||||||
char buffer[512];
|
|
||||||
|
|
||||||
SetDParamStr(0, grfconfig->GetName());
|
SetDParamStr(0, grfconfig->GetName());
|
||||||
GetString(buffer, part1, lastof(buffer));
|
Debug(grf, 0, "{}", StrMakeValid(GetString(part1)));
|
||||||
Debug(grf, 0, "{}", buffer + 3);
|
|
||||||
|
|
||||||
SetDParam(1, engine);
|
SetDParam(1, engine);
|
||||||
GetString(buffer, part2, lastof(buffer));
|
Debug(grf, 0, "{}", StrMakeValid(GetString(part2)));
|
||||||
Debug(grf, 0, "{}", buffer + 3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user