Cube  Diff

Differences From Artifact [2902b001e4]:

To Artifact [e6c4962238]:


1
2
3
4

5
6
7
8
9
10
11
// 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);




>







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 "Command.h"
#import "DynamicEntity.h"
#import "Entity.h"

void
line(int x1, int y1, float z1, int x2, int y2, float z2)
{
	glBegin(GL_POLYGON);
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
		    [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")];
	}
}

void
loadsky(OFString *basename)
{
	static OFString *lastsky = @"";

	basename = [basename stringByReplacingOccurrencesOfString:@"\\"
	                                               withString:@"/"];

	if ([lastsky isEqual:basename])
		return;







<
|
<







200
201
202
203
204
205
206

207

208
209
210
211
212
213
214
		    [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")];
	}
}


COMMAND(loadsky, ARG_1STR, (^(OFString *basename) {

	static OFString *lastsky = @"";

	basename = [basename stringByReplacingOccurrencesOfString:@"\\"
	                                               withString:@"/"];

	if ([lastsky isEqual:basename])
		return;
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
		        [Cube.sharedInstance.gameDataIRI
		            IRIByAppendingPathComponent:path],
		        &xs, &ys, true))
			conoutf(@"could not load sky textures");
	}

	lastsky = basename;
}
COMMAND(loadsky, ARG_1STR)

float cursordepth = 0.9f;
GLint viewport[4];
GLdouble mm[16], pm[16];
OFVector3D worldpos;

void







|
<







225
226
227
228
229
230
231
232

233
234
235
236
237
238
239
		        [Cube.sharedInstance.gameDataIRI
		            IRIByAppendingPathComponent:path],
		        &xs, &ys, true))
			conoutf(@"could not load sky textures");
	}

	lastsky = basename;
}))


float cursordepth = 0.9f;
GLint viewport[4];
GLdouble mm[16], pm[16];
OFVector3D worldpos;

void