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

Function HTextureSlide

editor/HTexture.cpp:337–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337void HTextureSlide(room *rp, int facenum, float right, float up) {
338 ASSERT(rp != NULL);
339 ASSERT(rp->used);
340
341 if (Editor_view_mode == VM_TERRAIN) {
342 /*int i;
343 for (i=0;i<TERRAIN_DEPTH*TERRAIN_WIDTH;i++)
344 {
345 if (TerrainSelected[i])
346 {
347 for (int t=0;t<4;t++)
348 {
349 float val=Terrain_UV_lookup[Terrain_seg[i].u[t]];
350
351 val+=(1.0/32.0);
352
353 Terrain_seg[i].u[t]=TerrainLookupUV(val);
354 }
355
356 }
357
358 }
359 */
360 return;
361
362 } else { // mine
363 for (int i = 0; i < rp->faces[facenum].num_verts; i++) {
364 rp->faces[facenum].face_uvls[i].u -= right / 128.0f;
365 rp->faces[facenum].face_uvls[i].v += up / 128.0f;
366 }
367 }
368
369#ifndef NEWEDITOR
370 World_changed = 1;
371#endif
372}
373
374void HTextureRotate(room *roomp, int facenum, angle ang) {
375 g3UVL uvcenter;

Callers 9

OnIdleMethod · 0.85
OnAccelSlidedownMethod · 0.85
OnAccelSlideleftMethod · 0.85
OnAccelSliderightMethod · 0.85
OnAccelSlideupMethod · 0.85
OnTexpadSlideLeftMethod · 0.85
OnTexpadSlideRightMethod · 0.85
OnTexpadSlideUpMethod · 0.85
OnTexpadSlideDownMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected