strings.h
author ludde
Fri, 15 Jul 2005 18:30:13 +0000
changeset 2070 47b1f29d4671
parent 2063 ae866a12f2df
child 2087 a03690e33b66
permissions -rw-r--r--
(svn r2580) Change: Added {INDUSTRY} command for printing industry names instead of the old {TOWN} {STRING} way.
- The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT.
Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
1309
4403a69da4f8 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
tron
parents:
diff changeset
     1
#ifndef STRINGS_H
4403a69da4f8 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
tron
parents:
diff changeset
     2
#define STRINGS_H
4403a69da4f8 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
tron
parents:
diff changeset
     3
1553
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     4
static inline char* InlineString(char* buf, uint16 string)
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     5
{
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     6
	*buf++ = '\x81';
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     7
	*buf++ = string & 0xFF;
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     8
	*buf++ = string >> 8;
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     9
	return buf;
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
    10
}
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
    11
1312
594340ca5b87 (svn r1816) Use char instead of byte for string formatting
tron
parents: 1309
diff changeset
    12
char *GetString(char *buffr, uint16 string);
2063
ae866a12f2df (svn r2572) - Codechange: [string] Changed string system so it's not as dependent on decode_parameters
ludde
parents: 2056
diff changeset
    13
char *GetStringWithArgs(char *buffr, uint16 string, const int32 *argv);
ae866a12f2df (svn r2572) - Codechange: [string] Changed string system so it's not as dependent on decode_parameters
ludde
parents: 2056
diff changeset
    14
1309
4403a69da4f8 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
tron
parents:
diff changeset
    15
void InjectDParam(int amount);
4403a69da4f8 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
tron
parents:
diff changeset
    16
int32 GetParamInt32(void);
4403a69da4f8 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
tron
parents:
diff changeset
    17
uint GetCurrentCurrencyRate(void);
4403a69da4f8 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
tron
parents:
diff changeset
    18
4403a69da4f8 (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
tron
parents:
diff changeset
    19
#endif