mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-30 07:31:13 +00:00
22bb395305
Fixed svc_setangles and sv_bigcoords. Model code is now responsible for transforming traces instead of it being generic. This fixes rotating things getting stuck in players in hexen2. The renderer now generates a list of surfaces to draw. Backend now performs rotations/scaling per entity. This fixes sorting order, at least when not using realtime lights. Hidden items in the hexen2 inventory that you do not have. Added colourmapping for hexen2. Should be easier to click on menu items for hexen2. git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3602 fc73d0e0-1445-4013-8a0c-d673dee63da5
77 lines
1.6 KiB
C
77 lines
1.6 KiB
C
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
char *effects[] =
|
|
{
|
|
"spikeset.cfg",
|
|
"faithful.cfg",
|
|
"highfps.cfg",
|
|
"minimal.cfg",
|
|
"h2part.cfg",
|
|
"tsshaft.cfg",
|
|
NULL
|
|
};
|
|
|
|
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");
|
|
|
|
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");
|
|
*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);
|
|
}
|