MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / HTextureRotate

Function HTextureRotate

editor/HTexture.cpp:374–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374void HTextureRotate(room *roomp, int facenum, angle ang) {
375 g3UVL uvcenter;
376 float rotmat[4];
377
378 HTextureCreate2DRotMat(rotmat, ang);
379
380 if (Editor_view_mode == VM_TERRAIN && ang == 0x4000) {
381 for (int i = 0; i < TERRAIN_WIDTH * TERRAIN_DEPTH; i++) {
382 if (TerrainSelected[i]) {
383 /*int f=(Terrain_seg[i].rotation_factor&0x0F);
384 f++;
385 f%=4;
386
387 Terrain_seg[i].rotation_factor&=0xF0;
388 Terrain_seg[i].rotation_factor|=(f);*/
389 }
390 }
391
392 return;
393 } else {
394 HTextureComputeUVRoomFaceCenter(&uvcenter, roomp, facenum);
395 HTextureRotUVPointsOnRoomFace(roomp, facenum, rotmat, &uvcenter);
396 }
397
398#ifndef NEWEDITOR
399 World_changed = 1;
400#endif
401}
402
403void HTextureStretchMore(room *rp, int face, int edge) {
404 if (Editor_view_mode == VM_TERRAIN) {

Callers 4

OnIdleMethod · 0.85
OnTexpadRotLeftMethod · 0.85
OnTexpadRotRightMethod · 0.85
OnTexpadRotate90Method · 0.85

Calls 3

HTextureCreate2DRotMatFunction · 0.85

Tested by

no test coverage detected