preload scope.png

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6057 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
flowtron
2011-02-05 09:44:31 +00:00
parent 53c35f4fd8
commit a83856a1d2
2 changed files with 3 additions and 12 deletions
+2 -12
View File
@@ -87,11 +87,11 @@ VARP(hideconsole, 0, 0, 1);
VARP(hidespecthud, 0, 0, 1);
VAR(showmap, 0, 0, 1);
void drawscope()
void drawscope(bool preload)
{
static Texture *scopetex = NULL;
if(!scopetex) scopetex = textureload("packages/misc/scope.png", 3);
if(preload) return;
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBindTexture(GL_TEXTURE_2D, scopetex->id);
glColor3ub(255, 255, 255);
@@ -682,16 +682,6 @@ void drawscores()
glPopAttrib();
}
VARP(positiontype, 0, 0, 1); // integer (0) or float (1) return values?
void getposition()
{
string poslist;
if(positiontype) formatstring(poslist)("%.2f %.2f %.2f", player1->o.x, player1->o.y, player1->o.z );
else formatstring(poslist)("%d %d %d", player1->o.x*DNF, player1->o.y*DNF, player1->o.z*DNF );
result(poslist);
}
COMMAND(getposition, ARG_NONE);
VARP(clockdisplay,0,0,2);
VARP(dbgpos,0,0,1);
void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwater)