stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus/src editor/editloop.c include/stratag...


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src editor/editloop.c include/stratag...
Date: 29 Jan 2004 21:20:10 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/29 21:20:10

Modified files:
        src/editor     : editloop.c 
        src/include    : stratagus.h 
        src/unit       : unit_cache.c 

Log message:
        Fix cache bug, I hope. How should I test??

Patches:
Index: stratagus/src/editor/editloop.c
diff -u stratagus/src/editor/editloop.c:1.160 
stratagus/src/editor/editloop.c:1.161
--- stratagus/src/editor/editloop.c:1.160       Thu Jan 29 10:24:03 2004
+++ stratagus/src/editor/editloop.c     Thu Jan 29 21:20:08 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: editloop.c,v 1.160 2004/01/28 23:24:03 nobody_ Exp $
+//      $Id: editloop.c,v 1.161 2004/01/29 10:20:08 nobody_ Exp $
 
 //@{
 
@@ -637,11 +637,11 @@
 
                        VideoDrawRectangleClip(ColorGray, x, y, icon->Width, 
icon->Height);
                        if (i == SelectedUnitIndex) {
-                               VideoDrawRectangle(ColorGreen, x + 1, y + 1,
+                               VideoDrawRectangleClip(ColorGreen, x + 1, y + 1,
                                        icon->Width - 2, icon->Height - 2);
                        }
                        if (i == CursorUnitIndex) {
-                               VideoDrawRectangle(ColorWhite,x - 1, y - 1,
+                               VideoDrawRectangleClip(ColorWhite,x - 1, y - 1,
                                        icon->Width + 2, icon->Height + 2);
                        }
 
Index: stratagus/src/include/stratagus.h
diff -u stratagus/src/include/stratagus.h:1.47 
stratagus/src/include/stratagus.h:1.48
--- stratagus/src/include/stratagus.h:1.47      Tue Jan 27 21:15:23 2004
+++ stratagus/src/include/stratagus.h   Thu Jan 29 21:20:08 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: stratagus.h,v 1.47 2004/01/27 10:15:23 wizzard Exp $
+//      $Id: stratagus.h,v 1.48 2004/01/29 10:20:08 nobody_ Exp $
 
 #ifndef __STRATAGUS_H__
 #define __STRATAGUS_H__
@@ -38,7 +38,7 @@
 ============================================================================*/
 
 // New unit cache
-//#define NEW_UNIT_CACHE
+#define NEW_UNIT_CACHE
 
 // New Lua scripting.
 //#define META_LUA
Index: stratagus/src/unit/unit_cache.c
diff -u stratagus/src/unit/unit_cache.c:1.46 
stratagus/src/unit/unit_cache.c:1.47
--- stratagus/src/unit/unit_cache.c:1.46        Sat Jan 24 13:42:27 2004
+++ stratagus/src/unit/unit_cache.c     Thu Jan 29 21:20:09 2004
@@ -30,7 +30,7 @@
 //         Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //         02111-1307, USA.
 //
-//             $Id: unit_cache.c,v 1.46 2004/01/24 02:42:27 jsalmon3 Exp $
+//             $Id: unit_cache.c,v 1.47 2004/01/29 10:20:09 nobody_ Exp $
 
 //@{
 
@@ -284,10 +284,11 @@
                        } else {
                                if (mf->UnitCache != listitem) {
                                        DebugLevel0Fn("Try to remove unit not 
in cache. (%d)\n" _C_ unit->Slot);
+                               } else {
+                                       // item is head of the list.
+                                       mf->UnitCache = listitem->Next;
+                                       DebugCheck(mf->UnitCache && 
mf->UnitCache->Prev);
                                }
-                               // item is head of the list.
-                               mf->UnitCache = listitem->Next;
-                               DebugCheck(mf->UnitCache && 
mf->UnitCache->Prev);
                        }
 
                        listitem->Next = listitem->Prev = 0;




reply via email to

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