stratagus-cvs
[Top][All Lists]
Advanced

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

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


From: Nehal Mistry
Subject: [Stratagus-CVS] stratagus/src/video cursor.c
Date: Thu, 27 Nov 2003 01:39:13 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Nehal Mistry <address@hidden>   03/11/27 01:39:12

Modified files:
        src/video      : cursor.c 

Log message:
        simple DrawBuildingCursor

Patches:
Index: stratagus/src/video/cursor.c
diff -u stratagus/src/video/cursor.c:1.81 stratagus/src/video/cursor.c:1.82
--- stratagus/src/video/cursor.c:1.81   Sun Nov 23 14:11:03 2003
+++ stratagus/src/video/cursor.c        Thu Nov 27 01:39:12 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: cursor.c,v 1.81 2003/11/23 19:11:03 jsalmon3 Exp $
+//     $Id: cursor.c,v 1.82 2003/11/27 06:39:12 nehalmistry Exp $
 
 //@{
 
@@ -814,13 +814,13 @@
 {
     int x;
     int y;
-    int x1;
-    int y1;
     int mx;
     int my;
 #ifdef USE_SDL_SURFACE
     SDL_Color color;
 #else
+    int x1;
+    int y1;
     VMemType color;
 #endif
     int f;
@@ -869,10 +869,12 @@
     while (h--) {
        w = w0;
        while (w--) {
+#ifndef USE_SDL_SURFACE
            int basex;
            int basey;
            int i;
            int j;
+#endif
 
            // FIXME: The field is covered by fog of war!
            if (f && (CursorBuilding->MustBuildOnTop ||
@@ -885,6 +887,11 @@
            } else {
                color = ColorRed;
            }
+#ifdef USE_SDL_SURFACE
+           printf("w = %d\n", w);
+           VideoFillTransRectangle(color, x + w * TileSizeX, y + h * 
+               TileSizeY, TileSizeX, TileSizeY, 95);
+#else
            // FIXME: I could do this faster+better
            /* latimerius: I'm not sure what you have in mind but I can
             * at least move invariants out of the loops. */
@@ -903,6 +910,7 @@
                    break;
                }
            }
+#endif
        }
     }
 }
@@ -1250,7 +1258,7 @@
     int i;
 
     CLprintf(file, "\n;;; -----------------------------------------\n");
-    CLprintf(file, ";;; MODULE: cursors $Id: cursor.c,v 1.81 2003/11/23 
19:11:03 jsalmon3 Exp $\n\n");
+    CLprintf(file, ";;; MODULE: cursors $Id: cursor.c,v 1.82 2003/11/27 
06:39:12 nehalmistry 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]