Jump to content
  • entries
    74
  • comments
    426
  • views
    1446333

MDB File Bitflags


Rob McGinnis

1658 views

Q: Some of the blocks in a MDB file have a 32-bit field in front of the vertex count field, which we assume is a flag bit vector. In most cases it has a value of 0, but occasionally some bits are set. What do they indicate?

 

A: The bitflags are as follows for skin and rigid packets:

 

const DWORD NWN2_ALPHA_TEST = 1 << 0;

const DWORD NWN2_ALPHA_BLEND = 1 << 1; // #### SHOULD NOT BE USED

const DWORD NWN2_ADDITIVE_BLEND = 1 << 2; // #### SHOULD NOT BE USED

const DWORD NWN2_ENVIRONMENT_MAPPED = 1 << 3;

const DWORD NWN2_CUTSCENE_MESH = 1 << 4;

const DWORD NWN2_GLOW = 1 << 5;

const DWORD NWN2_NO_CAST_SHADOWS = 1 << 6;

const DWORD NWN2_PROJECTED_TEXTURES = 1 << 7;

 

Most of them are pretty straightforward. The projected texture flag means that the model will accept UI projected textures such as the spell targeting cursor.

0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...