~ubuntu-branches/ubuntu/trusty/hedgewars/trusty-proposed

« back to all changes in this revision

Viewing changes to hedgewars/uRender.pas

  • Committer: Package Import Robot
  • Author(s): Dmitry E. Oboukhov
  • Date: 2011-11-20 18:31:17 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20111120183117-pjhz1n2pvnmxa246
Tags: 0.9.17-1
* [Paul Wise]
 * Mention the homing bee in the package description (Closes: #577092)
 * Also install the hwengine desktop file (LP: #811770)
 * Depend on ttf-dejavu-core since it is smaller
 * Depend on ttf-wqy-zenhei instead of embedding a copy of it
* [Dmitry E. Oboukhov]
 * New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
procedure Tint(r, g, b, a: Byte); inline;
46
46
procedure Tint(c: Longword); inline;
47
47
 
48
 
var
49
 
    HHTexture: PTexture;
50
48
 
51
49
implementation
52
50
uses uVariables;
147
145
 
148
146
glPushMatrix;
149
147
glTranslatef(X, Y, 0);
 
148
if Dir = 0 then Dir:= 1;
150
149
 
151
 
if Dir < 0 then
152
 
   glRotatef(Angle, 0, 0, -1)
153
 
else
154
 
   glRotatef(Angle, 0, 0,  1);
 
150
glRotatef(Angle, 0, 0, Dir);
155
151
 
156
152
glTranslatef(Dir*OffsetX, OffsetY, 0);
157
153
glScalef(Scale, Scale, 1);
159
155
// Any reason for this call? And why only in t direction, not s?
160
156
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
161
157
 
162
 
if Dir < 0 then
163
 
    hw:= w div -2
164
 
else
165
 
    hw:= w div 2;
 
158
hw:= w div (2 div Dir);
166
159
 
167
160
nx:= round(Texture^.w / w); // number of horizontal frames
168
161
ny:= round(Texture^.h / h); // number of vertical frames