fteqw/engine/partcfgs/generatebuiltin.c
Spoike 589b09ae1d added cl_sendguid cvar, defaulting to 0. this disables the guid feature by default.
reworked a few q2 particle effects. q2 should feel a bit better now. by no means complete.
ssqcless csqc should have time progressing.
q3ui+console should be a bit less stupid.
stripped old huffman code. copied over from ioquake3. should help avoid bugs in that shit.
system mouse cursor should now always be hidden when running windowed. soft-cursor only.
added bindlist.lst feature.
particle system can now support weighted/randomized sounds. model command now more verbose, and supports renderflags.
renamed debugger cvar to pr_debugger, in the hopes that it'll be easier to find. also added to menu a little more visibly in a politically-motivated move.
fix q2+viewsize 30
'high' particles now have scrag+hknight impact effects. perhaps I overdid the scrag one.
fixed q2 player icons on the scoreboard.
added q3bsp_surf_meshcollision_* cvars.
dedicated servers now use the same bsp etc loading code as clients. the dedicated-server-only stuff is no longer needed, which is a good thing because it seemed a little buggy last time I tried.
split vertex+fragment shader compilation, for systems that secretly thread that.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4651 fc73d0e0-1445-4013-8a0c-d673dee63da5
2014-05-10 13:42:13 +00:00

89 lines
1.8 KiB
C

#include <stdio.h>
#include <string.h>
char effects[][64] =
{
"spikeset.cfg",
"faithful.cfg",
"highfps.cfg",
"high.cfg",
"minimal.cfg",
"h2part.cfg",
"q2part.cfg",
"tsshaft.cfg",
""
};
int main(void)
{
FILE *c, *h, *s;
char line[1024];
int i, j;
c = fopen("../client/r_partset.c", "wt");
h = fopen("../client/r_partset.h", "wt");
if (!c || !h)
{
printf("unable to open a file\n");
return;
}
fprintf(c, "/*\nWARNING: THIS FILE IS GENERATED BY '"__FILE__"'.\nYOU SHOULD NOT EDIT THIS FILE BY HAND\n*/\n\n");
fprintf(c, "#include \"r_partset.h\"\n\n\n");
for (i = 0; *effects[i]; i++)
{
s = fopen(effects[i], "rt");
if (!s)
{
printf("unable to open %s\n", effects[i]);
return;
}
*strchr(effects[i], '.') = 0;
fprintf(h, "extern char *particle_set_%s;\n", effects[i]);
if (i)
fprintf(c, "\n\n\n//////////////////////////////////////////////////////\n\n\n");
fprintf(c, "char *particle_set_%s =\n", effects[i]);
while(fgets(line, sizeof(line), s))
{
j = 0;
while (line[j] == ' ' || line[j] == '\t')
j++;
if ((line[j] == '/' && line[j] == '/') || line[j] == '\r' || line[j] == '\n')
{
while (line[j])
fputc(line[j++], c);
}
else
{
fputc('\"', c);
while (line[j] && line[j] != '\r' && line[j] != '\n')
{
if (line[j] == '\t')
fputc(' ', c);
else if (line[j] == '\"')
{
fputc('\\', c);
fputc(line[j], c);
}
else
fputc(line[j], c);
j++;
}
fputs("\\n\"\n", c);
}
}
fputs(";\n", c);
fclose(s);
}
fputs("#define R_PARTSET_BUILTINS ", h);
for (i = 0; *effects[i]; i++)
{
fprintf(h, "{\"%s\", &particle_set_%s},", effects[i], effects[i]);
}
fputs("\n", h);
fclose(h);
fclose(c);
}