UFO: Alien Invasion
Loading...
Searching...
No Matches
textures.cpp File Reference
#include "bsp.h"
#include "textures.h"
Include dependency graph for textures.cpp:

Go to the source code of this file.

Functions

int FindMiptex (const char *name)
static void TextureAxisFromPlane (plane_t *pln, vec3_t xv, vec3_t yv, bool isTerrain)
int TexinfoForBrushTexture (plane_t *plane, brush_texture_t *bt, const vec3_t origin, bool isTerrain)

Variables

static int nummiptex = 0
textureref_t textureref [MAX_MAP_TEXTURES]
static const vec3_t baseaxis [18]

Function Documentation

◆ FindMiptex()

int FindMiptex ( const char * name)
Returns
-1 means that the texture was not found
See also
TexinfoForBrushTexture
ParseBrush

Definition at line 38 of file textures.cpp.

References i, MAX_MAP_TEXTURES, name, nummiptex, Q_streq, Q_strncpyz(), Sys_Error(), and textureref.

Referenced by ParseBrush().

◆ TexinfoForBrushTexture()

◆ TextureAxisFromPlane()

void TextureAxisFromPlane ( plane_t * pln,
vec3_t xv,
vec3_t yv,
bool isTerrain )
static

Definition at line 65 of file textures.cpp.

References baseaxis, DotProduct, i, plane_t::normal, and VectorCopy.

Referenced by TexinfoForBrushTexture().

Variable Documentation

◆ baseaxis

const vec3_t baseaxis[18]
static
Initial value:
=
{
{0,0,1}, {1,0,0}, {0,-1,0},
{0,0,-1}, {1,0,0}, {0,-1,0},
{1,0,0}, {0,1,0}, {0,0,-1},
{-1,0,0}, {0,1,0}, {0,0,-1},
{0,1,0}, {1,0,0}, {0,0,-1},
{0,-1,0}, {1,0,0}, {0,0,-1}
}

Definition at line 55 of file textures.cpp.

Referenced by TextureAxisFromPlane().

◆ nummiptex

int nummiptex = 0
static

Definition at line 29 of file textures.cpp.

Referenced by FindMiptex().

◆ textureref

Definition at line 30 of file textures.cpp.

Referenced by FindMiptex(), GenerateFootstepList(), and GenerateMaterialFile().