Reorganize land texteure function in prepare to texture split
authorunc0rr
Wed, 18 Feb 2009 16:28:21 +0000
changeset 1805 dd9fb4b13fd8
parent 1804 4e78ad846fb6
child 1806 3c4f0886c123
Reorganize land texteure function in prepare to texture split
hedgewars/uLand.pas
hedgewars/uStore.pas
hedgewars/uWorld.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
 
--- 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)
--- 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