1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 16:39:09 +00:00

(svn r16946) -Doc: Adding docs for some string parameter manipulation functions.

This commit is contained in:
alberth
2009-07-25 07:49:49 +00:00
parent 63f2da7492
commit 59c48fee8b
2 changed files with 41 additions and 2 deletions

View File

@@ -35,8 +35,8 @@
#include "table/strings.h"
#include "table/control_codes.h"
DynamicLanguages _dynlang;
uint64 _decode_parameters[20];
DynamicLanguages _dynlang; ///< Language information of the program.
uint64 _decode_parameters[20]; ///< Global array of string parameters. To access, use #SetDParam.
static char *StationGetSpecialString(char *buff, int x, const char *last);
static char *GetSpecialTownNameString(char *buff, int ind, uint32 seed, const char *last);
@@ -171,6 +171,10 @@ void SetDParamStr(uint n, const char *str)
SetDParam(n, (uint64)(size_t)str);
}
/**
* Shift the string parameters in the global string parameter array by \a amount positions, making room at the beginning.
* @param amount Number of positions to shift.
*/
void InjectDParam(uint amount)
{
assert((uint)amount < lengthof(_decode_parameters));