Skip to content

Commit a95938a

Browse files
committed
remove #define
1 parent 557a6a9 commit a95938a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

code/fireball/fireballs.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,15 +411,15 @@ void fireball_parse_tbl()
411411

412412
auto lod0 = fi.lod[0].filename;
413413

414-
if (strlen(lod0) > MAX_FIREBALL_BASENAME_LEN)
414+
if (strlen(lod0) > MAX_FILENAME_LEN - 3)
415415
{
416-
Warning(LOCATION, "A fireball base file name may not be longer than %d characters due to the LOD naming scheme.\nLODs other than LOD0 will be skipped for fireball %s", MAX_FIREBALL_BASENAME_LEN, lod0);
416+
Warning(LOCATION, "A fireball base file name may not be longer than %d characters due to the LOD naming scheme.\nLODs other than LOD0 will be skipped for fireball %s", MAX_FILENAME_LEN - 3, lod0);
417417
fi.lod_count = 1;
418418
continue;
419419
}
420420

421421
for (int j = 1; j < fi.lod_count; ++j)
422-
sprintf(fi.lod[j].filename, "%.*s_%d", MAX_FIREBALL_BASENAME_LEN, lod0, j % MAX_FIREBALL_LOD);
422+
sprintf(fi.lod[j].filename, "%.*s_%d", MAX_FILENAME_LEN - 3, lod0, j % MAX_FIREBALL_LOD);
423423
}
424424
}
425425

code/fireball/fireballs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class asteroid_info;
3737
#define NUM_DEFAULT_FIREBALLS 6
3838

3939
#define MAX_FIREBALL_LOD 4
40-
#define MAX_FIREBALL_BASENAME_LEN MAX_FILENAME_LEN - 3 // ensure base file name + _*lod* fits in filename field
4140

4241
#define FIREBALL_NUM_LARGE_EXPLOSIONS 2
4342

0 commit comments

Comments
 (0)