summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-06 20:53:31 +0000
committertron <tron@openttd.org>2005-02-06 20:53:31 +0000
commit6984d6cd31d3ceb270a7caa75c4ed757788eb50b (patch)
tree4d728c3b9f36fe992992338e2532a9f937559204 /misc.c
parentf1610872de835e4aafe222e73ca0858e2c7d9354 (diff)
downloadopenttd-6984d6cd31d3ceb270a7caa75c4ed757788eb50b.tar.xz
(svn r1832) Next byte -> char iteration: custom names
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/misc.c b/misc.c
index c01122833..df9436549 100644
--- a/misc.c
+++ b/misc.c
@@ -15,7 +15,7 @@
extern void StartupEconomy(void);
extern void InitNewsItemStructs(void);
-byte _name_array[512][32];
+char _name_array[512][32];
static inline uint32 ROR(uint32 x, int n)
{
@@ -306,9 +306,9 @@ void DeleteName(StringID id)
}
}
-byte *GetName(int id, byte *buff)
+char *GetName(int id, char *buff)
{
- byte *b;
+ const char *b;
if (id & 0x600) {
if (id & 0x200) {
@@ -341,11 +341,11 @@ static void InitializeNameMgr(void)
memset(_name_array, 0, sizeof(_name_array));
}
-StringID RealAllocateName(const byte *name, byte skip, bool check_double)
+StringID RealAllocateName(const char *name, byte skip, bool check_double)
{
int free_item = -1;
- const byte *names;
- byte *dst;
+ const char *names;
+ char *dst;
int i;
names = &_name_array[0][0];
@@ -744,7 +744,7 @@ void bubblesort(void *base, size_t nmemb, size_t size, int(*compar)(const void *
static void Save_NAME(void)
{
int i;
- byte *b = _name_array[0];
+ char *b = _name_array[0];
for(i=0; i!=lengthof(_name_array); i++,b+=sizeof(_name_array[0])) {
if (*b) {