Cube  Diff

Differences From Artifact [974268cfe4]:

To Artifact [554de9b14f]:


20
21
22
23
24
25
26
27


28


29
30
31
32
33
34
35
36
37


38
39
40
41
42
43
44

OF_CONSTRUCTOR()
{
	enqueueInit(^ {
		static const struct {
			OFString *name;
			int *storage;
		} vars[4] = { { @"selx", &sel.x }, { @"sely", &sel.y },


			{ @"selxs", &sel.xs }, { @"selys", &sel.ys } };



		for (size_t i = 0; i < 4; i++) {
			Variable *variable = [Variable
			    variableWithName: vars[i].name
					 min: 0
					 max: 4096
				     storage: vars[i].storage
				    function: NULL
				   persisted: false];


			Identifier.identifiers[vars[i].name] = variable;
		}
	});
}

int selh = 0;
bool selset = false;







|
>
>
|
>
>







<
|
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

40
41
42
43
44
45
46
47
48
49

OF_CONSTRUCTOR()
{
	enqueueInit(^ {
		static const struct {
			OFString *name;
			int *storage;
		} vars[4] = {
			{ @"selx", &sel.x },
			{ @"sely", &sel.y },
			{ @"selxs", &sel.xs },
			{ @"selys", &sel.ys }
		};

		for (size_t i = 0; i < 4; i++) {
			Variable *variable = [Variable
			    variableWithName: vars[i].name
					 min: 0
					 max: 4096
				     storage: vars[i].storage

				   persisted: false
				      getter: NULL
				      setter: NULL];
			Identifier.identifiers[vars[i].name] = variable;
		}
	});
}

int selh = 0;
bool selset = false;
630
631
632
633
634
635
636
637


638
639
640

641
642

643
644
645
646
647
648
649
650

	remipmore(&sel, 0);

	sel.xs--;
	sel.ys--;
})

VARF(


    fullbright, 0, 0, 1, if (fullbright) {
	    if (noteditmode())
		    return;

	    for (int i = 0; i < mipsize; i++)
		    world[i].r = world[i].g = world[i].b = 176;

    });

COMMAND(edittag, ARG_1INT, ^ (int tag) {
	EDITSELMP;

	struct block *sel_ = &sel;
	// Ugly hack to make the macro work.
	struct block *sel = sel_;







<
>
>
|
|
|
>
|
|
>
|







635
636
637
638
639
640
641

642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658

	remipmore(&sel, 0);

	sel.xs--;
	sel.ys--;
})


static int fullbright = 0;
VARB(fullbright, 0, 1, ^ { return fullbright; }, ^ (int value) {
	if (fullbright) {
		if (noteditmode())
			return;

		for (int i = 0; i < mipsize; i++)
			world[i].r = world[i].g = world[i].b = 176;
	}
});

COMMAND(edittag, ARG_1INT, ^ (int tag) {
	EDITSELMP;

	struct block *sel_ = &sel;
	// Ugly hack to make the macro work.
	struct block *sel = sel_;