UFO: Alien Invasion
Loading...
Searching...
No Matches
ufo2map.cpp File Reference

Starting point for map compiler. More...

#include <sys/resource.h>
#include "lighting.h"
#include "bsp.h"
#include "check/check.h"
#include "check/checkentities.h"
#include "check/checklib.h"
#include "../../shared/shared.h"
#include "ufo2map.h"
#include <SDL_main.h>
Include dependency graph for ufo2map.cpp:

Go to the source code of this file.

Data Structures

struct  usagePair_t

Macros

#define VERSION   "1.2.6"
#define REVISION   "1"
#define LIGHTING_NONE   1
#define LIGHTING_DAY_ONLY   2
#define LIGHTING_NIGHT_ONLY   3

Functions

static void Usage (void)
 print usage information.
void Com_Printf (const char *format,...)
bool AbortPrint (const verbosityLevel_t msgVerbLevel)
 return nonzero if printing should be aborted based on the command line verbosity level and the importance of the message
void Verb_Printf (const verbosityLevel_t msgVerbLevel, const char *format,...)
 decides wether to proceed with output based on verbosity level
static void U2M_Parameter (int argc, char **argv)
 Check for bsping, lighting and checking/fixing command line parameters.
static void U2M_SetDefaultConfigValues (void)
 Set default values.
void PrintMapName (void)
 print name in concise form for lower verbosity levels. verbosity check done before calling this function.
int main (int argc, char **argv)

Variables

mapConfig_t config
static char mapFilename [MAX_OSPATH]
memPool_tcom_genericPool
memPool_tcom_fileSysPool
char baseFilename [MAX_OSPATH]
static const usagePair_t usageArray []

Detailed Description

Starting point for map compiler.

Definition in file ufo2map.cpp.

Macro Definition Documentation

◆ LIGHTING_DAY_ONLY

#define LIGHTING_DAY_ONLY   2

Definition at line 31 of file ufo2map.cpp.

Referenced by main(), and U2M_Parameter().

◆ LIGHTING_NIGHT_ONLY

#define LIGHTING_NIGHT_ONLY   3

Definition at line 32 of file ufo2map.cpp.

Referenced by main(), and U2M_Parameter().

◆ LIGHTING_NONE

#define LIGHTING_NONE   1

Definition at line 30 of file ufo2map.cpp.

Referenced by main(), and U2M_Parameter().

◆ REVISION

#define REVISION   "1"

Definition at line 27 of file ufo2map.cpp.

Referenced by U2M_Parameter().

◆ VERSION

#define VERSION   "1.2.6"

Definition at line 26 of file ufo2map.cpp.

Referenced by main(), and U2M_Parameter().

Function Documentation

◆ AbortPrint()

bool AbortPrint ( const verbosityLevel_t msgVerbLevel)

return nonzero if printing should be aborted based on the command line verbosity level and the importance of the message

Parameters
msgVerbLevelinsignificance of the message. Larger numbers mean the message is less important. The message will first be printed if the msgVerbLevel is equal to the config.verbosity.
See also
verbosityLevel_t

Definition at line 189 of file ufo2map.cpp.

References config.

Referenced by Check_Printf(), and Verb_Printf().

◆ Com_Printf()

void Com_Printf ( const char * format,
... )

Definition at line 170 of file ufo2map.cpp.

References format(), and Q_vsnprintf().

Referenced by PrintMapName(), and Usage().

◆ main()

◆ PrintMapName()

void PrintMapName ( void )

print name in concise form for lower verbosity levels. verbosity check done before calling this function.

Definition at line 532 of file ufo2map.cpp.

References Com_Printf(), config, and mapFilename.

Referenced by Check_Printf(), and main().

◆ U2M_Parameter()

void U2M_Parameter ( int argc,
char ** argv )
static

Check for bsping, lighting and checking/fixing command line parameters.

Definition at line 216 of file ufo2map.cpp.

References config, FS_NormPath(), i, LIGHTING_DAY_ONLY, LIGHTING_NIGHT_ONLY, LIGHTING_NONE, Q_streq, Q_strncpyz(), REVISION, Sys_Error(), threadstate, Usage(), VERB_LESS, VERB_NORMAL, Verb_Printf(), and VERSION.

Referenced by main().

◆ U2M_SetDefaultConfigValues()

void U2M_SetDefaultConfigValues ( void )
static

Set default values.

Definition at line 487 of file ufo2map.cpp.

References AngleVectors(), ColorNormalize(), config, LIGHTMAP_DAY, LIGHTMAP_NIGHT, Vector2Set, VectorSet, and VERB_NORMAL.

Referenced by main().

◆ Usage()

void Usage ( void )
static

print usage information.

Definition at line 147 of file ufo2map.cpp.

References Com_Printf(), len, usageArray, and v.

Referenced by main(), and U2M_Parameter().

◆ Verb_Printf()

void Verb_Printf ( const verbosityLevel_t msgVerbLevel,
const char * format,
... )

decides wether to proceed with output based on verbosity level

See also
Com_Printf, Check_Printf, AbortPrint

Definition at line 198 of file ufo2map.cpp.

References AbortPrint(), format(), and Q_vsnprintf().

Referenced by main(), and U2M_Parameter().

Variable Documentation

◆ baseFilename

char baseFilename[MAX_OSPATH]

This is used for extra file output functions

Definition at line 55 of file ufo2map.cpp.

Referenced by DoRouting(), main(), and RT_WriteCSVFiles().

◆ com_fileSysPool

memPool_t* com_fileSysPool

Definition at line 53 of file ufo2map.cpp.

◆ com_genericPool

memPool_t* com_genericPool

Definition at line 52 of file ufo2map.cpp.

◆ config

mapConfig_t config

Definition at line 49 of file ufo2map.cpp.

◆ mapFilename

char mapFilename[MAX_OSPATH]
static

Definition at line 50 of file ufo2map.cpp.

Referenced by GetUMPName(), main(), and PrintMapName().

◆ usageArray

const usagePair_t usageArray[]
static

Definition at line 62 of file ufo2map.cpp.

Referenced by Usage().