doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
Lib.cpp File Reference
#include "precompiled.h"

Go to the source code of this file.

Functions

dword PackColor (const idVec4 &color)
 
void UnpackColor (const dword color, idVec4 &unpackedColor)
 
dword PackColor (const idVec3 &color)
 
void UnpackColor (const dword color, idVec3 &unpackedColor)
 
short BigShort (short l)
 
short LittleShort (short l)
 
int BigLong (int l)
 
int LittleLong (int l)
 
float BigFloat (float l)
 
float LittleFloat (float l)
 
void BigRevBytes (void *bp, int elsize, int elcount)
 
void LittleRevBytes (void *bp, int elsize, int elcount)
 
void LittleBitField (void *bp, int elsize)
 
void SixtetsForInt (byte *out, int src)
 
int IntForSixtets (byte *in)
 
short ShortSwap (short l)
 
short ShortNoSwap (short l)
 
int LongSwap (int l)
 
int LongNoSwap (int l)
 
float FloatSwap (float f)
 
float FloatNoSwap (float f)
 
void RevBytesSwap (void *bp, int elsize, int elcount)
 
void RevBitFieldSwap (void *bp, int elsize)
 
void RevBytesNoSwap (void *bp, int elsize, int elcount)
 
void RevBitFieldNoSwap (void *bp, int elsize)
 
void SixtetsForIntLittle (byte *out, int src)
 
void SixtetsForIntBig (byte *out, int src)
 
int IntForSixtetsLittle (byte *in)
 
int IntForSixtetsBig (byte *in)
 
void Swap_Init (void)
 
bool Swap_IsBigEndian (void)
 
void AssertFailed (const char *file, int line, const char *expression)
 

Variables

idVec4 colorBlack = idVec4( 0.00f, 0.00f, 0.00f, 1.00f )
 
idVec4 colorWhite = idVec4( 1.00f, 1.00f, 1.00f, 1.00f )
 
idVec4 colorRed = idVec4( 1.00f, 0.00f, 0.00f, 1.00f )
 
idVec4 colorGreen = idVec4( 0.00f, 1.00f, 0.00f, 1.00f )
 
idVec4 colorBlue = idVec4( 0.00f, 0.00f, 1.00f, 1.00f )
 
idVec4 colorYellow = idVec4( 1.00f, 1.00f, 0.00f, 1.00f )
 
idVec4 colorMagenta = idVec4( 1.00f, 0.00f, 1.00f, 1.00f )
 
idVec4 colorCyan = idVec4( 0.00f, 1.00f, 1.00f, 1.00f )
 
idVec4 colorOrange = idVec4( 1.00f, 0.50f, 0.00f, 1.00f )
 
idVec4 colorPurple = idVec4( 0.60f, 0.00f, 0.60f, 1.00f )
 
idVec4 colorPink = idVec4( 0.73f, 0.40f, 0.48f, 1.00f )
 
idVec4 colorBrown = idVec4( 0.40f, 0.35f, 0.08f, 1.00f )
 
idVec4 colorLtGrey = idVec4( 0.75f, 0.75f, 0.75f, 1.00f )
 
idVec4 colorMdGrey = idVec4( 0.50f, 0.50f, 0.50f, 1.00f )
 
idVec4 colorDkGrey = idVec4( 0.25f, 0.25f, 0.25f, 1.00f )
 

Function Documentation

void AssertFailed ( const char *  file,
int  line,
const char *  expression 
)

Definition at line 576 of file Lib.cpp.

float BigFloat ( float  l)

Definition at line 282 of file Lib.cpp.

int BigLong ( int  l)

Definition at line 280 of file Lib.cpp.

void BigRevBytes ( void bp,
int  elsize,
int  elcount 
)

Definition at line 284 of file Lib.cpp.

short BigShort ( short  l)

Definition at line 278 of file Lib.cpp.

float FloatNoSwap ( float  f)

Definition at line 364 of file Lib.cpp.

float FloatSwap ( float  f)

Definition at line 344 of file Lib.cpp.

int IntForSixtets ( byte in)

Definition at line 289 of file Lib.cpp.

int IntForSixtetsBig ( byte in)

Definition at line 511 of file Lib.cpp.

int IntForSixtetsLittle ( byte in)

Definition at line 493 of file Lib.cpp.

void LittleBitField ( void bp,
int  elsize 
)

Definition at line 286 of file Lib.cpp.

float LittleFloat ( float  l)

Definition at line 283 of file Lib.cpp.

int LittleLong ( int  l)

Definition at line 281 of file Lib.cpp.

void LittleRevBytes ( void bp,
int  elsize,
int  elcount 
)

Definition at line 285 of file Lib.cpp.

short LittleShort ( short  l)

Definition at line 279 of file Lib.cpp.

int LongNoSwap ( int  l)

Definition at line 335 of file Lib.cpp.

int LongSwap ( int  l)

Definition at line 319 of file Lib.cpp.

dword PackColor ( const idVec4 color)

Definition at line 147 of file Lib.cpp.

dword PackColor ( const idVec3 color)

Definition at line 190 of file Lib.cpp.

void RevBitFieldNoSwap ( void bp,
int  elsize 
)

Definition at line 458 of file Lib.cpp.

void RevBitFieldSwap ( void bp,
int  elsize 
)

Definition at line 425 of file Lib.cpp.

void RevBytesNoSwap ( void bp,
int  elsize,
int  elcount 
)

Definition at line 449 of file Lib.cpp.

void RevBytesSwap ( void bp,
int  elsize,
int  elcount 
)

Definition at line 382 of file Lib.cpp.

short ShortNoSwap ( short  l)

Definition at line 310 of file Lib.cpp.

short ShortSwap ( short  l)

Definition at line 296 of file Lib.cpp.

void SixtetsForInt ( byte out,
int  src 
)

Definition at line 288 of file Lib.cpp.

void SixtetsForIntBig ( byte out,
int  src 
)

Definition at line 481 of file Lib.cpp.

void SixtetsForIntLittle ( byte out,
int  src 
)

Definition at line 467 of file Lib.cpp.

void Swap_Init ( void  )

Definition at line 525 of file Lib.cpp.

bool Swap_IsBigEndian ( void  )

Definition at line 563 of file Lib.cpp.

void UnpackColor ( const dword  color,
idVec4 unpackedColor 
)

Definition at line 169 of file Lib.cpp.

void UnpackColor ( const dword  color,
idVec3 unpackedColor 
)

Definition at line 211 of file Lib.cpp.

Variable Documentation

idVec4 colorBlack = idVec4( 0.00f, 0.00f, 0.00f, 1.00f )

Definition at line 115 of file Lib.cpp.

idVec4 colorBlue = idVec4( 0.00f, 0.00f, 1.00f, 1.00f )

Definition at line 119 of file Lib.cpp.

idVec4 colorBrown = idVec4( 0.40f, 0.35f, 0.08f, 1.00f )

Definition at line 126 of file Lib.cpp.

idVec4 colorCyan = idVec4( 0.00f, 1.00f, 1.00f, 1.00f )

Definition at line 122 of file Lib.cpp.

idVec4 colorDkGrey = idVec4( 0.25f, 0.25f, 0.25f, 1.00f )

Definition at line 129 of file Lib.cpp.

idVec4 colorGreen = idVec4( 0.00f, 1.00f, 0.00f, 1.00f )

Definition at line 118 of file Lib.cpp.

idVec4 colorLtGrey = idVec4( 0.75f, 0.75f, 0.75f, 1.00f )

Definition at line 127 of file Lib.cpp.

idVec4 colorMagenta = idVec4( 1.00f, 0.00f, 1.00f, 1.00f )

Definition at line 121 of file Lib.cpp.

idVec4 colorMdGrey = idVec4( 0.50f, 0.50f, 0.50f, 1.00f )

Definition at line 128 of file Lib.cpp.

idVec4 colorOrange = idVec4( 1.00f, 0.50f, 0.00f, 1.00f )

Definition at line 123 of file Lib.cpp.

idVec4 colorPink = idVec4( 0.73f, 0.40f, 0.48f, 1.00f )

Definition at line 125 of file Lib.cpp.

idVec4 colorPurple = idVec4( 0.60f, 0.00f, 0.60f, 1.00f )

Definition at line 124 of file Lib.cpp.

idVec4 colorRed = idVec4( 1.00f, 0.00f, 0.00f, 1.00f )

Definition at line 117 of file Lib.cpp.

idVec4 colorWhite = idVec4( 1.00f, 1.00f, 1.00f, 1.00f )

Definition at line 116 of file Lib.cpp.

idVec4 colorYellow = idVec4( 1.00f, 1.00f, 0.00f, 1.00f )

Definition at line 120 of file Lib.cpp.