stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus/src unit/unittype.c video/png.c


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src unit/unittype.c video/png.c
Date: 31 Jan 2004 21:52:23 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/31 21:52:23

Modified files:
        src/unit       : unittype.c 
        src/video      : png.c 

Log message:
        Reduce memory usage with about 15 megs

Patches:
Index: stratagus/src/unit/unittype.c
diff -u stratagus/src/unit/unittype.c:1.151 stratagus/src/unit/unittype.c:1.152
--- stratagus/src/unit/unittype.c:1.151 Sun Jan 25 17:29:25 2004
+++ stratagus/src/unit/unittype.c       Sat Jan 31 21:52:22 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: unittype.c,v 1.151 2004/01/25 06:29:25 wizzard Exp $
+//      $Id: unittype.c,v 1.152 2004/01/31 10:52:22 nobody_ Exp $
 
 //@{
 
@@ -1187,7 +1187,7 @@
 //     char** sp;
 
        CLprintf(file, "\n--- -----------------------------------------\n");
-       CLprintf(file, "--- MODULE: unittypes $Id: unittype.c,v 1.151 
2004/01/25 06:29:25 wizzard Exp $\n\n");
+       CLprintf(file, "--- MODULE: unittypes $Id: unittype.c,v 1.152 
2004/01/31 10:52:22 nobody_ Exp $\n\n");
 #if 0
        // Original number to internal unit-type name.
 
@@ -1365,6 +1365,11 @@
                        fprintf(stdout, "Unit-type %s not found\n", 
type->SameSprite);
                        ExitFatal(-1);
                }
+               if (!type->Sprite) {
+                       LoadUnitTypeSprite(type);
+               }
+               unittype->Sprite = type->Sprite;
+               return;
        } else {
                type = unittype;
        }
Index: stratagus/src/video/png.c
diff -u stratagus/src/video/png.c:1.32 stratagus/src/video/png.c:1.33
--- stratagus/src/video/png.c:1.32      Fri Jan 16 23:02:28 2004
+++ stratagus/src/video/png.c   Sat Jan 31 21:52:23 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: png.c,v 1.32 2004/01/16 12:02:28 wizzard Exp $
+//      $Id: png.c,v 1.33 2004/01/31 10:52:23 nobody_ Exp $
 
 //@{
 
@@ -199,6 +199,7 @@
                return NULL;
        }
 #ifdef DEBUG
+       DebugLevel3Fn("%10d: %s: %d * %d\n" _C_ w * h _C_ name _C_ w _C_ h);
        AllocatedGraphicMemory += h * w;
 #endif
 




reply via email to

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