allow GL extension checking from cfgs
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1973 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -114,7 +114,12 @@ alias new_gfx_quality [
|
||||
fpsrange 30 40
|
||||
watersubdiv 4
|
||||
dynlight 16
|
||||
waterreflect 1
|
||||
if (glext "GL_ARB_fragment_program") [
|
||||
// make sure the 3D card is powerful enough for this
|
||||
waterreflect 1
|
||||
] [
|
||||
waterreflect 0
|
||||
]
|
||||
dynshadow 40
|
||||
lighterror 4
|
||||
scorch 1
|
||||
|
||||
@@ -131,7 +131,7 @@ int curteam() { return team_int(player1->team); }
|
||||
COMMANDN(team, newteam, ARG_1STR);
|
||||
COMMANDN(name, newname, ARG_1STR);
|
||||
COMMANDN(skin, newskin, ARG_1INT);
|
||||
COMMAND(curteam, ARG_1EXP);
|
||||
COMMAND(curteam, ARG_IVAL);
|
||||
VARP(showscoresondeath, 0, 1, 1);
|
||||
|
||||
void deathstate(playerent *pl)
|
||||
|
||||
@@ -289,6 +289,8 @@ char *executeret(const char *p) // all evaluation hap
|
||||
case ARG_2EXP: intret(((int (__cdecl *)(int, int))id->fun)(ATOI(w[1]), ATOI(w[2]))); break;
|
||||
case ARG_1EST: intret(((int (__cdecl *)(char *))id->fun)(w[1])); break;
|
||||
case ARG_2EST: intret(((int (__cdecl *)(char *, char *))id->fun)(w[1], w[2])); break;
|
||||
case ARG_IVAL: intret(((int (__cdecl *)())id->fun)()); break;
|
||||
case ARG_SVAL: result(((const char * (__cdecl *)())id->fun)()); break;
|
||||
case ARG_VARI:
|
||||
case ARG_VARIW:
|
||||
{
|
||||
|
||||
@@ -71,6 +71,7 @@ enum // function signatures for script functions, see command.cpp
|
||||
ARG_DOWN,
|
||||
ARG_1EXP, ARG_2EXP,
|
||||
ARG_1EST, ARG_2EST,
|
||||
ARG_IVAL, ARG_SVAL,
|
||||
ARG_VARI, ARG_VARIW
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ void docwritebaseref(char *ref, char *schemalocation, char *transformation)
|
||||
if(id.type != ID_COMMAND) continue;
|
||||
fprintf(f, "\t\t\t\t<command name=\"%s\">\n", xmlstringenc(name, id.name, _MAXDEFSTR));
|
||||
fprintf(f, "\t\t\t\t\t%s\n", desc);
|
||||
if(id.narg != ARG_NONE && id.narg != ARG_DOWN)
|
||||
if(id.narg != ARG_NONE && id.narg != ARG_DOWN && id.narg != ARG_IVAL && id.narg != ARG_SVAL)
|
||||
{
|
||||
fprintf(f, "\t\t\t\t\t<arguments>\n");
|
||||
if(id.narg == ARG_VARI) fprintf(f, "\t\t\t\t\t\t<variableArgument token=\"...\" description=\"TODO\"/>\n");
|
||||
|
||||
@@ -21,6 +21,13 @@ void *getprocaddress(const char *name)
|
||||
return SDL_GL_GetProcAddress(name);
|
||||
}
|
||||
|
||||
int glext(char *ext)
|
||||
{
|
||||
const char *exts = (const char *)glGetString(GL_EXTENSIONS);
|
||||
return strstr(exts, ext) != NULL;
|
||||
}
|
||||
COMMAND(glext, ARG_1EST);
|
||||
|
||||
void gl_checkextensions()
|
||||
{
|
||||
const char *vendor = (const char *)glGetString(GL_VENDOR);
|
||||
@@ -49,7 +56,7 @@ void gl_checkextensions()
|
||||
hasMDA = true;
|
||||
}
|
||||
|
||||
if(!strstr(exts, "GL_EXT_fragment_program"))
|
||||
if(!strstr(exts, "GL_ARB_fragment_program"))
|
||||
{
|
||||
// not a required extension, but ensures the card has enough power to do reflections
|
||||
extern int waterreflect, waterrefract;
|
||||
|
||||
@@ -69,8 +69,8 @@ int magreserve(int w) { if(w > 0 && w < NUMGUNS) return player1->weapons[w]->amm
|
||||
|
||||
COMMANDN(weapon, selectweaponi, ARG_1INT);
|
||||
COMMAND(shiftweapon, ARG_1INT);
|
||||
COMMAND(currentprimary, ARG_1EST);
|
||||
COMMAND(curweapon, ARG_1EXP);
|
||||
COMMAND(currentprimary, ARG_IVAL);
|
||||
COMMAND(curweapon, ARG_IVAL);
|
||||
COMMAND(magcontent, ARG_1EXP);
|
||||
COMMAND(magreserve, ARG_1EXP);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user