stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src clone/unit_draw.c video/cursor.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src clone/unit_draw.c video/cursor.c
Date: Tue, 21 Oct 2003 17:33:53 -0400

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/10/21 17:33:53

Modified files:
        src/clone      : unit_draw.c 
        src/video      : cursor.c 

Log message:
        Changed default building cursor and shadow frame to first still 
animation

Patches:
Index: stratagus/src/clone/unit_draw.c
diff -u stratagus/src/clone/unit_draw.c:1.168 
stratagus/src/clone/unit_draw.c:1.169
--- stratagus/src/clone/unit_draw.c:1.168       Tue Oct 21 00:27:57 2003
+++ stratagus/src/clone/unit_draw.c     Tue Oct 21 17:33:52 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: unit_draw.c,v 1.168 2003/10/21 04:27:57 jsalmon3 Exp $
+//     $Id: unit_draw.c,v 1.169 2003/10/21 21:33:52 jsalmon3 Exp $
 
 //@{
 
@@ -577,7 +577,7 @@
 global void SaveDecorations(CLFile* file)
 {
     CLprintf(file, "\n;;; -----------------------------------------\n");
-    CLprintf(file, ";;; MODULE: decorations $Id: unit_draw.c,v 1.168 
2003/10/21 04:27:57 jsalmon3 Exp $\n\n");
+    CLprintf(file, ";;; MODULE: decorations $Id: unit_draw.c,v 1.169 
2003/10/21 21:33:52 jsalmon3 Exp $\n\n");
 
     CLprintf(file, "(mana-sprite \"%s\"  %d %d  %d %d)\n",
        ManaSprite.File, ManaSprite.HotX, ManaSprite.HotY,
@@ -1166,11 +1166,10 @@
                }
            } else {
                // FIXME: correct frame?  taken from DrawBuildingCursor
-               if (VideoGraphicFrames(type->Sprite) > 5) {
-                   VideoDrawShadowClip(type->ShadowSprite, 4, x, y);
-               } else {
-                   VideoDrawShadowClip(type->ShadowSprite, 0, x, y);
-               }
+               VideoDrawShadowClip(type->ShadowSprite,
+                   CursorBuilding->Animations->Still[0].Frame +
+                       (CursorBuilding->Building ? 0 : 
CursorBuilding->NumDirections / 2 + 1 - 1),
+                   x, y);
            }
        }
        return;
@@ -1196,11 +1195,10 @@
            }
        } else {
            // FIXME: correct frame?  taken from DrawBuildingCursor
-           if (VideoGraphicFrames(type->Sprite) > 5) {
-               VideoDrawShadowClip(type->ShadowSprite, 4, x, y);
-           } else {
-               VideoDrawShadowClip(type->ShadowSprite, 0, x, y);
-           }
+           VideoDrawShadowClip(type->ShadowSprite,
+               CursorBuilding->Animations->Still[0].Frame +
+                   (CursorBuilding->Building ? 0 : 
CursorBuilding->NumDirections / 2 + 1 - 1),
+               x, y);
        }
        return;
     }
Index: stratagus/src/video/cursor.c
diff -u stratagus/src/video/cursor.c:1.72 stratagus/src/video/cursor.c:1.73
--- stratagus/src/video/cursor.c:1.72   Tue Oct 21 00:27:58 2003
+++ stratagus/src/video/cursor.c        Tue Oct 21 17:33:53 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: cursor.c,v 1.72 2003/10/21 04:27:58 jsalmon3 Exp $
+//     $Id: cursor.c,v 1.73 2003/10/21 21:33:53 jsalmon3 Exp $
 
 //@{
 
@@ -724,11 +724,10 @@
     SetClipping(vp->X, vp->Y, vp->EndX, vp->EndY);
     DrawShadow(NULL, CursorBuilding, x, y);
     GraphicPlayerPixels(ThisPlayer, CursorBuilding->Sprite);
-    if (VideoGraphicFrames(CursorBuilding->Sprite) > 5) {
-       DrawUnitType(CursorBuilding, 4, x, y);
-    } else {
-       DrawUnitType(CursorBuilding, 0, x, y);
-    }
+    DrawUnitType(CursorBuilding,
+       CursorBuilding->Animations->Still[0].Frame +
+           (CursorBuilding->Building ? 0 : CursorBuilding->NumDirections / 2 + 
1 - 1),
+       x, y);
     PopClipping();
 
     //
@@ -1122,7 +1121,7 @@
     int i;
 
     CLprintf(file, "\n;;; -----------------------------------------\n");
-    CLprintf(file, ";;; MODULE: cursors $Id: cursor.c,v 1.72 2003/10/21 
04:27:58 jsalmon3 Exp $\n\n");
+    CLprintf(file, ";;; MODULE: cursors $Id: cursor.c,v 1.73 2003/10/21 
21:33:53 jsalmon3 Exp $\n\n");
 
     for (i = 0; Cursors[i].OType; ++i) {
        CLprintf(file, "(define-cursor '%s '%s\n",




reply via email to

[Prev in Thread] Current Thread [Next in Thread]