src/newgrf.cpp
changeset 6481 85ad87daf4b0
parent 6479 a9d1ad19242b
child 6491 00dc414c909d
equal deleted inserted replaced
6480:277af7b07386 6481:85ad87daf4b0
   134  * addition of file:line information when parsing grf files.
   134  * addition of file:line information when parsing grf files.
   135  * NOTE: for the above reason(s) grfmsg() should ONLY be used for
   135  * NOTE: for the above reason(s) grfmsg() should ONLY be used for
   136  * loading/parsing grf files, not for runtime debug messages as there
   136  * loading/parsing grf files, not for runtime debug messages as there
   137  * is no file information available during that time.
   137  * is no file information available during that time.
   138  * @param severity debugging severity level, see debug.h
   138  * @param severity debugging severity level, see debug.h
   139  * @param debugging message in printf() format */
   139  * @param str message in printf() format */
   140 void CDECL grfmsg(int severity, const char *str, ...)
   140 void CDECL grfmsg(int severity, const char *str, ...)
   141 {
   141 {
   142 	char buf[1024];
   142 	char buf[1024];
   143 	va_list va;
   143 	va_list va;
   144 
   144 
   232 }
   232 }
   233 
   233 
   234 
   234 
   235 /** Used when setting an object's property to map to the GRF's strings
   235 /** Used when setting an object's property to map to the GRF's strings
   236  * while taking in consideration the "drift" between TTDPatch string system and OpenTTD's one
   236  * while taking in consideration the "drift" between TTDPatch string system and OpenTTD's one
       
   237  * @param grfid Id of the grf file
   237  * @param str StringID that we want to have the equivalent in OoenTTD
   238  * @param str StringID that we want to have the equivalent in OoenTTD
   238  * @return the properly adjusted StringID
   239  * @return the properly adjusted StringID
   239  */
   240  */
   240 static StringID MapGRFStringID(uint32 grfid, StringID str)
   241 static StringID MapGRFStringID(uint32 grfid, StringID str)
   241 {
   242 {
  2002 	return group;
  2003 	return group;
  2003 }
  2004 }
  2004 
  2005 
  2005 /**
  2006 /**
  2006  * Creates a spritegroup representing a sprite number result.
  2007  * Creates a spritegroup representing a sprite number result.
  2007  * @param value The sprite number.
  2008  * @param sprite The sprite number.
  2008  * @param sprites The number of sprites per set.
  2009  * @param num_sprites The number of sprites per set.
  2009  * @return A spritegroup representing the sprite number result.
  2010  * @return A spritegroup representing the sprite number result.
  2010  */
  2011  */
  2011 static const SpriteGroup* NewResultSpriteGroup(SpriteID sprite, byte num_sprites)
  2012 static const SpriteGroup* NewResultSpriteGroup(SpriteID sprite, byte num_sprites)
  2012 {
  2013 {
  2013 	SpriteGroup *group = AllocateSpriteGroup();
  2014 	SpriteGroup *group = AllocateSpriteGroup();