(svn r6837) - Codechange: More const SpriteGroups missed in r6836
authorpeter1138
Thu, 19 Oct 2006 10:40:21 +0000
changeset 4893 000692659d8c
parent 4892 cafd96f10c1e
child 4894 b9322e55f0e1
(svn r6837) - Codechange: More const SpriteGroups missed in r6836
newgrf.c
newgrf_station.h
--- a/newgrf.c	Thu Oct 19 10:20:36 2006 +0000
+++ b/newgrf.c	Thu Oct 19 10:40:21 2006 +0000
@@ -1395,7 +1395,7 @@
  * @param value The value that was used to represent this callback result
  * @return A spritegroup representing that callback result
  */
-static SpriteGroup* NewCallBackResultSpriteGroup(uint16 value)
+static const SpriteGroup* NewCallBackResultSpriteGroup(uint16 value)
 {
 	SpriteGroup *group = AllocateSpriteGroup();
 
@@ -1420,7 +1420,7 @@
  * @param sprites The number of sprites per set.
  * @return A spritegroup representing the sprite number result.
  */
-static SpriteGroup* NewResultSpriteGroup(SpriteID sprite, byte num_sprites)
+static const SpriteGroup* NewResultSpriteGroup(SpriteID sprite, byte num_sprites)
 {
 	SpriteGroup *group = AllocateSpriteGroup();
 	group->type = SGT_RESULT;
@@ -1475,7 +1475,7 @@
 
 /* Helper function to either create a callback or link to a previously
  * defined spritegroup. */
-static SpriteGroup* GetGroupFromGroupID(byte setid, byte type, uint16 groupid)
+static const SpriteGroup* GetGroupFromGroupID(byte setid, byte type, uint16 groupid)
 {
 	if (HASBIT(groupid, 15)) return NewCallBackResultSpriteGroup(groupid);
 
@@ -1488,7 +1488,7 @@
 }
 
 /* Helper function to either create a callback or a result sprite group. */
-static SpriteGroup* CreateGroupFromGroupID(byte feature, byte setid, byte type, uint16 spriteid, uint16 num_sprites)
+static const SpriteGroup* CreateGroupFromGroupID(byte feature, byte setid, byte type, uint16 spriteid, uint16 num_sprites)
 {
 	if (HASBIT(spriteid, 15)) return NewCallBackResultSpriteGroup(spriteid);
 
--- a/newgrf_station.h	Thu Oct 19 10:20:36 2006 +0000
+++ b/newgrf_station.h	Thu Oct 19 10:40:21 2006 +0000
@@ -73,7 +73,7 @@
 	 * Used for obtaining the sprite offset of custom sprites, and for
 	 * evaluating callbacks.
 	 */
-	struct SpriteGroup *spritegroup[NUM_GLOBAL_CID];
+	const struct SpriteGroup *spritegroup[NUM_GLOBAL_CID];
 } StationSpec;
 
 /**