| 417 | } |
| 418 | |
| 419 | void HTextureSetDefault(room *rp, int face) { |
| 420 | if (Editor_view_mode == VM_TERRAIN) { |
| 421 | for (int i = 0; i < TERRAIN_WIDTH * TERRAIN_DEPTH; i++) { |
| 422 | if (TerrainSelected[i]) { |
| 423 | int index = Terrain_seg[i].texseg_index; |
| 424 | Terrain_tex_seg[index].rotation = 0; |
| 425 | } |
| 426 | } |
| 427 | World_changed = 1; |
| 428 | } else if (Editor_view_mode == VM_ROOM) { |
| 429 | //@@Stretch_scale_x = (float)1.0; |
| 430 | //@@Stretch_scale_y = (float)1.0; |
| 431 | |
| 432 | for (int i = 0; i < rp->faces[face].num_verts; i++) { |
| 433 | float saveu2 = rp->faces[face].face_uvls[i].u2; |
| 434 | float savev2 = rp->faces[face].face_uvls[i].v2; |
| 435 | |
| 436 | GetUVLForRoomPoint(ROOMNUM(rp), face, i, &rp->faces[face].face_uvls[i]); |
| 437 | |
| 438 | rp->faces[face].face_uvls[i].u2 = saveu2; |
| 439 | rp->faces[face].face_uvls[i].v2 = savev2; |
| 440 | } |
| 441 | } else { |
| 442 | //@@Stretch_scale_x = (float)1.0; |
| 443 | //@@Stretch_scale_y = (float)1.0; |
| 444 | |
| 445 | for (int i = 0; i < rp->faces[face].num_verts; i++) { |
| 446 | float saveu2 = rp->faces[face].face_uvls[i].u2; |
| 447 | float savev2 = rp->faces[face].face_uvls[i].v2; |
| 448 | |
| 449 | GetUVLForRoomPoint(ROOMNUM(rp), face, i, &rp->faces[face].face_uvls[i]); |
| 450 | |
| 451 | rp->faces[face].face_uvls[i].u2 = saveu2; |
| 452 | rp->faces[face].face_uvls[i].v2 = savev2; |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | #ifndef NEWEDITOR |
| 457 | World_changed = 1; |
| 458 | #endif |
| 459 | } |
| 460 | |
| 461 | void HTextureNextEdge() { |
| 462 | Curedge++; |
no test coverage detected