*** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1228 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+17
-24
@@ -45,8 +45,7 @@ int renderedtexs = 0;
|
||||
void renderstripssky()
|
||||
{
|
||||
if(skystrips.tris.first.empty() && skystrips.tristrips.first.empty() && skystrips.quads.first.empty()) return;
|
||||
int xs, ys;
|
||||
glBindTexture(GL_TEXTURE_2D, lookuptexture(DEFAULT_SKY, xs, ys));
|
||||
glBindTexture(GL_TEXTURE_2D, lookuptexture(DEFAULT_SKY)->id);
|
||||
RENDERSTRIPS(skystrips.tris, GL_TRIANGLES);
|
||||
RENDERSTRIPS(skystrips.tristrips, GL_TRIANGLE_STRIP);
|
||||
RENDERSTRIPS(skystrips.quads, GL_QUADS);
|
||||
@@ -54,11 +53,10 @@ void renderstripssky()
|
||||
|
||||
void renderstrips()
|
||||
{
|
||||
int xs, ys;
|
||||
loopj(renderedtexs)
|
||||
{
|
||||
stripbatch &sb = stripbatches[j];
|
||||
glBindTexture(GL_TEXTURE_2D, lookuptexture(sb.tex, xs, ys));
|
||||
glBindTexture(GL_TEXTURE_2D, lookuptexture(sb.tex)->id);
|
||||
RENDERSTRIPS(sb.tris, GL_TRIANGLES);
|
||||
RENDERSTRIPS(sb.tristrips, GL_TRIANGLE_STRIP);
|
||||
RENDERSTRIPS(sb.quads, GL_QUADS);
|
||||
@@ -143,10 +141,9 @@ void render_flat(int wtex, int x, int y, int size, int h, sqr *l1, sqr *l2, sqr
|
||||
{
|
||||
if(showm) { l3 = l1 = &sbright; l4 = l2 = &sdark; }
|
||||
|
||||
int sx, sy;
|
||||
lookuptexture(wtex, sx, sy);
|
||||
float xf = TEXTURESCALE/sx;
|
||||
float yf = TEXTURESCALE/sy;
|
||||
Texture *t = lookuptexture(wtex);
|
||||
float xf = TEXTURESCALE/t->xs;
|
||||
float yf = TEXTURESCALE/t->ys;
|
||||
float xs = size*xf;
|
||||
float ys = size*yf;
|
||||
float xo = xf*x;
|
||||
@@ -221,10 +218,9 @@ void render_flatdelta(int wtex, int x, int y, int size, float h1, float h2, floa
|
||||
{
|
||||
if(showm) { l3 = l1 = &sbright; l4 = l2 = &sdark; }
|
||||
|
||||
int sx, sy;
|
||||
lookuptexture(wtex, sx, sy);
|
||||
float xf = TEXTURESCALE/sx;
|
||||
float yf = TEXTURESCALE/sy;
|
||||
Texture *t = lookuptexture(wtex);
|
||||
float xf = TEXTURESCALE/t->xs;
|
||||
float yf = TEXTURESCALE/t->ys;
|
||||
float xs = size*xf;
|
||||
float ys = size*yf;
|
||||
float xo = xf*x;
|
||||
@@ -276,19 +272,17 @@ void render_2tris(sqr *h, sqr *s, int x1, int y1, int x2, int y2, int x3, int y3
|
||||
{
|
||||
stripend();
|
||||
|
||||
int sx, sy;
|
||||
lookuptexture(h->ftex, sx, sy);
|
||||
float xf = TEXTURESCALE/sx;
|
||||
float yf = TEXTURESCALE/sy;
|
||||
|
||||
Texture *t = lookuptexture(h->ftex);
|
||||
float xf = TEXTURESCALE/t->xs;
|
||||
float yf = TEXTURESCALE/t->ys;
|
||||
vert(x1, y1, h->floor, l1, xf*x1, yf*y1);
|
||||
vert(x2, y2, h->floor, l2, xf*x2, yf*y2);
|
||||
vert(x3, y3, h->floor, l3, xf*x3, yf*y3);
|
||||
addstrip(mergestrips ? GL_TRIANGLES : GL_TRIANGLE_STRIP, h->ftex, verts.length()-3, 3);
|
||||
|
||||
lookuptexture(h->ctex, sx, sy);
|
||||
xf = TEXTURESCALE/sx;
|
||||
yf = TEXTURESCALE/sy;
|
||||
t = lookuptexture(h->ctex);
|
||||
xf = TEXTURESCALE/t->xs;
|
||||
yf = TEXTURESCALE/t->ys;
|
||||
|
||||
vert(x3, y3, h->ceil, l3, xf*x3, yf*y3);
|
||||
vert(x2, y2, h->ceil, l2, xf*x2, yf*y2);
|
||||
@@ -317,10 +311,9 @@ void render_square(int wtex, float floor1, float floor2, float ceil1, float ceil
|
||||
stripend();
|
||||
if(showm) { l1 = &sbright; l2 = &sdark; }
|
||||
|
||||
int sx, sy;
|
||||
lookuptexture(wtex, sx, sy);
|
||||
float xf = TEXTURESCALE/sx;
|
||||
float yf = TEXTURESCALE/sy;
|
||||
Texture *t = lookuptexture(wtex);
|
||||
float xf = TEXTURESCALE/t->xs;
|
||||
float yf = TEXTURESCALE/t->ys;
|
||||
float xs = size*xf;
|
||||
float xo = xf*(x1==x2 ? min(y1,y2) : min(x1,x2));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user