short hsGDirect3DTnLEnumerate::IGetDXBitDepth( D3DFORMAT format ) { #define ReturnDepth(type, depth) if (format == type) return depth ReturnDepth(D3DFMT_UNKNOWN, 0); ReturnDepth(D3DFMT_A8R8G8B8, 32); ReturnDepth(D3DFMT_X8R8G8B8, 32); ReturnDepth(D3DFMT_R5G6B5, 16); ReturnDepth(D3DFMT_X1R5G5B5, 16); ReturnDepth(D3DFMT_A1R5G5B5, 16); // Supported by DX9, but we don't currently support it. Can add support if needed. //ReturnDepth(D3DFMT_A2B10G10R10, 32); // Unsupported translation format--return 0 return 0; }
/* * Function: ReturnFreeSurface * Usage: grid->h[n]=ReturnFreeSurface(grid->xv[n],grid->yv[n]); * ------------------------------------------------------------- * Helper function to create an initial free-surface. Used * in phys.c in the InitializePhysicalVariables function. * */ REAL ReturnFreeSurface(REAL x, REAL y, REAL d) { if(x>12.5) return -ReturnDepth(x,y)+0.001; return 0; }