Cube  Diff

Differences From Artifact [cc23cfc264]:

To Artifact [93fef8399d]:


33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
33
34
35
36
37
38
39

40
41
42
43
44
45
46
47







-
+







	{                                                   \
		makeundo();                                 \
		loop(x, sel->xs) loop(y, sel->ys)           \
		{                                           \
			sqr *s = S(sel->x + x, sel->y + y); \
			b;                                  \
		}                                           \
		remip(sel);                                 \
		remip(sel, 0);                              \
	}

int cx, cy, ch;

int curedittex[] = { -1, -1, -1 };

bool dragging = false;
436
437
438
439
440
441
442
443

444
445
446
447
448
449
450
436
437
438
439
440
441
442

443
444
445
446
447
448
449
450







-
+







		case 3:
			if (s->utex == rtex.utex)
				s->utex = lasttex;
			break;
		}
	}
	block b = { 0, 0, ssize, ssize };
	remip(&b);
	remip(&b, 0);
}

void
edittypexy(int type, const block *sel)
{
	loopselxy(s->type = type);
}
514
515
516
517
518
519
520
521

522
523
524
525
526
527
528
514
515
516
517
518
519
520

521
522
523
524
525
526
527
528







-
+







}
COMMAND(equalize, ARG_1INT)

void
setvdeltaxy(int delta, const block *sel)
{
	loopselxy(s->vdelta = max(s->vdelta + delta, 0));
	remipmore(sel);
	remipmore(sel, 0);
}

void
setvdelta(int delta)
{
	EDITSEL;
	setvdeltaxy(delta, &sel);
559
560
561
562
563
564
565
566

567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584

585
586
587
588
589
590
591
592
593
594
595
596
597
598
599

600
601
602
603
604
605
606
559
560
561
562
563
564
565

566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583

584
585
586
587
588
589
590
591
592
593
594
595
596
597
598

599
600
601
602
603
604
605
606







-
+

















-
+














-
+







	// Ugly hack to make the macro work.
	block *sel = sel_;
	loopselxy(s->vdelta = sel->xs > sel->ys
	        ? (archverts[sel->xs - 1][x] +
	              (y == 0 || y == sel->ys - 1 ? sidedelta : 0))
	        : (archverts[sel->ys - 1][y] +
	              (x == 0 || x == sel->xs - 1 ? sidedelta : 0)));
	remipmore(sel);
	remipmore(sel, 0);
}

void
slope(int xd, int yd)
{
	EDITSELMP;
	int off = 0;
	if (xd < 0)
		off -= xd * sel.xs;
	if (yd < 0)
		off -= yd * sel.ys;
	sel.xs++;
	sel.ys++;
	block *sel_ = &sel;
	// Ugly hack to make the macro work.
	block *sel = sel_;
	loopselxy(s->vdelta = xd * x + yd * y + off);
	remipmore(sel);
	remipmore(sel, 0);
}

void
perlin(int scale, int seed, int psize)
{
	EDITSELMP;
	sel.xs++;
	sel.ys++;
	makeundo();
	sel.xs--;
	sel.ys--;
	perlinarea(&sel, scale, seed, psize);
	sel.xs++;
	sel.ys++;
	remipmore(&sel);
	remipmore(&sel, 0);
	sel.xs--;
	sel.ys--;
}

VARF(
    fullbright, 0, 0, 1, if (fullbright) {
	    if (noteditmode())