UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
map.h
Go to the documentation of this file.
1 
5 /*
6 All original material Copyright (C) 2002-2020 UFO: Alien Invasion.
7 
8 Copyright (C) 1997-2001 Id Software, Inc.
9 
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License
12 as published by the Free Software Foundation; either version 2
13 of the License, or (at your option) any later version.
14 
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 See the GNU General Public License for more details.
20 
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 
25 */
26 
27 #pragma once
28 
29 #include "../../shared/mathlib.h"
30 #include "../../shared/defines.h"
31 #include "common/polylib.h"
32 
33 typedef struct brush_texture_s {
37  char name[MAX_TEXPATH];
38  uint32_t surfaceFlags;
39  int value;
41 
42 typedef struct face_s {
43  struct face_s* next;
48  struct face_s* merged;
49  struct face_s* split[2];
51  struct portal_s* portal;
52  int texinfo;
53  uint16_t planenum;
54  uint32_t contentFlags;
56  int numpoints;
58 } face_t;
59 
60 typedef struct side_s {
61  uint16_t planenum;
62  int texinfo;
64  struct side_s* original;
65  uint32_t contentFlags;
66  uint32_t surfaceFlags;
67  bool visible;
68  bool tested;
69  bool bevel;
72  struct mapbrush_s* brush;
73 } side_t;
74 
75 typedef struct mapbrush_s {
76  int entitynum;
77  int brushnum;
79  uint32_t contentFlags;
80 
82 
83  int numsides;
85 
90  int numNear;
91 
94  bool finished;
95 } mapbrush_t;
96 
98 typedef struct plane_s {
105  int type;
108 } plane_t;
109 
110 typedef struct portal_s {
112  struct node_s* onnode;
113  struct node_s* nodes[2];
114  struct portal_s* next[2];
116 
117  bool sidefound;
118  struct side_s* side;
119  face_t* face[2];
120 } portal_t;
struct node_s * onnode
Definition: map.h:112
int vertexnums[MAXEDGES]
Definition: map.h:57
vec3_t normal
Definition: map.h:99
vec3_t planeVector[3]
Definition: map.h:106
int texinfo
Definition: map.h:62
int numNear
Definition: map.h:90
Definition: map.h:42
bool bevel
Definition: map.h:69
int entitynum
Definition: map.h:76
struct face_s * next
Definition: map.h:43
struct face_s face_t
int type
Definition: map.h:105
plane_t plane
Definition: map.h:111
Definition: aabb.h:42
struct portal_s * next[2]
Definition: map.h:114
float vec_t
Definition: ufotypes.h:37
uint32_t contentFlags
Definition: map.h:54
winding_t * winding
Definition: map.h:63
int numsides
Definition: map.h:83
winding_t * winding
Definition: map.h:115
struct mapbrush_s mapbrush_t
AABB mbBox
Definition: map.h:81
vec2_t scale
Definition: map.h:36
struct face_s * split[2]
Definition: map.h:49
bool isCompositeMember
Definition: map.h:70
Definition: map.h:98
#define MAX_TEXPATH
Definition: defines.h:95
int value
Definition: map.h:39
winding_t * w
Definition: map.h:55
vec_t rotate
Definition: map.h:35
struct node_s * nodes[2]
Definition: map.h:113
uint16_t planenum
Definition: map.h:61
struct side_s * original
Definition: map.h:64
struct side_s * original_sides
Definition: map.h:84
struct mapbrush_s * brush
Definition: map.h:72
for storing the vertices of the side of a brush or other polygon
Definition: polylib.h:30
bool visible
Definition: map.h:67
struct side_s * side
Definition: map.h:118
bool tested
Definition: map.h:68
Definition: map.h:60
struct brush_texture_s brush_texture_t
int texinfo
Definition: map.h:52
uint16_t planenum
Definition: map.h:53
struct portal_s * portal
Definition: map.h:51
uint32_t contentFlags
Definition: map.h:65
face_t * face[2]
Definition: map.h:119
struct plane_s * hash_chain
Definition: map.h:107
bool skipWriteBack
Definition: map.h:92
struct plane_s plane_t
int numpoints
Definition: map.h:56
struct mapbrush_s ** nearBrushes
Definition: map.h:89
int brushnum
Definition: map.h:77
vec_t dist
Definition: map.h:100
Definition: map.h:75
bool finished
Definition: map.h:94
uint32_t surfaceFlags
Definition: map.h:38
vec_t vec3_t[3]
Definition: ufotypes.h:39
vec_t vec2_t[2]
Definition: ufotypes.h:38
struct face_s * merged
Definition: map.h:48
vec2_t shift
Definition: map.h:34
Definition: map.h:110
struct side_s side_t
uint32_t surfaceFlags
Definition: map.h:66
Definition: bsp.h:42
bool sidefound
Definition: map.h:117
uint32_t contentFlags
Definition: map.h:79
struct portal_s portal_t
#define MAXEDGES
Definition: defines.h:49
char name[MAX_TEXPATH]
Definition: map.h:37