Cube  Diff

Differences From Artifact [0157413baa]:

To Artifact [a8778ab451]:


62
63
64
65
66
67
68
69
70
71


72
73
74
75
76
77
78
62
63
64
65
66
67
68



69
70
71
72
73
74
75
76
77







-
-
-
+
+







	if (!savegame && type != 3)
		playsound(S_RUMBLE);
	sprintf_sd(aliasname)("level_trigger_%d", tag);
	if (identexists(aliasname))
		execute(aliasname);
	if (type == 2)
		endsp(false);
};

COMMAND(trigger, ARG_2INT);
}
COMMAND(trigger, ARG_2INT)

// main geometric mipmapping routine, recursively rebuild mipmaps within block
// b. tries to produce cube out of 4 lower level mips as well as possible, sets
// defer to 0 if mipped cube is a perfect mip, i.e. can be rendered at this mip
// level indistinguishable from its constituent cubes (saves considerable
// rendering time if this is possible).

356
357
358
359
360
361
362
363
364
365


366
367
368
369
370
371
372
355
356
357
358
359
360
361



362
363
364
365
366
367
368
369
370







-
-
-
+
+







	{
		entity &e = ents[i];
		if (e.type == type)
			e.type = NOTUSED;
	};
	if (type == LIGHT)
		calclight();
};

COMMAND(clearents, ARG_1STR);
}
COMMAND(clearents, ARG_1CSTR)

void
scalecomp(uchar &c, int intens)
{
	int n = c * intens / 100;
	if (n > 255)
		n = 255;
389
390
391
392
393
394
395
396
397
398


399
400
401
402
403
404
405
387
388
389
390
391
392
393



394
395
396
397
398
399
400
401
402







-
-
-
+
+







		if (intens) {
			scalecomp(e.attr2, intens);
			scalecomp(e.attr3, intens);
			scalecomp(e.attr4, intens);
		};
	};
	calclight();
};

COMMAND(scalelights, ARG_2INT);
}
COMMAND(scalelights, ARG_2INT)

int
findentity(int type, int index)
{
	for (int i = index; i < ents.length(); i++)
		if (ents[i].type == type)
			return i;
500
501
502
503
504
505
506
507
508
509
510
511





497
498
499
500
501
502
503





504
505
506
507
508







-
-
-
-
-
+
+
+
+
+
};
void
newmap(int i)
{
	empty_world(i, false);
};

COMMAND(mapenlarge, ARG_NONE);
COMMAND(newmap, ARG_1INT);
COMMANDN(recalc, calclight, ARG_NONE);
COMMAND(delent, ARG_NONE);
COMMAND(entproperty, ARG_2INT);
COMMAND(mapenlarge, ARG_NONE)
COMMAND(newmap, ARG_1INT)
COMMANDN(recalc, calclight, ARG_NONE)
COMMAND(delent, ARG_NONE)
COMMAND(entproperty, ARG_2INT)