# HG changeset patch # User unc0rr # Date 1234974501 0 # Node ID dd9fb4b13fd808c443053919f06f3d8018446fac # Parent 4e78ad846fb6a118b33474e4445051142084f58d Reorganize land texteure function in prepare to texture split diff -r 4e78ad846fb6 -r dd9fb4b13fd8 hedgewars/uLand.pas --- a/hedgewars/uLand.pas Wed Feb 18 15:04:40 2009 +0000 +++ b/hedgewars/uLand.pas Wed Feb 18 16:28:21 2009 +0000 @@ -38,7 +38,7 @@ function GenPreview: TPreview; procedure CheckLandDigest(s: shortstring); procedure UpdateLandTexture(Y, Height: LongInt); -procedure RealLandTexUpdate; +procedure DrawLand (X, Y: LongInt); implementation uses uConsole, uStore, uMisc, uRandom, uTeams, uLandObjects, uSHA, uIO, uAmmos; @@ -817,6 +817,11 @@ updBottomY:= 0 end; +procedure DrawLand(X, Y: LongInt); +begin +RealLandTexUpdate; +DrawTexture(X, Y, LandTexture) +end; initialization diff -r 4e78ad846fb6 -r dd9fb4b13fd8 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Wed Feb 18 15:04:40 2009 +0000 +++ b/hedgewars/uStore.pas Wed Feb 18 16:28:21 2009 +0000 @@ -28,7 +28,6 @@ procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt); procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt); procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture); -procedure DrawLand (X, Y: LongInt); procedure DrawTexture(X, Y: LongInt; Texture: PTexture); procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, Frames: LongInt); procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real); @@ -492,11 +491,6 @@ DrawFromRect(X, Y, @r, Source) end; -procedure DrawLand(X, Y: LongInt); -begin -DrawTexture(X, Y, LandTexture) -end; - procedure DrawCentered(X, Top: LongInt; Source: PTexture); begin DrawTexture(X - Source^.w div 2, Top, Source) diff -r 4e78ad846fb6 -r dd9fb4b13fd8 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Wed Feb 18 15:04:40 2009 +0000 +++ b/hedgewars/uWorld.pas Wed Feb 18 16:28:21 2009 +0000 @@ -191,8 +191,6 @@ //glPushMatrix; //glScalef(1.0, 1.0, 1.0); -RealLandTexUpdate; - if not isPaused then MoveCamera; // background