Cube  Diff

Differences From Artifact [0275a674d6]:

To Artifact [32dfc98d1d]:


1
2
3
4
5

6
7
8
9
10
11
12
// renderextras.cpp: misc gl render code and the HUD

#include "cube.h"

#import "DynamicEntity.h"


void
line(int x1, int y1, float z1, int x2, int y2, float z2)
{
	glBegin(GL_POLYGON);
	glVertex3f((float)x1, z1, (float)y1);
	glVertex3f((float)x1, z1, y1 + 0.01f);





>







1
2
3
4
5
6
7
8
9
10
11
12
13
// renderextras.cpp: misc gl render code and the HUD

#include "cube.h"

#import "DynamicEntity.h"
#import "Entity.h"

void
line(int x1, int y1, float z1, int x2, int y2, float z2)
{
	glBegin(GL_POLYGON);
	glVertex3f((float)x1, z1, (float)y1);
	glVertex3f((float)x1, z1, y1 + 0.01f);
171
172
173
174
175
176
177

178
179
180
181

182
183
184
185
186
187
188

189
190
191

192
193
194
195
196
197
198
199
200
201
	@"?",
	@"?",
	@"?",
	@"?",
	@"?",
};


void
renderents() // show sparkly thingies for map entities in edit mode
{
	closeent = @"";

	if (!editmode)
		return;
	loopv(ents)
	{
		entity &e = ents[i];
		if (e.type == NOTUSED)
			continue;

		OFVector3D v = OFMakeVector3D(e.x, e.y, e.z);
		particle_splash(2, 2, 40, v);
	}

	int e = closestent();
	if (e >= 0) {
		entity &c = ents[e];
		closeent =
		    [OFString stringWithFormat:@"closest entity = %@ (%d, %d, "
		                               @"%d, %d), selection = (%d, %d)",
		              entnames[c.type], c.attr1, c.attr2, c.attr3,
		              c.attr4, getvar(@"selxs"), getvar(@"selys")];
	}
}







>

|


>


<
|
|


>



>


|







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
	@"?",
	@"?",
	@"?",
	@"?",
	@"?",
};

// show sparkly thingies for map entities in edit mode
void
renderents()
{
	closeent = @"";

	if (!editmode)
		return;


	for (Entity *e in ents) {
		if (e.type == NOTUSED)
			continue;

		OFVector3D v = OFMakeVector3D(e.x, e.y, e.z);
		particle_splash(2, 2, 40, v);
	}

	int e = closestent();
	if (e >= 0) {
		Entity *c = ents[e];
		closeent =
		    [OFString stringWithFormat:@"closest entity = %@ (%d, %d, "
		                               @"%d, %d), selection = (%d, %d)",
		              entnames[c.type], c.attr1, c.attr2, c.attr3,
		              c.attr4, getvar(@"selxs"), getvar(@"selys")];
	}
}