30 #include "../ufo2map.h"
31 #include "../../../shared/entitiesdef.h"
50 int entnum,
int brushnum,
const char*
format, ...)
53 static bool firstSuccessfulPrint =
true;
54 static bool startOfLine =
true;
55 const bool containsNewline = strchr(format,
'\n') !=
nullptr;
63 msgVerbLevel = lastMsgVerbLevel;
65 lastMsgVerbLevel = msgVerbLevel;
74 static int skippingCheckLine = 0;
76 if (!skippingCheckLine && startOfLine && !change && containsNewline)
80 if (!skippingCheckLine && startOfLine && !change) {
81 skippingCheckLine = 1;
86 if (skippingCheckLine && containsNewline) {
87 skippingCheckLine = 0;
92 if (skippingCheckLine)
98 firstSuccessfulPrint =
false;
102 char out_buffer1[4096];
106 va_start(argptr, format);
107 Q_vsnprintf(out_buffer1,
sizeof(out_buffer1), format, argptr);
113 prefix = change ?
"* " :
" ";
116 printf(
"%sent:%i brush:%i - %s", prefix, entnum, brushnum, out_buffer1);
118 printf(
"%s", out_buffer1);
123 startOfLine = containsNewline ?
true :
false;
133 char* entitiesUfoBuf;
141 Sys_Error(
"CheckEntities: Unable to read entities.ufo");
Performs check on a loaded mapfile, and makes changes that can be saved back to the source map...
Performs check on a loaded mapfile, and makes changes that can be saved back to the source map...
int Q_vsnprintf(char *str, size_t size, const char *format, va_list ap)
Safe (null terminating) vsnprintf implementation.
void Sys_Error(const char *error,...)
void Check_InitEntityDefs(void)
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
mapbrush_t mapbrushes[MAX_MAP_BRUSHES]
void Check_Printf(verbosityLevel_t msgVerbLevel, bool change, int entnum, int brushnum, const char *format,...)
decides wether to proceed with output based on verbosity and ufo2map's mode: check/fix/compile ...
int ED_Parse(const char *data_p)
void PrintMapName(void)
print name in concise form for lower verbosity levels. verbosity check done before calling this funct...
struct side_s ** memberSides
compositeSide_t compositeSides[MAX_MAP_SIDES/2]
const char * ED_GetLastError(void)
struct mapbrush_s ** nearBrushes
void Check_Free(void)
free the mapbrush_t::nearBrushes, compositeSides and entitiesdef.h stuff.
void format(__printf__, 1, 2)))