FS2_Open
Open source remastering of the Freespace 2 engine
Macro constants used in/with bmpman.h

Macros

#define MAX_BITMAPS   4750
 How many bitmaps the game can handle. More...
 
#define BMP_AABITMAP   (1<<0)
 antialiased bitmap More...
 
#define BMP_TEX_XPARENT   (1<<1)
 transparent texture More...
 
#define BMP_TEX_OTHER   (1<<2)
 so we can identify all "normal" textures More...
 
#define BMP_TEX_DXT1   (1<<3)
 dxt1 compressed 8r8g8b1a (24bit) More...
 
#define BMP_TEX_DXT3   (1<<4)
 dxt3 compressed 8r8g8b4a (32bit) More...
 
#define BMP_TEX_DXT5   (1<<5)
 dxt5 compressed 8r8g8b8a (32bit) More...
 
#define BMP_TEX_CUBEMAP   (1<<6)
 a texture made for cubic environment map More...
 
#define BMP_TEX_COMP   ( BMP_TEX_DXT1 | BMP_TEX_DXT3 | BMP_TEX_DXT5 )
 Compressed textures. More...
 
#define BMP_TEX_NONCOMP   ( BMP_TEX_XPARENT | BMP_TEX_OTHER )
 Non-compressed textures. More...
 
#define BMP_TEX_ANY   ( BMP_TEX_COMP | BMP_TEX_NONCOMP )
 Any texture. More...
 
#define BMP_FLAG_RENDER_TARGET_STATIC   (1<<0)
 Texture is a static type. More...
 
#define BMP_FLAG_RENDER_TARGET_DYNAMIC   (1<<1)
 Texture is a dynamic type (animation) More...
 
#define BMP_FLAG_CUBEMAP   (1<<2)
 Texture is a cubemap. More...
 

Enumerations

enum  BM_TYPE {
  BM_TYPE_NONE = 0, BM_TYPE_USER, BM_TYPE_PCX, BM_TYPE_TGA,
  BM_TYPE_DDS, BM_TYPE_PNG, BM_TYPE_JPG, BM_TYPE_ANI,
  BM_TYPE_EFF, BM_TYPE_RENDER_TARGET_STATIC, BM_TYPE_RENDER_TARGET_DYNAMIC, BM_TYPE_DXT1,
  BM_TYPE_DXT3, BM_TYPE_DXT5, BM_TYPE_CUBEMAP_DDS, BM_TYPE_CUBEMAP_DXT1,
  BM_TYPE_CUBEMAP_DXT3, BM_TYPE_CUBEMAP_DXT5
}
 

Detailed Description

Macro Definition Documentation

#define BMP_AABITMAP   (1<<0)

antialiased bitmap

Definition at line 52 of file bmpman.h.

#define BMP_FLAG_CUBEMAP   (1<<2)

Texture is a cubemap.

Definition at line 68 of file bmpman.h.

#define BMP_FLAG_RENDER_TARGET_DYNAMIC   (1<<1)

Texture is a dynamic type (animation)

Definition at line 67 of file bmpman.h.

#define BMP_FLAG_RENDER_TARGET_STATIC   (1<<0)

Texture is a static type.

Definition at line 66 of file bmpman.h.

#define BMP_TEX_ANY   ( BMP_TEX_COMP | BMP_TEX_NONCOMP )

Any texture.

Definition at line 63 of file bmpman.h.

#define BMP_TEX_COMP   ( BMP_TEX_DXT1 | BMP_TEX_DXT3 | BMP_TEX_DXT5 )

Compressed textures.

Definition at line 61 of file bmpman.h.

#define BMP_TEX_CUBEMAP   (1<<6)

a texture made for cubic environment map

Definition at line 58 of file bmpman.h.

#define BMP_TEX_DXT1   (1<<3)

dxt1 compressed 8r8g8b1a (24bit)

Definition at line 55 of file bmpman.h.

#define BMP_TEX_DXT3   (1<<4)

dxt3 compressed 8r8g8b4a (32bit)

Definition at line 56 of file bmpman.h.

#define BMP_TEX_DXT5   (1<<5)

dxt5 compressed 8r8g8b8a (32bit)

Definition at line 57 of file bmpman.h.

#define BMP_TEX_NONCOMP   ( BMP_TEX_XPARENT | BMP_TEX_OTHER )

Non-compressed textures.

Definition at line 62 of file bmpman.h.

#define BMP_TEX_OTHER   (1<<2)

so we can identify all "normal" textures

Definition at line 54 of file bmpman.h.

#define BMP_TEX_XPARENT   (1<<1)

transparent texture

Definition at line 53 of file bmpman.h.

#define MAX_BITMAPS   4750

How many bitmaps the game can handle.

Attention
MAX_BITMAPS shouldn't need to be bumped again. With the fixed bm_release() and it's proper use even the largest missions should stay under this number. With the largest retail missions and wasteful content we should still have about 20% of the slots free. If it still goes over then it's something the artists need to fix. For instance the Terran Mara fighter, with -spec and -glow and using the Shinepack, needs 117 bitmap slots alone. 111 of those is just for the glowmaps. This number can be greatly reduced if the number of ani frames for another LOD than LOD0 has fewer or no ani frames. A 37 frame glow ani for LOD2 is little more than a waste of resources. Future reports of texture corruption should be initially approached with content as the cause and not code. If anything we could/should reduce MAX_BITMAPS in the future. Where it's at now should accomidate even the largest mods. – Taylor

Definition at line 48 of file bmpman.h.

Enumeration Type Documentation

enum BM_TYPE
Enumerator
BM_TYPE_NONE 

No type.

BM_TYPE_USER 

in-memory

BM_TYPE_PCX 

PCX.

BM_TYPE_TGA 

16 or 32 bit targa

BM_TYPE_DDS 

generic identifier for DDS

BM_TYPE_PNG 

PNG.

BM_TYPE_JPG 

32 bit jpeg

BM_TYPE_ANI 

in-house ANI format

BM_TYPE_EFF 

specifies any type of animated image, the EFF itself is just text

BM_TYPE_RENDER_TARGET_STATIC 

24/32 bit setup internally as a static render target

BM_TYPE_RENDER_TARGET_DYNAMIC 

24/32 bit setup internally as a dynamic render target

BM_TYPE_DXT1 

24 bit with switchable alpha

BM_TYPE_DXT3 

32 bit with 4 bit alpha

BM_TYPE_DXT5 

32 bit with 8 bit alpha

BM_TYPE_CUBEMAP_DDS 

generic DDS cubemap (uncompressed cubemap surface)

BM_TYPE_CUBEMAP_DXT1 

24-bit cubemap (compressed cubemap surface)

BM_TYPE_CUBEMAP_DXT3 

32-bit cubemap (compressed cubemap surface)

BM_TYPE_CUBEMAP_DXT5 

32-bit cubemap (compressed cubemap surface)

Definition at line 71 of file bmpman.h.