Cube  Diff

Differences From Artifact [d502cbc841]:

To Artifact [6ee2ffc9ed]:


146
147
148
149
150
151
152
153

154

155
156
157
158
159
160
161








162
163
164
165
166
167
168
146
147
148
149
150
151
152

153
154
155







156
157
158
159
160
161
162
163
164
165
166
167
168
169
170







-
+

+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+







texturereset()
{
	curtexnum = 0;
}
COMMAND(texturereset, ARG_NONE)

void
texture(char *aframe, char *name)
texture(OFString *aframe, OFString *name)
{
	@autoreleasepool {
	int num = curtexnum++, frame = atoi(aframe);
	if (num < 0 || num >= 256 || frame < 0 || frame >= MAXFRAMES)
		return;
	mapping[num][frame] = 1;
	char *n = mapname[num][frame];
	strcpy_s(n, name);
	path(n);
		int num = curtexnum++, frame = (int)aframe.longLongValue;
		if (num < 0 || num >= 256 || frame < 0 || frame >= MAXFRAMES)
			return;
		mapping[num][frame] = 1;
		char *n = mapname[num][frame];
		strcpy_s(n, name.UTF8String);
		path(n);
	}
}
COMMAND(texture, ARG_2STR)

int
lookuptexture(int tex, int &xs, int &ys)
{
	int frame = 0; // other frames?
298
299
300
301
302
303
304
305
306


307
308
309
310
311
312
313
314

315
316
317
318
319
320
321
300
301
302
303
304
305
306


307
308
309
310
311
312
313
314
315

316
317
318
319
320
321
322
323







-
-
+
+







-
+







int xtraverts;

VAR(fog, 64, 180, 1024);
VAR(fogcolour, 0, 0x8099B3, 0xFFFFFF);

VARP(hudgun, 0, 1, 1);

char *hudgunnames[] = {"hudguns/fist", "hudguns/shotg", "hudguns/chaing",
    "hudguns/rocket", "hudguns/rifle"};
OFString *hudgunnames[] = {@"hudguns/fist", @"hudguns/shotg", @"hudguns/chaing",
    @"hudguns/rocket", @"hudguns/rifle"};

void
drawhudmodel(int start, int end, float speed, int base)
{
	rendermodel(hudgunnames[player1->gunselect], start, end, 0, 1.0f,
	    player1->o.x, player1->o.z, player1->o.y, player1->yaw + 90,
	    player1->pitch, false, 1.0f, speed, 0, base);
};
}

void
drawhudgun(float fovy, float aspect, int farplane)
{
	if (!hudgun /*|| !player1->gunselect*/)
		return;