mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 12:01:25 +00:00
Fix up some qc warnings from recent fteqcc improvements.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6339 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
fcbfc90892
commit
7df2df5cd5
6 changed files with 38 additions and 15 deletions
|
@ -488,10 +488,11 @@ void(vector mousepos) editor_terrain_addentities =
|
||||||
s = sin(gettime(5)) * r;
|
s = sin(gettime(5)) * r;
|
||||||
c = cos(gettime(5)) * r;
|
c = cos(gettime(5)) * r;
|
||||||
|
|
||||||
col_x = (sin(gettime(5))+1.5)*0.1;
|
col = [(sin(gettime(5))+1.5)*0.1, 0, 0];
|
||||||
|
|
||||||
t = trace_endpos;
|
t = trace_endpos;
|
||||||
R_BeginPolygon("terrainedit");
|
R_BeginPolygon("terrainedit");
|
||||||
|
tx_z = 0;
|
||||||
for (a = 0; a < 3.14*2; a += 3.14*2/8)
|
for (a = 0; a < 3.14*2; a += 3.14*2/8)
|
||||||
{
|
{
|
||||||
tx_x = sin(a);
|
tx_x = sin(a);
|
||||||
|
|
|
@ -396,14 +396,10 @@ void(string shader, vector org, vector s, vector t, string text, vector col, flo
|
||||||
}
|
}
|
||||||
|
|
||||||
//precompute the st offset for each vertex
|
//precompute the st offset for each vertex
|
||||||
tc0_x = (0.0/16) + st_x;
|
tc0 = [(0.0/16) + st_x, (0.0/16) + st_y];
|
||||||
tc1_x = (1.0/16) - st_x;
|
tc1 = [(1.0/16) - st_x, (0.0/16) + st_y];
|
||||||
tc2_x = (1.0/16) - st_x;
|
tc2 = [(1.0/16) - st_x, (1.0/16) - st_y];
|
||||||
tc3_x = (0.0/16) + st_x;
|
tc3 = [(0.0/16) + st_x, (1.0/16) - st_y];
|
||||||
tc0_y = (0.0/16) + st_y;
|
|
||||||
tc1_y = (0.0/16) + st_y;
|
|
||||||
tc2_y = (1.0/16) - st_y;
|
|
||||||
tc3_y = (1.0/16) - st_y;
|
|
||||||
|
|
||||||
/*begin looks up the shader and is thus potentially expensive, fte requires it only once per batch of polygons.*/
|
/*begin looks up the shader and is thus potentially expensive, fte requires it only once per batch of polygons.*/
|
||||||
R_BeginPolygon(shader);
|
R_BeginPolygon(shader);
|
||||||
|
|
|
@ -51,6 +51,7 @@ void(mitem_desktop desktop) M_Pop =
|
||||||
cmd("m_configs", M_Configs, menu/options_configs.qc) \
|
cmd("m_configs", M_Configs, menu/options_configs.qc) \
|
||||||
cmd("m_reset", M_Reset, ) \
|
cmd("m_reset", M_Reset, ) \
|
||||||
cmd("m_dir", M_Dir, ) \
|
cmd("m_dir", M_Dir, ) \
|
||||||
|
cmd("m_cat", M_FOpen, ) \
|
||||||
cmd("m_preset", M_Preset, menu/presets.qc)
|
cmd("m_preset", M_Preset, menu/presets.qc)
|
||||||
|
|
||||||
//make sure all the right files are included
|
//make sure all the right files are included
|
||||||
|
@ -89,7 +90,7 @@ void(float mode) m_toggle
|
||||||
};
|
};
|
||||||
float(string cstr) m_consolecommand =
|
float(string cstr) m_consolecommand =
|
||||||
{
|
{
|
||||||
tokenize(cstr);
|
tokenize_console(cstr);
|
||||||
string cmd = argv(0);
|
string cmd = argv(0);
|
||||||
|
|
||||||
switch(cmd)
|
switch(cmd)
|
||||||
|
@ -145,7 +146,7 @@ void() m_init =
|
||||||
};
|
};
|
||||||
void(string cstr) GameCommand =
|
void(string cstr) GameCommand =
|
||||||
{
|
{
|
||||||
tokenize(cstr);
|
tokenize_console(cstr);
|
||||||
string cmd = argv(0);
|
string cmd = argv(0);
|
||||||
|
|
||||||
switch(cmd)
|
switch(cmd)
|
||||||
|
|
|
@ -15,7 +15,7 @@ class mitem_cvargrid : mitem_grid
|
||||||
};
|
};
|
||||||
float cursorpos;
|
float cursorpos;
|
||||||
string newval;
|
string newval;
|
||||||
static void() mitem_cvargrid =
|
void() mitem_cvargrid =
|
||||||
{
|
{
|
||||||
grid_buf_names = -1;
|
grid_buf_names = -1;
|
||||||
cursorpos = -1;
|
cursorpos = -1;
|
||||||
|
|
|
@ -13,7 +13,7 @@ nonstatic void(mitem_desktop desktop) M_Dir =
|
||||||
print("m_dir <FILEPATH> [PACKAGE]\n");
|
print("m_dir <FILEPATH> [PACKAGE]\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pack != "")
|
if (pack)
|
||||||
h = search_begin(path, SB_FULLPACKAGEPATH|SB_FORCESEARCH|16, 0, argv(2));
|
h = search_begin(path, SB_FULLPACKAGEPATH|SB_FORCESEARCH|16, 0, argv(2));
|
||||||
else
|
else
|
||||||
h = search_begin(path, SB_FULLPACKAGEPATH|16|32, 0);
|
h = search_begin(path, SB_FULLPACKAGEPATH|16|32, 0);
|
||||||
|
@ -35,9 +35,34 @@ nonstatic void(mitem_desktop desktop) M_Dir =
|
||||||
search_getfilemtime(h,i),
|
search_getfilemtime(h,i),
|
||||||
search_getpackagename(h,i)
|
search_getpackagename(h,i)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
float f = search_fopen(h,i);
|
||||||
|
if (f>=0)
|
||||||
|
{
|
||||||
|
print(sprintf("^`u8:" "\t%S\n", substring(fgets(f), 0, 64)));
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
print("\tsearch_fopen failure\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
search_end(h);
|
search_end(h);
|
||||||
};
|
};
|
||||||
|
nonstatic void(mitem_desktop desktop) M_FOpen =
|
||||||
|
{
|
||||||
|
float f = fopen(argv(1), FILE_READ);
|
||||||
|
string s;
|
||||||
|
if (f>=0)
|
||||||
|
{
|
||||||
|
while ((s=fgets(f)))
|
||||||
|
print(sprintf("^`u8:" "%s\n", s));
|
||||||
|
fclose(f);
|
||||||
|
print("<EOF>\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
print("fopen failure\n");
|
||||||
|
};
|
||||||
|
|
||||||
#define FOURCC(a,b,c,d) ((int)(a)<<0i)|((int)(b)<<8i)|((int)(c)<<16i)|((int)(d)<<24i)
|
#define FOURCC(a,b,c,d) ((int)(a)<<0i)|((int)(b)<<8i)|((int)(c)<<16i)|((int)(d)<<24i)
|
||||||
static string(string name) getmapdesc =
|
static string(string name) getmapdesc =
|
||||||
|
@ -128,7 +153,7 @@ class mitem_maplist : mitem_grid
|
||||||
buf_del(descs);
|
buf_del(descs);
|
||||||
super::item_remove();
|
super::item_remove();
|
||||||
};
|
};
|
||||||
static void() mitem_maplist =
|
void() mitem_maplist =
|
||||||
{
|
{
|
||||||
searchhandle searchtable;
|
searchhandle searchtable;
|
||||||
searchtable = search_begin("maps/*.bsp", SB_FULLPACKAGEPATH, 0);
|
searchtable = search_begin("maps/*.bsp", SB_FULLPACKAGEPATH, 0);
|
||||||
|
|
|
@ -101,7 +101,7 @@ float(vector pos, float scan, float char, float down) mitem_tabs::item_keypress
|
||||||
|
|
||||||
if (down && (scan == K_MOUSE1 || scan == K_MOUSE2 || scan == K_MOUSE3))
|
if (down && (scan == K_MOUSE1 || scan == K_MOUSE2 || scan == K_MOUSE3))
|
||||||
{
|
{
|
||||||
sz_y = 16;
|
sz = [8,16];
|
||||||
//to highlight the active tab, we draw the top line 1 pixel higher, and no bottom line
|
//to highlight the active tab, we draw the top line 1 pixel higher, and no bottom line
|
||||||
for (ch = this.item_children; ch; ch = ch.item_next)
|
for (ch = this.item_children; ch; ch = ch.item_next)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue