Browse Source

Update demo09.lpr

Seenkao 2 years ago
parent
commit
9356bd1099
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Zengl_SRC/demos/Lazarus/09 - Sprite Engine(Classes)/demo09.lpr

+ 6 - 1
Zengl_SRC/demos/Lazarus/09 - Sprite Engine(Classes)/demo09.lpr

@@ -175,12 +175,14 @@ begin
 
     if time <= 255 Then
     begin
-      i := Get_Color(correctColor[1]);
       pr2d_Rect(0, 0, 800, 600,{$IfDef OLD_METHODS} $7FAF7F, 255,{$Else}correctColor[1],{$EndIf} PR2D_FILL);
+      {$IfNDef OLD_METHODS}
+      i := Get_Color(correctColor[1]);
       dec(i);
       if i < $7FAF7F00 then
         i := $7FAF7F00;
       Correct_Color(correctColor[1], i);
+      {$EndIf}
       ssprite2d_Draw(texLogo, 400 - 256, 300 - 128, 512, 256, 0, time)
     end
     else
@@ -188,10 +190,13 @@ begin
       begin
         i := Get_Color(correctColor[0]);
         pr2d_Rect( 0, 0, 800, 600,{$IfDef OLD_METHODS} $AFAFAF, 510 - time,{$Else}correctColor[0],{$EndIf} PR2D_FILL );
+        {$IfNDef OLD_METHODS}
+        i := Get_Color(correctColor[0]);
         dec(i);
         if i < $AFAFAF00 then
           i := $AFAFAF00;
         Correct_Color(correctColor[0], i);
+        {$EndIf}
         ssprite2d_Draw( texLogo, 400 - 256, 300 - 128, 512, 256, 0, 510 - time );
       end;