Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] (PR#2496) acces to sprite hash_table outside tilespec.c
Home

[Freeciv-Dev] (PR#2496) acces to sprite hash_table outside tilespec.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#2496) acces to sprite hash_table outside tilespec.c
From: "Rafa³ Bursig via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 5 Dec 2002 14:56:42 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Patch add acces to sprite hash table outside tilespec. This is used in 
SDLClient to load GUITheme/City Icon from specfiles.

Rafal


----------------------------------------------------------------------
Portal INTERIA.PL zaprasza... >>> http://link.interia.pl/f167c 

diff -u -r fcc/client/tilespec.c fc/client/tilespec.c
--- fcc/client/tilespec.c       Wed Dec  4 16:29:07 2002
+++ fc/client/tilespec.c        Wed Dec  4 19:17:44 2002
@@ -134,6 +134,16 @@
 }
 
 /**********************************************************************
+   Return hash table sprite_hash that maps tilespec tags to tile Sprite 
pointers.
+   This is kept permanently after setup, for doing lookups on ruleset
+   information (including on reconnections etc).
+**********************************************************************/
+struct hash_table * get_sprite_hash(void)
+{
+  return sprite_hash;
+}
+
+/**********************************************************************
   Gets full filename for tilespec file, based on input name.
   Returned data is allocated, and freed by user as required.
   Input name may be null, in which case uses default.
diff -u -r fcc/client/tilespec.h fc/client/tilespec.h
--- fcc/client/tilespec.h       Wed Dec  4 16:29:07 2002
+++ fc/client/tilespec.h        Wed Dec  4 19:18:38 2002
@@ -28,6 +28,7 @@
 struct player;
 
 const char **get_tileset_list(void);
+struct hash_table * get_sprite_hash(void);
 
 void tilespec_read_toplevel(const char *tileset_name);
 void tilespec_load_tiles(void);

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