summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-06-12 09:10:17 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-13 12:45:45 +0200
commit55a11710a6c0f7942f3947711f2050c34782c39d (patch)
tree491b3009324e623236977614e91371a0ea4abac7 /src/newgrf_config.cpp
parenta99ac62c1ab816ee48cac85fdf834f9fdc599cb1 (diff)
downloadopenttd-55a11710a6c0f7942f3947711f2050c34782c39d.tar.xz
Codechange: convert printf DEBUG statements to fmt Debug statements
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r--src/newgrf_config.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index 4e37be54f..addf6a147 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -307,7 +307,7 @@ size_t GRFGetSizeOfDataSection(FILE *f)
/* Valid container version 2, get data section size. */
size_t offset = ((size_t)data[13] << 24) | ((size_t)data[12] << 16) | ((size_t)data[11] << 8) | (size_t)data[10];
if (offset >= 1 * 1024 * 1024 * 1024) {
- DEBUG(grf, 0, "Unexpectedly large offset for NewGRF");
+ Debug(grf, 0, "Unexpectedly large offset for NewGRF");
/* Having more than 1 GiB of data is very implausible. Mostly because then
* all pools in OpenTTD are flooded already. Or it's just Action C all over.
* In any case, the offsets to graphics will likely not work either. */
@@ -524,7 +524,7 @@ GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig)
f = FindGRFConfig(c->ident.grfid, FGCM_COMPATIBLE, nullptr, c->version);
if (f != nullptr) {
md5sumToString(buf, lastof(buf), c->ident.md5sum);
- DEBUG(grf, 1, "NewGRF %08X (%s) not found; checksum %s. Compatibility mode on", BSWAP32(c->ident.grfid), c->filename, buf);
+ Debug(grf, 1, "NewGRF {:08X} ({}) not found; checksum {}. Compatibility mode on", BSWAP32(c->ident.grfid), c->filename, buf);
if (!HasBit(c->flags, GCF_COMPATIBLE)) {
/* Preserve original_md5sum after it has been assigned */
SetBit(c->flags, GCF_COMPATIBLE);
@@ -538,13 +538,13 @@ GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig)
/* No compatible grf was found, mark it as disabled */
md5sumToString(buf, lastof(buf), c->ident.md5sum);
- DEBUG(grf, 0, "NewGRF %08X (%s) not found; checksum %s", BSWAP32(c->ident.grfid), c->filename, buf);
+ Debug(grf, 0, "NewGRF {:08X} ({}) not found; checksum {}", BSWAP32(c->ident.grfid), c->filename, buf);
c->status = GCS_NOT_FOUND;
res = GLC_NOT_FOUND;
} else {
compatible_grf:
- DEBUG(grf, 1, "Loading GRF %08X from %s", BSWAP32(f->ident.grfid), f->filename);
+ Debug(grf, 1, "Loading GRF {:08X} from {}", BSWAP32(f->ident.grfid), f->filename);
/* The filename could be the filename as in the savegame. As we need
* to load the GRF here, we need the correct filename, so overwrite that
* in any case and set the name and info when it is not set already.
@@ -673,10 +673,10 @@ void DoScanNewGRFFiles(NewGRFScanCallback *callback)
ClearGRFConfigList(&_all_grfs);
TarScanner::DoScan(TarScanner::NEWGRF);
- DEBUG(grf, 1, "Scanning for NewGRFs");
+ Debug(grf, 1, "Scanning for NewGRFs");
uint num = GRFFileScanner::DoScan();
- DEBUG(grf, 1, "Scan complete, found %d files", num);
+ Debug(grf, 1, "Scan complete, found {} files", num);
if (num != 0 && _all_grfs != nullptr) {
/* Sort the linked list using quicksort.
* For that we first have to make an array, then sort and