| 518 | } |
| 519 | |
| 520 | int d3d_GetTexClass(int handle, int map_type) { |
| 521 | int w, tex_class; |
| 522 | |
| 523 | if (map_type == MAP_TYPE_LIGHTMAP) |
| 524 | w = GameLightmaps[handle].square_res; |
| 525 | else if (map_type == MAP_TYPE_BUMPMAP) |
| 526 | w = GameBumpmaps[handle].width; |
| 527 | else |
| 528 | w = bm_w(handle, 0); |
| 529 | |
| 530 | if (w == 256) |
| 531 | tex_class = 0; |
| 532 | else if (w == 128) |
| 533 | tex_class = 1; |
| 534 | else if (w == 64) |
| 535 | tex_class = 2; |
| 536 | else if (w == 32) |
| 537 | tex_class = 3; |
| 538 | else { |
| 539 | mprintf(0, "Bad class for d3d!\n"); |
| 540 | Int3(); |
| 541 | } |
| 542 | |
| 543 | return tex_class; |
| 544 | } |
| 545 | |
| 546 | // Given a bitmap handle, a map type, and a destination d3d slot, takes the data |
| 547 | // from the application and massages it for direct3d's consumption |
no test coverage detected