stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus/src/ui icons.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/ui icons.c
Date: Sat, 01 Nov 2003 16:06:44 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/11/01 16:06:44

Modified files:
        src/ui         : icons.c 

Log message:
        Fixed bug cleaning icons, made IconFileHash larger

Patches:
Index: stratagus/src/ui/icons.c
diff -u stratagus/src/ui/icons.c:1.50 stratagus/src/ui/icons.c:1.51
--- stratagus/src/ui/icons.c:1.50       Mon Oct 27 19:07:23 2003
+++ stratagus/src/ui/icons.c    Sat Nov  1 16:06:43 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: icons.c,v 1.50 2003/10/28 00:07:23 jsalmon3 Exp $
+//     $Id: icons.c,v 1.51 2003/11/01 21:06:43 jsalmon3 Exp $
 
 //@{
 
@@ -70,13 +70,13 @@
 
 #ifdef DOXYGEN                         // no real code, only for document
 
-local IconFile* IconFileHash[31];      /// lookup table for icon file names
+local IconFile* IconFileHash[61];      /// lookup table for icon file names
 
 local Icon* IconHash[61];              /// lookup table for icon names
 
 #else
 
-local hashtable(IconFile*, 31) IconFileHash;/// lookup table for icon file 
names
+local hashtable(IconFile*, 61) IconFileHash;/// lookup table for icon file 
names
 
 local hashtable(Icon*, 61) IconHash;   /// lookup table for icon names
 
@@ -211,7 +211,7 @@
                buf = alloca(strlen(file) + 9 + 1);
                file = strcat(strcpy(buf, "graphics/"), file);
                ShowLoadProgress("Icons %s", file);
-               icon->File->Sprite = LoadSprite(file,IconWidth,IconHeight);
+               icon->File->Sprite = LoadSprite(file, IconWidth, IconHeight);
 #ifdef USE_OPENGL
                MakeTexture(icon->File->Sprite, icon->File->Sprite->Width,
                    icon->File->Sprite->Height);
@@ -252,7 +252,7 @@
     //  Icons
     //
     if (Icons) {
-       table = alloca(NumIcons);
+       table = alloca(NumIcons * sizeof(IconFile*));
        n = 0;
        for (i = 0; i < NumIcons; ++i) {
            char* str;
@@ -429,7 +429,7 @@
     int i;
 
     CLprintf(file, "\n;;; -----------------------------------------\n");
-    CLprintf(file, ";;; MODULE: icons $Id: icons.c,v 1.50 2003/10/28 00:07:23 
jsalmon3 Exp $\n\n");
+    CLprintf(file, ";;; MODULE: icons $Id: icons.c,v 1.51 2003/11/01 21:06:43 
jsalmon3 Exp $\n\n");
 
     //
     //  Mapping the original icon numbers in puds to our internal strings




reply via email to

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