X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Frenders%2Fopengl%2Fr_draw.pas;h=e836b30d1190e7923f536587de66c616106fd3e0;hb=0a015427343163d4b6e7939c9a07f34d386f7a88;hp=212043e93e25f730476450fa3e274ec26f392b1d;hpb=5915de9864c6054538d5b85aceb7db8c75132cea;p=d2df-sdl.git diff --git a/src/game/renders/opengl/r_draw.pas b/src/game/renders/opengl/r_draw.pas index 212043e..e836b30 100644 --- a/src/game/renders/opengl/r_draw.pas +++ b/src/game/renders/opengl/r_draw.pas @@ -24,9 +24,10 @@ interface procedure r_Draw_Texture (img: TGLTexture; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; blend: Boolean); procedure r_Draw_TextureRepeat (img: TGLTexture; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; blend: Boolean); + procedure r_Draw_TextureRepeatRotate (img: TGLTexture; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; blend: Boolean; rx, ry, angle: Integer); procedure r_Draw_MultiTextureRepeat (m: TGLMultiTexture; const anim: TAnimState; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; blend: Boolean); - procedure r_Draw_MultiTextureRepeatRotate (m: TGLMultiTexture; const anim: TAnimState; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; rx, ry, angle: Integer; blend: Boolean); + procedure r_Draw_MultiTextureRepeatRotate (m: TGLMultiTexture; const anim: TAnimState; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; blend: Boolean; rx, ry, angle: Integer); procedure r_Draw_Filter (l, t, r, b: Integer; rr, gg, bb, aa: Byte); @@ -148,6 +149,23 @@ implementation r_Draw_Texture(img, x + i * img.width, y + j * img.height, img.width, img.height, flip, r, g, b, a, blend); end; + procedure r_Draw_TextureRepeatRotate (img: TGLTexture; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; blend: Boolean; rx, ry, angle: Integer); + begin + ASSERT(w >= 0); + ASSERT(h >= 0); + if a <> 0 then + begin + glPushMatrix; + glTranslatef(x + rx, y + ry, 0); + glRotatef(angle, 0, 0, 1); + glTranslatef(-(x + rx), -(y + ry), 0); + r_Draw_TextureRepeat(img, x, y, w, h, flip, r, g, b, a, blend); + glPopMatrix; + end + else + r_Draw_TextureRepeat(img, x, y, w, h, flip, r, g, b, a, blend); + end; + procedure r_Draw_MultiTextureRepeat (m: TGLMultiTexture; const anim: TAnimState; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; blend: Boolean); var img: TGLTexture; cur, total, i: Integer; begin @@ -169,8 +187,7 @@ implementation end end; - procedure r_Draw_MultiTextureRepeatRotate (m: TGLMultiTexture; const anim: TAnimState; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; rx, ry, angle: Integer; blend: Boolean); - var i, j: Integer; + procedure r_Draw_MultiTextureRepeatRotate (m: TGLMultiTexture; const anim: TAnimState; x, y, w, h: Integer; flip: Boolean; r, g, b, a: Byte; blend: Boolean; rx, ry, angle: Integer); begin ASSERT(w >= 0); ASSERT(h >= 0);