hedgewars/uRender.pas
changeset 6318 ca12368acc16
parent 5565 1a326ba319c9
child 6322 b310f0bc8dde
equal deleted inserted replaced
6317:83b93a2d2741 6318:ca12368acc16
   157 glScalef(Scale, Scale, 1);
   157 glScalef(Scale, Scale, 1);
   158 
   158 
   159 // Any reason for this call? And why only in t direction, not s?
   159 // Any reason for this call? And why only in t direction, not s?
   160 //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
   160 //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
   161 
   161 
   162 if Dir < 0 then
   162 hw:= w div Dir;
   163     hw:= w div -2
       
   164 else
       
   165     hw:= w div 2;
       
   166 
   163 
   167 nx:= round(Texture^.w / w); // number of horizontal frames
   164 nx:= round(Texture^.w / w); // number of horizontal frames
   168 ny:= round(Texture^.h / h); // number of vertical frames
   165 ny:= round(Texture^.h / h); // number of vertical frames
   169 
   166 
   170 ft:= (Frame mod ny) * Texture^.ry / ny;
   167 ft:= (Frame mod ny) * Texture^.ry / ny;