strings.h
author Darkvater
Sun, 18 Sep 2005 20:56:44 +0000
changeset 2436 7d5df545bd5d
parent 2291 c142846954ee
child 4386 8a51b76f79e7
permissions -rw-r--r--
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2087
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2087
diff changeset
     2
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
     3
#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
     4
#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
     5
1553
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     6
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
     7
{
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     8
	*buf++ = '\x81';
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
     9
	*buf++ = string & 0xFF;
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
    10
	*buf++ = string >> 8;
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
    11
	return buf;
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
    12
}
cf513e731bd3 (svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
tron
parents: 1312
diff changeset
    13
1312
594340ca5b87 (svn r1816) Use char instead of byte for string formatting
tron
parents: 1309
diff changeset
    14
char *GetString(char *buffr, uint16 string);
2087
a03690e33b66 (svn r2597) Feature: [string system] Support cases.
ludde
parents: 2063
diff changeset
    15
char *GetStringWithArgs(char *buffr, uint string, const int32 *argv);
2063
ae866a12f2df (svn r2572) - Codechange: [string] Changed string system so it's not as dependent on decode_parameters
ludde
parents: 2056
diff changeset
    16
2202
c1ad4a86798b (svn r2718) Forgot one file
tron
parents: 2186
diff changeset
    17
extern char _userstring[128];
c1ad4a86798b (svn r2718) Forgot one file
tron
parents: 2186
diff changeset
    18
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
    19
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
    20
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
    21
2436
7d5df545bd5d (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents: 2291
diff changeset
    22
#endif /* STRINGS_H */