UFO: Alien Invasion
Loading...
Searching...
No Matches
shared.h
Go to the documentation of this file.
1
4
5/*
6Copyright (C) 1997-2001 Id Software, Inc.
7
8This program is free software; you can redistribute it and/or
9modify it under the terms of the GNU General Public License
10as published by the Free Software Foundation; either version 2
11of the License, or (at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17See the GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23*/
24
25#pragma once
26
29#include "../../../common/mem.h"
37
50
51bool AbortPrint(const verbosityLevel_t importance);
52void Verb_Printf(const verbosityLevel_t importance, const char *format, ...) __attribute__((format(__printf__, 2, 3)));
53
122
123extern mapConfig_t config;
124extern char baseFilename[MAX_OSPATH];
125
126typedef struct threadstate_s {
132 bool progress;
134
136
139
140void ThreadLock(void);
141void ThreadUnlock(void);
142void RunThreadsOn(void (*func)(unsigned int), unsigned int workcount, bool progress, const char *id);
143void RunSingleThreadOn(void (*func)(unsigned int), unsigned int workcount, bool progress, const char *id);
144
145#define SYS_VRB 0 /* verbose support (on/off) */
146#define SYS_STD 1 /* standard print level */
147#define SYS_WRN 2 /* warnings */
148#define SYS_ERR 3 /* error */
149
150void Sys_Error(const char *error, ...) __attribute__((noreturn, format(__printf__, 1, 2)));
151void Com_Printf(const char *format, ...) __attribute__((format(__printf__, 1, 2)));
Byte order functions header.
void Com_Printf(const char *const fmt,...)
Definition common.cpp:428
memPool_t * com_genericPool
Definition common.cpp:72
memPool_t * com_fileSysPool
Definition common.cpp:71
#define __attribute__(x)
Definition cxx.h:37
Defined CONSTANTS (Macros are elsewhere).
#define LIGHTMAP_MAX
Definition defines.h:365
Filesystem header file.
#define MAX_OSPATH
Definition filesys.h:44
Memory handling with sentinel checking and pools with tags for grouped free'ing.
Shared parsing functions.
void format(__printf__, 1, 2)))
#define MAX_VAR
Definition shared.h:36
bool noshare
Definition shared.h:70
bool chkFillLevelFlags
Definition shared.h:87
int nice
Definition shared.h:56
bool chkContained
Definition shared.h:86
float entity_scale
Definition shared.h:116
bool nobackclip
Definition shared.h:74
bool nosubdiv
Definition shared.h:71
bool fulldetail
Definition shared.h:62
bool chkMixedFaceContents
Definition shared.h:93
bool performMapCheck
Definition shared.h:84
vec3_t sun_color[LIGHTMAP_MAX]
Definition shared.h:105
bool chkLevelFlags
Definition shared.h:91
vec3_t sun_normal[LIGHTMAP_MAX]
Definition shared.h:107
byte lightquant
Definition shared.h:114
bool verbose
Definition shared.h:57
float subdivideSize
Definition shared.h:55
bool nomerge
Definition shared.h:65
float contrast
Definition shared.h:112
bool chkNodraws
Definition shared.h:89
float surface_scale
Definition shared.h:115
bool exportLightmaps
Definition shared.h:64
bool extrasamples
Definition shared.h:78
bool info
Definition shared.h:80
verbosityLevel_t verbosity
Definition shared.h:58
bool nowater
Definition shared.h:66
bool noweld
Definition shared.h:69
float brightness
Definition shared.h:113
int compile_for_day
Definition shared.h:120
bool generateMaterialFile
Definition shared.h:82
int block_yl
Definition shared.h:76
bool notjunc
Definition shared.h:72
int block_xh
Definition shared.h:76
bool nocsg
Definition shared.h:67
bool chkMMicro
Definition shared.h:94
float mapMicrovol
Definition shared.h:96
vec3_t sun_ambient_color[LIGHTMAP_MAX]
Definition shared.h:104
float microvolume
Definition shared.h:77
int block_xl
Definition shared.h:76
float saturation
Definition shared.h:111
bool noprune
Definition shared.h:59
bool onlyents
Definition shared.h:63
bool fixMap
Definition shared.h:98
vec3_t sun_angles[LIGHTMAP_MAX]
Definition shared.h:106
bool chkTextures
Definition shared.h:92
int sun_intensity[LIGHTMAP_MAX]
Definition shared.h:103
bool stats
Definition shared.h:99
bool chkAll
Definition shared.h:97
bool chkZFight
Definition shared.h:95
int nolighting
Definition shared.h:75
bool chkBrushes
Definition shared.h:90
bool generateDebugTrace
Definition shared.h:101
bool generateTraceFile
Definition shared.h:100
bool soft
Definition shared.h:79
int onlynewer
Definition shared.h:118
bool verboseentities
Definition shared.h:73
bool chkIntersection
Definition shared.h:88
int block_yh
Definition shared.h:76
bool chkEntities
Definition shared.h:85
bool generateFootstepFile
Definition shared.h:81
char gamedir[MAX_VAR]
Definition shared.h:109
bool nodetail
Definition shared.h:61
int workindex
Definition shared.h:128
int workcount
Definition shared.h:129
bool progress
Definition shared.h:132
int numthreads
Definition shared.h:127
static config_t config
Definition test_all.cpp:43
void ThreadUnlock(void)
Release the lock on the shared data.
Definition threads.cpp:126
void Verb_Printf(const verbosityLevel_t importance, const char *format,...) __attribute__((format(__printf__
void RunSingleThreadOn(void(*func)(unsigned int), unsigned int workcount, bool progress, const char *id)
void RunThreadsOn(void(*func)(unsigned int), unsigned int workcount, bool progress, const char *id)
verbosityLevel_t
verbosity levels for use in calls to Verb_Printf and on the command line -v <int>
Definition shared.h:40
@ VERB_NUM
Definition shared.h:48
@ VERB_NORMAL
Definition shared.h:45
@ VERB_SILENT_EXCEPT_ERROR
Definition shared.h:41
@ VERB_EXTRA
Definition shared.h:46
@ VERB_MAPNAME
Definition shared.h:43
@ VERB_LESS
Definition shared.h:44
@ VERB_CHECK
Definition shared.h:42
@ VERB_DUMP
Definition shared.h:47
char baseFilename[MAX_OSPATH]
Definition ufo2map.cpp:55
void ThreadLock(void)
Lock the shared data by the calling thread.
Definition threads.cpp:112
threadstate_t threadstate
Definition threads.cpp:32
bool AbortPrint(const verbosityLevel_t importance)
return nonzero if printing should be aborted based on the command line verbosity level and the import...
Definition ufo2map.cpp:189
void Sys_Error(const char *error,...) __attribute__((noreturn
Cross-platform type definitions.
vec_t vec3_t[3]
Definition ufotypes.h:39